udp: move udp->no_check6_rx to udp->udp_flags
authorEric Dumazet <edumazet@google.com>
Tue, 12 Sep 2023 09:17:23 +0000 (09:17 +0000)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 20 Nov 2023 10:58:55 +0000 (11:58 +0100)
commit06de37fc9c6a7339e30cff0aafcb7675184f84cd
tree053b8b7f59fb04aed072c7b0b7a4b9ee3b481e79
parent39fc39a0c5907a07b8505f73b11532b72ed6e9c4
udp: move udp->no_check6_rx to udp->udp_flags

[ Upstream commit bcbc1b1de884647aa0318bf74eb7f293d72a1e40 ]

syzbot reported that udp->no_check6_rx can be read locklessly.
Use one atomic bit from udp->udp_flags.

Fixes: 1c19448c9ba6 ("net: Make enabling of zero UDP6 csums more restrictive")
Reported-by: syzbot <syzkaller@googlegroups.com>
Signed-off-by: Eric Dumazet <edumazet@google.com>
Reviewed-by: Willem de Bruijn <willemb@google.com>
Signed-off-by: Paolo Abeni <pabeni@redhat.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
include/linux/udp.h
net/ipv4/udp.c
net/ipv6/udp.c