android_kernel_motorola_sm6375/security/smack
Repository files (latest commit first)
Filename Latest commit message Latest commit date
Konstantin Andreev 2859267753 smack: unix sockets: fix accept()ed socket label
[ Upstream commit e86cac0acdb1a74f608bacefe702f2034133a047 ]

When a process accept()s connection from a unix socket
(either stream or seqpacket)
it gets the socket with the label of the connecting process.

For example, if a connecting process has a label 'foo',
the accept()ed socket will also have 'in' and 'out' labels 'foo',
regardless of the label of the listener process.

This is because kernel creates unix child sockets
in the context of the connecting process.

I do not see any obvious way for the listener to abuse
alien labels coming with the new socket, but,
to be on the safe side, it's better fix new socket labels.

Signed-off-by: Konstantin Andreev <[email protected]>
Signed-off-by: Casey Schaufler <[email protected]>
Signed-off-by: Sasha Levin <[email protected]>
2024-09-12 11:03:52 +02:00
..
Kconfig
Makefile
smack.h smack: Record transmuting in smk_transmuted 2023-10-10 21:46:41 +02:00
smack_access.c
smack_lsm.c smack: unix sockets: fix accept()ed socket label 2024-09-12 11:03:52 +02:00
smack_netfilter.c
smackfs.c smackfs: Prevent underflow in smk_set_cipso() 2023-09-23 10:59:46 +02:00