Skip to content

SELinux UNIX domain socket fixes/cleanup

Paul Moore selinux 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest6 patches 6 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/6selinux: Update socket's label alongside inode's labelsecurity/selinux/hooks.c security/selinux/include/netlabel.h security/selinux/netlabel.c+50 -60 replies
2/6selinux: Set the peer label correctly on connected UNIX domain socketssecurity/selinux/hooks.c+14 -160 replies
3/6selinux: Consolidate sockcreate_sid logicsecurity/selinux/hooks.c+12 -200 replies
4/6selinux: Shuffle the sk_security_struct alloc and free routinessecurity/selinux/hooks.c+17 -280 replies
5/6selinux: Convert socket related access controls to use socket labelssecurity/selinux/hooks.c+45 -740 replies
6/6selinux: Use current_security() when possiblesecurity/selinux/hooks.c+6 -110 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.

Read the v1 thread

Cover letter [PATCH 0/6] SELinux UNIX domain socket fixes/cleanup

I finally got a chance to cobble together some tests to verify both getpeercon() on the client end of a connected UNIX domain socket as well as the proper operation of fsetxattr() on sockets. I'm happy to report that everything worked as I expected it to (UNIX sockets now behave like INET sockets) and nothing exploded. This latest version of the patchset should include all the feedback I've received so far as well as my sign-off on each patch so I think we should be in good shape at this point. As a result, I'm submitting these patches for whatever kernel release looks most appropriate - maybe to late for .35, but you might be able to make a weak argument that some of the patches are bugfixes - regardless, I'll let you guys make that call; as long as they go somewhere I'll be happy.

For those of you using git, you can also find a copy of the patches at the URL below.

* git://git.infradead.org/users/pcmoore/lblnet-2.6_testing

Thanks.

---

Paul Moore (6):
selinux: Update socket's label alongside inode's label
selinux: Set the peer label correctly on connected UNIX domain sockets
selinux: Consolidate sockcreate_sid logic
selinux: Shuffle the sk_security_struct alloc and free routines
selinux: Convert socket related access controls to use socket labels
selinux: Use current_security() when possible

 security/selinux/hooks.c            |  286 +++++++++++++++++------------------
 security/selinux/include/netlabel.h |    5 -
 security/selinux/netlabel.c         |    8 +
 3 files changed, 144 insertions(+), 155 deletions(-)

--
This message was distributed to subscribers of the selinux mailing list. If you no longer wish to subscribe, send mail to [email protected] with the words "unsubscribe selinux" without quotes as the message.