[v6.6] KFENCE: use-after-free read in dvb_device_open

0 views
Skip to first unread message

syzbot

unread,
Feb 8, 2026, 6:24:24 PM (2 days ago) Feb 8
to syzkaller...@googlegroups.com
Hello,

syzbot found the following issue on:

HEAD commit: c56aaf1a85ae Linux 6.6.123
git tree: linux-6.6.y
console output: https://syzkaller.appspot.com/x/log.txt?x=17635402580000
kernel config: https://syzkaller.appspot.com/x/.config?x=2a950bf7c0bff9f9
dashboard link: https://syzkaller.appspot.com/bug?extid=681e0dd2b4b3e48496c3
compiler: Debian clang version 21.1.8 (++20251221033036+2078da43e25a-1~exp1~20251221153213.50), Debian LLD 21.1.8

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

Downloadable assets:
disk image: https://storage.googleapis.com/syzbot-assets/0c1480594070/disk-c56aaf1a.raw.xz
vmlinux: https://storage.googleapis.com/syzbot-assets/118e64c14227/vmlinux-c56aaf1a.xz
kernel image: https://storage.googleapis.com/syzbot-assets/320a7e9bfff1/bzImage-c56aaf1a.xz

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

==================================================================
BUG: KFENCE: use-after-free read in dvb_device_open+0xca/0x370 drivers/media/dvb-core/dvbdev.c:99

Use-after-free read at 0xffff88823bd8cf18 (in kfence-#197):
dvb_device_open+0xca/0x370 drivers/media/dvb-core/dvbdev.c:99
chrdev_open+0x5cc/0x6a0 fs/char_dev.c:414
do_dentry_open+0x8c6/0x1500 fs/open.c:929
do_open fs/namei.c:3640 [inline]
path_openat+0x27f1/0x3230 fs/namei.c:3797
do_filp_open+0x1f5/0x430 fs/namei.c:3824
do_sys_openat2+0x134/0x1d0 fs/open.c:1421
do_sys_open fs/open.c:1436 [inline]
__do_sys_openat fs/open.c:1452 [inline]
__se_sys_openat fs/open.c:1447 [inline]
__x64_sys_openat+0x139/0x160 fs/open.c:1447
do_syscall_x64 arch/x86/entry/common.c:46 [inline]
do_syscall_64+0x55/0xa0 arch/x86/entry/common.c:76
entry_SYSCALL_64_after_hwframe+0x68/0xd2

kfence-#197: 0xffff88823bd8cf00-0xffff88823bd8cfef, size=240, cache=skbuff_head_cache

allocated by task 12 on cpu 0 at 2422.987790s:
__alloc_skb+0x103/0x2c0 net/core/skbuff.c:643
alloc_skb include/linux/skbuff.h:1284 [inline]
nsim_dev_trap_skb_build drivers/net/netdevsim/dev.c:748 [inline]
nsim_dev_trap_report drivers/net/netdevsim/dev.c:805 [inline]
nsim_dev_trap_report_work+0x293/0xb00 drivers/net/netdevsim/dev.c:851
process_one_work kernel/workqueue.c:2634 [inline]
process_scheduled_works+0xa5d/0x15d0 kernel/workqueue.c:2711
worker_thread+0xa55/0xfc0 kernel/workqueue.c:2792
kthread+0x2fa/0x390 kernel/kthread.c:388
ret_from_fork+0x48/0x80 arch/x86/kernel/process.c:152
ret_from_fork_asm+0x11/0x20 arch/x86/entry/entry_64.S:293

freed by task 12 on cpu 0 at 2422.987858s:
nsim_dev_trap_report drivers/net/netdevsim/dev.c:821 [inline]
nsim_dev_trap_report_work+0x76f/0xb00 drivers/net/netdevsim/dev.c:851
process_one_work kernel/workqueue.c:2634 [inline]
process_scheduled_works+0xa5d/0x15d0 kernel/workqueue.c:2711
worker_thread+0xa55/0xfc0 kernel/workqueue.c:2792
kthread+0x2fa/0x390 kernel/kthread.c:388
ret_from_fork+0x48/0x80 arch/x86/kernel/process.c:152
ret_from_fork_asm+0x11/0x20 arch/x86/entry/entry_64.S:293

CPU: 1 PID: 1219 Comm: syz.2.6149 Not tainted syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/24/2026
RIP: 0010:dvb_device_open+0xca/0x370 drivers/media/dvb-core/dvbdev.c:99
Code: 8b 3f 4d 85 ff 0f 84 83 01 00 00 4c 89 64 24 08 4d 8d 67 18 4c 89 e5 48 c1 ed 03 80 7c 1d 00 00 74 08 4c 89 e7 e8 f6 98 dd fa <4d> 8b 2c 24 4d 85 ed 0f 84 5e 01 00 00 4c 89 e8 48 c1 e8 03 80 3c
RSP: 0018:ffffc9000c5277f0 EFLAGS: 00010246
RAX: 1ffffffff2ec59db RBX: dffffc0000000000 RCX: 0000000000000000
RDX: 0000000000000001 RSI: 0000000000000008 RDI: 00000000ffffffff
RBP: 1ffff110477b19e3 R08: ffffffff8defe8cf R09: 1ffffffff1bdfd19
R10: dffffc0000000000 R11: fffffbfff1bdfd1a R12: ffff88823bd8cf18
R13: 1ffff920018a4f0c R14: ffff88802688ed28 R15: ffff88823bd8cf00
FS: 00007f5c09a276c0(0000) GS:ffff8880b8f00000(0000) knlGS:0000000000000000
CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: ffff88823bd8cf18 CR3: 000000006608c000 CR4: 00000000003506e0
Call Trace:
<TASK>
chrdev_open+0x5cc/0x6a0 fs/char_dev.c:414
do_dentry_open+0x8c6/0x1500 fs/open.c:929
do_open fs/namei.c:3640 [inline]
path_openat+0x27f1/0x3230 fs/namei.c:3797
do_filp_open+0x1f5/0x430 fs/namei.c:3824
do_sys_openat2+0x134/0x1d0 fs/open.c:1421
do_sys_open fs/open.c:1436 [inline]
__do_sys_openat fs/open.c:1452 [inline]
__se_sys_openat fs/open.c:1447 [inline]
__x64_sys_openat+0x139/0x160 fs/open.c:1447
do_syscall_x64 arch/x86/entry/common.c:46 [inline]
do_syscall_64+0x55/0xa0 arch/x86/entry/common.c:76
entry_SYSCALL_64_after_hwframe+0x68/0xd2
RIP: 0033:0x7f5c08b5b78e
Code: 08 0f 85 a5 a8 ff ff 49 89 fb 48 89 f0 48 89 d7 48 89 ce 4c 89 c2 4d 89 ca 4c 8b 44 24 08 4c 8b 4c 24 10 4c 89 5c 24 08 0f 05 <c3> 66 2e 0f 1f 84 00 00 00 00 00 0f 1f 80 00 00 00 00 48 83 ec 08
RSP: 002b:00007f5c09a26b28 EFLAGS: 00000246 ORIG_RAX: 0000000000000101
RAX: ffffffffffffffda RBX: 00007f5c09a276c0 RCX: 00007f5c08b5b78e
RDX: 0000000000040002 RSI: 00007f5c09a26c00 RDI: ffffffffffffff9c
RBP: 00007f5c09a26c00 R08: 0000000000000000 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000246 R12: cccccccccccccccd
R13: 00007f5c08e16038 R14: 00007f5c08e15fa0 R15: 00007ffc11f53368
</TASK>
==================================================================
----------------
Code disassembly (best guess):
0: 8b 3f mov (%rdi),%edi
2: 4d 85 ff test %r15,%r15
5: 0f 84 83 01 00 00 je 0x18e
b: 4c 89 64 24 08 mov %r12,0x8(%rsp)
10: 4d 8d 67 18 lea 0x18(%r15),%r12
14: 4c 89 e5 mov %r12,%rbp
17: 48 c1 ed 03 shr $0x3,%rbp
1b: 80 7c 1d 00 00 cmpb $0x0,0x0(%rbp,%rbx,1)
20: 74 08 je 0x2a
22: 4c 89 e7 mov %r12,%rdi
25: e8 f6 98 dd fa call 0xfadd9920
* 2a: 4d 8b 2c 24 mov (%r12),%r13 <-- trapping instruction
2e: 4d 85 ed test %r13,%r13
31: 0f 84 5e 01 00 00 je 0x195
37: 4c 89 e8 mov %r13,%rax
3a: 48 c1 e8 03 shr $0x3,%rax
3e: 80 .byte 0x80
3f: 3c .byte 0x3c


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

syzbot

unread,
Feb 8, 2026, 8:04:23 PM (2 days ago) Feb 8
to syzkaller...@googlegroups.com
syzbot has found a reproducer for the following issue on:

HEAD commit: c56aaf1a85ae Linux 6.6.123
git tree: linux-6.6.y
console output: https://syzkaller.appspot.com/x/log.txt?x=116417fa580000
kernel config: https://syzkaller.appspot.com/x/.config?x=2a950bf7c0bff9f9
dashboard link: https://syzkaller.appspot.com/bug?extid=681e0dd2b4b3e48496c3
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=159eeb22580000

Downloadable assets:
disk image: https://storage.googleapis.com/syzbot-assets/0c1480594070/disk-c56aaf1a.raw.xz
vmlinux: https://storage.googleapis.com/syzbot-assets/118e64c14227/vmlinux-c56aaf1a.xz
kernel image: https://storage.googleapis.com/syzbot-assets/320a7e9bfff1/bzImage-c56aaf1a.xz

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

==================================================================
BUG: KASAN: slab-use-after-free in dvb_device_open+0xca/0x370 drivers/media/dvb-core/dvbdev.c:99
Read of size 8 at addr ffff8881427b7e18 by task syz.0.54/6137

CPU: 0 PID: 6137 Comm: syz.0.54 Not tainted syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/24/2026
Call Trace:
<TASK>
dump_stack_lvl+0x18c/0x250 lib/dump_stack.c:106
print_address_description mm/kasan/report.c:364 [inline]
print_report+0xa8/0x210 mm/kasan/report.c:468
kasan_report+0x117/0x150 mm/kasan/report.c:581
dvb_device_open+0xca/0x370 drivers/media/dvb-core/dvbdev.c:99
chrdev_open+0x5cc/0x6a0 fs/char_dev.c:414
do_dentry_open+0x8c6/0x1500 fs/open.c:929
do_open fs/namei.c:3640 [inline]
path_openat+0x27f1/0x3230 fs/namei.c:3797
do_filp_open+0x1f5/0x430 fs/namei.c:3824
do_sys_openat2+0x134/0x1d0 fs/open.c:1421
do_sys_open fs/open.c:1436 [inline]
__do_sys_openat fs/open.c:1452 [inline]
__se_sys_openat fs/open.c:1447 [inline]
__x64_sys_openat+0x139/0x160 fs/open.c:1447
do_syscall_x64 arch/x86/entry/common.c:46 [inline]
do_syscall_64+0x55/0xa0 arch/x86/entry/common.c:76
entry_SYSCALL_64_after_hwframe+0x68/0xd2
RIP: 0033:0x7f938415b78e
Code: 08 0f 85 a5 a8 ff ff 49 89 fb 48 89 f0 48 89 d7 48 89 ce 4c 89 c2 4d 89 ca 4c 8b 44 24 08 4c 8b 4c 24 10 4c 89 5c 24 08 0f 05 <c3> 66 2e 0f 1f 84 00 00 00 00 00 0f 1f 80 00 00 00 00 48 83 ec 08
RSP: 002b:00007f9385039b28 EFLAGS: 00000246 ORIG_RAX: 0000000000000101
RAX: ffffffffffffffda RBX: 00007f938503a6c0 RCX: 00007f938415b78e
RDX: 0000000000040002 RSI: 00007f9385039c00 RDI: ffffffffffffff9c
RBP: 00007f9385039c00 R08: 0000000000000000 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000246 R12: cccccccccccccccd
R13: 00007f9384416128 R14: 00007f9384416090 R15: 00007ffc5172ef18
</TASK>

Allocated by task 1:
kasan_save_stack mm/kasan/common.c:46 [inline]
kasan_set_track+0x4e/0x70 mm/kasan/common.c:53
____kasan_kmalloc mm/kasan/common.c:375 [inline]
__kasan_kmalloc+0x8f/0xa0 mm/kasan/common.c:384
kmalloc include/linux/slab.h:600 [inline]
kzalloc include/linux/slab.h:721 [inline]
dvb_register_device+0x2fd/0x2210 drivers/media/dvb-core/dvbdev.c:475
dvb_register_frontend+0x649/0x930 drivers/media/dvb-core/dvb_frontend.c:3056
vidtv_bridge_dvb_init drivers/media/test-drivers/vidtv/vidtv_bridge.c:436 [inline]
vidtv_bridge_probe+0x9ab/0xf80 drivers/media/test-drivers/vidtv/vidtv_bridge.c:508
platform_probe+0x13b/0x1c0 drivers/base/platform.c:1404
call_driver_probe drivers/base/dd.c:-1 [inline]
really_probe+0x25b/0xb20 drivers/base/dd.c:658
__driver_probe_device+0x18c/0x330 drivers/base/dd.c:800
driver_probe_device+0x4f/0x420 drivers/base/dd.c:830
__driver_attach+0x44e/0x6e0 drivers/base/dd.c:1216
bus_for_each_dev+0x235/0x2b0 drivers/base/bus.c:370
bus_add_driver+0x340/0x630 drivers/base/bus.c:675
driver_register+0x23a/0x310 drivers/base/driver.c:246
vidtv_bridge_init+0x3d/0x70 drivers/media/test-drivers/vidtv/vidtv_bridge.c:598
do_one_initcall+0x242/0x790 init/main.c:1250
do_initcall_level+0x137/0x1f0 init/main.c:1312
do_initcalls+0x69/0xd0 init/main.c:1328
kernel_init_freeable+0x3ed/0x580 init/main.c:1565
kernel_init+0x1d/0x1c0 init/main.c:1455
ret_from_fork+0x48/0x80 arch/x86/kernel/process.c:152
ret_from_fork_asm+0x11/0x20 arch/x86/entry/entry_64.S:293

Freed by task 6131:
kasan_save_stack mm/kasan/common.c:46 [inline]
kasan_set_track+0x4e/0x70 mm/kasan/common.c:53
kasan_save_free_info+0x2e/0x50 mm/kasan/generic.c:522
____kasan_slab_free+0x126/0x1e0 mm/kasan/common.c:237
kasan_slab_free include/linux/kasan.h:164 [inline]
slab_free_hook mm/slub.c:1811 [inline]
slab_free_freelist_hook+0x130/0x1a0 mm/slub.c:1837
slab_free mm/slub.c:3830 [inline]
__kmem_cache_free+0xba/0x1e0 mm/slub.c:3843
dvb_free_device drivers/media/dvb-core/dvbdev.c:619 [inline]
kref_put include/linux/kref.h:65 [inline]
dvb_device_put drivers/media/dvb-core/dvbdev.c:632 [inline]
dvb_device_open+0x2ee/0x370 drivers/media/dvb-core/dvbdev.c:113
chrdev_open+0x5cc/0x6a0 fs/char_dev.c:414
do_dentry_open+0x8c6/0x1500 fs/open.c:929
do_open fs/namei.c:3640 [inline]
path_openat+0x27f1/0x3230 fs/namei.c:3797
do_filp_open+0x1f5/0x430 fs/namei.c:3824
do_sys_openat2+0x134/0x1d0 fs/open.c:1421
do_sys_open fs/open.c:1436 [inline]
__do_sys_openat fs/open.c:1452 [inline]
__se_sys_openat fs/open.c:1447 [inline]
__x64_sys_openat+0x139/0x160 fs/open.c:1447
do_syscall_x64 arch/x86/entry/common.c:46 [inline]
do_syscall_64+0x55/0xa0 arch/x86/entry/common.c:76
entry_SYSCALL_64_after_hwframe+0x68/0xd2

The buggy address belongs to the object at ffff8881427b7e00
which belongs to the cache kmalloc-256 of size 256
The buggy address is located 24 bytes inside of
freed 256-byte region [ffff8881427b7e00, ffff8881427b7f00)

The buggy address belongs to the physical page:
page:ffffea000509ed80 refcount:1 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x1427b6
head:ffffea000509ed80 order:1 entire_mapcount:0 nr_pages_mapped:0 pincount:0
flags: 0x57ff00000000840(slab|head|node=1|zone=2|lastcpupid=0x7ff)
page_type: 0xffffffff()
raw: 057ff00000000840 ffff888017c41b40 dead000000000122 0000000000000000
raw: 0000000000000000 0000000000100010 00000001ffffffff 0000000000000000
page dumped because: kasan: bad access detected
page_owner tracks the page as allocated
page last allocated via order 1, migratetype Unmovable, gfp_mask 0xd20c0(__GFP_IO|__GFP_FS|__GFP_NOWARN|__GFP_NORETRY|__GFP_COMP|__GFP_NOMEMALLOC), pid 1, tgid 1 (swapper/0), ts 18033851631, free_ts 0
set_page_owner include/linux/page_owner.h:31 [inline]
post_alloc_hook+0x1c1/0x200 mm/page_alloc.c:1581
prep_new_page mm/page_alloc.c:1588 [inline]
get_page_from_freelist+0x1951/0x19e0 mm/page_alloc.c:3220
__alloc_pages+0x1f0/0x460 mm/page_alloc.c:4486
alloc_page_interleave+0x24/0x1e0 mm/mempolicy.c:2120
alloc_slab_page+0x5d/0x160 mm/slub.c:1881
allocate_slab mm/slub.c:2028 [inline]
new_slab+0x87/0x2d0 mm/slub.c:2081
___slab_alloc+0xc5d/0x12f0 mm/slub.c:3253
__slab_alloc mm/slub.c:3339 [inline]
__slab_alloc_node mm/slub.c:3392 [inline]
slab_alloc_node mm/slub.c:3485 [inline]
__kmem_cache_alloc_node+0x19e/0x250 mm/slub.c:3534
kmalloc_trace+0x2a/0xe0 mm/slab_common.c:1098
kmalloc include/linux/slab.h:600 [inline]
kzalloc include/linux/slab.h:721 [inline]
bus_add_driver+0x162/0x630 drivers/base/bus.c:659
driver_register+0x23a/0x310 drivers/base/driver.c:246
usb_register_driver+0x206/0x3d0 drivers/usb/core/driver.c:1062
do_one_initcall+0x242/0x790 init/main.c:1250
do_initcall_level+0x137/0x1f0 init/main.c:1312
do_initcalls+0x69/0xd0 init/main.c:1328
kernel_init_freeable+0x3ed/0x580 init/main.c:1565
page_owner free stack trace missing

Memory state around the buggy address:
ffff8881427b7d00: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
ffff8881427b7d80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
>ffff8881427b7e00: fa fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
^
ffff8881427b7e80: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
ffff8881427b7f00: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
==================================================================


---
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.
Reply all
Reply to author
Forward
0 new messages