syzbot


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

Status: auto-closed as invalid on 2022/05/01 03:50
Reported-by: syzbot+@syzkaller.appspotmail.com
First crash: 244d, last: 244d
similar bugs (2):
Kernel Title Repro Cause bisect Fix bisect Count Last Reported Patched Status
upstream KCSAN: data-race in data_push_tail / vsnprintf (3) 8 88d 187d 0/24 auto-closed as invalid on 2022/10/04 16:48
upstream KCSAN: data-race in data_push_tail / vsnprintf 36 308d 622d 0/24 auto-closed as invalid on 2022/02/26 00:52

Sample crash report:
loop0: detected capacity change from 0 to 16383
==================================================================
BUG: KCSAN: data-race in data_push_tail / vsnprintf

write to 0xffffffff86fde03b of 1 bytes by task 27736 on cpu 0:
 vsnprintf+0xe8f/0xed0
 va_format lib/vsprintf.c:1704 [inline]
 pointer+0x4b0/0x860 lib/vsprintf.c:2443
 vsnprintf+0x8a1/0xed0 lib/vsprintf.c:2810
 vscnprintf+0x3e/0x80 lib/vsprintf.c:2912
 printk_sprint kernel/printk/printk.c:2099 [inline]
 vprintk_store+0x638/0xbb0 kernel/printk/printk.c:2209
 vprintk_emit+0xcc/0x430 kernel/printk/printk.c:2256
 vprintk_default+0x22/0x30 kernel/printk/printk.c:2283
 vprintk+0x7f/0x90 kernel/printk/printk_safe.c:50
 _printk+0x76/0x97 kernel/printk/printk.c:2293
 __ext4_msg+0x16d/0x180 fs/ext4/super.c:944
 __ext4_fill_super+0x1a74/0x5a00 fs/ext4/super.c:4833
 ext4_fill_super+0x10b/0x2f0 fs/ext4/super.c:5587
 get_tree_bdev+0x2c2/0x3d0 fs/super.c:1292
 vfs_get_tree+0x4a/0x1a0 fs/super.c:1497
 do_new_mount fs/namespace.c:3039 [inline]
 path_mount+0x11cf/0x1c40 fs/namespace.c:3369
 do_mount fs/namespace.c:3382 [inline]
 __do_sys_mount fs/namespace.c:3590 [inline]
 __se_sys_mount+0x24b/0x2f0 fs/namespace.c:3567
 __x64_sys_mount+0x63/0x70 fs/namespace.c:3567
 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+0x44/0xae

read to 0xffffffff86fde038 of 8 bytes by task 27737 on cpu 1:
 data_make_reusable kernel/printk/printk_ringbuffer.c:590 [inline]
 data_push_tail+0x138/0x470 kernel/printk/printk_ringbuffer.c:675
 data_alloc+0xbc/0x2b0 kernel/printk/printk_ringbuffer.c:1046
 prb_reserve+0x931/0xc10 kernel/printk/printk_ringbuffer.c:1555
 vprintk_store+0x560/0xbb0 kernel/printk/printk.c:2199
 vprintk_emit+0xcc/0x430 kernel/printk/printk.c:2256
 vprintk_default+0x22/0x30 kernel/printk/printk.c:2283
 vprintk+0x7f/0x90 kernel/printk/printk_safe.c:50
 _printk+0x76/0x97 kernel/printk/printk.c:2293
 set_capacity_and_notify+0x170/0x1d0 block/genhd.c:90
 loop_set_size drivers/block/loop.c:233 [inline]
 loop_configure+0xd53/0xf50 drivers/block/loop.c:1059
 lo_ioctl+0x633/0x1260
 blkdev_ioctl+0x20e/0x440 block/ioctl.c:588
 vfs_ioctl fs/ioctl.c:51 [inline]
 __do_sys_ioctl fs/ioctl.c:870 [inline]
 __se_sys_ioctl+0xcb/0x140 fs/ioctl.c:856
 __x64_sys_ioctl+0x3f/0x50 fs/ioctl.c:856
 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+0x44/0xae

value changed: 0x0000000100009f90 -> 0x000000000a797279

Reported by Kernel Concurrency Sanitizer on:
CPU: 1 PID: 27737 Comm: syz-executor.0 Not tainted 5.17.0-syzkaller-10753-gbddac7c1e02b-dirty #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011
==================================================================
EXT4-fs (loop0): ext4_check_descriptors: Block bitmap for group 0 overlaps superblock
EXT4-fs (loop0): ext4_check_descriptors: Inode bitmap for group 0 overlaps superblock
EXT4-fs (loop0): ext4_check_descriptors: Inode table for group 0 overlaps superblock
EXT4-fs error (device loop0): __ext4_fill_super:5310: inode #2: comm syz-executor.0: iget: root inode unallocated
EXT4-fs (loop0): get root inode failed
EXT4-fs (loop0): mount failed

Crashes (1):
Manager Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Title
ci2-upstream-kcsan-gce 2022/03/27 03:41 upstream bddac7c1e02b 89bc8608 .config log report info KCSAN: data-race in data_push_tail / vsnprintf
* Struck through repros no longer work on HEAD.