syzbot


KCSAN: data-race in batadv_check_known_mac_addr / batadv_iv_ogm_schedule (2)

Status: auto-obsoleted due to no activity on 2024/08/11 05:09
Subsystems: batman
[Documentation on labels]
First crash: 227d, last: 227d
Similar bugs (2)
Kernel Title Repro Cause bisect Fix bisect Count Last Reported Patched Status
upstream KCSAN: data-race in batadv_check_known_mac_addr / batadv_iv_ogm_schedule batman 1 1487d 1487d 0/28 auto-closed as invalid on 2021/02/28 04:57
upstream KCSAN: data-race in batadv_check_known_mac_addr / batadv_iv_ogm_schedule (3) batman 1 186d 186d 0/28 auto-obsoleted due to no activity on 2024/09/21 06:14

Sample crash report:
batman_adv: The newly added mac address (aa:aa:aa:aa:aa:3f) already exists on: batadv_slave_1
batman_adv: It is strongly recommended to keep mac addresses unique to avoid problems!
==================================================================
BUG: KCSAN: data-race in batadv_check_known_mac_addr / batadv_iv_ogm_schedule

write to 0xffff888110d40610 of 1 bytes by task 3943 on cpu 1:
 batadv_iv_ogm_schedule_buff net/batman-adv/bat_iv_ogm.c:803 [inline]
 batadv_iv_ogm_schedule+0xaa/0x780 net/batman-adv/bat_iv_ogm.c:868
 batadv_iv_send_outstanding_bat_ogm_packet+0x44c/0x4b0 net/batman-adv/bat_iv_ogm.c:1712
 process_one_work kernel/workqueue.c:3248 [inline]
 process_scheduled_works+0x483/0x9a0 kernel/workqueue.c:3329
 worker_thread+0x526/0x720 kernel/workqueue.c:3409
 kthread+0x1d1/0x210 kernel/kthread.c:389
 ret_from_fork+0x4b/0x60 arch/x86/kernel/process.c:147
 ret_from_fork_asm+0x1a/0x30 arch/x86/entry/entry_64.S:244

read to 0xffff888110d40610 of 1 bytes by task 26353 on cpu 0:
 batadv_check_known_mac_addr+0x4f/0x180 net/batman-adv/hard-interface.c:515
 batadv_hard_if_event+0x4b0/0x1000 net/batman-adv/hard-interface.c:998
 notifier_call_chain kernel/notifier.c:93 [inline]
 raw_notifier_call_chain+0x6f/0x1d0 kernel/notifier.c:461
 call_netdevice_notifiers_info+0xae/0x100 net/core/dev.c:1992
 call_netdevice_notifiers_extack net/core/dev.c:2030 [inline]
 call_netdevice_notifiers net/core/dev.c:2044 [inline]
 dev_set_mac_address+0x1ff/0x260 net/core/dev.c:9044
 dev_set_mac_address_user+0x31/0x50 net/core/dev.c:9058
 do_setlink+0x510/0x2490 net/core/rtnetlink.c:2855
 __rtnl_newlink net/core/rtnetlink.c:3696 [inline]
 rtnl_newlink+0x11a1/0x1690 net/core/rtnetlink.c:3743
 rtnetlink_rcv_msg+0x85e/0x910 net/core/rtnetlink.c:6635
 netlink_rcv_skb+0x12c/0x230 net/netlink/af_netlink.c:2564
 rtnetlink_rcv+0x1c/0x30 net/core/rtnetlink.c:6653
 netlink_unicast_kernel net/netlink/af_netlink.c:1335 [inline]
 netlink_unicast+0x58d/0x660 net/netlink/af_netlink.c:1361
 netlink_sendmsg+0x5ca/0x6e0 net/netlink/af_netlink.c:1905
 sock_sendmsg_nosec net/socket.c:730 [inline]
 __sock_sendmsg+0x140/0x180 net/socket.c:745
 __sys_sendto+0x1e5/0x260 net/socket.c:2192
 __do_sys_sendto net/socket.c:2204 [inline]
 __se_sys_sendto net/socket.c:2200 [inline]
 __x64_sys_sendto+0x78/0x90 net/socket.c:2200
 x64_sys_call+0x16d7/0x2d70 arch/x86/include/generated/asm/syscalls_64.h:45
 do_syscall_x64 arch/x86/entry/common.c:52 [inline]
 do_syscall_64+0xc9/0x1c0 arch/x86/entry/common.c:83
 entry_SYSCALL_64_after_hwframe+0x77/0x7f

value changed: 0x04 -> 0x03

Reported by Kernel Concurrency Sanitizer on:
CPU: 0 PID: 26353 Comm: syz-executor Not tainted 6.10.0-rc6-syzkaller-00215-g22f902dfc51e #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 06/07/2024
==================================================================
batman_adv: batadv0: Interface activated: batadv_slave_1
netdevsim netdevsim3 netdevsim0: set [1, 0] type 2 family 0 port 6081 - 0
netdevsim netdevsim3 netdevsim1: set [1, 0] type 2 family 0 port 6081 - 0
netdevsim netdevsim3 netdevsim2: set [1, 0] type 2 family 0 port 6081 - 0
netdevsim netdevsim3 netdevsim3: set [1, 0] type 2 family 0 port 6081 - 0

Crashes (1):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2024/07/07 05:05 upstream 22f902dfc51e 2a40360c .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in batadv_check_known_mac_addr / batadv_iv_ogm_schedule
* Struck through repros no longer work on HEAD.