syzbot


KCSAN: data-race in skb_queue_tail / unix_dgram_poll (4)

Status: fixed on 2022/03/08 16:11
Subsystems: net
[Documentation on labels]
Fix commit: 04f08eb44b50 net/af_unix: fix a data-race in unix_dgram_poll
First crash: 1189d, last: 1177d
Similar bugs (3)
Kernel Title Repro Cause bisect Fix bisect Count Last Reported Patched Status
upstream KCSAN: data-race in skb_queue_tail / unix_dgram_poll (3) net 1 1391d 1391d 0/28 auto-closed as invalid on 2021/03/17 02:28
upstream KCSAN: data-race in skb_queue_tail / unix_dgram_poll net 2 1856d 1864d 0/28 closed as invalid on 2019/11/19 13:24
upstream KCSAN: data-race in skb_queue_tail / unix_dgram_poll (2) net 1 1581d 1581d 0/28 auto-closed as invalid on 2020/09/08 00:38

Sample crash report:
==================================================================
BUG: KCSAN: data-race in skb_queue_tail / unix_dgram_poll

write to 0xffff8881039f1ce0 of 4 bytes by task 1017 on cpu 1:
 __skb_insert include/linux/skbuff.h:1943 [inline]
 __skb_queue_before include/linux/skbuff.h:2048 [inline]
 __skb_queue_tail include/linux/skbuff.h:2081 [inline]
 skb_queue_tail+0x80/0xa0 net/core/skbuff.c:3310
 unix_dgram_sendmsg+0x101e/0x1650 net/unix/af_unix.c:1902
 sock_sendmsg_nosec net/socket.c:704 [inline]
 sock_sendmsg net/socket.c:724 [inline]
 ____sys_sendmsg+0x39a/0x510 net/socket.c:2409
 ___sys_sendmsg net/socket.c:2463 [inline]
 __sys_sendmsg+0x242/0x2c0 net/socket.c:2492
 __do_sys_sendmsg net/socket.c:2501 [inline]
 __se_sys_sendmsg net/socket.c:2499 [inline]
 __x64_sys_sendmsg+0x42/0x50 net/socket.c:2499
 do_syscall_x64 arch/x86/entry/common.c:50 [inline]
 do_syscall_64+0x44/0xa0 arch/x86/entry/common.c:80
 entry_SYSCALL_64_after_hwframe+0x44/0xae

read to 0xffff8881039f1ce0 of 4 bytes by task 372 on cpu 0:
 skb_queue_len include/linux/skbuff.h:1874 [inline]
 unix_recvq_full net/unix/af_unix.c:195 [inline]
 unix_dgram_poll+0x2bc/0x3e0 net/unix/af_unix.c:3076
 sock_poll+0x23e/0x260 net/socket.c:1302
 vfs_poll include/linux/poll.h:90 [inline]
 ep_item_poll fs/eventpoll.c:846 [inline]
 ep_send_events fs/eventpoll.c:1685 [inline]
 ep_poll fs/eventpoll.c:1799 [inline]
 do_epoll_wait+0x6b7/0xf10 fs/eventpoll.c:2227
 __do_sys_epoll_wait fs/eventpoll.c:2239 [inline]
 __se_sys_epoll_wait fs/eventpoll.c:2234 [inline]
 __x64_sys_epoll_wait+0x119/0x140 fs/eventpoll.c:2234
 do_syscall_x64 arch/x86/entry/common.c:50 [inline]
 do_syscall_64+0x44/0xa0 arch/x86/entry/common.c:80
 entry_SYSCALL_64_after_hwframe+0x44/0xae

value changed: 0x00000000 -> 0x00000001

Reported by Kernel Concurrency Sanitizer on:
CPU: 0 PID: 372 Comm: systemd-journal Not tainted 5.14.0-syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011
==================================================================

Crashes (2):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2021/09/12 06:11 upstream c605c39677b9 3ce60af8 .config console log report info ci2-upstream-kcsan-gce KCSAN: data-race in skb_queue_tail / unix_dgram_poll
2021/08/30 23:34 upstream 8596e589b787 8f58a0ef .config console log report info ci2-upstream-kcsan-gce KCSAN: data-race in skb_queue_tail / unix_dgram_poll
* Struck through repros no longer work on HEAD.