syzbot


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

Status: moderation: reported on 2025/07/18 06:47
Subsystems: kernel
[Documentation on labels]
Reported-by: syzbot+bc481c0f87c5cf781cf4@syzkaller.appspotmail.com
First crash: 1d09h, last: 1d09h
Similar bugs (3)
Kernel Title Rank 🛈 Repro Cause bisect Fix bisect Count Last Reported Patched Status
upstream KCSAN: data-race in data_push_tail / hex_string kernel 6 1 1456d 1456d 0/29 auto-closed as invalid on 2021/08/27 18:21
upstream KCSAN: data-race in data_push_tail / hex_string (3) kernel 6 1 100d 100d 0/29 auto-obsoleted due to no activity on 2025/06/04 16:05
upstream KCSAN: data-race in data_push_tail / hex_string (2) kernel 6 1 581d 581d 0/29 auto-obsoleted due to no activity on 2024/01/19 21:50

Sample crash report:
BUG: KCSAN: data-race in data_push_tail / hex_string

write to 0xffffffff88e446b0 of 1 bytes by task 8056 on cpu 0:
 hex_string+0x28e/0x330 lib/vsprintf.c:1209
 pointer+0x2d7/0xcf0 lib/vsprintf.c:2468
 vsnprintf+0x491/0x890 lib/vsprintf.c:2878
 vscnprintf+0x41/0x90 lib/vsprintf.c:2939
 printk_sprint+0x30/0x2d0 kernel/printk/printk.c:2216
 vprintk_store+0x599/0x860 kernel/printk/printk.c:2336
 vprintk_emit+0x178/0x650 kernel/printk/printk.c:2426
 vprintk_default+0x26/0x30 kernel/printk/printk.c:2465
 vprintk+0x1d/0x30 kernel/printk/printk_safe.c:82
 _printk+0x79/0xa0 kernel/printk/printk.c:2475
 show_opcodes+0xfe/0x120 arch/x86/kernel/dumpstack.c:121
 show_iret_regs+0x12/0x40 arch/x86/kernel/dumpstack.c:147
 __show_regs+0x2a/0x440 arch/x86/kernel/process_64.c:77
 show_regs_if_on_stack arch/x86/kernel/dumpstack.c:165 [inline]
 show_trace_log_lvl+0x423/0x560 arch/x86/kernel/dumpstack.c:298
 __dump_stack+0x1d/0x30 lib/dump_stack.c:94
 dump_stack_lvl+0xe8/0x140 lib/dump_stack.c:120
 dump_stack+0x15/0x1b lib/dump_stack.c:129
 fail_dump lib/fault-inject.c:73 [inline]
 should_fail_ex+0x265/0x280 lib/fault-inject.c:174
 should_fail_alloc_page+0xf2/0x100 mm/fail_page_alloc.c:44
 prepare_alloc_pages mm/page_alloc.c:4734 [inline]
 __alloc_frozen_pages_noprof+0xff/0x360 mm/page_alloc.c:4948
 alloc_pages_mpol+0xb3/0x250 mm/mempolicy.c:2419
 folio_alloc_mpol_noprof mm/mempolicy.c:2438 [inline]
 vma_alloc_folio_noprof+0x1aa/0x300 mm/mempolicy.c:2473
 folio_prealloc mm/memory.c:-1 [inline]
 alloc_anon_folio mm/memory.c:5014 [inline]
 do_anonymous_page mm/memory.c:5071 [inline]
 do_pte_missing mm/memory.c:4249 [inline]
 handle_pte_fault mm/memory.c:6069 [inline]
 __handle_mm_fault mm/memory.c:6212 [inline]
 handle_mm_fault+0xec2/0x2be0 mm/memory.c:6381
 do_user_addr_fault+0x3fe/0x1090 arch/x86/mm/fault.c:1387
 handle_page_fault arch/x86/mm/fault.c:1476 [inline]
 exc_page_fault+0x62/0xa0 arch/x86/mm/fault.c:1532
 asm_exc_page_fault+0x26/0x30 arch/x86/include/asm/idtentry.h:623
 __put_user_8+0xd/0x20 arch/x86/lib/putuser.S:113
 processcompl+0x3eb/0x410 drivers/usb/core/devio.c:2073
 proc_reapurb drivers/usb/core/devio.c:2112 [inline]
 usbdev_do_ioctl drivers/usb/core/devio.c:2617 [inline]
 usbdev_ioctl+0x1ea/0x1710 drivers/usb/core/devio.c:2827
 vfs_ioctl fs/ioctl.c:51 [inline]
 __do_sys_ioctl fs/ioctl.c:907 [inline]
 __se_sys_ioctl+0xce/0x140 fs/ioctl.c:893
 __x64_sys_ioctl+0x43/0x50 fs/ioctl.c:893
 x64_sys_call+0x19a8/0x2fb0 arch/x86/include/generated/asm/syscalls_64.h:17
 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

read to 0xffffffff88e446b0 of 8 bytes by task 8058 on cpu 1:
 data_make_reusable kernel/printk/printk_ringbuffer.c:594 [inline]
 data_push_tail+0xfd/0x420 kernel/printk/printk_ringbuffer.c:679
 data_alloc+0xbf/0x2b0 kernel/printk/printk_ringbuffer.c:1054
 prb_reserve+0x808/0xaf0 kernel/printk/printk_ringbuffer.c:1669
 vprintk_store+0x56d/0x860 kernel/printk/printk.c:2326
 vprintk_emit+0x178/0x650 kernel/printk/printk.c:2426
 vprintk_default+0x26/0x30 kernel/printk/printk.c:2465
 vprintk+0x1d/0x30 kernel/printk/printk_safe.c:82
 _printk+0x79/0xa0 kernel/printk/printk.c:2475
 __nla_validate_parse+0x1738/0x1d00 lib/nlattr.c:647
 __nla_parse+0x40/0x60 lib/nlattr.c:732
 nla_parse_nested_deprecated include/net/netlink.h:1365 [inline]
 rtnl_newlink+0x793/0x12d0 net/core/rtnetlink.c:4002
 rtnetlink_rcv_msg+0x5fe/0x6d0 net/core/rtnetlink.c:6944
 netlink_rcv_skb+0x120/0x220 net/netlink/af_netlink.c:2552
 rtnetlink_rcv+0x1c/0x30 net/core/rtnetlink.c:6971
 netlink_unicast_kernel net/netlink/af_netlink.c:1320 [inline]
 netlink_unicast+0x5a8/0x680 net/netlink/af_netlink.c:1346
 netlink_sendmsg+0x58b/0x6b0 net/netlink/af_netlink.c:1896
 sock_sendmsg_nosec net/socket.c:712 [inline]
 __sock_sendmsg+0x145/0x180 net/socket.c:727
 ____sys_sendmsg+0x31e/0x4e0 net/socket.c:2566
 ___sys_sendmsg+0x17b/0x1d0 net/socket.c:2620
 __sys_sendmsg net/socket.c:2652 [inline]
 __do_sys_sendmsg net/socket.c:2657 [inline]
 __se_sys_sendmsg net/socket.c:2655 [inline]
 __x64_sys_sendmsg+0xd4/0x160 net/socket.c:2655
 x64_sys_call+0x2999/0x2fb0 arch/x86/include/generated/asm/syscalls_64.h:47
 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: 0x0000000100002fca -> 0x2031302066302039

Reported by Kernel Concurrency Sanitizer on:
CPU: 1 UID: 0 PID: 8058 Comm: syz.3.13652 Not tainted 6.16.0-rc6-syzkaller-00121-g6832a9317eee #0 PREEMPT(voluntary) 
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 05/07/2025
==================================================================

Crashes (1):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2025/07/18 06:46 upstream 6832a9317eee 88248e14 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in data_push_tail / hex_string
* Struck through repros no longer work on HEAD.