From: richard_c_haines@btinternet.com (Richard Haines)
To: linux-security-module@vger.kernel.org
Subject: [RFC PATCH 5/5] selinux: Add SCTP support
Date: Wed, 01 Nov 2017 21:34:09 +0000 [thread overview]
Message-ID: <1509572049.2954.6.camel@btinternet.com> (raw)
In-Reply-To: <20171031171614.GE3675@localhost.localdomain>
On Tue, 2017-10-31 at 15:16 -0200, Marcelo Ricardo Leitner wrote:
> On Tue, Oct 17, 2017 at 02:59:53PM +0100, Richard Haines wrote:
> > The SELinux SCTP implementation is explained in:
> > Documentation/security/SELinux-sctp.txt
> >
> > Signed-off-by: Richard Haines <richard_c_haines@btinternet.com>
> > ---
>
> ...
> > diff --git a/security/selinux/hooks.c b/security/selinux/hooks.c
> > index 33fd061..c3e9600 100644
> > --- a/security/selinux/hooks.c
> > +++ b/security/selinux/hooks.c
>
> ...
> > @@ -4521,7 +4565,14 @@ static int selinux_socket_connect(struct
> > socket *sock, struct sockaddr *address,
> > unsigned short snum;
> > u32 sid, perm;
> >
> > - if (sk->sk_family == PF_INET) {
> > + /* sctp_connectx(3) calls via
> > + *selinux_sctp_bind_connect() that validates
> > multiple
> > + * connect addresses. Because of this need to
> > check
> > + * address->sa_family as it is possible to have
> > + * sk->sk_family = PF_INET6 with addr->sa_family =
> > AF_INET.
> > + */
> > + if (sk->sk_family == PF_INET ||
> > + address->sa_family ==
> > AF_INET) {
>
> Not sure which code style applies on this file but the if () above
> looks odd. At least, checkpatch.pl complained about it.
Changed to read:
if (sk->sk_family == PF_INET ||
address->sa_family == AF_INET) {
>
> Marcelo
> --
> To unsubscribe from this list: send the line "unsubscribe linux-
> security-module" in
> the body of a message to majordomo at vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
--
To unsubscribe from this list: send the line "unsubscribe linux-security-module" in
the body of a message to majordomo at vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
WARNING: multiple messages have this Message-ID (diff)
From: Richard Haines <richard_c_haines@btinternet.com>
To: linux-security-module@vger.kernel.org
Subject: Re: [RFC PATCH 5/5] selinux: Add SCTP support
Date: Wed, 01 Nov 2017 21:34:09 +0000 [thread overview]
Message-ID: <1509572049.2954.6.camel@btinternet.com> (raw)
In-Reply-To: <20171031171614.GE3675@localhost.localdomain>
On Tue, 2017-10-31 at 15:16 -0200, Marcelo Ricardo Leitner wrote:
> On Tue, Oct 17, 2017 at 02:59:53PM +0100, Richard Haines wrote:
> > The SELinux SCTP implementation is explained in:
> > Documentation/security/SELinux-sctp.txt
> >
> > Signed-off-by: Richard Haines <richard_c_haines@btinternet.com>
> > ---
>
> ...
> > diff --git a/security/selinux/hooks.c b/security/selinux/hooks.c
> > index 33fd061..c3e9600 100644
> > --- a/security/selinux/hooks.c
> > +++ b/security/selinux/hooks.c
>
> ...
> > @@ -4521,7 +4565,14 @@ static int selinux_socket_connect(struct
> > socket *sock, struct sockaddr *address,
> > unsigned short snum;
> > u32 sid, perm;
> >
> > - if (sk->sk_family = PF_INET) {
> > + /* sctp_connectx(3) calls via
> > + *selinux_sctp_bind_connect() that validates
> > multiple
> > + * connect addresses. Because of this need to
> > check
> > + * address->sa_family as it is possible to have
> > + * sk->sk_family = PF_INET6 with addr->sa_family > > AF_INET.
> > + */
> > + if (sk->sk_family = PF_INET ||
> > + address->sa_family =
> > AF_INET) {
>
> Not sure which code style applies on this file but the if () above
> looks odd. At least, checkpatch.pl complained about it.
Changed to read:
if (sk->sk_family = PF_INET ||
address->sa_family = AF_INET) {
>
> Marcelo
> --
> To unsubscribe from this list: send the line "unsubscribe linux-
> security-module" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
WARNING: multiple messages have this Message-ID (diff)
From: Richard Haines <richard_c_haines@btinternet.com>
To: Marcelo Ricardo Leitner <marcelo.leitner@gmail.com>
Cc: selinux@tycho.nsa.gov, netdev@vger.kernel.org,
linux-sctp@vger.kernel.org,
linux-security-module@vger.kernel.org
Subject: Re: [RFC PATCH 5/5] selinux: Add SCTP support
Date: Wed, 01 Nov 2017 21:34:09 +0000 [thread overview]
Message-ID: <1509572049.2954.6.camel@btinternet.com> (raw)
In-Reply-To: <20171031171614.GE3675@localhost.localdomain>
On Tue, 2017-10-31 at 15:16 -0200, Marcelo Ricardo Leitner wrote:
> On Tue, Oct 17, 2017 at 02:59:53PM +0100, Richard Haines wrote:
> > The SELinux SCTP implementation is explained in:
> > Documentation/security/SELinux-sctp.txt
> >
> > Signed-off-by: Richard Haines <richard_c_haines@btinternet.com>
> > ---
>
> ...
> > diff --git a/security/selinux/hooks.c b/security/selinux/hooks.c
> > index 33fd061..c3e9600 100644
> > --- a/security/selinux/hooks.c
> > +++ b/security/selinux/hooks.c
>
> ...
> > @@ -4521,7 +4565,14 @@ static int selinux_socket_connect(struct
> > socket *sock, struct sockaddr *address,
> > unsigned short snum;
> > u32 sid, perm;
> >
> > - if (sk->sk_family == PF_INET) {
> > + /* sctp_connectx(3) calls via
> > + *selinux_sctp_bind_connect() that validates
> > multiple
> > + * connect addresses. Because of this need to
> > check
> > + * address->sa_family as it is possible to have
> > + * sk->sk_family = PF_INET6 with addr->sa_family =
> > AF_INET.
> > + */
> > + if (sk->sk_family == PF_INET ||
> > + address->sa_family ==
> > AF_INET) {
>
> Not sure which code style applies on this file but the if () above
> looks odd. At least, checkpatch.pl complained about it.
Changed to read:
if (sk->sk_family == PF_INET ||
address->sa_family == AF_INET) {
>
> Marcelo
> --
> To unsubscribe from this list: send the line "unsubscribe linux-
> security-module" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
next prev parent reply other threads:[~2017-11-01 21:34 UTC|newest]
Thread overview: 36+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-10-17 13:59 [RFC PATCH 5/5] selinux: Add SCTP support Richard Haines
2017-10-17 13:59 ` Richard Haines
2017-10-17 13:59 ` Richard Haines
2017-10-20 19:00 ` Stephen Smalley
2017-10-20 19:00 ` Stephen Smalley
2017-10-20 19:00 ` Stephen Smalley
2017-10-24 15:50 ` Richard Haines
2017-10-24 15:50 ` Richard Haines
2017-10-24 15:50 ` Richard Haines
2017-10-31 17:16 ` Marcelo Ricardo Leitner
2017-10-31 17:16 ` Marcelo Ricardo Leitner
2017-10-31 17:16 ` Marcelo Ricardo Leitner
2017-11-01 21:34 ` Richard Haines [this message]
2017-11-01 21:34 ` Richard Haines
2017-11-01 21:34 ` Richard Haines
2017-11-07 0:09 ` Paul Moore
2017-11-07 0:09 ` Paul Moore
2017-11-07 0:09 ` Paul Moore
2017-11-13 22:05 ` Richard Haines
2017-11-13 22:05 ` Richard Haines
2017-11-13 22:05 ` Richard Haines
2017-11-13 22:40 ` Paul Moore
2017-11-13 22:40 ` Paul Moore
2017-11-13 22:40 ` Paul Moore
2017-11-14 13:41 ` Stephen Smalley
2017-11-14 13:41 ` Stephen Smalley
2017-11-14 13:41 ` Stephen Smalley
2017-11-14 21:52 ` Richard Haines
2017-11-14 21:52 ` Richard Haines
2017-11-14 21:52 ` Richard Haines
2017-11-20 21:55 ` Paul Moore
2017-11-20 21:55 ` Paul Moore
2017-11-20 21:55 ` Paul Moore
2017-11-21 17:37 ` Richard Haines
2017-11-21 17:37 ` Richard Haines
2017-11-21 17:37 ` Richard Haines
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1509572049.2954.6.camel@btinternet.com \
--to=richard_c_haines@btinternet.com \
--cc=linux-security-module@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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.