KASAN: use-after-free Read in media_request_release

Status: moderation: reported on 2026/08/02 05:03
Subsystems: media
[Documentation on labels]
Reported-by: syzbot+3cf188eda05e1d57939a@syzkaller.appspotmail.com
First crash: 5d01h, last: 5d01h
✨ AI Jobs (3)
ID Workflow Result Correct Bug Created Started Finished Revision Error
6c2035b3 moderation 💥 KASAN: use-after-free Read in media_request_release 2026/08/03 00:00 2026/08/03 00:00 2026/08/03 00:00 e611ffe1
dashboard requested TargetOS "linux" TargetArch "386", but agent does not support it
d6182690 assessment-security 💥 KASAN: use-after-free Read in media_request_release 2026/08/02 00:00 2026/08/02 00:00 2026/08/02 00:00 e611ffe1
dashboard requested TargetOS "linux" TargetArch "386", but agent does not support it
2dbaca9a assessment-security 💥 KASAN: use-after-free Read in media_request_release 2026/07/31 00:00 2026/07/31 00:00 2026/07/31 00:00 aaffb173
dashboard requested TargetOS "linux" TargetArch "386", but agent does not support it

Sample crash report:
==================================================================
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
==================================================================

Crashes (1):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2026/07/29 04:59 upstream 3b5f4b83c4ab 4a865b71 .config console log report info [disk image (non-bootable)] [vmlinux] [kernel image] ci-qemu-upstream-386 KASAN: use-after-free Read in media_request_release
* Struck through repros no longer work on HEAD.