syzbot


KCSAN: data-race in batadv_hardif_enable_interface / batadv_iv_ogm_schedule

Status: auto-closed as invalid on 2022/01/06 10:50
Subsystems: batman
[Documentation on labels]
Reported-by: syzbot+219d17250fb1b31e6e5e@syzkaller.appspotmail.com
First crash: 874d, last: 874d

Sample crash report:
==================================================================
BUG: KCSAN: data-race in batadv_hardif_enable_interface / batadv_iv_ogm_schedule

write to 0xffff88816bec9c68 of 8 bytes by task 25885 on cpu 1:
 batadv_hardif_enable_interface+0x10a/0x810 net/batman-adv/hard-interface.c:696
 batadv_softif_slave_add+0x5e/0xd0 net/batman-adv/soft-interface.c:836
 do_set_master net/core/rtnetlink.c:2521 [inline]
 __rtnl_newlink net/core/rtnetlink.c:3475 [inline]
 rtnl_newlink+0x1298/0x13b0 net/core/rtnetlink.c:3506
 rtnetlink_rcv_msg+0x745/0x7e0 net/core/rtnetlink.c:5571
 netlink_rcv_skb+0x14e/0x250 net/netlink/af_netlink.c:2491
 rtnetlink_rcv+0x18/0x20 net/core/rtnetlink.c:5589
 netlink_unicast_kernel net/netlink/af_netlink.c:1319 [inline]
 netlink_unicast+0x5fc/0x6c0 net/netlink/af_netlink.c:1345
 netlink_sendmsg+0x6e1/0x7d0 net/netlink/af_netlink.c:1916
 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+0x195/0x230 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/0xd0 arch/x86/entry/common.c:80
 entry_SYSCALL_64_after_hwframe+0x44/0xae

read to 0xffff88816bec9c68 of 8 bytes by task 17675 on cpu 0:
 batadv_iv_ogm_schedule_buff net/batman-adv/bat_iv_ogm.c:844 [inline]
 batadv_iv_ogm_schedule+0x549/0x7e0 net/batman-adv/bat_iv_ogm.c:869
 batadv_iv_send_outstanding_bat_ogm_packet+0x474/0x4c0 net/batman-adv/bat_iv_ogm.c:1713
 process_one_work+0x3fc/0x980 kernel/workqueue.c:2298
 worker_thread+0x616/0xa70 kernel/workqueue.c:2445
 kthread+0x2c7/0x2e0 kernel/kthread.c:327
 ret_from_fork+0x1f/0x30

value changed: 0x0000000000000000 -> 0xffff88813896d000

Reported by Kernel Concurrency Sanitizer on:
CPU: 0 PID: 17675 Comm: kworker/u4:4 Not tainted 5.16.0-rc3-syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011
Workqueue: bat_events batadv_iv_send_outstanding_bat_ogm_packet

==================================================================

Crashes (1):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2021/12/02 10:49 upstream 58e1100fdc59 61f86278 .config console log report info ci2-upstream-kcsan-gce KCSAN: data-race in batadv_hardif_enable_interface / batadv_iv_ogm_schedule
* Struck through repros no longer work on HEAD.