Re: [syzbot] [bpf?] KMSAN: uninit-value in handle_bug

From: syzbot

Date: Tue Mar 17 2026 - 02:48:39 EST


syzbot has found a reproducer for the following issue on:

HEAD commit: 2d1373e4246d Merge tag 'for-7.0-rc4-tag' of git://git.kern..
git tree: upstream
console output: https://syzkaller.appspot.com/x/log.txt?x=146bc4da580000
kernel config: https://syzkaller.appspot.com/x/.config?x=963de479f54c6dbb
dashboard link: https://syzkaller.appspot.com/bug?extid=ba80855313e6fa65717a
compiler: Debian clang version 21.1.8 (++20251221033036+2078da43e25a-1~exp1~20251221153213.50), Debian LLD 21.1.8
syz repro: https://syzkaller.appspot.com/x/repro.syz?x=14b4a8da580000
C reproducer: https://syzkaller.appspot.com/x/repro.c?x=16773406580000

Downloadable assets:
disk image: https://storage.googleapis.com/syzbot-assets/bef78207d3f7/disk-2d1373e4.raw.xz
vmlinux: https://storage.googleapis.com/syzbot-assets/35fd28ca5034/vmlinux-2d1373e4.xz
kernel image: https://storage.googleapis.com/syzbot-assets/c2b759faae9e/bzImage-2d1373e4.xz

IMPORTANT: if you fix the issue, please add the following tag to the commit:
Reported-by: syzbot+ba80855313e6fa65717a@xxxxxxxxxxxxxxxxxxxxxxxxx

------------[ cut here ]------------
=====================================================
BUG: KMSAN: uninit-value in vsnprintf+0x15be/0x1b00 lib/vsprintf.c:2912
vsnprintf+0x15be/0x1b00 lib/vsprintf.c:2912
vprintk_store+0x350/0x1550 kernel/printk/printk.c:2307
vprintk_emit+0x2c8/0xba0 kernel/printk/printk.c:2455
vprintk_default+0x3f/0x50 kernel/printk/printk.c:2494
vprintk+0x36/0x50 kernel/printk/printk_safe.c:82
__warn_printf lib/bug.c:190 [inline]
__report_bug+0xa10/0xe00 lib/bug.c:244
report_bug_entry+0x17c/0x220 lib/bug.c:269
handle_bug+0xe5/0x230 arch/x86/kernel/traps.c:430
exc_invalid_op+0x1f/0x50 arch/x86/kernel/traps.c:489
asm_exc_invalid_op+0x1f/0x30 arch/x86/include/asm/idtentry.h:616
reg_bounds_sanity_check+0x571/0x14e0 kernel/bpf/verifier.c:2817
reg_set_min_max+0x34b/0x450 kernel/bpf/verifier.c:17159
check_cond_jmp_op+0x3bf5/0x5370 kernel/bpf/verifier.c:17609
do_check_insn kernel/bpf/verifier.c:21168 [inline]
do_check+0xc7e8/0x1add0 kernel/bpf/verifier.c:21308
do_check_common+0x2705/0x4270 kernel/bpf/verifier.c:24650
do_check_main kernel/bpf/verifier.c:24733 [inline]
bpf_check+0x1f159/0x27e90 kernel/bpf/verifier.c:26056
bpf_prog_load+0x2b41/0x3140 kernel/bpf/syscall.c:3089
__sys_bpf+0x8e0/0xee0 kernel/bpf/syscall.c:6228
__do_sys_bpf kernel/bpf/syscall.c:6341 [inline]
__se_sys_bpf kernel/bpf/syscall.c:6339 [inline]
__x64_sys_bpf+0xa4/0xf0 kernel/bpf/syscall.c:6339
x64_sys_call+0x13d0/0x3ea0 arch/x86/include/generated/asm/syscalls_64.h:322
do_syscall_x64 arch/x86/entry/syscall_64.c:63 [inline]
do_syscall_64+0x134/0xf80 arch/x86/entry/syscall_64.c:94
entry_SYSCALL_64_after_hwframe+0x77/0x7f

Uninit was stored to memory at:
vsnprintf+0x15b7/0x1b00 lib/vsprintf.c:-1
vprintk_store+0x350/0x1550 kernel/printk/printk.c:2307
vprintk_emit+0x2c8/0xba0 kernel/printk/printk.c:2455
vprintk_default+0x3f/0x50 kernel/printk/printk.c:2494
vprintk+0x36/0x50 kernel/printk/printk_safe.c:82
__warn_printf lib/bug.c:190 [inline]
__report_bug+0xa10/0xe00 lib/bug.c:244
report_bug_entry+0x17c/0x220 lib/bug.c:269
handle_bug+0xe5/0x230 arch/x86/kernel/traps.c:430
exc_invalid_op+0x1f/0x50 arch/x86/kernel/traps.c:489
asm_exc_invalid_op+0x1f/0x30 arch/x86/include/asm/idtentry.h:616

Local variable pflags created at:
try_charge_memcg+0x63/0x1c20 mm/memcontrol.c:2367
obj_cgroup_charge_pages+0x69/0x330 mm/memcontrol.c:2857

CPU: 1 UID: 0 PID: 5997 Comm: syz.0.17 Not tainted syzkaller #0 PREEMPT(full)
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 02/12/2026
=====================================================


---
If you want syzbot to run the reproducer, reply with:
#syz test: git://repo/address.git branch-or-commit-hash
If you attach or paste a git patch, syzbot will apply it before testing.