All of lore.kernel.org
 help / color / mirror / Atom feed
From: Guido Trentalancia <guido@trentalancia.net>
To: Paul Moore <paul@paul-moore.com>
Cc: selinux@tycho.nsa.gov
Subject: Re: [PATCH v3] Classify AF_ALG sockets (was: Differentiate between Unix Stream Socket and Sequential Packet Socket)
Date: Mon, 22 Aug 2016 23:07:17 +0200	[thread overview]
Message-ID: <1471900037.19333.6.camel@trentalancia.net> (raw)
In-Reply-To: <CAHC9VhR5Cvc0jf1v6VoO+EpOphNPCTXVWM0O+_SbRsTX6uF_TA@mail.gmail.com>

Hello Paul.

Thanks for providing your feedback.

On Mon, 22/08/2016 at 16.17 -0400, Paul Moore wrote:
> On Mon, Aug 22, 2016 at 9:02 AM, Guido Trentalancia
> <guido@trentalancia.net> wrote:
> > 
> > Modify the SELinux kernel code so that it is able to classify
> > sockets with
> > the new AF_ALG namespace (used for the user-space interface to the
> > kernel
> > Crypto API).
> > 
> > A companion patch has been created for the Reference Policy and it
> > will be
> > posted to its mailing list, once this patch is merged.
> > 
> > Signed-off-by: Guido Trentalancia <guido@trentalancia.net>
> > ---
> >  security/selinux/hooks.c            |    5 +++--
> >  security/selinux/include/classmap.h |    2 ++
> >  2 files changed, 5 insertions(+), 2 deletions(-)
> > 
> > --- linux-4.7.1-orig/security/selinux/hooks.c   2016-08-21
> > 18:20:52.788066467 +0200
> > +++ linux-4.7.1/security/selinux/hooks.c        2016-08-21
> > 18:23:48.603479911 +0200
> > @@ -1316,6 +1315,8 @@ static inline u16 socket_type_to_securit
> >                 return SECCLASS_KEY_SOCKET;
> >         case PF_APPLETALK:
> >                 return SECCLASS_APPLETALK_SOCKET;
> > +       case PF_ALG:
> > +               return SECCLASS_ALG_SOCKET;
> >         }
> 
> Because this patch changes the object class for existing permission
> checks you will need to wrap this with a policy capability, see
> selinux_policycap_netpeer for an example.

I have posted a revised version of the patch (v4).

By the way, I think libsepol needs to be patched too. And, of course,
the Reference Policy (the patch is ready).

--
Guido

  reply	other threads:[~2016-08-22 21:07 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-08-20 16:18 [PATCH] Differentiate between Unix Stream Socket and Sequential Packet Socket Guido Trentalancia
2016-08-20 17:17 ` Paul Moore
2016-08-20 17:39   ` Guido Trentalancia
2016-08-20 18:44     ` Paul Moore
2016-08-20 19:09       ` Guido Trentalancia
2016-08-21  3:24         ` Paul Moore
2016-08-21 17:17           ` [PATCH v2] " Guido Trentalancia
2016-08-22 13:02             ` [PATCH v3] Classify AF_ALG sockets (was: Differentiate between Unix Stream Socket and Sequential Packet Socket) Guido Trentalancia
2016-08-22 20:17               ` Paul Moore
2016-08-22 21:07                 ` Guido Trentalancia [this message]
2016-08-22 21:04               ` [PATCH v4] Classify AF_ALG sockets Guido Trentalancia
2016-08-22 22:36                 ` Paul Moore
2016-08-23 13:05                   ` Stephen Smalley
2016-08-23 13:35                     ` Paul Moore
2016-08-23 14:14                 ` [PATCH v5] " Guido Trentalancia
2016-08-23 14:42                   ` Stephen Smalley
2016-08-23 15:21                     ` [PATCH] Update libsepol to support the policy capability for " Guido Trentalancia
2016-08-23 22:02                     ` [PATCH v5] Classify " Paul Moore
2016-08-23 23:03                       ` Guido Trentalancia
2016-08-21 17:31           ` [PATCH] Differentiate between Unix Stream Socket and Sequential Packet Socket Guido Trentalancia
2016-08-21 17:32           ` Guido Trentalancia

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=1471900037.19333.6.camel@trentalancia.net \
    --to=guido@trentalancia.net \
    --cc=paul@paul-moore.com \
    --cc=selinux@tycho.nsa.gov \
    /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.