syzbot


KCSAN: data-race in data_push_tail / vsnprintf (6)

Status: moderation: reported on 2023/12/07 10:15
Subsystems: ext4
[Documentation on labels]
Reported-by: syzbot+96a41bfe9f245b3c8350@syzkaller.appspotmail.com
First crash: 238d, last: 7d02h
Similar bugs (5)
Kernel Title Repro Cause bisect Fix bisect Count Last Reported Patched Status
upstream KCSAN: data-race in data_push_tail / vsnprintf (4) ext4 4 339d 427d 0/26 auto-obsoleted due to no activity on 2023/05/03 19:58
upstream KCSAN: data-race in data_push_tail / vsnprintf (3) kernel 8 550d 649d 0/26 auto-closed as invalid on 2022/10/04 16:48
upstream KCSAN: data-race in data_push_tail / vsnprintf (2) ext4 1 707d 707d 0/26 auto-closed as invalid on 2022/05/01 03:50
upstream KCSAN: data-race in data_push_tail / vsnprintf (5) block net 2 249d 278d 0/26 closed as invalid on 2023/06/28 10:46
upstream KCSAN: data-race in data_push_tail / vsnprintf usb 36 771d 1084d 0/26 auto-closed as invalid on 2022/02/26 00:52

Sample crash report:
SELinux: unrecognized netlink message: protocol=0 nlmsg_type=0 sclass=netlink_route_socket pid=26823 comm=syz-executor.0
==================================================================
BUG: KCSAN: data-race in data_push_tail / vsnprintf

write to 0xffffffff870d98b4 of 1 bytes by task 26824 on cpu 0:
 vsnprintf+0xdd8/0xe30
 vscnprintf+0x42/0x80 lib/vsprintf.c:2930
 printk_sprint+0x30/0x2d0 kernel/printk/printk.c:2124
 vprintk_store+0x56f/0x800 kernel/printk/printk.c:2238
 vprintk_emit+0xd0/0x5d0 kernel/printk/printk.c:2284
 vprintk_deferred kernel/printk/printk.c:3945 [inline]
 _printk_deferred+0x83/0xb0 kernel/printk/printk.c:3954
 ___ratelimit+0x293/0x2b0 lib/ratelimit.c:56
 xt_ct_set_helper net/netfilter/xt_CT.c:82 [inline]
 xt_ct_tg_check+0x56d/0x790 net/netfilter/xt_CT.c:203
 xt_ct_tg_check_v0+0xc3/0x130 net/netfilter/xt_CT.c:250
 xt_check_target+0x261/0x480 net/netfilter/x_tables.c:1038
 check_target net/ipv6/netfilter/ip6_tables.c:528 [inline]
 find_check_entry net/ipv6/netfilter/ip6_tables.c:571 [inline]
 translate_table+0xccb/0x1040 net/ipv6/netfilter/ip6_tables.c:733
 do_replace net/ipv6/netfilter/ip6_tables.c:1150 [inline]
 do_ip6t_set_ctl+0x14b3/0x1800 net/ipv6/netfilter/ip6_tables.c:1636
 nf_setsockopt+0x18d/0x1b0 net/netfilter/nf_sockopt.c:101
 ipv6_setsockopt+0x11c/0x130 net/ipv6/ipv6_sockglue.c:997
 rawv6_setsockopt+0x21e/0x410 net/ipv6/raw.c:1048
 sock_common_setsockopt+0x61/0x70 net/core/sock.c:3715
 do_sock_setsockopt net/socket.c:2311 [inline]
 __sys_setsockopt+0x1d4/0x240 net/socket.c:2334
 __do_sys_setsockopt net/socket.c:2343 [inline]
 __se_sys_setsockopt net/socket.c:2340 [inline]
 __x64_sys_setsockopt+0x66/0x80 net/socket.c:2340
 do_syscall_x64 arch/x86/entry/common.c:52 [inline]
 do_syscall_64+0xcd/0x1d0 arch/x86/entry/common.c:83
 entry_SYSCALL_64_after_hwframe+0x63/0x6b

read to 0xffffffff870d98b0 of 8 bytes by task 26823 on cpu 1:
 data_make_reusable kernel/printk/printk_ringbuffer.c:590 [inline]
 data_push_tail+0x102/0x430 kernel/printk/printk_ringbuffer.c:675
 data_alloc+0xbe/0x2c0 kernel/printk/printk_ringbuffer.c:1046
 prb_reserve+0x897/0xbc0 kernel/printk/printk_ringbuffer.c:1555
 vprintk_store+0x53e/0x800 kernel/printk/printk.c:2228
 vprintk_emit+0xd0/0x5d0 kernel/printk/printk.c:2284
 vprintk_default+0x26/0x30 kernel/printk/printk.c:2318
 vprintk+0x71/0x80 kernel/printk/printk_safe.c:45
 _printk+0x7a/0xa0 kernel/printk/printk.c:2328
 selinux_netlink_send+0x3fe/0x470 security/selinux/hooks.c:5964
 security_netlink_send+0x3e/0x70 security/security.c:4113
 netlink_sendmsg+0x563/0x770 net/netlink/af_netlink.c:1898
 sock_sendmsg_nosec net/socket.c:730 [inline]
 __sock_sendmsg net/socket.c:745 [inline]
 ____sys_sendmsg+0x37c/0x4d0 net/socket.c:2584
 ___sys_sendmsg net/socket.c:2638 [inline]
 __sys_sendmsg+0x1e9/0x270 net/socket.c:2667
 __do_sys_sendmsg net/socket.c:2676 [inline]
 __se_sys_sendmsg net/socket.c:2674 [inline]
 __x64_sys_sendmsg+0x46/0x50 net/socket.c:2674
 do_syscall_x64 arch/x86/entry/common.c:52 [inline]
 do_syscall_64+0xcd/0x1d0 arch/x86/entry/common.c:83
 entry_SYSCALL_64_after_hwframe+0x63/0x6b

value changed: 0x00000001000061d3 -> 0x000000010a646573

Reported by Kernel Concurrency Sanitizer on:
CPU: 1 PID: 26823 Comm: syz-executor.0 Not tainted 6.8.0-rc5-syzkaller-00329-gab0a97cffa0b #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/25/2024
==================================================================

Crashes (23):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2024/02/25 12:45 upstream ab0a97cffa0b 8d446f15 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in data_push_tail / vsnprintf
2024/01/30 09:45 upstream 861c0981648f 991a98f4 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in data_push_tail / vsnprintf
2024/01/25 05:00 upstream 443b349019f2 1e153dc8 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in data_push_tail / vsnprintf
2024/01/23 18:47 upstream 7ed2632ec7d7 1e153dc8 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in data_push_tail / vsnprintf
2024/01/21 03:21 upstream 125514880ddd 9bd8dcda .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in data_push_tail / vsnprintf
2024/01/14 06:19 upstream 052d534373b7 551587c1 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in data_push_tail / vsnprintf
2023/12/20 19:56 upstream 55cb5f43689d de21eb89 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in data_push_tail / vsnprintf
2023/12/11 12:25 upstream a39b6ac3781d 28b24332 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in data_push_tail / vsnprintf
2023/11/11 13:06 upstream 3ca112b71f35 6d6dbf8a .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in data_push_tail / vsnprintf
2023/11/06 18:18 upstream d2f51b3516da 78fae24e .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in data_push_tail / vsnprintf
2023/11/05 18:22 upstream 1c41041124bd 500bfdc4 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in data_push_tail / vsnprintf
2023/10/31 14:33 upstream 5a6a09e97199 58499c95 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in data_push_tail / vsnprintf
2023/10/30 13:42 upstream ffc253263a13 b5729d82 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in data_push_tail / vsnprintf
2023/10/16 08:00 upstream fbe1bf1e5ff1 f757a323 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in data_push_tail / vsnprintf
2023/10/09 20:02 upstream 94f6f0550c62 3c53c7d9 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in data_push_tail / vsnprintf
2023/10/07 21:15 upstream 59f3fd30af35 5e837c76 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in data_push_tail / vsnprintf
2023/10/07 07:28 upstream 82714078aee4 5e837c76 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in data_push_tail / vsnprintf
2023/10/05 18:53 upstream 3006adf3be79 db17ad9f .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in data_push_tail / vsnprintf
2023/09/19 20:28 upstream 2cf0f7156238 0b6a67ac .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in data_push_tail / vsnprintf
2023/08/26 13:44 upstream 382d4cd18475 7ba13a15 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in data_push_tail / vsnprintf
2023/08/21 23:48 upstream f7757129e3de 6b415825 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in data_push_tail / vsnprintf
2023/07/25 19:24 upstream 0b5547c51827 6756545c .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in data_push_tail / vsnprintf
2023/07/09 01:43 upstream 8fc3b8f082cc 668cb1fa .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in data_push_tail / vsnprintf
* Struck through repros no longer work on HEAD.