linux/net/unix
Jiexun Wang d119775f2b af_unix: Reject SIOCATMARK on non-stream sockets
SIOCATMARK reports whether the receive queue is at the urgent mark for
MSG_OOB.

In AF_UNIX, MSG_OOB is supported only for SOCK_STREAM sockets.
SOCK_DGRAM and SOCK_SEQPACKET reject MSG_OOB in sendmsg() and recvmsg(),
so they should not support SIOCATMARK either.

Return -EOPNOTSUPP for non-stream sockets before checking the receive
queue.

Fixes: 314001f0bf ("af_unix: Add OOB support")
Cc: stable@kernel.org
Reported-by: Yuan Tan <yuantan098@gmail.com>
Reported-by: Yifan Wu <yifanwucs@gmail.com>
Reported-by: Juefei Pu <tomapufckgml@gmail.com>
Reported-by: Xin Liu <bird@lzu.edu.cn>
Suggested-by: Kuniyuki Iwashima <kuniyu@google.com>
Signed-off-by: Jiexun Wang <wangjiexun2025@gmail.com>
Signed-off-by: Ren Wei <n05ec@lzu.edu.cn>
Reviewed-by: Kuniyuki Iwashima <kuniyu@google.com>
Link: https://patch.msgid.link/20260506140825.2987635-1-n05ec@lzu.edu.cn
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
2026-05-07 08:36:02 -07:00
..
af_unix.c af_unix: Reject SIOCATMARK on non-stream sockets 2026-05-07 08:36:02 -07:00
af_unix.h af_unix: Give up GC if MSG_PEEK intervened. 2026-03-12 13:37:18 -07:00
diag.c vfs-7.1-rc1.kino 2026-04-13 12:19:01 -07:00
garbage.c af_unix: Set gc_in_progress to true in unix_gc(). 2026-05-04 18:34:45 -07:00
Kconfig af_unix: Add a prompt to CONFIG_AF_UNIX_OOB 2024-12-19 19:16:15 -08:00
Makefile af_unix: Remove CONFIG_UNIX_SCM. 2024-01-31 16:41:16 -08:00
sysctl_net_unix.c af_unix: Clean up #include under net/unix/. 2025-03-25 04:30:07 -07:00
unix_bpf.c bpf, sockmap: Fix af_unix null-ptr-deref in proto update 2026-04-15 17:22:58 -07:00