syzbot


KCSAN: data-race in pcpu_alloc_noprof / pcpu_balance_workfn (2)

Status: upstream: reported on 2024/08/29 16:53
Subsystems: kernel
[Documentation on labels]
Reported-by: syzbot+6d392a44667baa45bb5a@syzkaller.appspotmail.com
First crash: 46d, last: 17h11m
Discussions (1)
Title Replies (including bot) Last reply
[syzbot] [kernel?] KCSAN: data-race in pcpu_alloc_noprof / pcpu_balance_workfn (2) 2 (3) 2024/09/03 22:01
Similar bugs (1)
Kernel Title Repro Cause bisect Fix bisect Count Last Reported Patched Status
upstream KCSAN: data-race in pcpu_alloc_noprof / pcpu_balance_workfn kernel 8 89d 122d 0/28 auto-obsoleted due to no activity on 2024/08/21 20:27

Sample crash report:
veth1_macvtap: entered promiscuous mode
==================================================================
BUG: KCSAN: data-race in pcpu_alloc_noprof / pcpu_balance_workfn

read-write to 0xffffffff88bdf3ac of 4 bytes by task 24 on cpu 1:
 pcpu_update_empty_pages mm/percpu.c:602 [inline]
 pcpu_chunk_populated mm/percpu.c:1531 [inline]
 pcpu_balance_populated mm/percpu.c:2062 [inline]
 pcpu_balance_workfn+0x94e/0xa60 mm/percpu.c:2212
 process_one_work kernel/workqueue.c:3229 [inline]
 process_scheduled_works+0x483/0x9a0 kernel/workqueue.c:3310
 worker_thread+0x51d/0x6f0 kernel/workqueue.c:3391
 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 0xffffffff88bdf3ac of 4 bytes by task 3267 on cpu 0:
 pcpu_alloc_noprof+0x9b6/0x10a0 mm/percpu.c:1894
 fib6_nh_init+0x63a/0x15d0 net/ipv6/route.c:3628
 ip6_route_info_create+0x7b2/0xba0 net/ipv6/route.c:3809
 addrconf_f6i_alloc+0x188/0x280 net/ipv6/route.c:4588
 fixup_permanent_addr net/ipv6/addrconf.c:3588 [inline]
 addrconf_permanent_addr+0x13c/0x5e0 net/ipv6/addrconf.c:3627
 addrconf_notify+0x681/0x950 net/ipv6/addrconf.c:3699
 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:1996
 __dev_notify_flags+0xff/0x1a0
 dev_change_flags+0xab/0xd0 net/core/dev.c:8918
 do_setlink+0x844/0x2490 net/core/rtnetlink.c:2929
 __rtnl_newlink net/core/rtnetlink.c:3725 [inline]
 rtnl_newlink+0x11a3/0x1690 net/core/rtnetlink.c:3772
 rtnetlink_rcv_msg+0x6aa/0x710 net/core/rtnetlink.c:6675
 netlink_rcv_skb+0x12c/0x230 net/netlink/af_netlink.c:2551
 rtnetlink_rcv+0x1c/0x30 net/core/rtnetlink.c:6693
 netlink_unicast_kernel net/netlink/af_netlink.c:1331 [inline]
 netlink_unicast+0x599/0x670 net/netlink/af_netlink.c:1357
 netlink_sendmsg+0x5cc/0x6e0 net/netlink/af_netlink.c:1901
 sock_sendmsg_nosec net/socket.c:729 [inline]
 __sock_sendmsg+0x140/0x180 net/socket.c:744
 __sys_sendto+0x1d6/0x260 net/socket.c:2214
 __do_sys_sendto net/socket.c:2226 [inline]
 __se_sys_sendto net/socket.c:2222 [inline]
 __x64_sys_sendto+0x78/0x90 net/socket.c:2222
 x64_sys_call+0x2959/0x2d60 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: 0x00000001 -> 0x00000004

Reported by Kernel Concurrency Sanitizer on:
CPU: 0 UID: 0 PID: 3267 Comm: syz-executor Not tainted 6.12.0-rc3-syzkaller-00013-geca631b8fe80 #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 09/13/2024
==================================================================
batman_adv: The newly added mac address (aa:aa:aa:aa:aa:3e) already exists on: batadv_slave_0
batman_adv: It is strongly recommended to keep mac addresses unique to avoid problems!
batman_adv: The newly added mac address (aa:aa:aa:aa:aa:3e) already exists on: batadv_slave_0
batman_adv: It is strongly recommended to keep mac addresses unique to avoid problems!
batman_adv: The newly added mac address (aa:aa:aa:aa:aa:3e) already exists on: batadv_slave_0
batman_adv: It is strongly recommended to keep mac addresses unique to avoid problems!
batman_adv: batadv0: Interface activated: batadv_slave_0
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!
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!
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!
batman_adv: batadv0: Interface activated: batadv_slave_1
netdevsim netdevsim4 netdevsim0: set [1, 0] type 2 family 0 port 6081 - 0
netdevsim netdevsim4 netdevsim1: set [1, 0] type 2 family 0 port 6081 - 0
netdevsim netdevsim4 netdevsim2: set [1, 0] type 2 family 0 port 6081 - 0
netdevsim netdevsim4 netdevsim3: set [1, 0] type 2 family 0 port 6081 - 0

Crashes (7):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2024/10/14 20:56 upstream eca631b8fe80 b01b6661 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in pcpu_alloc_noprof / pcpu_balance_workfn
2024/10/13 01:41 upstream 7234e2ea0edd 084d8178 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in pcpu_alloc_noprof / pcpu_balance_workfn
2024/09/30 12:04 upstream 9852d85ec9d4 bbd4e0a4 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in pcpu_alloc_noprof / pcpu_balance_workfn
2024/09/14 05:24 upstream b7718454f937 b58f933c .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in pcpu_alloc_noprof / pcpu_balance_workfn
2024/09/12 09:37 upstream 77f587896757 60e1a995 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in pcpu_alloc_noprof / pcpu_balance_workfn
2024/09/08 17:55 upstream 5dadc1be8fc5 9750182a .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in pcpu_alloc_noprof / pcpu_balance_workfn
2024/08/29 14:14 upstream d5d547aa7b51 9bd464fc .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in pcpu_alloc_noprof / pcpu_balance_workfn
* Struck through repros no longer work on HEAD.