KASAN: use-after-free Read in ovl_dentry_release

Status: premoderation: reported on 2026/07/26 05:31
Reported-by: syzbot+89eec016e5b4aa0fd476@syzkaller.appspotmail.com
First crash: 4d12h, last: 4d12h

Sample crash report:
RBP: 00007ffd8158c490 R08: 00007ffd8158d490 R09: 00000000ffffffff
R10: 0000000000000000 R11: 0000000000000246 R12: 00007ffd8158d520
R13: 00007f163a97d30a R14: 0000000000027812 R15: 00007ffd8158d560
---[ end trace 4e8f48f2ec636358 ]---
==================================================================
BUG: KASAN: use-after-free in fast_dput+0x1e0/0x290 fs/dcache.c:750
Read of size 4 at addr ffff88810d26fee0 by task syz-executor/2823

CPU: 1 PID: 2823 Comm: syz-executor Tainted: G        W         syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 07/16/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_load4_noabort+0x14/0x20 mm/kasan/report_generic.c:308
 fast_dput+0x1e0/0x290 fs/dcache.c:750
 dput+0x21/0x80 fs/dcache.c:870
 ovl_entry_stack_free fs/overlayfs/super.c:67 [inline]
 ovl_dentry_release+0xb9/0x150 fs/overlayfs/super.c:80
 __dentry_kill+0x4c1/0x660 fs/dcache.c:588
 shrink_dentry_list+0x38e/0x500 fs/dcache.c:1146
 shrink_dcache_parent+0xa9/0x270 fs/dcache.c:-1
 do_one_tree+0x27/0x150 fs/dcache.c:1627
 shrink_dcache_for_umount+0x6a/0x110 fs/dcache.c:1644
 generic_shutdown_super+0x66/0x320 fs/super.c:447
 kill_anon_super+0x3a/0x70 fs/super.c:1131
 deactivate_locked_super+0xa0/0x100 fs/super.c:335
 deactivate_super+0xaf/0xe0 fs/super.c:366
 cleanup_mnt+0x44f/0x500 fs/namespace.c:1123
 __cleanup_mnt+0x19/0x20 fs/namespace.c:1130
 task_work_run+0x127/0x190 kernel/task_work.c:189
 exit_task_work include/linux/task_work.h:33 [inline]
 do_exit+0xa7c/0x24e0 kernel/exit.c:873
 do_group_exit+0x149/0x310 kernel/exit.c:987
 __do_sys_exit_group kernel/exit.c:998 [inline]
 __se_sys_exit_group kernel/exit.c:996 [inline]
 __x64_sys_exit_group+0x3f/0x40 kernel/exit.c:996
 do_syscall_64+0x31/0x40 arch/x86/entry/common.c:46
 entry_SYSCALL_64_after_hwframe+0x61/0xcb
RIP: 0033:0x7f163a8e7e99
Code: Unable to access opcode bytes at RIP 0x7f163a8e7e6f.
RSP: 002b:00007ffd8158a0e8 EFLAGS: 00000246 ORIG_RAX: 00000000000000e7
RAX: ffffffffffffffda RBX: 00007f163a97d37c RCX: 00007f163a8e7e99
RDX: 0000000000000000 RSI: 0000000000000000 RDI: 0000000000000001
RBP: 0000000000000016 R08: 0000000000000000 R09: 00007f163a97d30a
R10: 0000000000000000 R11: 0000000000000246 R12: 00007ffd8158b3a0
R13: 00007f163a97d30a R14: 000055555c44a4e8 R15: 00007ffd8158d560

Allocated by task 4014:
 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
 __d_alloc+0x2d/0x690 fs/dcache.c:1714
 d_alloc fs/dcache.c:1793 [inline]
 d_alloc_parallel+0xe2/0x1390 fs/dcache.c:2549
 __lookup_slow+0x14c/0x410 fs/namei.c:1633
 lookup_one_len+0x196/0x2d0 fs/namei.c:2664
 incfs_lookup_dentry+0x60/0xb0 fs/incfs/data_mgmt.c:210
 open_or_create_special_dir+0x4c/0x1e0 fs/incfs/vfs.c:469
 incfs_mount_fs+0x434/0x8d0 fs/incfs/vfs.c:1867
 legacy_get_tree+0xed/0x190 fs/fs_context.c:593
 vfs_get_tree+0x89/0x260 fs/super.c:1572
 do_new_mount+0x25a/0xa30 fs/namespace.c:3006
 path_mount+0x581/0xca0 fs/namespace.c:3336
 do_mount fs/namespace.c:3349 [inline]
 __do_sys_mount fs/namespace.c:3557 [inline]
 __se_sys_mount+0x320/0x390 fs/namespace.c:3534
 __x64_sys_mount+0xbf/0xd0 fs/namespace.c:3534
 do_syscall_64+0x31/0x40 arch/x86/entry/common.c:46
 entry_SYSCALL_64_after_hwframe+0x61/0xcb

Freed by task 4067:
 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
 __d_free+0x23/0x30 fs/dcache.c:271
 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
 dentry_free+0xbd/0x150 fs/dcache.c:-1
 __dentry_kill+0x516/0x660 fs/dcache.c:597
 dentry_kill+0xc0/0x2a0 fs/dcache.c:-1
 dput+0x42/0x80 fs/dcache.c:883
 ovl_entry_stack_free fs/overlayfs/super.c:67 [inline]
 ovl_dentry_release+0xb9/0x150 fs/overlayfs/super.c:80
 __dentry_kill+0x4c1/0x660 fs/dcache.c:588
 shrink_dentry_list+0x38e/0x500 fs/dcache.c:1146
 shrink_dcache_parent+0xa9/0x270 fs/dcache.c:-1
 do_one_tree+0x27/0x150 fs/dcache.c:1627
 shrink_dcache_for_umount+0x6a/0x110 fs/dcache.c:1644
 generic_shutdown_super+0x66/0x320 fs/super.c:447
 kill_anon_super+0x3a/0x70 fs/super.c:1131
 deactivate_locked_super+0xa0/0x100 fs/super.c:335
 deactivate_super+0xaf/0xe0 fs/super.c:366
 cleanup_mnt+0x44f/0x500 fs/namespace.c:1123
 __cleanup_mnt+0x19/0x20 fs/namespace.c:1130
 task_work_run+0x127/0x190 kernel/task_work.c:189
 exit_task_work include/linux/task_work.h:33 [inline]
 do_exit+0xa7c/0x24e0 kernel/exit.c:873
 do_group_exit+0x149/0x310 kernel/exit.c:987
 __do_sys_exit_group kernel/exit.c:998 [inline]
 __se_sys_exit_group kernel/exit.c:996 [inline]
 __x64_sys_exit_group+0x3f/0x40 kernel/exit.c:996
 do_syscall_64+0x31/0x40 arch/x86/entry/common.c:46
 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_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
 dentry_free+0xbd/0x150 fs/dcache.c:-1
 __dentry_kill+0x516/0x660 fs/dcache.c:597
 dentry_kill+0xc0/0x2a0 fs/dcache.c:-1
 dput+0x42/0x80 fs/dcache.c:883
 do_unlinkat+0x30c/0x670 fs/namei.c:4046
 __do_sys_unlink fs/namei.c:4090 [inline]
 __se_sys_unlink fs/namei.c:4088 [inline]
 __x64_sys_unlink+0x49/0x50 fs/namei.c:4088
 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 ffff88810d26fee0
 which belongs to the cache dentry of size 208
The buggy address is located 0 bytes inside of
 208-byte region [ffff88810d26fee0, ffff88810d26ffb0)
The buggy address belongs to the page:
page:ffffea0004349bc0 refcount:1 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x10d26f
flags: 0x4000000000000200(slab)
raw: 4000000000000200 dead000000000100 dead000000000122 ffff88810018ad80
raw: 0000000000000000 00000000000f000f 00000001ffffffff 0000000000000000
page dumped because: kasan: bad access detected
page_owner tracks the page as allocated
page last allocated via order 0, migratetype Reclaimable, gfp_mask 0x112cd0(GFP_USER|__GFP_NOWARN|__GFP_NORETRY|__GFP_RECLAIMABLE), pid 303, ts 62274756813, free_ts 58645088201
 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
 __d_alloc+0x2d/0x690 fs/dcache.c:1714
 d_alloc fs/dcache.c:1793 [inline]
 d_alloc_parallel+0xe2/0x1390 fs/dcache.c:2549
 lookup_open fs/namei.c:3183 [inline]
 open_last_lookups fs/namei.c:3325 [inline]
 path_openat+0x992/0x3040 fs/namei.c:3514
 do_filp_open+0x1df/0x400 fs/namei.c:3544
 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
 __free_slab+0xcf/0x190 mm/slub.c:1899
 free_slab mm/slub.c:1914 [inline]
 discard_slab mm/slub.c:1920 [inline]
 unfreeze_partials+0x150/0x180 mm/slub.c:2415
 put_cpu_partial+0xc1/0x180 mm/slub.c:2451
 __slab_free+0x2c9/0x3a0 mm/slub.c:3100
 do_slab_free mm/slub.c:3196 [inline]
 ___cache_free+0x10e/0x130 mm/slub.c:3215
 qlink_free+0x50/0x90 mm/kasan/quarantine.c:157
 qlist_free_all+0x5f/0xb0 mm/kasan/quarantine.c:176
 kasan_quarantine_reduce+0x14a/0x160 mm/kasan/quarantine.c:283
 __kasan_slab_alloc+0x2f/0xe0 mm/kasan/common.c:440
 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_trace+0x155/0x2e0 mm/slub.c:2977
 kmalloc include/linux/slab.h:555 [inline]
 kzalloc include/linux/slab.h:667 [inline]
 usb_get_bos_descriptor+0x56/0x990 drivers/usb/core/config.c:1014
 hub_port_init+0x19b0/0x2520 drivers/usb/core/hub.c:5140
 hub_port_connect drivers/usb/core/hub.c:5428 [inline]
 hub_port_connect_change drivers/usb/core/hub.c:5639 [inline]
 port_event drivers/usb/core/hub.c:5805 [inline]
 hub_event+0x23b1/0x4220 drivers/usb/core/hub.c:5887

Memory state around the buggy address:
 ffff88810d26fd80: fb fb fc fc fc fc fc fc fc fc 00 00 00 00 00 00
 ffff88810d26fe00: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
>ffff88810d26fe80: 00 00 00 00 fc fc fc fc fc fc fc fc fa fb fb fb
                                                       ^
 ffff88810d26ff00: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
 ffff88810d26ff80: fb fb fb fb fb fb fc fc fc fc fc fc fc fc fc fc
==================================================================
------------[ cut here ]------------
WARNING: CPU: 0 PID: 2823 at fs/dcache.c:766 fast_dput+0x207/0x290 fs/dcache.c:766
Modules linked in:
CPU: 0 PID: 2823 Comm: syz-executor Tainted: G    B   W         syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 07/16/2026
RIP: 0010:fast_dput+0x207/0x290 fs/dcache.c:766
Code: e0 f2 ff e9 4e fe ff ff 89 d9 80 e1 07 80 c1 03 38 c1 0f 8c a1 fe ff ff 48 89 df e8 83 e0 f2 ff e9 94 fe ff ff e8 79 6b b8 ff <0f> 0b e9 13 ff ff ff 89 d9 80 e1 07 80 c1 03 38 c1 0f 8c ec fe ff
RSP: 0018:ffffc90000e37970 EFLAGS: 00010293
RAX: ffffffff81ac37e7 RBX: ffff88810d26fee0 RCX: ffff8881262a13c0
RDX: 0000000000000000 RSI: 00000000ffffff80 RDI: 0000000000000001
RBP: ffffc90000e37998 R08: 0000000000000003 R09: 0000000000000004
R10: dffffc0000000000 R11: fffff520001c6f20 R12: 00000000ffffff80
R13: dffffc0000000000 R14: ffff88810d26ff38 R15: 1ffff11021a4dfe7
FS:  0000000000000000(0000) GS:ffff8881f7000000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 00007fecab2c4d58 CR3: 0000000113ee2000 CR4: 00000000003526b0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
Call Trace:
 dput+0x21/0x80 fs/dcache.c:870
 ovl_entry_stack_free fs/overlayfs/super.c:67 [inline]
 ovl_dentry_release+0xb9/0x150 fs/overlayfs/super.c:80
 __dentry_kill+0x4c1/0x660 fs/dcache.c:588
 shrink_dentry_list+0x38e/0x500 fs/dcache.c:1146
 shrink_dcache_parent+0xa9/0x270 fs/dcache.c:-1
 do_one_tree+0x27/0x150 fs/dcache.c:1627
 shrink_dcache_for_umount+0x6a/0x110 fs/dcache.c:1644
 generic_shutdown_super+0x66/0x320 fs/super.c:447
 kill_anon_super+0x3a/0x70 fs/super.c:1131
 deactivate_locked_super+0xa0/0x100 fs/super.c:335
 deactivate_super+0xaf/0xe0 fs/super.c:366
 cleanup_mnt+0x44f/0x500 fs/namespace.c:1123
 __cleanup_mnt+0x19/0x20 fs/namespace.c:1130
 task_work_run+0x127/0x190 kernel/task_work.c:189
 exit_task_work include/linux/task_work.h:33 [inline]
 do_exit+0xa7c/0x24e0 kernel/exit.c:873
 do_group_exit+0x149/0x310 kernel/exit.c:987
 __do_sys_exit_group kernel/exit.c:998 [inline]
 __se_sys_exit_group kernel/exit.c:996 [inline]
 __x64_sys_exit_group+0x3f/0x40 kernel/exit.c:996
 do_syscall_64+0x31/0x40 arch/x86/entry/common.c:46
 entry_SYSCALL_64_after_hwframe+0x61/0xcb
RIP: 0033:0x7f163a8e7e99
Code: Unable to access opcode bytes at RIP 0x7f163a8e7e6f.
RSP: 002b:00007ffd8158a0e8 EFLAGS: 00000246 ORIG_RAX: 00000000000000e7
RAX: ffffffffffffffda RBX: 00007f163a97d37c RCX: 00007f163a8e7e99
RDX: 0000000000000000 RSI: 0000000000000000 RDI: 0000000000000001
RBP: 0000000000000016 R08: 0000000000000000 R09: 00007f163a97d30a
R10: 0000000000000000 R11: 0000000000000246 R12: 00007ffd8158b3a0
R13: 00007f163a97d30a R14: 000055555c44a4e8 R15: 00007ffd8158d560
---[ end trace 4e8f48f2ec636359 ]---

Crashes (1):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2026/07/26 05:30 android13-5.10-lts 50b3a256e550 492bab15 .config console log report info [disk image] [vmlinux] [kernel image] ci2-android-5-10 KASAN: use-after-free Read in ovl_dentry_release
* Struck through repros no longer work on HEAD.