syzbot


KCSAN: data-race in pcpu_alloc / pcpu_alloc (5)

Status: auto-obsoleted due to no activity on 2023/06/06 23:06
Subsystems: bpf netfilter
[Documentation on labels]
First crash: 400d, last: 361d
Similar bugs (5)
Kernel Title Repro Cause bisect Fix bisect Count Last Reported Patched Status
upstream KCSAN: data-race in pcpu_alloc / pcpu_alloc (3) netfilter 1 546d 546d 0/26 auto-obsoleted due to no activity on 2022/12/03 18:53
upstream KCSAN: data-race in pcpu_alloc / pcpu_alloc netfilter 1 743d 743d 0/26 auto-closed as invalid on 2022/05/20 04:11
upstream KCSAN: data-race in pcpu_alloc / pcpu_alloc (6) netfilter 3 184d 225d 0/26 auto-obsoleted due to no activity on 2023/11/30 23:40
upstream KCSAN: data-race in pcpu_alloc / pcpu_alloc (2) bpf 3 627d 650d 0/26 auto-closed as invalid on 2022/09/13 08:17
upstream KCSAN: data-race in pcpu_alloc / pcpu_alloc (4) netfilter 1 497d 497d 0/26 auto-obsoleted due to no activity on 2023/02/11 12:28

Sample crash report:
netdevsim netdevsim1 netdevsim1: set [1, 0] type 2 family 0 port 6081 - 0
netdevsim netdevsim1 netdevsim2: set [1, 0] type 2 family 0 port 6081 - 0
netdevsim netdevsim1 netdevsim3: set [1, 0] type 2 family 0 port 6081 - 0
==================================================================
BUG: KCSAN: data-race in pcpu_alloc / pcpu_alloc

read-write to 0xffffffff86f595d4 of 4 bytes by task 3064 on cpu 0:
 pcpu_update_empty_pages mm/percpu.c:602 [inline]
 pcpu_chunk_populated mm/percpu.c:1531 [inline]
 pcpu_alloc+0xa1f/0x1280 mm/percpu.c:1863
 __alloc_percpu+0x24/0x30 mm/percpu.c:1943
 xt_percpu_counter_alloc+0x72/0x110 net/netfilter/x_tables.c:1930
 find_check_entry net/ipv6/netfilter/ip6_tables.c:545 [inline]
 translate_table+0x99f/0x1040 net/ipv6/netfilter/ip6_tables.c:733
 ip6t_register_table+0x9a/0x440 net/ipv6/netfilter/ip6_tables.c:1743
 ip6table_raw_table_init+0x77/0xa0 net/ipv6/netfilter/ip6table_raw.c:48
 xt_find_table_lock+0x190/0x260 net/netfilter/x_tables.c:1259
 xt_request_find_table_lock+0x26/0xa0 net/netfilter/x_tables.c:1284
 get_info net/ipv6/netfilter/ip6_tables.c:979 [inline]
 do_ip6t_get_ctl+0x552/0xbf0 net/ipv6/netfilter/ip6_tables.c:1660
 nf_getsockopt+0x184/0x1a0 net/netfilter/nf_sockopt.c:116
 ipv6_getsockopt+0x183/0x1e0 net/ipv6/ipv6_sockglue.c:1500
 tcp_getsockopt+0xa7/0xd0 net/ipv4/tcp.c:4410
 sock_common_getsockopt+0x57/0x70 net/core/sock.c:3636
 __sys_getsockopt+0x175/0x1e0 net/socket.c:2317
 __do_sys_getsockopt net/socket.c:2332 [inline]
 __se_sys_getsockopt net/socket.c:2329 [inline]
 __x64_sys_getsockopt+0x66/0x80 net/socket.c:2329
 do_syscall_x64 arch/x86/entry/common.c:50 [inline]
 do_syscall_64+0x41/0xc0 arch/x86/entry/common.c:80
 entry_SYSCALL_64_after_hwframe+0x63/0xcd

read to 0xffffffff86f595d4 of 4 bytes by task 3074 on cpu 1:
 pcpu_alloc+0xa59/0x1280 mm/percpu.c:1870
 __alloc_percpu_gfp+0x26/0x30 mm/percpu.c:1930
 fib_nh_common_init+0x48/0x2b0 net/ipv4/fib_semantics.c:590
 fib6_nh_init+0xe11/0x15c0 net/ipv6/route.c:3600
 ip6_route_info_create+0x7cb/0xb90 net/ipv6/route.c:3791
 addrconf_f6i_alloc+0x182/0x280 net/ipv6/route.c:4563
 fixup_permanent_addr net/ipv6/addrconf.c:3485 [inline]
 addrconf_permanent_addr+0x135/0x5a0 net/ipv6/addrconf.c:3524
 addrconf_notify+0x6d4/0x980 net/ipv6/addrconf.c:3596
 notifier_call_chain kernel/notifier.c:93 [inline]
 raw_notifier_call_chain+0x6b/0x1c0 kernel/notifier.c:461
 __dev_notify_flags+0x205/0x3d0
 dev_change_flags+0xab/0xd0 net/core/dev.c:8643
 do_setlink+0xa09/0x18c0 net/core/rtnetlink.c:2836
 __rtnl_newlink net/core/rtnetlink.c:3626 [inline]
 rtnl_newlink+0x10cb/0x15a0 net/core/rtnetlink.c:3673
 rtnetlink_rcv_msg+0x807/0x8c0 net/core/rtnetlink.c:6395
 netlink_rcv_skb+0x126/0x220 net/netlink/af_netlink.c:2546
 rtnetlink_rcv+0x1c/0x20 net/core/rtnetlink.c:6413
 netlink_unicast_kernel net/netlink/af_netlink.c:1339 [inline]
 netlink_unicast+0x56f/0x640 net/netlink/af_netlink.c:1365
 netlink_sendmsg+0x665/0x770 net/netlink/af_netlink.c:1913
 sock_sendmsg_nosec net/socket.c:724 [inline]
 sock_sendmsg net/socket.c:747 [inline]
 __sys_sendto+0x246/0x300 net/socket.c:2144
 __do_sys_sendto net/socket.c:2156 [inline]
 __se_sys_sendto net/socket.c:2152 [inline]
 __x64_sys_sendto+0x78/0x90 net/socket.c:2152
 do_syscall_x64 arch/x86/entry/common.c:50 [inline]
 do_syscall_64+0x41/0xc0 arch/x86/entry/common.c:80
 entry_SYSCALL_64_after_hwframe+0x63/0xcd

value changed: 0xffffffff -> 0x00000000

Reported by Kernel Concurrency Sanitizer on:
CPU: 1 PID: 3074 Comm: syz-executor.1 Not tainted 6.3.0-syzkaller-12570-g7df047b3f0aa #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 04/14/2023
==================================================================

Crashes (3):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2023/05/02 22:57 upstream 7df047b3f0aa 48e0a81d .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in pcpu_alloc / pcpu_alloc
2023/04/06 21:00 upstream f2afccfefe7b 00ce4c67 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in pcpu_alloc / pcpu_alloc
2023/03/24 16:20 upstream 1e760fa3596e 9700afae .config console log report info ci2-upstream-kcsan-gce KCSAN: data-race in pcpu_alloc / pcpu_alloc
* Struck through repros no longer work on HEAD.