[moderation] [virt?] KFENCE: use-after-free read in virtqueue_get_buf_ctx

0 views
Skip to first unread message

syzbot

unread,
Jul 29, 2026, 8:20:28 PM (10 hours ago) Jul 29
to syzkaller-upst...@googlegroups.com
Hello,

syzbot found the following issue on:

HEAD commit: 0ce37745d4bf Merge tag 'block-7.2-20260724' of git://git.k..
git tree: upstream
console output: https://syzkaller.appspot.com/x/log.txt?x=111e3746580000
kernel config: https://syzkaller.appspot.com/x/.config?x=cb17729fb04b1e3a
dashboard link: https://syzkaller.appspot.com/bug?extid=0f659760bac1ecb01812
compiler: Debian clang version 22.1.8 (++20260613092233+e80beda6e255-1~exp1~20260613092250.77), Debian LLD 22.1.8
CC: [eper...@redhat.com jasow...@gmail.com linux-...@vger.kernel.org m...@redhat.com virtual...@lists.linux.dev xuan...@linux.alibaba.com]

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

Downloadable assets:
disk image: https://storage.googleapis.com/syzbot-assets/1602ba4dd141/disk-0ce37745.raw.xz
vmlinux: https://storage.googleapis.com/syzbot-assets/b4104b1c9037/vmlinux-0ce37745.xz
kernel image: https://storage.googleapis.com/syzbot-assets/07e13b080f2a/bzImage-0ce37745.xz

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

==================================================================
BUG: KFENCE: use-after-free read in virtqueue_get_buf_ctx+0x42/0x2150 drivers/virtio/virtio_ring.c:3129

Use-after-free read at 0xffff88823be22048 (in kfence-#16):
virtqueue_get_buf_ctx+0x42/0x2150 drivers/virtio/virtio_ring.c:3129
stats_handle_request drivers/virtio/virtio_balloon.c:450 [inline]
update_balloon_stats_func+0x121/0x300 drivers/virtio/virtio_balloon.c:547
process_one_work kernel/workqueue.c:3322 [inline]
process_scheduled_works+0xa8e/0x14e0 kernel/workqueue.c:3405
worker_thread+0xa47/0xfb0 kernel/workqueue.c:3486
kthread+0x388/0x470 kernel/kthread.c:436
ret_from_fork+0x514/0xb70 arch/x86/kernel/process.c:158
ret_from_fork_asm+0x1a/0x30 arch/x86/entry/entry_64.S:245

kfence-#16: 0xffff88823be22f00-0xffff88823be22fef, size=240, cache=skbuff_head_cache

allocated by task 13198 on cpu 0 at 1787.700554s (0.398917s ago):
__alloc_skb+0x1d7/0x7a0 net/core/skbuff.c:704
alloc_skb include/linux/skbuff.h:1384 [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+0x2b1/0xcb0 drivers/net/netdevsim/dev.c:922
process_one_work kernel/workqueue.c:3322 [inline]
process_scheduled_works+0xa8e/0x14e0 kernel/workqueue.c:3405
worker_thread+0xa47/0xfb0 kernel/workqueue.c:3486
kthread+0x388/0x470 kernel/kthread.c:436
ret_from_fork+0x514/0xb70 arch/x86/kernel/process.c:158
ret_from_fork_asm+0x1a/0x30 arch/x86/entry/entry_64.S:245

freed by task 13198 on cpu 0 at 1787.704288s (0.395347s ago):
nsim_dev_trap_report drivers/net/netdevsim/dev.c:892 [inline]
nsim_dev_trap_report_work+0x879/0xcb0 drivers/net/netdevsim/dev.c:922
process_one_work kernel/workqueue.c:3322 [inline]
process_scheduled_works+0xa8e/0x14e0 kernel/workqueue.c:3405
worker_thread+0xa47/0xfb0 kernel/workqueue.c:3486
kthread+0x388/0x470 kernel/kthread.c:436
ret_from_fork+0x514/0xb70 arch/x86/kernel/process.c:158
ret_from_fork_asm+0x1a/0x30 arch/x86/entry/entry_64.S:245

CPU: 0 UID: 0 PID: 25534 Comm: kworker/0:1 Tainted: G L syzkaller #0 PREEMPT_{RT,(full)}
Tainted: [L]=SOFTLOCKUP
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 07/16/2026
Workqueue: events_freezable update_balloon_stats_func
RIP: 0010:virtqueue_get_buf_ctx+0x42/0x2150 drivers/virtio/virtio_ring.c:3129
Code: 48 89 fb 49 bd 00 00 00 00 00 fc ff df e8 26 18 87 fc 4c 8d 73 48 4c 89 f0 48 c1 e8 03 42 0f b6 04 28 84 c0 0f 85 d5 15 00 00 <45> 8b 36 4c 89 f7 48 c7 c6 e0 de a8 8e e8 0c 1e 87 fc 41 83 fe 01
RSP: 0018:ffffc900110d7960 EFLAGS: 00010246
RAX: 0000000000000000 RBX: ffff88823be22000 RCX: ffff88803a8e8000
RDX: 0000000000000000 RSI: 0000000000000000 RDI: 0000000000000000
RBP: 0000000000000000 R08: ffffffff8de1c71f R09: 0000000000000000
R10: fffff5200221aeb8 R11: fffffbfff1bc38e4 R12: 1ffff11004063d32
R13: dffffc0000000000 R14: ffff88823be22048 R15: ffffc900110d7a80
FS: 0000000000000000(0000) GS:ffff888125c42000(0000) knlGS:0000000000000000
CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: ffff88823be22048 CR3: 0000000027530000 CR4: 00000000003526f0
Call Trace:
<TASK>
stats_handle_request drivers/virtio/virtio_balloon.c:450 [inline]
update_balloon_stats_func+0x121/0x300 drivers/virtio/virtio_balloon.c:547
process_one_work kernel/workqueue.c:3322 [inline]
process_scheduled_works+0xa8e/0x14e0 kernel/workqueue.c:3405
worker_thread+0xa47/0xfb0 kernel/workqueue.c:3486
kthread+0x388/0x470 kernel/kthread.c:436
ret_from_fork+0x514/0xb70 arch/x86/kernel/process.c:158
ret_from_fork_asm+0x1a/0x30 arch/x86/entry/entry_64.S:245
</TASK>
==================================================================
----------------
Code disassembly (best guess):
0: 48 89 fb mov %rdi,%rbx
3: 49 bd 00 00 00 00 00 movabs $0xdffffc0000000000,%r13
a: fc ff df
d: e8 26 18 87 fc call 0xfc871838
12: 4c 8d 73 48 lea 0x48(%rbx),%r14
16: 4c 89 f0 mov %r14,%rax
19: 48 c1 e8 03 shr $0x3,%rax
1d: 42 0f b6 04 28 movzbl (%rax,%r13,1),%eax
22: 84 c0 test %al,%al
24: 0f 85 d5 15 00 00 jne 0x15ff
* 2a: 45 8b 36 mov (%r14),%r14d <-- trapping instruction
2d: 4c 89 f7 mov %r14,%rdi
30: 48 c7 c6 e0 de a8 8e mov $0xffffffff8ea8dee0,%rsi
37: e8 0c 1e 87 fc call 0xfc871e48
3c: 41 83 fe 01 cmp $0x1,%r14d


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