In the Linux kernel, the following vulnerability has been resolved:
netlink: annotate lockless accesses to nlk->maxrecvmsglen
syzbot reported a data-race in data-race in netlink_recvmsg() [1]
Indeed, netlinkrecvmsg() can be run concurrently, and netlinkdump() also needs protection.
[1] BUG: KCSAN: data-race in netlinkrecvmsg / netlinkrecvmsg
read to 0xffff888141840b38 of 8 bytes by task 23057 on cpu 0: netlinkrecvmsg+0xea/0x730 net/netlink/afnetlink.c:1988 sockrecvmsgnosec net/socket.c:1017 [inline] sock_recvmsg net/socket.c:1038 [inline] __sys_recvfrom+0x1ee/0x2e0 net/socket.c:2194 __dosysrecvfrom net/socket.c:2212 [inline] __sesysrecvfrom net/socket.c:2208 [inline] __x64sysrecvfrom+0x78/0x90 net/socket.c:2208 dosyscallx64 arch/x86/entry/common.c:50 [inline] dosyscall64+0x41/0xc0 arch/x86/entry/common.c:80 entrySYSCALL64afterhwframe+0x63/0xcd
write to 0xffff888141840b38 of 8 bytes by task 23037 on cpu 1: netlinkrecvmsg+0x114/0x730 net/netlink/afnetlink.c:1989 sockrecvmsgnosec net/socket.c:1017 [inline] sock_recvmsg net/socket.c:1038 [inline] ____sys_recvmsg+0x156/0x310 net/socket.c:2720 ___sysrecvmsg net/socket.c:2762 [inline] dorecvmmsg+0x2e5/0x710 net/socket.c:2856 __sys_recvmmsg net/socket.c:2935 [inline] __dosysrecvmmsg net/socket.c:2958 [inline] __sesysrecvmmsg net/socket.c:2951 [inline] __x64sysrecvmmsg+0xe2/0x160 net/socket.c:2951 dosyscallx64 arch/x86/entry/common.c:50 [inline] dosyscall64+0x41/0xc0 arch/x86/entry/common.c:80 entrySYSCALL64afterhwframe+0x63/0xcd
value changed: 0x0000000000000000 -> 0x0000000000001000
Reported by Kernel Concurrency Sanitizer on: CPU: 1 PID: 23037 Comm: syz-executor.2 Not tainted 6.3.0-rc4-syzkaller-00195-g5a57b48fdfcb #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 03/02/2023
{
"osv_generated_from": "https://github.com/CVEProject/cvelistV5/tree/main/cves/2023/53xxx/CVE-2023-53824.json",
"cna_assigner": "Linux"
}