[moderation] [media?] KASAN: use-after-free Read in media_request_release

7 views
Skip to first unread message

syzbot

unread,
Aug 2, 2026, 1:03:35 AM (yesterday) Aug 2
to syzkaller-upst...@googlegroups.com
Hello,

syzbot found the following issue on:

HEAD commit: 3b5f4b83c4ab Merge tag 'for-7.2-rc5-tag' of git://git.kern..
git tree: upstream
console output: https://syzkaller.appspot.com/x/log.txt?x=13de38c6580000
kernel config: https://syzkaller.appspot.com/x/.config?x=f221a1b5d497ed15
dashboard link: https://syzkaller.appspot.com/bug?extid=3cf188eda05e1d57939a
compiler: gcc (Debian 14.2.0-19) 14.2.0, GNU ld (GNU Binutils for Debian) 2.44
userspace arch: i386
CC: [laurent....@ideasonboard.com linux-...@vger.kernel.org linux...@vger.kernel.org mch...@kernel.org sakari...@linux.intel.com]

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

Downloadable assets:
disk image (non-bootable): https://storage.googleapis.com/syzbot-assets/d900f083ada3/non_bootable_disk-3b5f4b83.raw.xz
vmlinux: https://storage.googleapis.com/syzbot-assets/5d0c8cf34ed9/vmlinux-3b5f4b83.xz
kernel image: https://storage.googleapis.com/syzbot-assets/b2e50b89787e/bzImage-3b5f4b83.xz

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

==================================================================
BUG: KASAN: use-after-free in media_request_release+0x18f/0x1b0 drivers/media/mc/mc-request.c:74
Read of size 8 at addr ffff888043c603d0 by task syz.3.2978/16570

CPU: 0 UID: 0 PID: 16570 Comm: syz.3.2978 Tainted: G L syzkaller #0 PREEMPT(full)
Tainted: [L]=SOFTLOCKUP
Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2 04/01/2014
Call Trace:
<TASK>
__dump_stack lib/dump_stack.c:94 [inline]
dump_stack_lvl+0x100/0x190 lib/dump_stack.c:120
print_address_description mm/kasan/report.c:378 [inline]
print_report+0x13d/0x4b0 mm/kasan/report.c:482
kasan_report+0xdf/0x1c0 mm/kasan/report.c:595
media_request_release+0x18f/0x1b0 drivers/media/mc/mc-request.c:74
kref_put include/linux/kref.h:65 [inline]
media_request_put drivers/media/mc/mc-request.c:83 [inline]
media_request_close+0x7e/0xc0 drivers/media/mc/mc-request.c:91
__fput+0x3ff/0xb50 fs/file_table.c:512
task_work_run+0x150/0x240 kernel/task_work.c:233
resume_user_mode_work include/linux/resume_user_mode.h:50 [inline]
__exit_to_user_mode_loop kernel/entry/common.c:70 [inline]
exit_to_user_mode_loop+0x1d8/0x6f0 kernel/entry/common.c:101
__exit_to_user_mode_prepare include/linux/irq-entry-common.h:207 [inline]
syscall_exit_to_user_mode_prepare include/linux/irq-entry-common.h:230 [inline]
syscall_exit_to_user_mode include/linux/entry-common.h:318 [inline]
__do_fast_syscall_32+0x701/0x970 arch/x86/entry/syscall_32.c:310
do_fast_syscall_32+0x32/0x70 arch/x86/entry/syscall_32.c:332
entry_SYSENTER_compat_after_hwframe+0x84/0x8e
RIP: 0023:0xf705efec
Code: Unable to access opcode bytes at 0xf705efc2.
RSP: 002b:00000000ff83e81c EFLAGS: 00000202 ORIG_RAX: 00000000000001b4
RAX: 0000000000000000 RBX: 0000000000000003 RCX: 000000000000001e
RDX: 0000000000000000 RSI: 0000000000000000 RDI: 0000000000000000
RBP: 0000000000000000 R08: 0000000000000000 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000202 R12: 0000000000000000
R13: 0000000000000000 R14: 0000000000000000 R15: 0000000000000000
</TASK>

The buggy address belongs to the physical page:
page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x43c60
flags: 0x4fff00000000000(node=1|zone=1|lastcpupid=0x7ff)
page_type: f0(buddy)
raw: 04fff00000000000 ffffea00010f6008 ffff88807ffd6cc8 0000000000000000
raw: 0000000000000000 0000000000000005 00000000f0000000 0000000000000000
page dumped because: kasan: bad access detected
page_owner tracks the page as freed
page last allocated via order 4, migratetype Unmovable, gfp_mask 0x40dc0(GFP_KERNEL|__GFP_ZERO|__GFP_COMP), pid 1, tgid 1 (swapper/0), ts 13449862613, free_ts 566956916092
set_page_owner include/linux/page_owner.h:32 [inline]
post_alloc_hook+0xfd/0x120 mm/page_alloc.c:1859
prep_new_page mm/page_alloc.c:1867 [inline]
get_page_from_freelist+0xf48/0x3530 mm/page_alloc.c:3946
__alloc_frozen_pages_noprof+0x299/0x2dc0 mm/page_alloc.c:5304
alloc_pages_mpol+0x1fb/0x540 mm/mempolicy.c:2490
___kmalloc_large_node+0xe5/0x120 mm/slub.c:5274
__kmalloc_large_noprof+0x1c/0x70 mm/slub.c:5295
_kmalloc_noprof include/linux/slab.h:985 [inline]
_kzalloc_noprof include/linux/slab.h:1309 [inline]
vivid_create_instance drivers/media/test-drivers/vivid/vivid-core.c:1817 [inline]
vivid_probe+0x1f8/0x10d0 drivers/media/test-drivers/vivid/vivid-core.c:2095
platform_probe+0x106/0x1d0 drivers/base/platform.c:1439
call_driver_probe drivers/base/dd.c:628 [inline]
really_probe+0x241/0xa60 drivers/base/dd.c:706
__driver_probe_device+0x20e/0x450 drivers/base/dd.c:868
driver_probe_device+0x4a/0x140 drivers/base/dd.c:898
__driver_attach+0x21f/0x5b0 drivers/base/dd.c:1292
bus_for_each_dev+0x13e/0x1d0 drivers/base/bus.c:383
bus_add_driver+0x305/0x5b0 drivers/base/bus.c:763
driver_register+0x1e2/0x360 drivers/base/driver.c:174
vivid_init+0x527/0x6a0 drivers/media/test-drivers/vivid/vivid-core.c:2296
page last free pid 16570 tgid 16570 stack trace:
reset_page_owner include/linux/page_owner.h:25 [inline]
__free_pages_prepare mm/page_alloc.c:1406 [inline]
__free_pages_ok+0x73b/0xfe0 mm/page_alloc.c:1584
v4l2_device_release drivers/media/v4l2-core/v4l2-device.c:51 [inline]
kref_put include/linux/kref.h:65 [inline]
v4l2_device_put+0xa3/0xd0 drivers/media/v4l2-core/v4l2-device.c:56
v4l2_device_release+0x2cf/0x480 drivers/media/v4l2-core/v4l2-dev.c:229
device_release+0xd2/0x270 drivers/base/core.c:2636
kobject_cleanup lib/kobject.c:689 [inline]
kobject_release lib/kobject.c:720 [inline]
kref_put include/linux/kref.h:65 [inline]
kobject_put+0x1f7/0x640 lib/kobject.c:737
put_device+0x1f/0x30 drivers/base/core.c:3880
video_put drivers/media/v4l2-core/v4l2-dev.c:173 [inline]
v4l2_release+0x2da/0x390 drivers/media/v4l2-core/v4l2-dev.c:480
__fput+0x3ff/0xb50 fs/file_table.c:512
task_work_run+0x150/0x240 kernel/task_work.c:233
resume_user_mode_work include/linux/resume_user_mode.h:50 [inline]
__exit_to_user_mode_loop kernel/entry/common.c:70 [inline]
exit_to_user_mode_loop+0x1d8/0x6f0 kernel/entry/common.c:101
__exit_to_user_mode_prepare include/linux/irq-entry-common.h:207 [inline]
syscall_exit_to_user_mode_prepare include/linux/irq-entry-common.h:230 [inline]
syscall_exit_to_user_mode include/linux/entry-common.h:318 [inline]
__do_fast_syscall_32+0x701/0x970 arch/x86/entry/syscall_32.c:310
do_fast_syscall_32+0x32/0x70 arch/x86/entry/syscall_32.c:332
entry_SYSENTER_compat_after_hwframe+0x84/0x8e

Memory state around the buggy address:
ffff888043c60280: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
ffff888043c60300: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
>ffff888043c60380: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
^
ffff888043c60400: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
ffff888043c60480: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
==================================================================


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