[moderation] [mm?] KCSAN: data-race in _prb_read_valid / prb_reserve_in_last (2)

2 views
Skip to first unread message

syzbot

unread,
Jul 23, 2025, 5:02:30 PM7/23/25
to syzkaller-upst...@googlegroups.com
Hello,

syzbot found the following issue on:

HEAD commit: 01a412d06bc5 Merge tag 'pull-ufs-fix' of git://git.kernel...
git tree: upstream
console output: https://syzkaller.appspot.com/x/log.txt?x=1672e4f0580000
kernel config: https://syzkaller.appspot.com/x/.config?x=c0dd0a92e88efc24
dashboard link: https://syzkaller.appspot.com/bug?extid=08a0b6dcd32b2b2dfcf7
compiler: Debian clang version 20.1.7 (++20250616065708+6146a88f6049-1~exp1~20250616065826.132), Debian LLD 20.1.7
CC: [ak...@linux-foundation.org han...@cmpxchg.org jack...@google.com linux-...@vger.kernel.org linu...@kvack.org mho...@suse.com sur...@google.com vba...@suse.cz z...@nvidia.com]

Unfortunately, I don't have any reproducer for this issue yet.

Downloadable assets:
disk image: https://storage.googleapis.com/syzbot-assets/ede6f30c84ca/disk-01a412d0.raw.xz
vmlinux: https://storage.googleapis.com/syzbot-assets/401f0382eacf/vmlinux-01a412d0.xz
kernel image: https://storage.googleapis.com/syzbot-assets/2a88235488d4/bzImage-01a412d0.xz

IMPORTANT: if you fix the issue, please add the following tag to the commit:
Reported-by: syzbot+08a0b6...@syzkaller.appspotmail.com

==================================================================
BUG: KCSAN: data-race in _prb_read_valid / prb_reserve_in_last

write to 0xffffffff8686a768 of 8 bytes by task 12330 on cpu 0:
data_realloc kernel/printk/printk_ringbuffer.c:1177 [inline]
prb_reserve_in_last+0x861/0xb80 kernel/printk/printk_ringbuffer.c:1440
vprintk_store+0x494/0x860 kernel/printk/printk.c:2300
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_free_areas mm/show_mem.c:346 [inline]
__show_mem+0xd8b/0x14b0 mm/show_mem.c:403
warn_alloc_show_mem mm/page_alloc.c:3719 [inline]
warn_alloc+0x189/0x1a0 mm/page_alloc.c:3744
__vmalloc_area_node mm/vmalloc.c:3702 [inline]
__vmalloc_node_range_noprof+0x497/0xe00 mm/vmalloc.c:3893
__vmalloc_node_noprof mm/vmalloc.c:3956 [inline]
__vmalloc_noprof+0x83/0xc0 mm/vmalloc.c:3970
bpf_prog_alloc_no_stats+0x47/0x390 kernel/bpf/core.c:104
bpf_prog_alloc+0x3c/0x150 kernel/bpf/core.c:146
bpf_prog_load+0x514/0x1070 kernel/bpf/syscall.c:2882
__sys_bpf+0x51d/0x790 kernel/bpf/syscall.c:5836
__do_sys_bpf kernel/bpf/syscall.c:5943 [inline]
__se_sys_bpf kernel/bpf/syscall.c:5941 [inline]
__x64_sys_bpf+0x41/0x50 kernel/bpf/syscall.c:5941
x64_sys_call+0x2478/0x2fb0 arch/x86/include/generated/asm/syscalls_64.h:322
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 0xffffffff8686a760 of 16 bytes by task 12340 on cpu 1:
desc_read kernel/printk/printk_ringbuffer.c:482 [inline]
desc_read_finalized_seq kernel/printk/printk_ringbuffer.c:1874 [inline]
prb_read kernel/printk/printk_ringbuffer.c:1922 [inline]
_prb_read_valid+0x1bc/0x920 kernel/printk/printk_ringbuffer.c:2113
prb_read_valid+0x3c/0x60 kernel/printk/printk_ringbuffer.c:2185
printk_get_next_message+0xc8/0x510 kernel/printk/printk.c:3005
console_emit_next_record kernel/printk/printk.c:3092 [inline]
console_flush_all+0x290/0x730 kernel/printk/printk.c:3226
__console_flush_and_unlock kernel/printk/printk.c:3285 [inline]
console_unlock+0xa1/0x330 kernel/printk/printk.c:3325
con_shutdown+0x4b/0x60 drivers/tty/vt/vt.c:3651
release_tty+0x85/0x4f0 drivers/tty/tty_io.c:1580
tty_release_struct+0x96/0xb0 drivers/tty/tty_io.c:1692
tty_release+0x856/0xb10 drivers/tty/tty_io.c:1852
__fput+0x29b/0x650 fs/file_table.c:465
____fput+0x1c/0x30 fs/file_table.c:493
task_work_run+0x131/0x1a0 kernel/task_work.c:227
resume_user_mode_work include/linux/resume_user_mode.h:50 [inline]
exit_to_user_mode_loop+0xe4/0x100 kernel/entry/common.c:114
exit_to_user_mode_prepare include/linux/entry-common.h:330 [inline]
syscall_exit_to_user_mode_work include/linux/entry-common.h:414 [inline]
syscall_exit_to_user_mode include/linux/entry-common.h:449 [inline]
do_syscall_64+0x1d6/0x200 arch/x86/entry/syscall_64.c:100
entry_SYSCALL_64_after_hwframe+0x77/0x7f

Reported by Kernel Concurrency Sanitizer on:
CPU: 1 UID: 0 PID: 12340 Comm: syz.2.2857 Not tainted 6.16.0-rc7-syzkaller-00018-g01a412d06bc5 #0 PREEMPT(voluntary)
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 05/07/2025
==================================================================


---
This report is generated by a bot. It may contain errors.
See https://goo.gl/tpsmEJ for more information about syzbot.
syzbot engineers can be reached at syzk...@googlegroups.com.

syzbot will keep track of this issue. See:
https://goo.gl/tpsmEJ#status for how to communicate with syzbot.

If the report is already addressed, let syzbot know by replying with:
#syz fix: exact-commit-title

If you want to overwrite report's subsystems, reply with:
#syz set subsystems: new-subsystem
(See the list of subsystem names on the web dashboard)

If the report is a duplicate of another one, reply with:
#syz dup: exact-subject-of-another-report

If you want to undo deduplication, reply with:
#syz undup
Reply all
Reply to author
Forward
0 new messages