KCSAN: data-race in __rcu_read_unlock / rcu_report_exp_cpu_mult

7 views
Skip to first unread message

syzbot

unread,
Dec 5, 2019, 12:35:09 AM12/5/19
to syzkaller-upst...@googlegroups.com
Hello,

syzbot found the following crash on:

HEAD commit: 05f22368 x86, kcsan: Enable KCSAN for x86
git tree: https://github.com/google/ktsan.git kcsan
console output: https://syzkaller.appspot.com/x/log.txt?x=14348934e00000
kernel config: https://syzkaller.appspot.com/x/.config?x=87d111955f40591f
dashboard link: https://syzkaller.appspot.com/bug?extid=8455e6d785a89e341ce1
compiler: gcc (GCC) 9.0.0 20181231 (experimental)
CC: [da...@davemloft.net kuz...@ms2.inr.ac.ru
linux-...@vger.kernel.org net...@vger.kernel.org yosh...@linux-ipv6.org
el...@google.com]

Unfortunately, I don't have any reproducer for this crash yet.

IMPORTANT: if you fix the bug, please add the following tag to the commit:
Reported-by: syzbot+8455e6...@syzkaller.appspotmail.com

==================================================================
BUG: KCSAN: data-race in __rcu_read_unlock / rcu_report_exp_cpu_mult

read to 0xffffffff85a7d440 of 8 bytes by task 9359 on cpu 0:
rcu_read_unlock_special kernel/rcu/tree_plugin.h:615 [inline]
__rcu_read_unlock+0x381/0x3c0 kernel/rcu/tree_plugin.h:383
rcu_read_unlock include/linux/rcupdate.h:652 [inline]
ip6_route_output_flags+0x84/0x1a0 net/ipv6/route.c:2504
ip6_dst_lookup_tail+0x25d/0xc30 net/ipv6/ip6_output.c:1049
ip6_dst_lookup_flow+0x68/0x120 net/ipv6/ip6_output.c:1150
inet6_csk_route_socket+0x2f7/0x420 net/ipv6/inet6_connection_sock.c:106
inet6_csk_xmit+0x91/0x1f0 net/ipv6/inet6_connection_sock.c:121
l2tp_xmit_core net/l2tp/l2tp_core.c:1030 [inline]
l2tp_xmit_skb+0x8c9/0x8e0 net/l2tp/l2tp_core.c:1132
pppol2tp_sendmsg+0x2fc/0x3c0 net/l2tp/l2tp_ppp.c:325
sock_sendmsg_nosec net/socket.c:637 [inline]
sock_sendmsg+0x9f/0xc0 net/socket.c:657
___sys_sendmsg+0x2b7/0x5d0 net/socket.c:2311
__sys_sendmmsg+0x123/0x350 net/socket.c:2413
__do_sys_sendmmsg net/socket.c:2442 [inline]
__se_sys_sendmmsg net/socket.c:2439 [inline]
__x64_sys_sendmmsg+0x64/0x80 net/socket.c:2439
do_syscall_64+0xcc/0x370 arch/x86/entry/common.c:290
entry_SYSCALL_64_after_hwframe+0x44/0xa9

write to 0xffffffff85a7d440 of 8 bytes by task 3504 on cpu 1:
rcu_report_exp_cpu_mult+0x4f/0xa0 kernel/rcu/tree_exp.h:244
sync_rcu_exp_select_node_cpus+0x478/0x510 kernel/rcu/tree_exp.h:414
sync_rcu_exp_select_cpus+0x30c/0x590 kernel/rcu/tree_exp.h:439
rcu_exp_sel_wait_wake kernel/rcu/tree_exp.h:575 [inline]
wait_rcu_exp_gp+0x25/0x40 kernel/rcu/tree_exp.h:589
process_one_work+0x3d4/0x890 kernel/workqueue.c:2269
worker_thread+0xa0/0x800 kernel/workqueue.c:2415
kthread+0x1d4/0x200 drivers/block/aoe/aoecmd.c:1253
ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:352

Reported by Kernel Concurrency Sanitizer on:
CPU: 1 PID: 3504 Comm: kworker/1:2 Not tainted 5.4.0-rc3+ #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS
Google 01/01/2011
Workqueue: rcu_gp wait_rcu_exp_gp
==================================================================


---
This bug is generated by a bot. It may contain errors.
See https://goo.gl/tpsmEJ for more information about syzbot.
syzbot engineers can be reached at syzk...@googlegroups.com.

syzbot will keep track of this bug report. See:
https://goo.gl/tpsmEJ#status for how to communicate with syzbot.

Marco Elver

unread,
Dec 13, 2019, 2:58:56 PM12/13/19
to syzbot, 'Dmitry Vyukov' via syzkaller-upstream-moderation
#syz fix: rcu: Use READ_ONCE() for ->expmask in rcu_read_unlock_special()
> --
> You received this message because you are subscribed to the Google Groups "syzkaller-upstream-moderation" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to syzkaller-upstream-m...@googlegroups.com.
> To view this discussion on the web visit https://groups.google.com/d/msgid/syzkaller-upstream-moderation/000000000000d2a23e0598ee4ac1%40google.com.
Reply all
Reply to author
Forward
0 new messages