syzbot


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

Status: auto-closed as invalid on 2022/10/04 16:48
Subsystems: kernel
[Documentation on labels]
First crash: 704d, last: 605d
Similar bugs (5)
Kernel Title Repro Cause bisect Fix bisect Count Last Reported Patched Status
upstream KCSAN: data-race in data_push_tail / vsnprintf (6) ext4 23 61d 141d 0/26 auto-obsoleted due to no activity on 2024/03/31 12:46
upstream KCSAN: data-race in data_push_tail / vsnprintf (4) ext4 4 393d 481d 0/26 auto-obsoleted due to no activity on 2023/05/03 19:58
upstream KCSAN: data-race in data_push_tail / vsnprintf (2) ext4 1 761d 761d 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 304d 332d 0/26 closed as invalid on 2023/06/28 10:46
upstream KCSAN: data-race in data_push_tail / vsnprintf usb 36 825d 1139d 0/26 auto-closed as invalid on 2022/02/26 00:52

Sample crash report:
vhci_hcd vhci_hcd.0: pdev(0) rhport(0) sockfd(3)
==================================================================
BUG: KCSAN: data-race in data_push_tail / vsnprintf

write to 0xffffffff87082d59 of 1 bytes by task 817 on cpu 1:
 vsnprintf+0xe2a/0xe80
 va_format lib/vsprintf.c:1680 [inline]
 pointer+0x685/0x910 lib/vsprintf.c:2419
 vsnprintf+0x905/0xe80 lib/vsprintf.c:2786
 vscnprintf+0x3e/0x80 lib/vsprintf.c:2888
 printk_sprint kernel/printk/printk.c:2092 [inline]
 vprintk_store+0x5f2/0xb50 kernel/printk/printk.c:2206
 vprintk_emit+0xcc/0x430 kernel/printk/printk.c:2252
 dev_vprintk_emit+0x1c9/0x1ed drivers/base/core.c:4736
 dev_printk_emit+0x7e/0xa2 drivers/base/core.c:4747
 __dev_printk+0xfa/0x110 drivers/base/core.c:4759
 _dev_info+0x9d/0xc1 drivers/base/core.c:4805
 attach_store+0x49a/0x6d0 drivers/usb/usbip/vhci_sysfs.c:415
 dev_attr_store+0x40/0x60 drivers/base/core.c:2211
 sysfs_kf_write+0xa6/0xc0 fs/sysfs/file.c:136
 kernfs_fop_write_iter+0x1d3/0x2c0 fs/kernfs/file.c:354
 call_write_iter include/linux/fs.h:2187 [inline]
 new_sync_write fs/read_write.c:491 [inline]
 vfs_write+0x468/0x760 fs/read_write.c:578
 ksys_write+0xe8/0x1a0 fs/read_write.c:631
 __do_sys_write fs/read_write.c:643 [inline]
 __se_sys_write fs/read_write.c:640 [inline]
 __x64_sys_write+0x3e/0x50 fs/read_write.c:640
 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 0xffffffff87082d58 of 8 bytes by task 818 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:2196
 vprintk_emit+0xcc/0x430 kernel/printk/printk.c:2252
 dev_vprintk_emit+0x1c9/0x1ed drivers/base/core.c:4736
 dev_printk_emit+0x7e/0xa2 drivers/base/core.c:4747
 __dev_printk+0xfa/0x110 drivers/base/core.c:4759
 _dev_info+0x9d/0xc1 drivers/base/core.c:4805
 attach_store+0x49a/0x6d0 drivers/usb/usbip/vhci_sysfs.c:415
 dev_attr_store+0x40/0x60 drivers/base/core.c:2211
 sysfs_kf_write+0xa6/0xc0 fs/sysfs/file.c:136
 kernfs_fop_write_iter+0x1d3/0x2c0 fs/kernfs/file.c:354
 call_write_iter include/linux/fs.h:2187 [inline]
 new_sync_write fs/read_write.c:491 [inline]
 vfs_write+0x468/0x760 fs/read_write.c:578
 ksys_write+0xe8/0x1a0 fs/read_write.c:631
 __do_sys_write fs/read_write.c:643 [inline]
 __se_sys_write fs/read_write.c:640 [inline]
 __x64_sys_write+0x3e/0x50 fs/read_write.c:640
 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: 0x0000000100018a8f -> 0x0000000100018a0a

Reported by Kernel Concurrency Sanitizer on:
CPU: 0 PID: 818 Comm: syz-executor.0 Not tainted 6.0.0-rc3-syzkaller-00007-gdcf8e5633e2e-dirty #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 07/22/2022
==================================================================
vhci_hcd vhci_hcd.0: devid(0) speed(3) speed_str(high-speed)
vhci_hcd vhci_hcd.0: Device attached

Crashes (8):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2022/08/30 16:42 upstream dcf8e5633e2e 4a380809 .config console log report info [disk image] [vmlinux] ci2-upstream-kcsan-gce KCSAN: data-race in data_push_tail / vsnprintf
2022/08/25 04:15 upstream c40e8341e3b3 514514f6 .config console log report info ci2-upstream-kcsan-gce KCSAN: data-race in data_push_tail / vsnprintf
2022/07/27 16:32 upstream 39c3c396f813 da9d0366 .config console log report info ci2-upstream-kcsan-gce KCSAN: data-race in data_push_tail / vsnprintf
2022/07/02 04:20 upstream b336ad598a3b 1434eec0 .config console log report info ci2-upstream-kcsan-gce KCSAN: data-race in data_push_tail / vsnprintf
2022/06/30 23:16 upstream 1a0e93df1e10 1434eec0 .config console log report info ci2-upstream-kcsan-gce KCSAN: data-race in data_push_tail / vsnprintf
2022/06/02 04:43 upstream 8eca6b0a647a b4bc6a3d .config console log report info ci2-upstream-kcsan-gce KCSAN: data-race in data_push_tail / vsnprintf
2022/06/01 00:22 upstream e1cbc3b96a99 3666edfe .config console log report info ci2-upstream-kcsan-gce KCSAN: data-race in data_push_tail / vsnprintf
2022/05/23 17:16 upstream 4b0986a3613c 4c7657cb .config console log report info ci2-upstream-kcsan-gce KCSAN: data-race in data_push_tail / vsnprintf
* Struck through repros no longer work on HEAD.