syzbot


KCSAN: data-race in data_alloc / prb_reserve

Status: moderation: reported on 2021/03/25 21:28
Subsystems: ext4 block bridge
[Documentation on labels]
Reported-by: syzbot+3ef70d22840405b8403f@syzkaller.appspotmail.com
First crash: 1434d, last: 1d10h

Sample crash report:
==================================================================
BUG: KCSAN: data-race in data_alloc / prb_reserve

write to 0xffffffff8668a808 of 8 bytes by task 17779 on cpu 0:
 data_alloc+0x291/0x2c0 kernel/printk/printk_ringbuffer.c:1096
 prb_reserve+0x85e/0xb60 kernel/printk/printk_ringbuffer.c:1669
 vprintk_store+0x53f/0x810 kernel/printk/printk.c:2301
 vprintk_emit+0x15e/0x680 kernel/printk/printk.c:2383
 vprintk_default+0x26/0x30 kernel/printk/printk.c:2422
 vprintk+0x75/0x80 kernel/printk/printk_safe.c:68
 _printk+0x7a/0xa0 kernel/printk/printk.c:2432
 __nla_validate_parse+0x1881/0x1e30 lib/nlattr.c:647
 __nla_parse+0x40/0x60 lib/nlattr.c:732
 nla_parse_nested_deprecated include/net/netlink.h:1339 [inline]
 tc_action_load_ops+0xa9/0x410 net/sched/act_api.c:1337
 tcf_action_init+0xd9/0x610 net/sched/act_api.c:1479
 tcf_action_add net/sched/act_api.c:2082 [inline]
 tc_ctl_action+0x292/0x840 net/sched/act_api.c:2139
 rtnetlink_rcv_msg+0x6aa/0x710 net/core/rtnetlink.c:6675
 netlink_rcv_skb+0x12c/0x230 net/netlink/af_netlink.c:2541
 rtnetlink_rcv+0x1c/0x30 net/core/rtnetlink.c:6693
 netlink_unicast_kernel net/netlink/af_netlink.c:1321 [inline]
 netlink_unicast+0x599/0x670 net/netlink/af_netlink.c:1347
 netlink_sendmsg+0x5cc/0x6e0 net/netlink/af_netlink.c:1891
 sock_sendmsg_nosec net/socket.c:711 [inline]
 __sock_sendmsg+0x140/0x180 net/socket.c:726
 ____sys_sendmsg+0x312/0x410 net/socket.c:2581
 ___sys_sendmsg net/socket.c:2635 [inline]
 __sys_sendmsg+0x19d/0x230 net/socket.c:2667
 __do_sys_sendmsg net/socket.c:2672 [inline]
 __se_sys_sendmsg net/socket.c:2670 [inline]
 __x64_sys_sendmsg+0x46/0x50 net/socket.c:2670
 x64_sys_call+0x2734/0x2dc0 arch/x86/include/generated/asm/syscalls_64.h:47
 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

read to 0xffffffff8668a808 of 8 bytes by task 17748 on cpu 1:
 desc_read kernel/printk/printk_ringbuffer.c:482 [inline]
 desc_push_tail kernel/printk/printk_ringbuffer.c:778 [inline]
 desc_reserve kernel/printk/printk_ringbuffer.c:924 [inline]
 prb_reserve+0x235/0xb60 kernel/printk/printk_ringbuffer.c:1619
 vprintk_store+0x53f/0x810 kernel/printk/printk.c:2301
 vprintk_emit+0x15e/0x680 kernel/printk/printk.c:2383
 vprintk_default+0x26/0x30 kernel/printk/printk.c:2422
 vprintk+0x75/0x80 kernel/printk/printk_safe.c:68
 _printk+0x7a/0xa0 kernel/printk/printk.c:2432
 ib_get_eth_speed+0x322/0x4a0 drivers/infiniband/core/verbs.c:2006
 siw_query_port+0x3d/0x240 drivers/infiniband/sw/siw/siw_verbs.c:179
 iw_query_port drivers/infiniband/core/device.c:2100 [inline]
 ib_query_port+0x369/0x3a0 drivers/infiniband/core/device.c:2141
 ib_setup_port_attrs+0x148/0x1340 drivers/infiniband/core/sysfs.c:1440
 add_one_compat_dev+0x2e6/0x3e0 drivers/infiniband/core/device.c:975
 rdma_dev_init_net+0x183/0x210 drivers/infiniband/core/device.c:1191
 ops_init+0x1c9/0x260 net/core/net_namespace.c:139
 setup_net+0x14d/0x600 net/core/net_namespace.c:356
 copy_net_ns+0x290/0x430 net/core/net_namespace.c:494
 create_new_namespaces+0x228/0x430 kernel/nsproxy.c:110
 unshare_nsproxy_namespaces+0xe6/0x120 kernel/nsproxy.c:228
 ksys_unshare+0x3c9/0x6e0 kernel/fork.c:3313
 __do_sys_unshare kernel/fork.c:3384 [inline]
 __se_sys_unshare kernel/fork.c:3382 [inline]
 __x64_sys_unshare+0x1f/0x30 kernel/fork.c:3382
 x64_sys_call+0x1a3e/0x2dc0 arch/x86/include/generated/asm/syscalls_64.h:273
 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: 0x0000000000044148 -> 0x00000000000f5458

Reported by Kernel Concurrency Sanitizer on:
CPU: 1 UID: 0 PID: 17748 Comm: syz-executor Not tainted 6.12.0-syzkaller-00971-g158f238aa69d #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 10/30/2024
==================================================================
lo speed is unknown, defaulting to 1000
chnl_net:caif_netlink_parms(): no params data found
bridge0: port 1(bridge_slave_0) entered blocking state
bridge0: port 1(bridge_slave_0) entered disabled state
bridge_slave_0: entered allmulticast mode
bridge_slave_0: entered promiscuous mode
bridge0: port 2(bridge_slave_1) entered blocking state
bridge0: port 2(bridge_slave_1) entered disabled state
bridge_slave_1: entered allmulticast mode
bridge_slave_1: entered promiscuous mode
bond0: (slave bond_slave_0): Enslaving as an active interface with an up link
bond0: (slave bond_slave_1): Enslaving as an active interface with an up link
team0: Port device team_slave_0 added
team0: Port device team_slave_1 added
batman_adv: batadv0: Adding interface: batadv_slave_0
batman_adv: batadv0: The MTU of interface batadv_slave_0 is too small (1500) to handle the transport of batman-adv packets. Packets going over this interface will be fragmented on layer2 which could impact the performance. Setting the MTU to 1560 would solve the problem.
batman_adv: batadv0: Not using interface batadv_slave_0 (retrying later): interface not active
batman_adv: batadv0: Adding interface: batadv_slave_1
batman_adv: batadv0: The MTU of interface batadv_slave_1 is too small (1500) to handle the transport of batman-adv packets. Packets going over this interface will be fragmented on layer2 which could impact the performance. Setting the MTU to 1560 would solve the problem.
batman_adv: batadv0: Not using interface batadv_slave_1 (retrying later): interface not active
hsr_slave_0: entered promiscuous mode
hsr_slave_1: entered promiscuous mode
debugfs: Directory 'hsr0' with parent 'hsr' already present!
Cannot create hsr debugfs directory
netdevsim netdevsim7 netdevsim0: renamed from eth0
netdevsim netdevsim7 netdevsim1: renamed from eth1
netdevsim netdevsim7 netdevsim2: renamed from eth2
netdevsim netdevsim7 netdevsim3: renamed from eth3
bridge0: port 2(bridge_slave_1) entered blocking state
bridge0: port 2(bridge_slave_1) entered forwarding state
bridge0: port 1(bridge_slave_0) entered blocking state
bridge0: port 1(bridge_slave_0) entered forwarding state
8021q: adding VLAN 0 to HW filter on device bond0
8021q: adding VLAN 0 to HW filter on device team0
8021q: adding VLAN 0 to HW filter on device batadv0
veth0_vlan: entered promiscuous mode
veth1_vlan: entered promiscuous mode
veth0_macvtap: entered promiscuous mode
veth1_macvtap: entered promiscuous mode
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: batadv0: Interface activated: batadv_slave_1
netdevsim netdevsim7 netdevsim0: set [1, 0] type 2 family 0 port 6081 - 0
netdevsim netdevsim7 netdevsim1: set [1, 0] type 2 family 0 port 6081 - 0
netdevsim netdevsim7 netdevsim2: set [1, 0] type 2 family 0 port 6081 - 0
netdevsim netdevsim7 netdevsim3: set [1, 0] type 2 family 0 port 6081 - 0

Crashes (960):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2024/11/19 20:08 upstream 158f238aa69d 7d02db5a .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in data_alloc / prb_reserve
2024/11/17 05:33 upstream b5a24181e461 cfe3a04a .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in data_alloc / prb_reserve
2024/11/13 07:09 upstream 3022e9d00ebe 62026c85 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in data_alloc / prb_reserve
2024/11/12 10:52 upstream 2d5404caa8c7 75bb1b32 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in data_alloc / prb_reserve
2024/11/10 14:51 upstream de2f378f2b77 6b856513 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in data_alloc / prb_reserve
2024/11/05 22:46 upstream 2e1b3cc9d7f7 da38b4c9 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in data_alloc / prb_reserve
2024/11/05 04:28 upstream 557329bcecc2 509da429 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in data_alloc / prb_reserve
2024/11/03 08:18 upstream 11066801dd4b f00eed24 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in data_alloc / prb_reserve
2024/10/28 06:38 upstream 284a2f899676 65e8686b .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in data_alloc / prb_reserve
2024/10/21 17:35 upstream 42f7652d3eb5 f1e4447c .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in data_alloc / prb_reserve
2024/10/21 09:58 upstream 42f7652d3eb5 cd6fc0a3 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in data_alloc / prb_reserve
2024/10/19 03:30 upstream b04ae0f45168 cd6fc0a3 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in data_alloc / prb_reserve
2024/10/16 03:27 upstream 2f87d0916ce0 bde2d81c .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in data_alloc / prb_reserve
2024/10/12 04:51 upstream 9e4c6c1ad9a1 084d8178 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in data_alloc / prb_reserve
2024/10/11 00:46 upstream eb952c47d154 8fbfc0c8 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in data_alloc / prb_reserve
2024/10/09 11:36 upstream 75b607fab38d 402f1df0 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in data_alloc / prb_reserve
2024/10/08 15:01 upstream 87d6aab2389e 402f1df0 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in data_alloc / prb_reserve
2024/10/05 20:37 upstream 27cc6fdf7201 d7906eff .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in data_alloc / prb_reserve
2024/10/04 23:03 upstream 2f91ff27b0ee d7906eff .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in data_alloc / prb_reserve
2024/10/02 00:05 upstream e32cde8d2bd7 ea2b66a6 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in data_alloc / prb_reserve
2024/09/29 03:31 upstream 3efc57369a0c ba29ff75 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in data_alloc / prb_reserve
2024/09/27 10:31 upstream 075dbe9f6e3c 9314348a .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in data_alloc / prb_reserve
2024/09/23 14:09 upstream de5cb0dcb74c 89298aad .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in data_alloc / prb_reserve
2024/09/20 03:37 upstream 2004cef11ea0 6f888b75 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in data_alloc / prb_reserve
2024/09/10 20:43 upstream 8d8d276ba2fb 86aa7bd7 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in data_alloc / prb_reserve
2024/09/09 11:39 upstream da3ea35007d0 9750182a .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in data_alloc / prb_reserve
2024/09/03 05:06 upstream 67784a74e258 8045124c .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in data_alloc / prb_reserve
2024/09/02 17:15 upstream 67784a74e258 1eda0d14 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in data_alloc / prb_reserve
2024/08/31 04:34 upstream 20371ba12063 1eda0d14 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in data_alloc / prb_reserve
2024/08/30 00:57 upstream d5d547aa7b51 9bd464fc .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in data_alloc / prb_reserve
2024/08/14 10:12 upstream 6b0f8db921ab 07a4d4ad .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in data_alloc / prb_reserve
2024/08/13 16:15 upstream d74da846046a f21a18ca .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in data_alloc / prb_reserve
2024/08/06 22:06 upstream eb5e56d14912 1ef9fe42 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in data_alloc / prb_reserve
2024/08/05 22:39 upstream de9c2c66ad8e e35c337f .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in data_alloc / prb_reserve
2024/08/04 22:09 upstream a5dbd76a8942 1786a2a8 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in data_alloc / prb_reserve
2024/08/02 08:57 upstream c0ecd6388360 1e9c4cf3 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in data_alloc / prb_reserve
2024/08/02 02:15 upstream 183d46ff422e 1e9c4cf3 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in data_alloc / prb_reserve
2024/07/27 23:30 upstream ff30564411ff 46eb10b7 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in data_alloc / prb_reserve
2024/07/27 18:14 upstream 3a7e02c040b1 46eb10b7 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in data_alloc / prb_reserve
2024/07/23 05:13 upstream 66ebbdfdeb09 708c10c4 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in data_alloc / prb_reserve
2024/07/19 17:23 upstream 720261cfc732 890ce4f3 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in data_alloc / prb_reserve
2024/07/17 20:20 upstream 51835949dda3 0f902625 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in data_alloc / prb_reserve
2024/07/16 22:44 upstream d67978318827 b66b37bd .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in data_alloc / prb_reserve
2024/07/14 15:40 upstream 4d145e3f830b eaeb5c15 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in data_alloc / prb_reserve
2024/07/12 06:22 upstream 8a18fda0febb eaeb5c15 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in data_alloc / prb_reserve
2024/07/10 10:27 upstream 34afb82a3c67 bc144f9a .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in data_alloc / prb_reserve
2024/07/08 12:58 upstream 256abd8e550c cde64f7d .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in data_alloc / prb_reserve
2024/07/06 21:57 upstream 1dd28064d416 2a40360c .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in data_alloc / prb_reserve
2024/07/04 09:04 upstream 795c58e4c7fc 3f2748a3 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in data_alloc / prb_reserve
2024/07/03 21:39 upstream 8a9c6c40432e f76a75f3 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in data_alloc / prb_reserve
2024/07/03 10:07 upstream e9d22f7a6655 1ecfa2d8 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in data_alloc / prb_reserve
2021/03/23 05:33 upstream 0d02ec6b3136 8092f30d .config console log report info ci2-upstream-kcsan-gce KCSAN: data-race in data_alloc / prb_reserve
2021/03/21 21:14 upstream 812da4d39463 4c9a64da .config console log report info ci2-upstream-kcsan-gce KCSAN: data-race in data_alloc / prb_reserve
2021/01/11 05:54 upstream 0653161f0fac 2c1f2513 .config console log report info ci2-upstream-kcsan-gce
2020/12/17 20:32 upstream accefff5b547 04201c06 .config console log report info ci2-upstream-kcsan-gce
* Struck through repros no longer work on HEAD.