[syzbot] [kernel?] upstream test error: KMSAN: uninit-value in irqentry_exit_to_kernel_mode_preempt

4 views
Skip to first unread message

syzbot

unread,
Apr 21, 2026, 5:37:36 PM (9 days ago) Apr 21
to linux-...@vger.kernel.org, lu...@kernel.org, pet...@infradead.org, syzkall...@googlegroups.com, tg...@kernel.org
Hello,

syzbot found the following issue on:

HEAD commit: 4ee64205ffaa Merge tag 'clk-for-linus' of git://git.kernel..
git tree: upstream
console output: https://syzkaller.appspot.com/x/log.txt?x=1706d702580000
kernel config: https://syzkaller.appspot.com/x/.config?x=ce4d707ce513c810
dashboard link: https://syzkaller.appspot.com/bug?extid=cdcfd55737fe43eeb3a3
compiler: Debian clang version 21.1.8 (++20251221033036+2078da43e25a-1~exp1~20251221153213.50), Debian LLD 21.1.8

Downloadable assets:
disk image: https://storage.googleapis.com/syzbot-assets/eed48de63104/disk-4ee64205.raw.xz
vmlinux: https://storage.googleapis.com/syzbot-assets/6ebe911e6995/vmlinux-4ee64205.xz
kernel image: https://storage.googleapis.com/syzbot-assets/557a239d8722/bzImage-4ee64205.xz

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

bridge0: port 1(bridge_slave_0) entered blocking state
bridge0: port 1(bridge_slave_0) entered forwarding state
=====================================================
BUG: KMSAN: uninit-value in irqentry_exit_to_kernel_mode_preempt+0xb0/0xc0 include/linux/irq-entry-common.h:472
irqentry_exit_to_kernel_mode_preempt+0xb0/0xc0 include/linux/irq-entry-common.h:472
irqentry_exit_to_kernel_mode include/linux/irq-entry-common.h:547 [inline]
irqentry_exit+0x7b/0x760 kernel/entry/common.c:164
sysvec_apic_timer_interrupt+0x52/0x90 arch/x86/kernel/apic/apic.c:1061
asm_sysvec_apic_timer_interrupt+0x1f/0x30 arch/x86/include/asm/idtentry.h:697
__sanitizer_cov_trace_pc+0x5/0x70 kernel/kcov.c:210
nsim_dev_trap_skb_build drivers/net/netdevsim/dev.c:842 [inline]
nsim_dev_trap_report drivers/net/netdevsim/dev.c:876 [inline]
nsim_dev_trap_report_work+0x8c0/0x1430 drivers/net/netdevsim/dev.c:922
process_one_work kernel/workqueue.c:3302 [inline]
process_scheduled_works+0xb65/0x1e40 kernel/workqueue.c:3385
worker_thread+0xee4/0x1590 kernel/workqueue.c:3466
kthread+0x53f/0x600 kernel/kthread.c:436
ret_from_fork+0x20f/0x8d0 arch/x86/kernel/process.c:158
ret_from_fork_asm+0x1a/0x30 arch/x86/entry/entry_64.S:245

Uninit was created at:
slab_post_alloc_hook mm/slub.c:4576 [inline]
slab_alloc_node mm/slub.c:4898 [inline]
__do_kmalloc_node mm/slub.c:5294 [inline]
__kmalloc_node_track_caller_noprof+0x4f6/0x1750 mm/slub.c:5403
kmalloc_reserve net/core/skbuff.c:635 [inline]
__alloc_skb+0x90d/0x1190 net/core/skbuff.c:713
alloc_skb include/linux/skbuff.h:1383 [inline]
nsim_dev_trap_skb_build drivers/net/netdevsim/dev.c:819 [inline]
nsim_dev_trap_report drivers/net/netdevsim/dev.c:876 [inline]
nsim_dev_trap_report_work+0x3f2/0x1430 drivers/net/netdevsim/dev.c:922
process_one_work kernel/workqueue.c:3302 [inline]
process_scheduled_works+0xb65/0x1e40 kernel/workqueue.c:3385
worker_thread+0xee4/0x1590 kernel/workqueue.c:3466
kthread+0x53f/0x600 kernel/kthread.c:436
ret_from_fork+0x20f/0x8d0 arch/x86/kernel/process.c:158
ret_from_fork_asm+0x1a/0x30 arch/x86/entry/entry_64.S:245

CPU: 1 UID: 0 PID: 13 Comm: kworker/u8:1 Not tainted syzkaller #0 PREEMPT(full)
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 03/18/2026
Workqueue: events_unbound nsim_dev_trap_report_work
=====================================================


---
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

Dmitry Vyukov

unread,
Apr 29, 2026, 2:30:01 AM (yesterday) Apr 29
to syzbot, kasan-dev, Alexander Potapenko, linux-...@vger.kernel.org, lu...@kernel.org, pet...@infradead.org, syzkall...@googlegroups.com, tg...@kernel.org
On Tue, 21 Apr 2026 at 23:37, syzbot
<syzbot+cdcfd5...@syzkaller.appspotmail.com> wrote:
>
> Hello,
>
> syzbot found the following issue on:
>
> HEAD commit: 4ee64205ffaa Merge tag 'clk-for-linus' of git://git.kernel..
> git tree: upstream
> console output: https://syzkaller.appspot.com/x/log.txt?x=1706d702580000
> kernel config: https://syzkaller.appspot.com/x/.config?x=ce4d707ce513c810
> dashboard link: https://syzkaller.appspot.com/bug?extid=cdcfd55737fe43eeb3a3
> compiler: Debian clang version 21.1.8 (++20251221033036+2078da43e25a-1~exp1~20251221153213.50), Debian LLD 21.1.8
>
> Downloadable assets:
> disk image: https://storage.googleapis.com/syzbot-assets/eed48de63104/disk-4ee64205.raw.xz
> vmlinux: https://storage.googleapis.com/syzbot-assets/6ebe911e6995/vmlinux-4ee64205.xz
> kernel image: https://storage.googleapis.com/syzbot-assets/557a239d8722/bzImage-4ee64205.xz
>
> IMPORTANT: if you fix the issue, please add the following tag to the commit:
> Reported-by: syzbot+cdcfd5...@syzkaller.appspotmail.com
>

+kmsan maintainers, not sure where it should be fixed: in irq code or
in kmsan code

Alexander Potapenko

unread,
Apr 29, 2026, 4:10:06 AM (yesterday) Apr 29
to Dmitry Vyukov, Mark Rutland, syzbot, kasan-dev, linux-...@vger.kernel.org, lu...@kernel.org, pet...@infradead.org, syzkall...@googlegroups.com, tg...@kernel.org, ruanj...@huawei.com
On Wed, Apr 29, 2026 at 8:29 AM Dmitry Vyukov <dvy...@google.com> wrote:
>
> On Tue, 21 Apr 2026 at 23:37, syzbot
> <syzbot+cdcfd5...@syzkaller.appspotmail.com> wrote:
> >
> > Hello,
> >
> > syzbot found the following issue on:
> >
> > HEAD commit: 4ee64205ffaa Merge tag 'clk-for-linus' of git://git.kernel..
> > git tree: upstream
> > console output: https://syzkaller.appspot.com/x/log.txt?x=1706d702580000
> > kernel config: https://syzkaller.appspot.com/x/.config?x=ce4d707ce513c810
> > dashboard link: https://syzkaller.appspot.com/bug?extid=cdcfd55737fe43eeb3a3
> > compiler: Debian clang version 21.1.8 (++20251221033036+2078da43e25a-1~exp1~20251221153213.50), Debian LLD 21.1.8
> >
> > Downloadable assets:
> > disk image: https://storage.googleapis.com/syzbot-assets/eed48de63104/disk-4ee64205.raw.xz
> > vmlinux: https://storage.googleapis.com/syzbot-assets/6ebe911e6995/vmlinux-4ee64205.xz
> > kernel image: https://storage.googleapis.com/syzbot-assets/557a239d8722/bzImage-4ee64205.xz
> >
> > IMPORTANT: if you fix the issue, please add the following tag to the commit:
> > Reported-by: syzbot+cdcfd5...@syzkaller.appspotmail.com
> >
>
> +kmsan maintainers, not sure where it should be fixed: in irq code or
> in kmsan code

I believe Mark's recent changes introduced this.
irqentry_exit_to_kernel_mode_preempt() is now checking for both `regs`
and `state`.
Because there is a lot of non-instrumented code around, we fail to
initialize these variables.
Instead, irqentry_enter_from_kernel_mode() explicitly calls
kmsan_unpoison_entry_regs(regs) to take care of the registers, but not
the state.
We should probably call `kmsan_unpoison_memory(&state, sizeof(state))`
at the same place.
Reply all
Reply to author
Forward
0 new messages