KASAN: slab-use-after-free Read in v4l2_release (3)

Status: upstream: reported C repro on 2026/09/11 16:15
Subsystems: media
Labels: prio:high
[Documentation on labels]
Reported-by: syzbot+34957180b0ed2581edaf@syzkaller.appspotmail.com
First crash: 55d, last: 1d04h
Cause bisection: failed (error log, bisect log)
  
▶ ▼ ✨ AI Jobs (2)
ID Workflow Result Correct Bug Created Started Finished Revision
4b08af9a repro-c Reproduced: ✅ ❓ KASAN: slab-use-after-free Read in v4l2_release (3) 2026/09/11 12:01 2026/09/11 12:01 2026/09/11 13:41 1fe56c0a
aeb76778 assessment-security DenialOfService: ✅ Exploitable: ✅ FilesystemTrigger: ❌ NetworkTrigger: ❌ PeripheralTrigger: ✅ RemoteTrigger: ❌ Unprivileged: ✅ UserNamespace: ❌ VMGuestTrigger: ❌ VMHostTrigger: ❌ ❓ KASAN: slab-use-after-free Read in v4l2_release (3) 2026/09/09 01:45 2026/09/09 01:45 2026/09/09 02:32 243b72f1
▶ ▼ Discussions (2)
Title Replies (including bot) Last reply
[PATCH] Input: sur40 - fix use-after-free in v4l2_release on disconnect 3 (3) 2026/10/18 10:53
[syzbot] [media?] KASAN: slab-use-after-free Read in v4l2_release (3) 0 (5) 2026/09/17 01:26
▶ ▼ Similar bugs (3)
Kernel Title Rank 🛈 Repro Cause bisect Fix bisect Count Last Reported Patched Status
upstream KASAN: slab-use-after-free Read in v4l2_release media usb 19 syz, C error inconclusive 1 649d 711d 0/29 auto-obsoleted due to no activity on 2025/07/14 22:25
upstream KASAN: slab-use-after-free Read in v4l2_release (2) media 19 syz, C error error 6 206d 434d 29/29 fixed on 2026/05/21 07:50
upstream KASAN: use-after-free Read in v4l2_release (3) usb media 19 syz, C error error 34 1932d 2488d 0/29 auto-obsoleted due to no activity on 2023/04/15 03:26
▶ ▼ Last patch testing requests (6)
Created Duration User Patch Repo Result
2026/09/26 22:19 13m retest repro upstream no crash job log log
2026/09/17 01:26 14m jchuang26@m.fudan.edu.cn patch upstream OK job log log
2026/09/15 01:38 14m jchuang26@m.fudan.edu.cn patch upstream OK job log log
2026/09/14 11:46 13m jchuang26@m.fudan.edu.cn patch git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git 08df884136f1c1197bab2a27814404fd329d9aac OK job log log
2026/09/12 01:03 18m kartikey406@gmail.com patch upstream OK job log log
2026/09/11 16:00 13m retest repro git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git 08df884136f1c1197bab2a27814404fd329d9aac report job log log

Sample crash report:
==================================================================
BUG: KASAN: slab-use-after-free in v4l2_release+0xb5/0x350 drivers/media/v4l2-core/v4l2-dev.c:466
Read of size 8 at addr ffff888027306658 by task syz-executor151/5968

CPU: 1 UID: 0 PID: 5968 Comm: syz-executor151 Not tainted syzkaller #0 PREEMPT(full) 
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 10/15/2026
Call Trace:
 <TASK>
 dump_stack_lvl+0xe8/0x150 lib/dump_stack.c:120
 print_address_description+0x55/0x1e0 mm/kasan/report.c:378
 print_report+0x58/0x70 mm/kasan/report.c:482
 kasan_report+0x117/0x150 mm/kasan/report.c:595
 v4l2_release+0xb5/0x350 drivers/media/v4l2-core/v4l2-dev.c:466
 __fput+0x408/0xa40 fs/file_table.c:512
 fput_close_sync+0x11f/0x240 fs/file_table.c:618
 filp_close_sync fs/open.c:1573 [inline]
 __do_sys_close fs/open.c:1596 [inline]
 __se_sys_close+0xa2/0x160 fs/open.c:1583
 do_syscall_32_irqs_on arch/x86/entry/syscall_32.c:79 [inline]
 do_int80_emulation+0x198/0x500 arch/x86/entry/syscall_32.c:166
 asm_int80_emulation+0x1a/0x20 arch/x86/include/asm/idtentry.h:598
RIP: 0023:0xf7ef68db
Code: 57 56 53 8b 44 24 14 f6 00 08 75 23 8b 44 24 18 8b 5c 24 1c 8b 4c 24 20 8b 54 24 24 8b 74 24 28 8b 7c 24 2c 8b 6c 24 30 cd 80 <5b> 5e 5f 5d c3 5b 5e 5f 5d e9 d7 e8 ff ff 66 90 66 90 66 90 90 55
RSP: 002b:00000000ffee1e5c EFLAGS: 00000246 ORIG_RAX: 0000000000000006
RAX: ffffffffffffffda RBX: 0000000000000004 RCX: 0000000000000000
RDX: 0000000000000000 RSI: 0000000000000000 RDI: 0000000000000000
RBP: 0000000000000000 R08: 0000000000000000 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000206 R12: 0000000000000000
R13: 0000000000000000 R14: 0000000000000000 R15: 0000000000000000
 </TASK>

Allocated by task 5757:
 kasan_save_stack mm/kasan/common.c:57 [inline]
 kasan_save_track+0x3e/0x80 mm/kasan/common.c:78
 poison_kmalloc_redzone mm/kasan/common.c:409 [inline]
 __kasan_kmalloc+0x93/0xb0 mm/kasan/common.c:426
 kasan_kmalloc include/linux/kasan.h:263 [inline]
 __kmalloc_cache_noprof+0x31c/0x600 mm/slub.c:5680
 _kmalloc_noprof include/linux/slab.h:991 [inline]
 _kzalloc_noprof include/linux/slab.h:1312 [inline]
 sur40_probe+0x16c/0xfa0 drivers/input/touchscreen/sur40.c:675
 usb_probe_interface+0x751/0xe00 drivers/usb/core/driver.c:399
 call_driver_probe drivers/base/dd.c:-1 [inline]
 really_probe+0x254/0xae0 drivers/base/dd.c:707
 __driver_probe_device+0x1e8/0x360 drivers/base/dd.c:869
 driver_probe_device+0x4f/0x240 drivers/base/dd.c:899
 __device_attach_driver+0x270/0x410 drivers/base/dd.c:1027
 bus_for_each_drv+0x258/0x2f0 drivers/base/bus.c:500
 __device_attach+0x2bd/0x430 drivers/base/dd.c:1131
 device_initial_probe+0x9c/0x100 drivers/base/dd.c:1190
 __bus_probe_device+0x126/0x220 drivers/base/bus.c:614
 device_add+0x7d7/0xb80 drivers/base/core.c:3778
 usb_set_configuration+0x1bb5/0x2260 drivers/usb/core/message.c:2280
 usb_generic_driver_probe+0x8d/0x150 drivers/usb/core/generic.c:250
 usb_probe_device+0x1c3/0x3b0 drivers/usb/core/driver.c:293
 call_driver_probe drivers/base/dd.c:-1 [inline]
 really_probe+0x254/0xae0 drivers/base/dd.c:707
 __driver_probe_device+0x1e8/0x360 drivers/base/dd.c:869
 driver_probe_device+0x4f/0x240 drivers/base/dd.c:899
 __device_attach_driver+0x270/0x410 drivers/base/dd.c:1027
 bus_for_each_drv+0x258/0x2f0 drivers/base/bus.c:500
 __device_attach+0x2bd/0x430 drivers/base/dd.c:1131
 device_initial_probe+0x9c/0x100 drivers/base/dd.c:1190
 __bus_probe_device+0x126/0x220 drivers/base/bus.c:614
 device_add+0x7d7/0xb80 drivers/base/core.c:3778
 usb_new_device+0x9aa/0x1690 drivers/usb/core/hub.c:2713
 hub_port_connect drivers/usb/core/hub.c:5585 [inline]
 hub_port_connect_change drivers/usb/core/hub.c:5725 [inline]
 port_event drivers/usb/core/hub.c:5889 [inline]
 hub_event+0x28e8/0x4d30 drivers/usb/core/hub.c:5971
 process_one_work kernel/workqueue.c:3495 [inline]
 process_scheduled_works+0xc3d/0x1630 kernel/workqueue.c:3578
 worker_thread+0xa47/0xfb0 kernel/workqueue.c:3659
 kthread+0x38b/0x480 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 5968:
 kasan_save_stack mm/kasan/common.c:57 [inline]
 kasan_save_track+0x3e/0x80 mm/kasan/common.c:78
 kasan_save_free_info+0x40/0x50 mm/kasan/generic.c:584
 poison_slab_object mm/kasan/common.c:264 [inline]
 __kasan_slab_free+0x5c/0x80 mm/kasan/common.c:296
 kasan_slab_free include/linux/kasan.h:235 [inline]
 slab_free_hook mm/slub.c:2780 [inline]
 slab_free mm/slub.c:6630 [inline]
 kfree+0x1c5/0x650 mm/slub.c:6923
 sur40_disconnect+0xaf/0x140 drivers/input/touchscreen/sur40.c:835
 usb_unbind_interface+0x295/0x9c0 drivers/usb/core/driver.c:460
 device_remove drivers/base/dd.c:619 [inline]
 __device_release_driver drivers/base/dd.c:1357 [inline]
 device_release_driver_internal+0x48d/0x7d0 drivers/base/dd.c:1380
 unbind_store+0x1a1/0x1d0 drivers/base/bus.c:244
 kernfs_fop_write_iter+0x3a4/0x540 fs/kernfs/file.c:345
 new_sync_write fs/read_write.c:595 [inline]
 vfs_write+0x612/0xba0 fs/read_write.c:687
 ksys_write+0x150/0x270 fs/read_write.c:739
 do_syscall_32_irqs_on arch/x86/entry/syscall_32.c:79 [inline]
 do_int80_emulation+0x198/0x500 arch/x86/entry/syscall_32.c:166
 asm_int80_emulation+0x1a/0x20 arch/x86/include/asm/idtentry.h:598

The buggy address belongs to the object at ffff888027306000
 which belongs to the cache kmalloc-4k of size 4096
The buggy address is located 1624 bytes inside of
 freed 4096-byte region [ffff888027306000, ffff888027307000)

The buggy address belongs to the physical page:
page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x27300
head: order:3 mapcount:0 entire_mapcount:0 nr_pages_mapped:0 pincount:0
flags: 0xfff00000000040(head|node=0|zone=1|lastcpupid=0x7ff)
page_type: f5(slab)
raw: 00fff00000000040 ffff88813ff29140 dead000000000100 dead000000000122
raw: 0000000000000000 0000000000040004 00000000f5000000 0000000000000000
head: 00fff00000000040 ffff88813ff29140 dead000000000100 dead000000000122
head: 0000000000000000 0000000000040004 00000000f5000000 0000000000000000
head: 00fff00000000003 fffffffffffffe01 00000000ffffffff 00000000ffffffff
head: ffffffffffffffff 0000000000000000 00000000ffffffff 0000000000000008
page dumped because: kasan: bad access detected
page_owner tracks the page as allocated
page last allocated via order 3, migratetype Unmovable, gfp_mask 0xd20c0(__GFP_IO|__GFP_FS|__GFP_NOWARN|__GFP_NORETRY|__GFP_COMP|__GFP_NOMEMALLOC), pid 1, tgid 1 (swapper/0), ts 5706504568
 set_page_owner include/linux/page_owner.h:33 [inline]
 post_alloc_hook+0x1f9/0x250 mm/page_alloc.c:1856
 prep_new_page mm/page_alloc.c:1864 [inline]
 get_page_from_freelist+0x220f/0x2280 mm/page_alloc.c:3935
 __alloc_frozen_pages_noprof+0x1fe/0x410 mm/page_alloc.c:5444
 alloc_slab_page mm/slub.c:3384 [inline]
 allocate_slab+0x7d/0x5e0 mm/slub.c:3499
 new_slab mm/slub.c:3550 [inline]
 refill_objects+0x2d5/0x350 mm/slub.c:7539
 refill_sheaf mm/slub.c:2917 [inline]
 __pcs_replace_empty_main+0x2c8/0x6c0 mm/slub.c:4811
 alloc_from_pcs mm/slub.c:4887 [inline]
 slab_alloc_node mm/slub.c:5021 [inline]
 __kmalloc_cache_noprof+0x396/0x600 mm/slub.c:5676
 _kmalloc_noprof include/linux/slab.h:991 [inline]
 _kzalloc_noprof include/linux/slab.h:1312 [inline]
 kobject_uevent_env+0x289/0x9e0 lib/kobject_uevent.c:543
 driver_register+0x2d4/0x320 drivers/base/driver.c:182
 panel_edp_init+0x1d/0x60 drivers/gpu/drm/panel/panel-edp.c:2320
 do_one_initcall+0x250/0x870 init/main.c:1419
 do_initcall_level+0x10a/0x1a0 init/main.c:1481
 do_initcalls+0x59/0xa0 init/main.c:1497
 kernel_init_freeable+0x29d/0x3e0 init/main.c:1732
 kernel_init+0x22/0x1d0 init/main.c:1622
 ret_from_fork+0x514/0xb70 arch/x86/kernel/process.c:158
page_owner free stack trace missing

Memory state around the buggy address:
 ffff888027306500: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
 ffff888027306580: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
>ffff888027306600: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
                                                    ^
 ffff888027306680: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
 ffff888027306700: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
==================================================================
----------------
Code disassembly (best guess):
   0:	57                   	push   %rdi
   1:	56                   	push   %rsi
   2:	53                   	push   %rbx
   3:	8b 44 24 14          	mov    0x14(%rsp),%eax
   7:	f6 00 08             	testb  $0x8,(%rax)
   a:	75 23                	jne    0x2f
   c:	8b 44 24 18          	mov    0x18(%rsp),%eax
  10:	8b 5c 24 1c          	mov    0x1c(%rsp),%ebx
  14:	8b 4c 24 20          	mov    0x20(%rsp),%ecx
  18:	8b 54 24 24          	mov    0x24(%rsp),%edx
  1c:	8b 74 24 28          	mov    0x28(%rsp),%esi
  20:	8b 7c 24 2c          	mov    0x2c(%rsp),%edi
  24:	8b 6c 24 30          	mov    0x30(%rsp),%ebp
  28:	cd 80                	int    $0x80
* 2a:	5b                   	pop    %rbx <-- trapping instruction
  2b:	5e                   	pop    %rsi
  2c:	5f                   	pop    %rdi
  2d:	5d                   	pop    %rbp
  2e:	c3                   	ret
  2f:	5b                   	pop    %rbx
  30:	5e                   	pop    %rsi
  31:	5f                   	pop    %rdi
  32:	5d                   	pop    %rbp
  33:	e9 d7 e8 ff ff       	jmp    0xffffe90f
  38:	66 90                	xchg   %ax,%ax
  3a:	66 90                	xchg   %ax,%ax
  3c:	66 90                	xchg   %ax,%ax
  3e:	90                   	nop
  3f:	55                   	push   %rbp

Crashes (6):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2026/10/31 12:25 git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git 36aad21d50d1 b498adee .config console log report C ci-upstream-kasan-gce-386 KASAN: slab-use-after-free Read in v4l2_release
2026/10/26 06:03 upstream 21a7f44fd076 1d9ca40b .config console log report syz / log [disk image (non-bootable)] [vmlinux] [kernel image] ci-qemu-upstream KASAN: slab-use-after-free Write in v4l2_release
2026/09/12 21:55 upstream 5225b8eec4c9 70a60e12 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-kasan-gce-selinux-root KASAN: slab-use-after-free Read in v4l2_release
2026/09/09 23:52 upstream 50d05c7c76c9 4e8b1cc6 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-kasan-gce-386 KASAN: slab-use-after-free Read in v4l2_release
2026/09/11 16:14 git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git 08df884136f1 4e8b1cc6 .config console log report C ci-qemu-upstream KASAN: slab-use-after-free Read in v4l2_release
2026/09/07 11:55 upstream df2908090cda 5e4626f5 .config console log report [disk image (non-bootable)] [vmlinux] [kernel image] ci-snapshot-upstream-root KASAN: slab-use-after-free Read in v4l2_release
* Struck through repros no longer work on HEAD.