summaryrefslogtreecommitdiff
path: root/net/unix/af_unix.c
diff options
context:
space:
mode:
authorKuniyuki Iwashima <kuniyu@amazon.com>2025-05-19 13:57:56 -0700
committerDavid S. Miller <davem@davemloft.net>2025-05-23 10:24:18 +0100
commit7d8d93fdde50b86bbbf46a203c368ed320e729ab (patch)
tree0a2b09d1dc876d7d13dafeba11d4ff3eed7b466d /net/unix/af_unix.c
parentae4f2f59e1f9c7c9cab1641a3c9645e587f0bc72 (diff)
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 <kuniyu@amazon.com> Reviewed-by: Willem de Bruijn <willemb@google.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/unix/af_unix.c')
0 files changed, 0 insertions, 0 deletions