All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] iucv: properly clone LSM attributes to newly created child sockets
@ 2016-06-09 12:59 Paul Moore
  2016-06-09 13:01 ` Paul Moore
  0 siblings, 1 reply; 6+ messages in thread
From: Paul Moore @ 2016-06-09 12:59 UTC (permalink / raw)
  To: linux-s390; +Cc: netdev, linux-security-module, selinux

From: Paul Moore <paul@paul-moore.com>

Much like we had to do for AF_BLUETOOTH and AF_ALG, make sure we
properly clone the parent socket's LSM attributes to newly created
child sockets.

Signed-off-by: Paul Moore <paul@paul-moore.com>
---
 net/iucv/af_iucv.c |    5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/net/iucv/af_iucv.c b/net/iucv/af_iucv.c
index fc3598a..a0d1e36 100644
--- a/net/iucv/af_iucv.c
+++ b/net/iucv/af_iucv.c
@@ -22,6 +22,7 @@
 #include <linux/skbuff.h>
 #include <linux/init.h>
 #include <linux/poll.h>
+#include <linux/security.h>
 #include <net/sock.h>
 #include <asm/ebcdic.h>
 #include <asm/cpcmd.h>
@@ -530,8 +531,10 @@ static void iucv_sock_close(struct sock *sk)
 
 static void iucv_sock_init(struct sock *sk, struct sock *parent)
 {
-	if (parent)
+	if (parent) {
 		sk->sk_type = parent->sk_type;
+		security_sk_clone(parent, sk);
+	}
 }
 
 static struct sock *iucv_sock_alloc(struct socket *sock, int proto, gfp_t prio, int kern)

^ permalink raw reply related	[flat|nested] 6+ messages in thread

* Re: [PATCH] iucv: properly clone LSM attributes to newly created child sockets
  2016-06-09 12:59 [PATCH] iucv: properly clone LSM attributes to newly created child sockets Paul Moore
@ 2016-06-09 13:01 ` Paul Moore
  2016-06-09 19:01   ` David Miller
  0 siblings, 1 reply; 6+ messages in thread
From: Paul Moore @ 2016-06-09 13:01 UTC (permalink / raw)
  To: linux-s390, netdev; +Cc: linux-security-module, selinux

On Thu, Jun 9, 2016 at 8:59 AM, Paul Moore <pmoore@redhat.com> wrote:
> From: Paul Moore <paul@paul-moore.com>
>
> Much like we had to do for AF_BLUETOOTH and AF_ALG, make sure we
> properly clone the parent socket's LSM attributes to newly created
> child sockets.
>
> Signed-off-by: Paul Moore <paul@paul-moore.com>
> ---
>  net/iucv/af_iucv.c |    5 ++++-
>  1 file changed, 4 insertions(+), 1 deletion(-)

Another small, and obvious, fix so I'm going to merge it into
selinux#next now, but if anyone has an objection please let me know.

> diff --git a/net/iucv/af_iucv.c b/net/iucv/af_iucv.c
> index fc3598a..a0d1e36 100644
> --- a/net/iucv/af_iucv.c
> +++ b/net/iucv/af_iucv.c
> @@ -22,6 +22,7 @@
>  #include <linux/skbuff.h>
>  #include <linux/init.h>
>  #include <linux/poll.h>
> +#include <linux/security.h>
>  #include <net/sock.h>
>  #include <asm/ebcdic.h>
>  #include <asm/cpcmd.h>
> @@ -530,8 +531,10 @@ static void iucv_sock_close(struct sock *sk)
>
>  static void iucv_sock_init(struct sock *sk, struct sock *parent)
>  {
> -       if (parent)
> +       if (parent) {
>                 sk->sk_type = parent->sk_type;
> +               security_sk_clone(parent, sk);
> +       }
>  }
>
>  static struct sock *iucv_sock_alloc(struct socket *sock, int proto, gfp_t prio, int kern)
>

-- 
paul moore
security @ redhat

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH] iucv: properly clone LSM attributes to newly created child sockets
  2016-06-09 13:01 ` Paul Moore
@ 2016-06-09 19:01   ` David Miller
  0 siblings, 0 replies; 6+ messages in thread
From: David Miller @ 2016-06-09 19:01 UTC (permalink / raw)
  To: pmoore; +Cc: linux-s390, netdev, linux-security-module, selinux

From: Paul Moore <pmoore@redhat.com>
Date: Thu, 9 Jun 2016 09:01:52 -0400

> On Thu, Jun 9, 2016 at 8:59 AM, Paul Moore <pmoore@redhat.com> wrote:
>> From: Paul Moore <paul@paul-moore.com>
>>
>> Much like we had to do for AF_BLUETOOTH and AF_ALG, make sure we
>> properly clone the parent socket's LSM attributes to newly created
>> child sockets.
>>
>> Signed-off-by: Paul Moore <paul@paul-moore.com>
>> ---
>>  net/iucv/af_iucv.c |    5 ++++-
>>  1 file changed, 4 insertions(+), 1 deletion(-)
> 
> Another small, and obvious, fix so I'm going to merge it into
> selinux#next now, but if anyone has an objection please let me know.

This is fine.

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH] iucv: properly clone LSM attributes to newly created child sockets
  2016-06-13 12:38   ` Paul Moore
@ 2016-06-13 14:38     ` Ursula Braun
  0 siblings, 0 replies; 6+ messages in thread
From: Ursula Braun @ 2016-06-13 14:38 UTC (permalink / raw)
  To: Paul Moore; +Cc: Paul Moore, linux-s390, netdev, linux-security-module, selinux

On Mon, 2016-06-13 at 08:38 -0400, Paul Moore wrote:
> On Mon, Jun 13, 2016 at 6:08 AM, Ursula Braun <ubraun@linux.vnet.ibm.com> wrote:
> >> From: Paul Moore <paul@paul-moore.com>
> >>
> >> Much like we had to do for AF_BLUETOOTH and AF_ALG, make sure we
> >> properly clone the parent socket's LSM attributes to newly created
> >> child sockets.
> >>
> >> Signed-off-by: Paul Moore <paul@paul-moore.com>
> >> ---
> >> net/iucv/af_iucv.c |    5 ++++-
> >> 1 file changed, 4 insertions(+), 1 deletion(-)
> >>
> >> diff --git a/net/iucv/af_iucv.c b/net/iucv/af_iucv.c
> >> index fc3598a..a0d1e36 100644
> >> --- a/net/iucv/af_iucv.c
> >> +++ b/net/iucv/af_iucv.c
> >> @@ -22,6 +22,7 @@
> >> #include <linux/skbuff.h>
> >> #include <linux/init.h>
> >> #include <linux/poll.h>
> >> +#include <linux/security.h>
> >> #include <net/sock.h>
> >> #include <asm/ebcdic.h>
> >> #include <asm/cpcmd.h>
> >> @@ -530,8 +531,10 @@ static void iucv_sock_close(struct sock *sk)
> >>
> >> static void iucv_sock_init(struct sock *sk, struct sock *parent)
> >> {
> >> -                 if (parent)
> >> +                 if (parent) {
> >>                                   sk->sk_type = parent->sk_type;
> >> +                                  security_sk_clone(parent, sk);
> >> +                 }
> >> }
> >>
> >> static struct sock *iucv_sock_alloc(struct socket *sock, int proto,
> >> gfp_t prio, int kern)
> >
> > applied locally - thx. Your patch will now be submitted for inclusion
> > into net-next.
> 
> Hi Ursula,
> 
> For what it's worth, I applied to the selinux#next branch last week,
> it should be in the linux-next builds.
> 
> * git://git.infradead.org/users/pcmoore/selinux
> * http://git.infradead.org/users/pcmoore/selinux
> 

ok, in this case I will not submit your patch myself.

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH] iucv: properly clone LSM attributes to newly created child sockets
  2016-06-13 10:08 ` Ursula Braun
@ 2016-06-13 12:38   ` Paul Moore
  2016-06-13 14:38     ` Ursula Braun
  0 siblings, 1 reply; 6+ messages in thread
From: Paul Moore @ 2016-06-13 12:38 UTC (permalink / raw)
  To: Ursula Braun
  Cc: Paul Moore, linux-s390, netdev, linux-security-module, selinux

On Mon, Jun 13, 2016 at 6:08 AM, Ursula Braun <ubraun@linux.vnet.ibm.com> wrote:
>> From: Paul Moore <paul@paul-moore.com>
>>
>> Much like we had to do for AF_BLUETOOTH and AF_ALG, make sure we
>> properly clone the parent socket's LSM attributes to newly created
>> child sockets.
>>
>> Signed-off-by: Paul Moore <paul@paul-moore.com>
>> ---
>> net/iucv/af_iucv.c |    5 ++++-
>> 1 file changed, 4 insertions(+), 1 deletion(-)
>>
>> diff --git a/net/iucv/af_iucv.c b/net/iucv/af_iucv.c
>> index fc3598a..a0d1e36 100644
>> --- a/net/iucv/af_iucv.c
>> +++ b/net/iucv/af_iucv.c
>> @@ -22,6 +22,7 @@
>> #include <linux/skbuff.h>
>> #include <linux/init.h>
>> #include <linux/poll.h>
>> +#include <linux/security.h>
>> #include <net/sock.h>
>> #include <asm/ebcdic.h>
>> #include <asm/cpcmd.h>
>> @@ -530,8 +531,10 @@ static void iucv_sock_close(struct sock *sk)
>>
>> static void iucv_sock_init(struct sock *sk, struct sock *parent)
>> {
>> -                 if (parent)
>> +                 if (parent) {
>>                                   sk->sk_type = parent->sk_type;
>> +                                  security_sk_clone(parent, sk);
>> +                 }
>> }
>>
>> static struct sock *iucv_sock_alloc(struct socket *sock, int proto,
>> gfp_t prio, int kern)
>
> applied locally - thx. Your patch will now be submitted for inclusion
> into net-next.

Hi Ursula,

For what it's worth, I applied to the selinux#next branch last week,
it should be in the linux-next builds.

* git://git.infradead.org/users/pcmoore/selinux
* http://git.infradead.org/users/pcmoore/selinux

-- 
paul moore
www.paul-moore.com

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH] iucv: properly clone LSM attributes to newly created child sockets
       [not found] <OFBFC201CF.D9C45214-ONC1257FCD.0059BB30-C1257FCD.0059C94A@notes.na.collabserv.com>
@ 2016-06-13 10:08 ` Ursula Braun
  2016-06-13 12:38   ` Paul Moore
  0 siblings, 1 reply; 6+ messages in thread
From: Ursula Braun @ 2016-06-13 10:08 UTC (permalink / raw)
  To: Paul Moore; +Cc: linux-s390, netdev, linux-security-module, selinux

> From: Paul Moore <paul@paul-moore.com>
> 
> Much like we had to do for AF_BLUETOOTH and AF_ALG, make sure we
> properly clone the parent socket's LSM attributes to newly created
> child sockets.
> 
> Signed-off-by: Paul Moore <paul@paul-moore.com>
> ---
> net/iucv/af_iucv.c |    5 ++++-
> 1 file changed, 4 insertions(+), 1 deletion(-)
> 
> diff --git a/net/iucv/af_iucv.c b/net/iucv/af_iucv.c
> index fc3598a..a0d1e36 100644
> --- a/net/iucv/af_iucv.c
> +++ b/net/iucv/af_iucv.c
> @@ -22,6 +22,7 @@
> #include <linux/skbuff.h>
> #include <linux/init.h>
> #include <linux/poll.h>
> +#include <linux/security.h>
> #include <net/sock.h>
> #include <asm/ebcdic.h>
> #include <asm/cpcmd.h>
> @@ -530,8 +531,10 @@ static void iucv_sock_close(struct sock *sk)
> 
> static void iucv_sock_init(struct sock *sk, struct sock *parent)
> {
> -                 if (parent)
> +                 if (parent) {
>                                   sk->sk_type = parent->sk_type;
> +                                  security_sk_clone(parent, sk);
> +                 }
> }
> 
> static struct sock *iucv_sock_alloc(struct socket *sock, int proto,
> gfp_t prio, int kern)

applied locally - thx. Your patch will now be submitted for inclusion
into net-next.

Regards, Ursula Braun
> 
> --
> To unsubscribe from this list: send the line "unsubscribe linux-s390"
> in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
> 
> 

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2016-06-13 14:38 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-06-09 12:59 [PATCH] iucv: properly clone LSM attributes to newly created child sockets Paul Moore
2016-06-09 13:01 ` Paul Moore
2016-06-09 19:01   ` David Miller
     [not found] <OFBFC201CF.D9C45214-ONC1257FCD.0059BB30-C1257FCD.0059C94A@notes.na.collabserv.com>
2016-06-13 10:08 ` Ursula Braun
2016-06-13 12:38   ` Paul Moore
2016-06-13 14:38     ` Ursula Braun

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.