KASAN: use-after-free Read in dentry_name

Status: premoderation: reported on 2026/11/17 20:27
Reported-by: syzbot+9a5633afc612aedd9d38@syzkaller.appspotmail.com
First crash: 2d05h, last: 2d05h
▶ ▼ Similar bugs (2)
Kernel Title Rank 🛈 Repro Cause bisect Fix bisect Count Last Reported Patched Status
upstream KASAN: slab-use-after-free Read in dentry_name prio:normal actionable overlayfs 19 2 54d 60d 27/29 upstream: reported on 2026/09/20 02:07
android-5-15 general protection fault in dentry_name 2 2 43d 44d 0/2 premoderation: reported on 2026/10/06 08:50

Sample crash report:
==================================================================
BUG: KASAN: use-after-free in dentry_name+0x4f5/0x970 lib/vsprintf.c:953
Read of size 1 at addr ffff88811dc703f0 by task syz.8.3328/11838

CPU: 0 PID: 11838 Comm: syz.8.3328 Not tainted syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 11/06/2026
Call Trace:
 __dump_stack+0x21/0x24 lib/dump_stack.c:77
 dump_stack_lvl+0x1a7/0x208 lib/dump_stack.c:118
 print_address_description+0x7f/0x2c0 mm/kasan/report.c:248
 __kasan_report mm/kasan/report.c:435 [inline]
 kasan_report+0x100/0x140 mm/kasan/report.c:452
 __asan_report_load1_noabort+0x14/0x20 mm/kasan/report_generic.c:306
 dentry_name+0x4f5/0x970 lib/vsprintf.c:953
 pointer+0x57e/0xc40 lib/vsprintf.c:2337
 vsnprintf+0xbb0/0x1990 lib/vsprintf.c:2693
 vscnprintf+0x2d/0x80 lib/vsprintf.c:2792
 vprintk_store+0xc7/0xb80 kernel/printk/printk.c:1994
 vprintk_emit+0x139/0x340 kernel/printk/printk.c:2052
 vprintk_default+0x26/0x30 kernel/printk/printk.c:2086
 vprintk_func+0x1a3/0x1e0 kernel/printk/printk_safe.c:401
 printk+0xda/0x130 kernel/printk/printk.c:2117
 __dump_page+0xd1a/0xf30 mm/debug.c:-1
 dump_page+0x1d/0x40 mm/debug.c:193
 do_migrate_range mm/memory_hotplug.c:1378 [inline]
 offline_pages+0x14be/0x1ab0 mm/memory_hotplug.c:1587
 memory_block_action drivers/base/memory.c:191 [inline]
 memory_block_change_state drivers/base/memory.c:213 [inline]
 memory_subsys_offline+0xd3/0x120 drivers/base/memory.c:250
 device_offline+0x25a/0x3a0 drivers/base/core.c:3785
 state_store+0x9c/0x180 drivers/base/memory.c:276
 dev_attr_store+0x5e/0x80 drivers/base/core.c:2018
 sysfs_kf_write+0x129/0x150 fs/sysfs/file.c:143
 kernfs_fop_write_iter+0x2bd/0x400 fs/kernfs/file.c:296
 call_write_iter include/linux/fs.h:2072 [inline]
 new_sync_write fs/read_write.c:518 [inline]
 vfs_write+0x770/0xd70 fs/read_write.c:605
 ksys_write+0x14a/0x260 fs/read_write.c:658
 __do_sys_write fs/read_write.c:670 [inline]
 __se_sys_write fs/read_write.c:667 [inline]
 __x64_sys_write+0x7b/0x90 fs/read_write.c:667
 do_syscall_64+0x31/0x40 arch/x86/entry/common.c:46
 entry_SYSCALL_64_after_hwframe+0x61/0xcb
RIP: 0033:0x7f382fcb4559
Code: ff c3 66 2e 0f 1f 84 00 00 00 00 00 0f 1f 44 00 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 e8 ff ff ff f7 d8 64 89 01 48
RSP: 002b:00007f382e702028 EFLAGS: 00000246 ORIG_RAX: 0000000000000001
RAX: ffffffffffffffda RBX: 00007f382ff30fa0 RCX: 00007f382fcb4559
RDX: 0000000000000007 RSI: 0000200000004f80 RDI: 0000000000000003
RBP: 00007f382fd43136 R08: 0000000000000000 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000
R13: 00007f382ff31038 R14: 00007f382ff30fa0 R15: 00007ffc7d268b28

Allocated by task 10195:
 kasan_save_stack mm/kasan/common.c:38 [inline]
 kasan_set_track mm/kasan/common.c:45 [inline]
 set_alloc_info mm/kasan/common.c:430 [inline]
 __kasan_slab_alloc+0xb7/0xe0 mm/kasan/common.c:463
 kasan_slab_alloc include/linux/kasan.h:244 [inline]
 slab_post_alloc_hook+0x5d/0x2f0 mm/slab.h:580
 slab_alloc_node mm/slub.c:2952 [inline]
 slab_alloc mm/slub.c:2960 [inline]
 kmem_cache_alloc+0x15a/0x2d0 mm/slub.c:2965
 kmem_cache_zalloc include/linux/slab.h:657 [inline]
 __alloc_file+0x28/0x320 fs/file_table.c:101
 alloc_empty_file+0x97/0x180 fs/file_table.c:151
 path_openat+0xf4/0x3040 fs/namei.c:3545
 do_filp_open+0x1df/0x400 fs/namei.c:3586
 do_sys_openat2+0x19f/0x750 fs/open.c:1219
 do_sys_open fs/open.c:1235 [inline]
 __do_sys_openat fs/open.c:1251 [inline]
 __se_sys_openat fs/open.c:1246 [inline]
 __x64_sys_openat+0x136/0x160 fs/open.c:1246
 do_syscall_64+0x31/0x40 arch/x86/entry/common.c:46
 entry_SYSCALL_64_after_hwframe+0x61/0xcb

Freed by task 12:
 kasan_save_stack mm/kasan/common.c:38 [inline]
 kasan_set_track+0x4a/0x70 mm/kasan/common.c:45
 kasan_set_free_info+0x23/0x40 mm/kasan/generic.c:370
 ____kasan_slab_free+0x125/0x160 mm/kasan/common.c:362
 __kasan_slab_free+0x11/0x20 mm/kasan/common.c:370
 kasan_slab_free include/linux/kasan.h:220 [inline]
 slab_free_hook mm/slub.c:1600 [inline]
 slab_free_freelist_hook+0xc5/0x190 mm/slub.c:1626
 slab_free mm/slub.c:3208 [inline]
 kmem_cache_free+0x100/0x2d0 mm/slub.c:3224
 file_free_rcu+0x93/0xa0 fs/file_table.c:50
 rcu_do_batch+0x488/0xaf0 kernel/rcu/tree.c:2494
 rcu_core+0x50a/0xca0 kernel/rcu/tree.c:2735
 rcu_core_si+0x9/0x10 kernel/rcu/tree.c:2748
 __do_softirq+0x255/0x563 kernel/softirq.c:309

Last potentially related work creation:
 kasan_save_stack+0x3a/0x60 mm/kasan/common.c:38
 __kasan_record_aux_stack+0xd2/0x100 mm/kasan/generic.c:348
 kasan_record_aux_stack_noalloc+0xb/0x10 mm/kasan/generic.c:358
 __call_rcu kernel/rcu/tree.c:2980 [inline]
 call_rcu+0x11a/0x1090 kernel/rcu/tree.c:3054
 file_free fs/file_table.c:58 [inline]
 __fput+0x56e/0x730 fs/file_table.c:299
 ____fput+0x15/0x20 fs/file_table.c:314
 task_work_run+0x127/0x190 kernel/task_work.c:189
 tracehook_notify_resume include/linux/tracehook.h:188 [inline]
 exit_to_user_mode_loop+0xcb/0xe0 kernel/entry/common.c:175
 exit_to_user_mode_prepare+0x76/0xa0 kernel/entry/common.c:202
 syscall_exit_to_user_mode+0x1d/0x40 kernel/entry/common.c:277
 do_syscall_64+0x3d/0x40 arch/x86/entry/common.c:56
 entry_SYSCALL_64_after_hwframe+0x61/0xcb

Second to last potentially related work creation:
 kasan_save_stack+0x3a/0x60 mm/kasan/common.c:38
 __kasan_record_aux_stack+0xd2/0x100 mm/kasan/generic.c:348
 kasan_record_aux_stack+0xe/0x10 mm/kasan/generic.c:353
 task_work_add+0x27/0x1e0 kernel/task_work.c:38
 fput_many+0xe7/0x1a0 fs/file_table.c:342
 fput+0x1a/0x20 fs/file_table.c:358
 filp_close+0x105/0x150 fs/open.c:1335
 __close_fd+0x44/0x50 fs/file.c:716
 __do_sys_close fs/open.c:1348 [inline]
 __se_sys_close fs/open.c:1346 [inline]
 __x64_sys_close+0x66/0xb0 fs/open.c:1346
 do_syscall_64+0x31/0x40 arch/x86/entry/common.c:46
 entry_SYSCALL_64_after_hwframe+0x61/0xcb

The buggy address belongs to the object at ffff88811dc70300
 which belongs to the cache filp of size 296
The buggy address is located 240 bytes inside of
 296-byte region [ffff88811dc70300, ffff88811dc70428)
The buggy address belongs to the page:
page:ffffea0004771c00 refcount:1 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x11dc70
head:ffffea0004771c00 order:1 compound_mapcount:0
flags: 0x4000000000010200(slab|head)
raw: 4000000000010200 dead000000000100 dead000000000122 ffff88810018b800
raw: 0000000000000000 0000000000150015 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 0x1d20c0(__GFP_IO|__GFP_FS|__GFP_NOWARN|__GFP_NORETRY|__GFP_COMP|__GFP_NOMEMALLOC|__GFP_HARDWALL), pid 11837, ts 744666458378, free_ts 725738455153
 set_page_owner include/linux/page_owner.h:35 [inline]
 post_alloc_hook mm/page_alloc.c:2456 [inline]
 prep_new_page+0x176/0x190 mm/page_alloc.c:2462
 get_page_from_freelist+0x225f/0x23f0 mm/page_alloc.c:4254
 __alloc_pages_nodemask+0x29a/0x640 mm/page_alloc.c:5384
 alloc_slab_page mm/slub.c:-1 [inline]
 allocate_slab mm/slub.c:1813 [inline]
 new_slab+0x84/0x3f0 mm/slub.c:1874
 new_slab_objects mm/slub.c:2632 [inline]
 ___slab_alloc+0x2f8/0x4c0 mm/slub.c:2796
 __slab_alloc+0x63/0xa0 mm/slub.c:2836
 slab_alloc_node mm/slub.c:2918 [inline]
 slab_alloc mm/slub.c:2960 [inline]
 kmem_cache_alloc+0x1a4/0x2d0 mm/slub.c:2965
 kmem_cache_zalloc include/linux/slab.h:657 [inline]
 __alloc_file+0x28/0x320 fs/file_table.c:101
 alloc_empty_file+0x97/0x180 fs/file_table.c:151
 path_openat+0xf4/0x3040 fs/namei.c:3545
 do_filp_open+0x1df/0x400 fs/namei.c:3586
 do_sys_openat2+0x19f/0x750 fs/open.c:1219
 do_sys_open fs/open.c:1235 [inline]
 __do_sys_openat fs/open.c:1251 [inline]
 __se_sys_openat fs/open.c:1246 [inline]
 __x64_sys_openat+0x136/0x160 fs/open.c:1246
 do_syscall_64+0x31/0x40 arch/x86/entry/common.c:46
 entry_SYSCALL_64_after_hwframe+0x61/0xcb
page last free stack trace:
 reset_page_owner include/linux/page_owner.h:28 [inline]
 free_pages_prepare mm/page_alloc.c:1349 [inline]
 free_pcp_prepare mm/page_alloc.c:1421 [inline]
 free_unref_page_prepare+0x2b7/0x2d0 mm/page_alloc.c:3336
 free_unref_page mm/page_alloc.c:3391 [inline]
 free_the_page mm/page_alloc.c:5443 [inline]
 __free_pages+0x146/0x390 mm/page_alloc.c:5454
 __vunmap+0x801/0x980 mm/vmalloc.c:2307
 __vfree mm/vmalloc.c:2356 [inline]
 vfree+0x61/0x90 mm/vmalloc.c:2387
 kvfree+0x26/0x40 mm/util.c:645
 btf_free kernel/bpf/btf.c:1472 [inline]
 btf_parse kernel/bpf/btf.c:4209 [inline]
 btf_new_fd+0x479/0xa00 kernel/bpf/btf.c:5472
 bpf_btf_load+0x5e/0x70 kernel/bpf/syscall.c:3841
 __do_sys_bpf kernel/bpf/syscall.c:4480 [inline]
 __se_sys_bpf+0x4ea/0x740 kernel/bpf/syscall.c:4391
 __x64_sys_bpf+0x7b/0x90 kernel/bpf/syscall.c:4391
 do_syscall_64+0x31/0x40 arch/x86/entry/common.c:46
 entry_SYSCALL_64_after_hwframe+0x61/0xcb

Memory state around the buggy address:
 ffff88811dc70280: 00 00 00 00 00 fc fc fc fc fc fc fc fc fc fc fc
 ffff88811dc70300: fa fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
>ffff88811dc70380: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
                                                             ^
 ffff88811dc70400: fb fb fb fb fb fc fc fc fc fc fc fc fc fc fc fc
 ffff88811dc70480: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
==================================================================

Crashes (1):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2026/11/17 20:26 android13-5.10-lts c73351b2e985 122f94d5 .config console log report info [disk image] [vmlinux] [kernel image] ci2-android-5-10 KASAN: use-after-free Read in dentry_name
* Struck through repros no longer work on HEAD.