aboutsummaryrefslogtreecommitdiffstats
path: root/net/unix/af_unix.c
diff options
context:
space:
mode:
authorKuniyuki Iwashima <[email protected]>2025-05-19 20:57:56 +0000
committerDavid S. Miller <[email protected]>2025-05-23 09:24:18 +0000
commit7d8d93fdde50b86bbbf46a203c368ed320e729ab (patch)
tree0a2b09d1dc876d7d13dafeba11d4ff3eed7b466d /net/unix/af_unix.c
parenttcp: Restrict SO_TXREHASH to TCP socket. (diff)
downloadkernel-7d8d93fdde50b86bbbf46a203c368ed320e729ab.tar.gz
kernel-7d8d93fdde50b86bbbf46a203c368ed320e729ab.zip
net: Restrict SO_PASS{CRED,PIDFD,SEC} to AF_{UNIX,NETLINK,BLUETOOTH}.
SCM_CREDENTIALS and SCM_SECURITY can be recv()ed by calling scm_recv() or scm_recv_unix(), and SCM_PIDFD is only used by scm_recv_unix(). scm_recv() is called from AF_NETLINK and AF_BLUETOOTH. scm_recv_unix() is literally called from AF_UNIX. Let's restrict SO_PASSCRED and SO_PASSSEC to such sockets and SO_PASSPIDFD to AF_UNIX only. Later, SOCK_PASS{CRED,PIDFD,SEC} will be moved to struct sock and united with another field. Signed-off-by: Kuniyuki Iwashima <[email protected]> Reviewed-by: Willem de Bruijn <[email protected]> Signed-off-by: David S. Miller <[email protected]>
Diffstat (limited to 'net/unix/af_unix.c')
0 files changed, 0 insertions, 0 deletions