Re: [PATCH] selinux: vsock: Set SID for socket returned by accept()

2021-03-19 Thread David Brazdil
Hi Paul, I'll post a v2 shortly but will address your comments here. > > include/linux/lsm_hooks.h | 7 +++ > > include/linux/security.h | 5 + > > net/vmw_vsock/af_vsock.c | 1 + > > security/security.c | 5 + > > security/selinux/hooks.c | 10 ++

Re: [PATCH] selinux: vsock: Set SID for socket returned by accept()

2021-03-17 Thread Paul Moore
On Wed, Mar 17, 2021 at 11:44 AM David Brazdil wrote: > > For AF_VSOCK, accept() currently returns sockets that are unlabelled. > Other socket families derive the child's SID from the SID of the parent > and the SID of the incoming packet. This is typically done as the > connected socket is placed

[PATCH] selinux: vsock: Set SID for socket returned by accept()

2021-03-17 Thread David Brazdil
For AF_VSOCK, accept() currently returns sockets that are unlabelled. Other socket families derive the child's SID from the SID of the parent and the SID of the incoming packet. This is typically done as the connected socket is placed in the queue that accept() removes from. Implement an LSM hook