syzbot


KCSAN: data-race in memchr / string (7)

Status: moderation: reported on 2025/10/09 00:00
Subsystems: audit
[Documentation on labels]
Reported-by: syzbot+c4535ed1abdf56b12a8b@syzkaller.appspotmail.com
First crash: 2d11h, last: 2d11h
Similar bugs (6)
Kernel Title Rank 🛈 Repro Cause bisect Fix bisect Count Last Reported Patched Status
upstream KCSAN: data-race in memchr / string (3) audit 6 7 505d 517d 0/29 auto-obsoleted due to no activity on 2024/06/28 09:14
upstream KCSAN: data-race in memchr / string (4) audit 6 1 455d 455d 0/29 auto-obsoleted due to no activity on 2024/08/16 20:32
upstream KCSAN: data-race in memchr / string (6) audit 6 1 120d 120d 0/29 auto-obsoleted due to no activity on 2025/08/07 14:40
upstream KCSAN: data-race in memchr / string (5) audit 6 1 401d 401d 0/29 auto-obsoleted due to no activity on 2024/10/10 00:33
upstream KCSAN: data-race in memchr / string v9fs 6 1 1559d 1559d 0/29 auto-closed as invalid on 2021/08/08 15:57
upstream KCSAN: data-race in memchr / string (2) mm 6 1 1312d 1312d 0/29 auto-closed as invalid on 2022/04/12 14:29

Sample crash report:
==================================================================
BUG: KCSAN: data-race in memchr / string

write to 0xffffffff88e581c2 of 1 bytes by task 29 on cpu 1:
 string_nocheck lib/vsprintf.c:657 [inline]
 string+0x187/0x220 lib/vsprintf.c:735
 vsnprintf+0x532/0x890 lib/vsprintf.c:2926
 vscnprintf+0x41/0x90 lib/vsprintf.c:2991
 printk_sprint+0x30/0x2d0 kernel/printk/printk.c:2189
 vprintk_store+0x599/0x860 kernel/printk/printk.c:2309
 vprintk_emit+0x10d/0x580 kernel/printk/printk.c:2399
 vprintk_default+0x26/0x30 kernel/printk/printk.c:2438
 vprintk+0x1d/0x30 kernel/printk/printk_safe.c:82
 _printk+0x79/0xa0 kernel/printk/printk.c:2448
 kauditd_printk_skb kernel/audit.c:583 [inline]
 kauditd_hold_skb+0x1b1/0x1c0 kernel/audit.c:618
 kauditd_send_queue+0x273/0x2c0 kernel/audit.c:803
 kauditd_thread+0x421/0x630 kernel/audit.c:927
 kthread+0x486/0x510 kernel/kthread.c:463
 ret_from_fork+0x122/0x1b0 arch/x86/kernel/process.c:158
 ret_from_fork_asm+0x1a/0x30 arch/x86/entry/entry_64.S:245

read to 0xffffffff88e581c2 of 1 bytes by task 27980 on cpu 0:
 memchr+0x28/0x50 lib/string.c:809
 memchr include/linux/fortify-string.h:739 [inline]
 count_lines kernel/printk/printk_ringbuffer.c:1815 [inline]
 copy_data kernel/printk/printk_ringbuffer.c:1861 [inline]
 prb_read kernel/printk/printk_ringbuffer.c:1954 [inline]
 _prb_read_valid+0x65d/0x920 kernel/printk/printk_ringbuffer.c:2131
 prb_read_valid_info+0x66/0x90 kernel/printk/printk_ringbuffer.c:2238
 do_syslog+0x6e2/0x7e0 kernel/printk/printk.c:1826
 __do_sys_syslog kernel/printk/printk.c:1850 [inline]
 __se_sys_syslog kernel/printk/printk.c:1848 [inline]
 __x64_sys_syslog+0x41/0x50 kernel/printk/printk.c:1848
 x64_sys_call+0x2f45/0x3000 arch/x86/include/generated/asm/syscalls_64.h:104
 do_syscall_x64 arch/x86/entry/syscall_64.c:63 [inline]
 do_syscall_64+0xd2/0x200 arch/x86/entry/syscall_64.c:94
 entry_SYSCALL_64_after_hwframe+0x77/0x7f

value changed: 0x29 -> 0x6d

Reported by Kernel Concurrency Sanitizer on:
CPU: 0 UID: 0 PID: 27980 Comm: syz.9.5827 Tainted: G        W           syzkaller #0 PREEMPT(voluntary) 
Tainted: [W]=WARN
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 08/18/2025
==================================================================

Crashes (1):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2025/10/08 23:59 upstream 0d97f2067c16 7e2882b3 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in memchr / string
* Struck through repros no longer work on HEAD.