linux-IllusionX/net/unix
Kuniyuki Iwashima 8a34d4e8d9 af_unix: Annotate data-races around sk->sk_state in sendmsg() and recvmsg().
The following functions read sk->sk_state locklessly and proceed only if
the state is TCP_ESTABLISHED.

  * unix_stream_sendmsg
  * unix_stream_read_generic
  * unix_seqpacket_sendmsg
  * unix_seqpacket_recvmsg

Let's use READ_ONCE() there.

Fixes: a05d2ad1c1 ("af_unix: Only allow recv on connected seqpacket sockets.")
Fixes: 1da177e4c3 ("Linux-2.6.12-rc2")
Signed-off-by: Kuniyuki Iwashima <kuniyu@amazon.com>
Signed-off-by: Paolo Abeni <pabeni@redhat.com>
2024-06-06 12:57:14 +02:00
..
af_unix.c af_unix: Annotate data-races around sk->sk_state in sendmsg() and recvmsg(). 2024-06-06 12:57:14 +02:00
diag.c Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net 2024-02-01 15:12:37 -08:00
garbage.c af_unix: Fix garbage collection of embryos carrying OOB with SCM_RIGHTS 2024-05-21 13:42:02 +02:00
Kconfig af_unix: Remove CONFIG_UNIX_SCM. 2024-01-31 16:41:16 -08:00
Makefile af_unix: Remove CONFIG_UNIX_SCM. 2024-01-31 16:41:16 -08:00
sysctl_net_unix.c net: Remove the now superfluous sentinel elements from ctl_table array 2024-05-03 13:29:41 +01:00
unix_bpf.c bpf: sockmap, fix proto update hook to avoid dup calls 2024-01-03 16:50:06 -08:00