syzbot


KASAN: slab-use-after-free Write in number

Status: upstream: reported C repro on 2026/01/02 01:42
Subsystems: media
[Documentation on labels]
Reported-by: syzbot+37fd81fa4305a9eadfb0@syzkaller.appspotmail.com
First crash: 8d12h, last: 8d08h
Discussions (2)
Title Replies (including bot) Last reply
[PATCH] media: media-request: fix race between media_request_alloc() and media_request_close() 2 (2) 2026/01/02 12:51
[syzbot] [media?] KASAN: slab-use-after-free Write in number 0 (2) 2026/01/02 11:35
Similar bugs (7)
Kernel Title Rank 🛈 Repro Cause bisect Fix bisect Count Last Reported Patched Status
upstream Internal error in number (2) net 2 1 609d 605d 0/29 auto-obsoleted due to no activity on 2024/08/04 18:51
upstream KMSAN: uninit-value in number (4) kernel 7 C 7189 1140d 1518d 0/29 closed as invalid on 2022/11/28 10:01
upstream KASAN: global-out-of-bounds Read in number fs 17 C done 6 358d 358d 0/29 auto-obsoleted due to no activity on 2025/06/20 14:54
upstream Internal error in number net 2 1 782d 778d 0/29 auto-obsoleted due to no activity on 2024/02/13 14:45
upstream KMSAN: uninit-value in number (2) can 7 C 168 1764d 2143d 19/29 fixed on 2021/03/10 01:48
upstream BUG: unable to handle kernel NULL pointer dereference in number (2) net 10 2 497d 503d 0/29 closed as invalid on 2024/09/13 11:13
upstream KMSAN: uninit-value in number (3) media 7 C 8575 1518d 1762d 20/29 fixed on 2021/11/10 00:50
Last patch testing requests (1)
Created Duration User Patch Repo Result
2026/01/02 11:35 20m dmantipov@yandex.ru patch https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git b69053dd3ffbc0d2dedbbc86182cdef6f641fe1b OK log

Sample crash report:
==================================================================
BUG: KASAN: slab-use-after-free in number+0xc48/0xf60 lib/vsprintf.c:572
Write of size 1 at addr ffff88801158b60c by task syz.0.30/5548

CPU: 0 UID: 0 PID: 5548 Comm: syz.0.30 Not tainted syzkaller #0 PREEMPT(full) 
Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2~bpo12+1 04/01/2014
Call Trace:
 <TASK>
 dump_stack_lvl+0xe8/0x150 lib/dump_stack.c:120
 print_address_description mm/kasan/report.c:378 [inline]
 print_report+0xca/0x240 mm/kasan/report.c:482
 kasan_report+0x118/0x150 mm/kasan/report.c:595
 number+0xc48/0xf60 lib/vsprintf.c:572
 vsnprintf+0x8e5/0xee0 lib/vsprintf.c:2911
 snprintf+0xda/0x120 lib/vsprintf.c:3041
 media_request_alloc+0x319/0x5b0 drivers/media/mc/mc-request.c:320
 media_device_request_alloc+0x98/0xd0 drivers/media/mc/mc-device.c:380
 media_device_ioctl+0x278/0x430 drivers/media/mc/mc-device.c:465
 vfs_ioctl fs/ioctl.c:51 [inline]
 __do_sys_ioctl fs/ioctl.c:597 [inline]
 __se_sys_ioctl+0xfc/0x170 fs/ioctl.c:583
 do_syscall_x64 arch/x86/entry/syscall_64.c:63 [inline]
 do_syscall_64+0xec/0xf80 arch/x86/entry/syscall_64.c:94
 entry_SYSCALL_64_after_hwframe+0x77/0x7f
RIP: 0033:0x7fe41c98f7c9
Code: ff ff c3 66 2e 0f 1f 84 00 00 00 00 00 0f 1f 40 00 48 89 f8 48 89 f7 48 89 d6 48 89 ca 4d 89 c2 4d 89 c8 4c 8b 4c 24 08 0f 05 <48> 3d 01 f0 ff ff 73 01 c3 48 c7 c1 a8 ff ff ff f7 d8 64 89 01 48
RSP: 002b:00007fe41bffe038 EFLAGS: 00000246 ORIG_RAX: 0000000000000010
RAX: ffffffffffffffda RBX: 00007fe41cbe5fa0 RCX: 00007fe41c98f7c9
RDX: 0000000000000000 RSI: 0000000080047c05 RDI: 0000000000000003
RBP: 00007fe41ca13f91 R08: 0000000000000000 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000
R13: 00007fe41cbe6038 R14: 00007fe41cbe5fa0 R15: 00007ffce8739818
 </TASK>

Allocated by task 5548:
 kasan_save_stack mm/kasan/common.c:56 [inline]
 kasan_save_track+0x3e/0x80 mm/kasan/common.c:77
 poison_kmalloc_redzone mm/kasan/common.c:397 [inline]
 __kasan_kmalloc+0x93/0xb0 mm/kasan/common.c:414
 kasan_kmalloc include/linux/kasan.h:262 [inline]
 __kmalloc_cache_noprof+0x3e2/0x700 mm/slub.c:5776
 kmalloc_noprof include/linux/slab.h:957 [inline]
 kzalloc_noprof include/linux/slab.h:1094 [inline]
 media_request_alloc+0xe4/0x5b0 drivers/media/mc/mc-request.c:294
 media_device_request_alloc+0x98/0xd0 drivers/media/mc/mc-device.c:380
 media_device_ioctl+0x278/0x430 drivers/media/mc/mc-device.c:465
 vfs_ioctl fs/ioctl.c:51 [inline]
 __do_sys_ioctl fs/ioctl.c:597 [inline]
 __se_sys_ioctl+0xfc/0x170 fs/ioctl.c:583
 do_syscall_x64 arch/x86/entry/syscall_64.c:63 [inline]
 do_syscall_64+0xec/0xf80 arch/x86/entry/syscall_64.c:94
 entry_SYSCALL_64_after_hwframe+0x77/0x7f

Freed by task 5549:
 kasan_save_stack mm/kasan/common.c:56 [inline]
 kasan_save_track+0x3e/0x80 mm/kasan/common.c:77
 kasan_save_free_info+0x46/0x50 mm/kasan/generic.c:584
 poison_slab_object mm/kasan/common.c:252 [inline]
 __kasan_slab_free+0x5c/0x80 mm/kasan/common.c:284
 kasan_slab_free include/linux/kasan.h:234 [inline]
 slab_free_hook mm/slub.c:2540 [inline]
 slab_free mm/slub.c:6670 [inline]
 kfree+0x1c0/0x660 mm/slub.c:6878
 media_request_close+0x38/0x50 drivers/media/mc/mc-request.c:89
 __fput+0x44c/0xa70 fs/file_table.c:468
 task_work_run+0x1d4/0x260 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:44 [inline]
 exit_to_user_mode_loop+0xef/0x4e0 kernel/entry/common.c:75
 __exit_to_user_mode_prepare include/linux/irq-entry-common.h:226 [inline]
 syscall_exit_to_user_mode_prepare include/linux/irq-entry-common.h:256 [inline]
 syscall_exit_to_user_mode_work include/linux/entry-common.h:159 [inline]
 syscall_exit_to_user_mode include/linux/entry-common.h:194 [inline]
 do_syscall_64+0x2b7/0xf80 arch/x86/entry/syscall_64.c:100
 entry_SYSCALL_64_after_hwframe+0x77/0x7f

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

The buggy address belongs to the physical page:
page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x1158b
flags: 0xfff00000000000(node=0|zone=1|lastcpupid=0x7ff)
page_type: f5(slab)
raw: 00fff00000000000 ffff88801a441b40 dead000000000122 0000000000000000
raw: 0000000000000000 0000000080080008 00000000f5000000 0000000000000000
page dumped because: kasan: bad access detected
page_owner tracks the page as allocated
page last allocated via order 0, migratetype Unmovable, gfp_mask 0x52cc0(GFP_KERNEL|__GFP_NOWARN|__GFP_NORETRY|__GFP_COMP), pid 5548, tgid 5547 (syz.0.30), ts 109855780649, free_ts 109836972307
 set_page_owner include/linux/page_owner.h:32 [inline]
 post_alloc_hook+0x234/0x290 mm/page_alloc.c:1846
 prep_new_page mm/page_alloc.c:1854 [inline]
 get_page_from_freelist+0x24e0/0x2580 mm/page_alloc.c:3915
 __alloc_frozen_pages_noprof+0x181/0x370 mm/page_alloc.c:5210
 alloc_pages_mpol+0x232/0x4a0 mm/mempolicy.c:2486
 alloc_slab_page mm/slub.c:3075 [inline]
 allocate_slab+0x86/0x3b0 mm/slub.c:3248
 new_slab mm/slub.c:3302 [inline]
 ___slab_alloc+0xe53/0x1820 mm/slub.c:4656
 __slab_alloc+0x65/0x100 mm/slub.c:4779
 __slab_alloc_node mm/slub.c:4855 [inline]
 slab_alloc_node mm/slub.c:5251 [inline]
 __kmalloc_cache_noprof+0x41e/0x700 mm/slub.c:5771
 kmalloc_noprof include/linux/slab.h:957 [inline]
 kzalloc_noprof include/linux/slab.h:1094 [inline]
 media_request_alloc+0xe4/0x5b0 drivers/media/mc/mc-request.c:294
 media_device_request_alloc+0x98/0xd0 drivers/media/mc/mc-device.c:380
 media_device_ioctl+0x278/0x430 drivers/media/mc/mc-device.c:465
 vfs_ioctl fs/ioctl.c:51 [inline]
 __do_sys_ioctl fs/ioctl.c:597 [inline]
 __se_sys_ioctl+0xfc/0x170 fs/ioctl.c:583
 do_syscall_x64 arch/x86/entry/syscall_64.c:63 [inline]
 do_syscall_64+0xec/0xf80 arch/x86/entry/syscall_64.c:94
 entry_SYSCALL_64_after_hwframe+0x77/0x7f
page last free pid 15 tgid 15 stack trace:
 reset_page_owner include/linux/page_owner.h:25 [inline]
 free_pages_prepare mm/page_alloc.c:1395 [inline]
 __free_frozen_pages+0xbc8/0xd30 mm/page_alloc.c:2943
 __tlb_remove_table_free mm/mmu_gather.c:227 [inline]
 tlb_remove_table_rcu+0x85/0x100 mm/mmu_gather.c:290
 rcu_do_batch kernel/rcu/tree.c:2605 [inline]
 rcu_core+0xc8e/0x1720 kernel/rcu/tree.c:2857
 handle_softirqs+0x22b/0x7c0 kernel/softirq.c:622
 run_ksoftirqd+0x36/0x60 kernel/softirq.c:1063
 smpboot_thread_fn+0x542/0xa60 kernel/smpboot.c:160
 kthread+0x711/0x8a0 kernel/kthread.c:463
 ret_from_fork+0x510/0xa50 arch/x86/kernel/process.c:158
 ret_from_fork_asm+0x1a/0x30 arch/x86/entry/entry_64.S:246

Memory state around the buggy address:
 ffff88801158b500: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
 ffff88801158b580: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
>ffff88801158b600: fa fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
                      ^
 ffff88801158b680: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
 ffff88801158b700: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
==================================================================

Crashes (3):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2025/12/29 05:45 upstream c875a6c32467 d1b870e1 .config console log report syz / log C [disk image (non-bootable)] [vmlinux] [kernel image] ci-snapshot-upstream-root KASAN: slab-use-after-free Write in number
2025/12/29 02:33 upstream c875a6c32467 d1b870e1 .config console log report syz / log C [disk image (non-bootable)] [vmlinux] [kernel image] ci-snapshot-upstream-root KASAN: slab-use-after-free Write in number
2025/12/29 01:34 upstream c875a6c32467 d1b870e1 .config console log report [disk image (non-bootable)] [vmlinux] [kernel image] ci-snapshot-upstream-root KASAN: slab-use-after-free Write in number
* Struck through repros no longer work on HEAD.