syzbot


KCSAN: data-race in data_push_tail / string

Status: moderation: reported on 2021/07/22 19:23
Reported-by: syzbot+b3b8d0f2cecce376adeb@syzkaller.appspotmail.com
First crash: 625d, last: 6d15h

Sample crash report:
device macvlan0 entered promiscuous mode
==================================================================
BUG: KCSAN: data-race in data_push_tail / string

write to 0xffffffff870b94d8 of 1 bytes by task 2201 on cpu 1:
 string_nocheck lib/vsprintf.c:647 [inline]
 string+0x17b/0x220 lib/vsprintf.c:725
 vsnprintf+0xb57/0xe80 lib/vsprintf.c:2800
 vscnprintf+0x3e/0x80 lib/vsprintf.c:2906
 printk_sprint kernel/printk/printk.c:2089 [inline]
 vprintk_store+0x5f2/0xb50 kernel/printk/printk.c:2203
 vprintk_emit+0xcc/0x430 kernel/printk/printk.c:2249
 vprintk_default+0x22/0x30 kernel/printk/printk.c:2279
 vprintk+0x7f/0x90 kernel/printk/printk_safe.c:50
 _printk+0x76/0x96 kernel/printk/printk.c:2289
 validate_nla lib/nlattr.c:389 [inline]
 __nla_validate_parse+0x112f/0x1970 lib/nlattr.c:600
 __nla_parse+0x3c/0x50 lib/nlattr.c:697
 nla_parse_deprecated include/net/netlink.h:695 [inline]
 nfnetlink_rcv_batch net/netfilter/nfnetlink.c:511 [inline]
 nfnetlink_rcv_skb_batch net/netfilter/nfnetlink.c:639 [inline]
 nfnetlink_rcv+0xa4d/0x13c0 net/netfilter/nfnetlink.c:657
 netlink_unicast_kernel net/netlink/af_netlink.c:1319 [inline]
 netlink_unicast+0x58a/0x660 net/netlink/af_netlink.c:1345
 netlink_sendmsg+0x666/0x760 net/netlink/af_netlink.c:1921
 sock_sendmsg_nosec net/socket.c:714 [inline]
 sock_sendmsg net/socket.c:734 [inline]
 ____sys_sendmsg+0x38f/0x500 net/socket.c:2482
 ___sys_sendmsg net/socket.c:2536 [inline]
 __sys_sendmsg+0x19a/0x230 net/socket.c:2565
 __do_sys_sendmsg net/socket.c:2574 [inline]
 __se_sys_sendmsg net/socket.c:2572 [inline]
 __x64_sys_sendmsg+0x42/0x50 net/socket.c:2572
 do_syscall_x64 arch/x86/entry/common.c:50 [inline]
 do_syscall_64+0x2b/0x70 arch/x86/entry/common.c:80
 entry_SYSCALL_64_after_hwframe+0x63/0xcd

read to 0xffffffff870b94d8 of 8 bytes by task 2203 on cpu 0:
 data_make_reusable kernel/printk/printk_ringbuffer.c:590 [inline]
 data_push_tail+0x10f/0x440 kernel/printk/printk_ringbuffer.c:675
 data_alloc+0xbc/0x2b0 kernel/printk/printk_ringbuffer.c:1046
 prb_reserve+0x897/0xbd0 kernel/printk/printk_ringbuffer.c:1555
 vprintk_store+0x51c/0xb50 kernel/printk/printk.c:2193
 vprintk_emit+0xcc/0x430 kernel/printk/printk.c:2249
 vprintk_default+0x22/0x30 kernel/printk/printk.c:2279
 vprintk+0x7f/0x90 kernel/printk/printk_safe.c:50
 _printk+0x76/0x96 kernel/printk/printk.c:2289
 __dev_set_promiscuity+0x179/0x380 net/core/dev.c:8335
 dev_set_promiscuity+0x37/0x90 net/core/dev.c:8374
 packet_dev_mc net/packet/af_packet.c:3619 [inline]
 packet_mc_add+0x346/0x430 net/packet/af_packet.c:3695
 packet_setsockopt+0xa87/0xe60 net/packet/af_packet.c:3780
 __sys_setsockopt+0x212/0x2b0 net/socket.c:2252
 __do_sys_setsockopt net/socket.c:2263 [inline]
 __se_sys_setsockopt net/socket.c:2260 [inline]
 __x64_sys_setsockopt+0x62/0x70 net/socket.c:2260
 do_syscall_x64 arch/x86/entry/common.c:50 [inline]
 do_syscall_64+0x2b/0x70 arch/x86/entry/common.c:80
 entry_SYSCALL_64_after_hwframe+0x63/0xcd

value changed: 0x00000000ffffeac2 -> 0x302e726f74756365

Reported by Kernel Concurrency Sanitizer on:
CPU: 0 PID: 2203 Comm: syz-executor.5 Not tainted 6.1.0-rc6-syzkaller-00012-g4312098baf37-dirty #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 10/26/2022
==================================================================

Crashes (182):
Manager Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Title
ci2-upstream-kcsan-gce 2022/11/24 09:16 upstream 4312098baf37 ff68ff8f .config log report info KCSAN: data-race in data_push_tail / string
ci2-upstream-kcsan-gce 2022/11/20 22:58 upstream 77c51ba552a1 5bb70014 .config log report info KCSAN: data-race in data_push_tail / string
ci2-upstream-kcsan-gce 2022/10/24 00:55 upstream d47136c28015 23bf86af .config log report info KCSAN: data-race in data_push_tail / string
ci2-upstream-kcsan-gce 2022/10/21 20:37 upstream 6d36c728bc2e 63e790dd .config log report info KCSAN: data-race in data_push_tail / string
ci2-upstream-kcsan-gce 2022/10/04 09:21 upstream 4fe89d07dcc2 feb56351 .config log report info KCSAN: data-race in data_push_tail / string
ci2-upstream-kcsan-gce 2022/10/03 13:45 upstream a962b54e162c feb56351 .config log report info KCSAN: data-race in data_push_tail / string
ci2-upstream-kcsan-gce 2022/09/27 14:55 upstream 3800a713b607 10323ddf .config log report info KCSAN: data-race in data_push_tail / string
ci2-upstream-kcsan-gce 2022/09/26 13:19 upstream f76349cf4145 d59ba983 .config log report info KCSAN: data-race in data_push_tail / string
ci2-upstream-kcsan-gce 2022/09/18 00:10 upstream a335366bad13 dd9a85ff .config log report info KCSAN: data-race in data_push_tail / string
ci2-upstream-kcsan-gce 2022/09/13 19:08 upstream d1221cea11fc a08652b0 .config log report info KCSAN: data-race in data_push_tail / string
ci2-upstream-kcsan-gce 2022/09/02 22:45 upstream 0b3acd1cc022 25194605 .config log report info KCSAN: data-race in data_push_tail / string
ci2-upstream-kcsan-gce 2022/08/29 02:16 upstream 8379c0b31fbc 07177916 .config log report info KCSAN: data-race in data_push_tail / string
ci2-upstream-kcsan-gce 2022/08/28 00:46 upstream 89b749d8552d 07177916 .config log report info KCSAN: data-race in data_push_tail / string
ci2-upstream-kcsan-gce 2022/08/21 00:27 upstream f31c32efd57c 26a13b38 .config log report info KCSAN: data-race in data_push_tail / string
ci2-upstream-kcsan-gce 2022/08/16 21:51 upstream 7ebfc85e2cd7 9e4b39c2 .config log report info KCSAN: data-race in data_push_tail / string
ci2-upstream-kcsan-gce 2022/08/10 12:48 upstream d4252071b97d aaa9eaa0 .config log report info KCSAN: data-race in data_push_tail / string
ci2-upstream-kcsan-gce 2022/08/06 16:37 upstream 6614a3c3164a 88e3a122 .config log report info KCSAN: data-race in data_push_tail / string
ci2-upstream-kcsan-gce 2022/08/03 02:16 upstream 7d0d3fa7339e 1c9013ac .config log report info KCSAN: data-race in data_push_tail / string
ci2-upstream-kcsan-gce 2022/07/30 04:20 upstream e65c6a46df94 fef302b1 .config log report info KCSAN: data-race in data_push_tail / string
ci2-upstream-kcsan-gce 2022/07/29 04:38 upstream 33ea1340bafe fb95c74d .config log report info KCSAN: data-race in data_push_tail / string
ci2-upstream-kcsan-gce 2022/07/28 11:38 upstream 6e7765cb477a fb95c74d .config log report info KCSAN: data-race in data_push_tail / string
ci2-upstream-kcsan-gce 2022/07/26 22:55 upstream 5de64d44968e ae971e66 .config log report info KCSAN: data-race in data_push_tail / string
ci2-upstream-kcsan-gce 2022/07/07 00:29 upstream 9f09069cde34 bff65f44 .config log report info KCSAN: data-race in data_push_tail / string
ci2-upstream-kcsan-gce 2022/07/06 04:50 upstream e35e5b6f695d bff65f44 .config log report info KCSAN: data-race in data_push_tail / string
ci2-upstream-kcsan-gce 2022/07/05 14:55 upstream c1084b6c5620 bff65f44 .config log report info KCSAN: data-race in data_push_tail / string
ci2-upstream-kcsan-gce 2022/06/30 12:04 upstream d9b2ba67917c 1434eec0 .config log report info KCSAN: data-race in data_push_tail / string
ci2-upstream-kcsan-gce 2022/06/24 09:01 upstream 92f20ff72066 a5dbd430 .config log report info KCSAN: data-race in data_push_tail / string
ci2-upstream-kcsan-gce 2022/06/24 02:19 upstream 92f20ff72066 912f5df7 .config log report info KCSAN: data-race in data_push_tail / string
ci2-upstream-kcsan-gce 2022/06/19 10:20 upstream 354c6e071be9 8f633d84 .config log report info KCSAN: data-race in data_push_tail / string
ci2-upstream-kcsan-gce 2022/06/16 06:33 upstream 30306f6194ca 1719ee24 .config log report info KCSAN: data-race in data_push_tail / string
ci2-upstream-kcsan-gce 2022/06/11 21:16 upstream 0885eacdc81f 0d5abf15 .config log report info KCSAN: data-race in data_push_tail / string
ci2-upstream-kcsan-gce 2022/06/07 19:02 upstream e71e60cd74df b2706118 .config log report info KCSAN: data-race in data_push_tail / string
ci2-upstream-kcsan-gce 2022/06/05 21:08 upstream 952923ddc011 c8857892 .config log report info KCSAN: data-race in data_push_tail / string
ci2-upstream-kcsan-gce 2022/06/01 16:54 upstream 700170bf6b4d b4bc6a3d .config log report info KCSAN: data-race in data_push_tail / string
ci2-upstream-kcsan-gce 2022/05/28 15:16 upstream 9d004b2f4fea a46af346 .config log report info KCSAN: data-race in data_push_tail / string
ci2-upstream-kcsan-gce 2022/05/18 09:26 upstream 210e04ff7681 744a39e2 .config log report info KCSAN: data-race in data_push_tail / string
ci2-upstream-kcsan-gce 2022/05/16 10:41 upstream 42226c989789 744a39e2 .config log report info KCSAN: data-race in data_push_tail / string
ci2-upstream-kcsan-gce 2022/05/13 05:19 upstream 0ac824f379fb 9ad6612a .config log report info KCSAN: data-race in data_push_tail / string
ci2-upstream-kcsan-gce 2022/05/11 09:30 upstream feb9c5e19e91 8d7b3b67 .config log report info KCSAN: data-race in data_push_tail / string
ci2-upstream-kcsan-gce 2022/05/10 22:33 upstream 9be9ed2612b5 8b277b8e .config log report info KCSAN: data-race in data_push_tail / string
ci2-upstream-kcsan-gce 2022/04/29 02:39 upstream 259b897e5a79 e9076525 .config log report info KCSAN: data-race in data_push_tail / string
ci2-upstream-kcsan-gce 2022/04/27 07:10 upstream cf424ef014ac 1fa34c1b .config log report info KCSAN: data-race in data_push_tail / string
ci2-upstream-kcsan-gce 2022/04/24 22:53 upstream 42740a2ff5d3 131df97d .config log report info KCSAN: data-race in data_push_tail / string
ci2-upstream-kcsan-gce 2021/07/20 18:18 upstream 8cae8cd89f05 1b201b48 .config log report info KCSAN: data-race in data_push_tail / string
ci2-upstream-kcsan-gce 2021/07/19 13:52 upstream 2734d6c1b1a0 e6a17580 .config log report info KCSAN: data-race in data_push_tail / string
ci2-upstream-kcsan-gce 2021/03/15 21:32 upstream 1e28eed17697 fdb2bb2c .config log report info KCSAN: data-race in data_push_tail / string
* Struck through repros no longer work on HEAD.