syzbot


KCSAN: data-race in data_push_tail / dentry_name

Status: auto-closed as invalid on 2021/11/10 04:07
Subsystems: fs
[Documentation on labels]
First crash: 944d, last: 932d
Similar bugs (1)
Kernel Title Repro Cause bisect Fix bisect Count Last Reported Patched Status
upstream KCSAN: data-race in data_push_tail / dentry_name (2) mm 1 109d 106d 0/26 auto-obsoleted due to no activity on 2024/02/11 06:34

Sample crash report:
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011
==================================================================
BUG: KCSAN: data-race in data_push_tail / dentry_name

write to 0xffffffff841420e0 of 1 bytes by task 20646 on cpu 0:
 dentry_name+0x306/0x380 lib/vsprintf.c:943
 pointer+0x58e/0x830 lib/vsprintf.c:2437
 vsnprintf+0x8a1/0xed0 lib/vsprintf.c:2801
 vscnprintf+0x29/0x80 lib/vsprintf.c:2900
 printk_sprint kernel/printk/printk.c:2075 [inline]
 vprintk_store+0x606/0xb80 kernel/printk/printk.c:2185
 vprintk_emit+0xac/0x390 kernel/printk/printk.c:2228
 vprintk_default+0x22/0x30 kernel/printk/printk.c:2255
 vprintk+0x7f/0x90 kernel/printk/printk_safe.c:50
 _printk+0x76/0x97 kernel/printk/printk.c:2265
 fail_dump lib/fault-inject.c:45 [inline]
 should_fail+0x223/0x250 lib/fault-inject.c:146
 should_fail_usercopy+0x16/0x20 lib/fault-inject-usercopy.c:37
 _copy_to_user+0x1c/0x90 lib/usercopy.c:29
 copy_to_user include/linux/uaccess.h:200 [inline]
 simple_read_from_buffer+0xab/0x120 fs/libfs.c:741
 proc_fail_nth_read+0x10d/0x150 fs/proc/base.c:1423
 vfs_read+0x1e6/0x750 fs/read_write.c:483
 ksys_read+0xd9/0x190 fs/read_write.c:623
 __do_sys_read fs/read_write.c:633 [inline]
 __se_sys_read fs/read_write.c:631 [inline]
 __x64_sys_read+0x3e/0x50 fs/read_write.c:631
 do_syscall_x64 arch/x86/entry/common.c:50 [inline]
 do_syscall_64+0x44/0xa0 arch/x86/entry/common.c:80
 entry_SYSCALL_64_after_hwframe+0x44/0xae

read to 0xffffffff841420e0 of 8 bytes by task 20643 on cpu 1:
 data_make_reusable kernel/printk/printk_ringbuffer.c:587 [inline]
 data_push_tail+0x138/0x470 kernel/printk/printk_ringbuffer.c:672
 data_alloc+0xbc/0x2b0 kernel/printk/printk_ringbuffer.c:1043
 prb_reserve+0x920/0xbf0 kernel/printk/printk_ringbuffer.c:1549
 vprintk_store+0x53a/0xb80 kernel/printk/printk.c:2175
 vprintk_emit+0xac/0x390 kernel/printk/printk.c:2228
 vprintk_default+0x22/0x30 kernel/printk/printk.c:2255
 vprintk+0x7f/0x90 kernel/printk/printk_safe.c:50
 _printk+0x76/0x97 kernel/printk/printk.c:2265
 dump_stack_print_info+0x125/0x130 lib/dump_stack.c:66
 __dump_stack lib/dump_stack.c:87 [inline]
 dump_stack_lvl+0xca/0x122 lib/dump_stack.c:106
 dump_stack+0x11/0x1b lib/dump_stack.c:113
 fail_dump lib/fault-inject.c:52 [inline]
 should_fail+0x23c/0x250 lib/fault-inject.c:146
 should_fail_usercopy+0x16/0x20 lib/fault-inject-usercopy.c:37
 _copy_to_user+0x1c/0x90 lib/usercopy.c:29
 copy_to_user include/linux/uaccess.h:200 [inline]
 simple_read_from_buffer+0xab/0x120 fs/libfs.c:741
 proc_fail_nth_read+0x10d/0x150 fs/proc/base.c:1423
 vfs_read+0x1e6/0x750 fs/read_write.c:483
 ksys_read+0xd9/0x190 fs/read_write.c:623
 __do_sys_read fs/read_write.c:633 [inline]
 __se_sys_read fs/read_write.c:631 [inline]
 __x64_sys_read+0x3e/0x50 fs/read_write.c:631
 do_syscall_x64 arch/x86/entry/common.c:50 [inline]
 do_syscall_64+0x44/0xa0 arch/x86/entry/common.c:80
 entry_SYSCALL_64_after_hwframe+0x44/0xae

value changed: 0x00000001000076b6 -> 0x202c79706f637265

Reported by Kernel Concurrency Sanitizer on:
CPU: 1 PID: 20643 Comm: syz-executor.4 Tainted: G        W         5.15.0-rc4-syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011
==================================================================
Call Trace:
 __dump_stack lib/dump_stack.c:88 [inline]
 dump_stack_lvl+0xd6/0x122 lib/dump_stack.c:106
 dump_stack+0x11/0x1b lib/dump_stack.c:113
 fail_dump lib/fault-inject.c:52 [inline]
 should_fail+0x23c/0x250 lib/fault-inject.c:146
 should_fail_usercopy+0x16/0x20 lib/fault-inject-usercopy.c:37
 _copy_to_user+0x1c/0x90 lib/usercopy.c:29
 copy_to_user include/linux/uaccess.h:200 [inline]
 simple_read_from_buffer+0xab/0x120 fs/libfs.c:741
 proc_fail_nth_read+0x10d/0x150 fs/proc/base.c:1423
 vfs_read+0x1e6/0x750 fs/read_write.c:483
 ksys_read+0xd9/0x190 fs/read_write.c:623
 __do_sys_read fs/read_write.c:633 [inline]
 __se_sys_read fs/read_write.c:631 [inline]
 __x64_sys_read+0x3e/0x50 fs/read_write.c:631
 do_syscall_x64 arch/x86/entry/common.c:50 [inline]
 do_syscall_64+0x44/0xa0 arch/x86/entry/common.c:80
 entry_SYSCALL_64_after_hwframe+0x44/0xae
RIP: 0033:0x7f665e18e48c
Code: ec 28 48 89 54 24 18 48 89 74 24 10 89 7c 24 08 e8 f9 fc ff ff 48 8b 54 24 18 48 8b 74 24 10 41 89 c0 8b 7c 24 08 31 c0 0f 05 <48> 3d 00 f0 ff ff 77 34 44 89 c7 48 89 44 24 08 e8 2f fd ff ff 48
RSP: 002b:00007f665bf53170 EFLAGS: 00000246 ORIG_RAX: 0000000000000000
RAX: ffffffffffffffda RBX: 0000000000000000 RCX: 00007f665e18e48c
RDX: 000000000000000f RSI: 00007f665bf531e0 RDI: 0000000000000004
RBP: 00007f665bf531d0 R08: 0000000000000000 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000001
R13: 00007ffdb641972f R14: 00007f665bf53300 R15: 0000000000022000

Crashes (2):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2021/10/06 04:00 upstream 60a9483534ed 0a63fd36 .config console log report info ci2-upstream-kcsan-gce KCSAN: data-race in data_push_tail / dentry_name
2021/09/24 02:28 upstream f10f0481a5b5 8cac236e .config console log report info ci2-upstream-kcsan-gce KCSAN: data-race in data_push_tail / dentry_name
* Struck through repros no longer work on HEAD.