diff options
author | Kuniyuki Iwashima <[email protected]> | 2023-09-01 16:46:04 -0700 |
---|---|---|
committer | David S. Miller <[email protected]> | 2023-09-04 11:00:17 +0100 |
commit | 718e6b51298e0f254baca0d40ab52a00e004e014 (patch) | |
tree | a1dbc411e29d32fcbeaad32fa41cd000181fb16c /net/unix/scm.c | |
parent | 5245008738029135af52a2048d9fe9c4dd9be698 (diff) |
af_unix: Fix msg_controllen test in scm_pidfd_recv() for MSG_CMSG_COMPAT.
Heiko Carstens reported that SCM_PIDFD does not work with MSG_CMSG_COMPAT
because scm_pidfd_recv() always checks msg_controllen against sizeof(struct
cmsghdr).
We need to use sizeof(struct compat_cmsghdr) for the compat case.
Fixes: 5e2ff6704a27 ("scm: add SO_PASSPIDFD and SCM_PIDFD")
Reported-by: Heiko Carstens <[email protected]>
Closes: https://lore.kernel.org/netdev/[email protected]/
Signed-off-by: Kuniyuki Iwashima <[email protected]>
Tested-by: Heiko Carstens <[email protected]>
Reviewed-by: Alexander Mikhalitsyn <[email protected]>
Reviewed-by: Michal Swiatkowski <[email protected]>
Acked-by: Christian Brauner <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
Diffstat (limited to 'net/unix/scm.c')
0 files changed, 0 insertions, 0 deletions