syzbot


KCSAN: data-race in console_flush_all / console_flush_all

Status: moderation: reported on 2024/09/24 07:21
Subsystems: selinux
[Documentation on labels]
Reported-by: syzbot+e1863428fbecbb36ac13@syzkaller.appspotmail.com
First crash: 18d, last: 1d19h

Sample crash report:
loop3: detected capacity change from 0 to 2048
==================================================================
BUG: KCSAN: data-race in console_flush_all / console_flush_all

write to 0xffffffff86816a48 of 8 bytes by task 9563 on cpu 0:
 console_emit_next_record kernel/printk/printk.c:3053 [inline]
 console_flush_all+0x395/0x770 kernel/printk/printk.c:3180
 __console_flush_and_unlock kernel/printk/printk.c:3239 [inline]
 console_unlock+0xab/0x330 kernel/printk/printk.c:3279
 vprintk_emit+0x3f4/0x680 kernel/printk/printk.c:2407
 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
 isofs_fill_super+0x1272/0x1290 fs/isofs/inode.c:661
 get_tree_bdev+0x256/0x2e0 fs/super.c:1635
 isofs_get_tree+0x1c/0x30 fs/isofs/inode.c:1526
 vfs_get_tree+0x56/0x1e0 fs/super.c:1800
 do_new_mount+0x227/0x690 fs/namespace.c:3507
 path_mount+0x49b/0xb30 fs/namespace.c:3834
 do_mount fs/namespace.c:3847 [inline]
 __do_sys_mount fs/namespace.c:4055 [inline]
 __se_sys_mount+0x27c/0x2d0 fs/namespace.c:4032
 __x64_sys_mount+0x67/0x80 fs/namespace.c:4032
 x64_sys_call+0x203e/0x2d60 arch/x86/include/generated/asm/syscalls_64.h:166
 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 0xffffffff86816a48 of 8 bytes by task 9565 on cpu 1:
 console_flush_all+0x57e/0x770 kernel/printk/printk.c:3181
 __console_flush_and_unlock kernel/printk/printk.c:3239 [inline]
 console_unlock+0xab/0x330 kernel/printk/printk.c:3279
 vprintk_emit+0x3f4/0x680 kernel/printk/printk.c:2407
 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
 set_capacity_and_notify+0xff/0x160 block/genhd.c:86
 loop_set_size+0x2e/0x70 drivers/block/loop.c:232
 loop_configure+0x8a7/0xa30 drivers/block/loop.c:1102
 lo_ioctl+0x5f6/0x11c0
 blkdev_ioctl+0x359/0x450 block/ioctl.c:693
 vfs_ioctl fs/ioctl.c:51 [inline]
 __do_sys_ioctl fs/ioctl.c:907 [inline]
 __se_sys_ioctl+0xcd/0x140 fs/ioctl.c:893
 __x64_sys_ioctl+0x43/0x50 fs/ioctl.c:893
 x64_sys_call+0x15cc/0x2d60 arch/x86/include/generated/asm/syscalls_64.h:17
 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: 0x0000000000001d17 -> 0x0000000000001d18

Reported by Kernel Concurrency Sanitizer on:
CPU: 1 UID: 0 PID: 9565 Comm: syz.3.2039 Tainted: G        W          6.12.0-rc2-syzkaller-00100-geb952c47d154 #0
Tainted: [W]=WARN
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 09/13/2024
==================================================================
ext4: Unknown parameter 'nouser_xattr'

Crashes (2):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2024/10/11 00:49 upstream eb952c47d154 8fbfc0c8 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in console_flush_all / console_flush_all
2024/09/24 07:20 upstream 18ba6034468e 89298aad .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in console_flush_all / console_flush_all
* Struck through repros no longer work on HEAD.