syzbot


KCSAN: data-race in data_push_tail / uuid_string (4)

Status: moderation: reported on 2024/11/10 15:54
Subsystems: ext4
[Documentation on labels]
Reported-by: syzbot+571ade47503c6ba10541@syzkaller.appspotmail.com
First crash: 26d, last: 26d
Similar bugs (3)
Kernel Title Repro Cause bisect Fix bisect Count Last Reported Patched Status
upstream KCSAN: data-race in data_push_tail / uuid_string (3) ext4 1 232d 232d 0/28 auto-obsoleted due to no activity on 2024/05/24 03:21
upstream KCSAN: data-race in data_push_tail / uuid_string ext4 4 441d 519d 0/28 auto-obsoleted due to no activity on 2023/10/28 05:07
upstream KCSAN: data-race in data_push_tail / uuid_string (2) ext4 1 369d 365d 0/28 auto-obsoleted due to no activity on 2024/01/09 18:19

Sample crash report:
syz.0.2225[9651] is installing a program with bpf_probe_write_user helper that may corrupt user memory!
syz.0.2225[9651] is installing a program with bpf_probe_write_user helper that may corrupt user memory!
==================================================================
BUG: KCSAN: data-race in data_push_tail / uuid_string

write to 0xffffffff88bb5d71 of 1 bytes by task 3318 on cpu 0:
 string_nocheck lib/vsprintf.c:650 [inline]
 uuid_string+0x435/0x4b0 lib/vsprintf.c:1731
 pointer+0x3ee/0xd20 lib/vsprintf.c:2432
 vsnprintf+0x861/0xe30 lib/vsprintf.c:2807
 va_format lib/vsprintf.c:1683 [inline]
 pointer+0x8a1/0xd20 lib/vsprintf.c:2434
 vsnprintf+0x861/0xe30 lib/vsprintf.c:2807
 vscnprintf+0x42/0x90 lib/vsprintf.c:2909
 printk_sprint+0x30/0x2d0 kernel/printk/printk.c:2197
 vprintk_store+0x570/0x810 kernel/printk/printk.c:2311
 vprintk_emit+0x15e/0x680 kernel/printk/printk.c:2383
 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
 __ext4_msg+0x18e/0x1a0 fs/ext4/super.c:991
 ext4_put_super+0x91/0x840 fs/ext4/super.c:1296
 generic_shutdown_super+0xe5/0x220 fs/super.c:642
 kill_block_super+0x2a/0x70 fs/super.c:1710
 ext4_kill_sb+0x44/0x80 fs/ext4/super.c:7320
 deactivate_locked_super+0x7d/0x1c0 fs/super.c:473
 deactivate_super+0x9f/0xb0 fs/super.c:506
 cleanup_mnt+0x268/0x2e0 fs/namespace.c:1373
 __cleanup_mnt+0x19/0x20 fs/namespace.c:1380
 task_work_run+0x13a/0x1a0 kernel/task_work.c:239
 resume_user_mode_work include/linux/resume_user_mode.h:50 [inline]
 exit_to_user_mode_loop kernel/entry/common.c:114 [inline]
 exit_to_user_mode_prepare include/linux/entry-common.h:328 [inline]
 __syscall_exit_to_user_mode_work kernel/entry/common.c:207 [inline]
 syscall_exit_to_user_mode+0xbe/0x130 kernel/entry/common.c:218
 do_syscall_64+0xd6/0x1c0 arch/x86/entry/common.c:89
 entry_SYSCALL_64_after_hwframe+0x77/0x7f

read to 0xffffffff88bb5d70 of 8 bytes by task 9651 on cpu 1:
 data_make_reusable kernel/printk/printk_ringbuffer.c:594 [inline]
 data_push_tail+0x102/0x430 kernel/printk/printk_ringbuffer.c:679
 data_alloc+0xbe/0x2c0 kernel/printk/printk_ringbuffer.c:1054
 prb_reserve+0x85e/0xb60 kernel/printk/printk_ringbuffer.c:1669
 vprintk_store+0x53f/0x810 kernel/printk/printk.c:2301
 vprintk_emit+0x15e/0x680 kernel/printk/printk.c:2383
 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
 bpf_get_probe_write_proto+0x8b/0x90 kernel/trace/bpf_trace.c:365
 bpf_tracing_func_proto+0x596/0x790 kernel/trace/bpf_trace.c:1466
 raw_tp_prog_func_proto+0x65/0xc0 kernel/trace/bpf_trace.c:1938
 get_helper_proto kernel/bpf/verifier.c:10421 [inline]
 check_helper_call+0x131/0x3d30 kernel/bpf/verifier.c:10441
 do_check+0x4c42/0x7310 kernel/bpf/verifier.c:18526
 do_check_common+0xc34/0x1160 kernel/bpf/verifier.c:21615
 do_check_main kernel/bpf/verifier.c:21706 [inline]
 bpf_check+0xa7de/0xcbf0 kernel/bpf/verifier.c:22418
 bpf_prog_load+0xed4/0x1070 kernel/bpf/syscall.c:2846
 __sys_bpf+0x463/0x7a0 kernel/bpf/syscall.c:5653
 __do_sys_bpf kernel/bpf/syscall.c:5760 [inline]
 __se_sys_bpf kernel/bpf/syscall.c:5758 [inline]
 __x64_sys_bpf+0x43/0x50 kernel/bpf/syscall.c:5758
 x64_sys_call+0x2625/0x2d60 arch/x86/include/generated/asm/syscalls_64.h:322
 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: 0x00000000ffffe9ff -> 0x00000000ffffe920

Reported by Kernel Concurrency Sanitizer on:
CPU: 1 UID: 0 PID: 9651 Comm: syz.0.2225 Not tainted 6.12.0-rc6-syzkaller-00279-gde2f378f2b77 #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 09/13/2024
==================================================================
syz.0.2225[9651] is installing a program with bpf_probe_write_user helper that may corrupt user memory!
syz.0.2225 (9651) used greatest stack depth: 9080 bytes left

Crashes (1):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2024/11/10 15:53 upstream de2f378f2b77 6b856513 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in data_push_tail / uuid_string
* Struck through repros no longer work on HEAD.