syzbot


KASAN: use-after-free Read in fast_dput (3)

Status: premoderation: reported on 2025/08/26 09:24
Reported-by: syzbot+6d1075923ca21f70fba5@syzkaller.appspotmail.com
First crash: 80d, last: 3d19h
Similar bugs (5)
Kernel Title Rank 🛈 Repro Cause bisect Fix bisect Count Last Reported Patched Status
android-6-1 KASAN: use-after-free Read in fast_dput 19 1 20d 20d 0/2 premoderation: reported on 2025/10/25 11:04
android-5-15 KASAN: use-after-free Read in fast_dput 19 1 291d 291d 0/2 auto-obsoleted due to no activity on 2025/04/27 04:39
android-5-10 KASAN: use-after-free Read in fast_dput 19 14 298d 488d 0/2 auto-obsoleted due to no activity on 2025/04/20 07:57
android-5-15 KASAN: use-after-free Read in fast_dput (2) 19 3 4d00h 25d 0/2 premoderation: reported on 2025/10/20 04:48
android-5-10 KASAN: use-after-free Read in fast_dput (2) 19 1 193d 193d 0/2 auto-obsoleted due to no activity on 2025/08/03 11:21

Sample crash report:
RBP: 0000000000000009 R08: 00007ffd508c7c37 R09: 00007ffd508cb150
R10: 0000000000000009 R11: 0000000000000246 R12: 00007ffd508cb150
R13: 00007ff85bad7d7d R14: 000055558128f4a8 R15: 00007ffd508cc220
---[ end trace 50a1f69a7186f86f ]---
==================================================================
BUG: KASAN: use-after-free in fast_dput+0x1e9/0x290 fs/dcache.c:750
Read of size 4 at addr ffff8881101c3bb0 by task syz-executor/399

CPU: 0 PID: 399 Comm: syz-executor Tainted: G        W         syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 10/02/2025
Call Trace:
 __dump_stack+0x21/0x24 lib/dump_stack.c:77
 dump_stack_lvl+0x169/0x1d8 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+0xe2/0x130 mm/kasan/report.c:452
 __asan_report_load4_noabort+0x14/0x20 mm/kasan/report_generic.c:308
 fast_dput+0x1e9/0x290 fs/dcache.c:750
 dput+0x21/0x80 fs/dcache.c:870
 incfs_free_mount_info+0x60/0x200 fs/incfs/data_mgmt.c:166
 incfs_kill_sb+0x1aa/0x210 fs/incfs/vfs.c:1979
 deactivate_locked_super+0xa0/0x100 fs/super.c:335
 deactivate_super+0xaf/0xe0 fs/super.c:366
 cleanup_mnt+0x446/0x500 fs/namespace.c:1114
 __cleanup_mnt+0x19/0x20 fs/namespace.c:1121
 task_work_run+0x127/0x190 kernel/task_work.c:189
 exit_task_work include/linux/task_work.h:33 [inline]
 do_exit+0xa4f/0x2480 kernel/exit.c:872
 do_group_exit+0x141/0x310 kernel/exit.c:986
 __do_sys_exit_group kernel/exit.c:997 [inline]
 __se_sys_exit_group kernel/exit.c:995 [inline]
 __x64_sys_exit_group+0x3f/0x40 kernel/exit.c:995
 do_syscall_64+0x31/0x40 arch/x86/entry/common.c:46
 entry_SYSCALL_64_after_hwframe+0x61/0xcb
RIP: 0033:0x7ff85ba556c9
Code: Unable to access opcode bytes at RIP 0x7ff85ba5569f.
RSP: 002b:00007ffd508c9e98 EFLAGS: 00000246 ORIG_RAX: 00000000000000e7
RAX: ffffffffffffffda RBX: 00007ff85bad7ddd RCX: 00007ff85ba556c9
RDX: 0000000000000000 RSI: 0000000000000000 RDI: 0000000000000001
RBP: 0000000000000009 R08: 00007ffd508c7c37 R09: 00007ffd508cb150
R10: 0000000000000009 R11: 0000000000000246 R12: 00007ffd508cb150
R13: 00007ff85bad7d7d R14: 000055558128f4a8 R15: 00007ffd508cc220

Allocated by task 450:
 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+0xbd/0xf0 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+0x165/0x2e0 mm/slub.c:2965
 __d_alloc+0x2d/0x6a0 fs/dcache.c:1714
 d_alloc fs/dcache.c:1793 [inline]
 d_alloc_parallel+0xd6/0x1320 fs/dcache.c:2547
 __lookup_slow+0x13e/0x3e0 fs/namei.c:1625
 lookup_one_len+0x18e/0x2c0 fs/namei.c:2656
 incfs_lookup_dentry+0x60/0xb0 fs/incfs/data_mgmt.c:210
 open_or_create_special_dir+0x4f/0x1d0 fs/incfs/vfs.c:469
 incfs_mount_fs+0x434/0x8c0 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/0xa20 fs/namespace.c:2997
 path_mount+0x572/0xc80 fs/namespace.c:3327
 do_mount fs/namespace.c:3340 [inline]
 __do_sys_mount fs/namespace.c:3548 [inline]
 __se_sys_mount+0x318/0x380 fs/namespace.c:3525
 __x64_sys_mount+0xbf/0xd0 fs/namespace.c:3525
 do_syscall_64+0x31/0x40 arch/x86/entry/common.c:46
 entry_SYSCALL_64_after_hwframe+0x61/0xcb

Freed by task 501:
 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+0x4df/0xa80 kernel/rcu/tree.c:2494
 rcu_core+0x55f/0xd60 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+0x10e/0x1050 kernel/rcu/tree.c:3054
 dentry_free+0xbd/0x150 fs/dcache.c:-1
 __dentry_kill+0x50a/0x650 fs/dcache.c:597
 dentry_kill+0xc0/0x2a0 fs/dcache.c:-1
 dput+0x42/0x80 fs/dcache.c:883
 incfs_free_mount_info+0x60/0x200 fs/incfs/data_mgmt.c:166
 incfs_kill_sb+0x1aa/0x210 fs/incfs/vfs.c:1979
 deactivate_locked_super+0xa0/0x100 fs/super.c:335
 deactivate_super+0xaf/0xe0 fs/super.c:366
 cleanup_mnt+0x446/0x500 fs/namespace.c:1114
 __cleanup_mnt+0x19/0x20 fs/namespace.c:1121
 task_work_run+0x127/0x190 kernel/task_work.c:189
 exit_task_work include/linux/task_work.h:33 [inline]
 do_exit+0xa4f/0x2480 kernel/exit.c:872
 do_group_exit+0x141/0x310 kernel/exit.c:986
 __do_sys_exit_group kernel/exit.c:997 [inline]
 __se_sys_exit_group kernel/exit.c:995 [inline]
 __x64_sys_exit_group+0x3f/0x40 kernel/exit.c:995
 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+0x10e/0x1050 kernel/rcu/tree.c:3054
 dentry_free+0xbd/0x150 fs/dcache.c:-1
 __dentry_kill+0x50a/0x650 fs/dcache.c:597
 dentry_kill+0xc0/0x2a0 fs/dcache.c:-1
 dput+0x42/0x80 fs/dcache.c:883
 handle_mounts fs/namei.c:1485 [inline]
 step_into+0x8f0/0xcf0 fs/namei.c:1782
 walk_component+0x26a/0x460 fs/namei.c:1958
 lookup_last fs/namei.c:2403 [inline]
 path_lookupat+0x180/0x490 fs/namei.c:2427
 filename_lookup+0x1d5/0x600 fs/namei.c:2460
 user_path_at_empty+0x43/0x50 fs/namei.c:2740
 user_path_at include/linux/namei.h:60 [inline]
 vfs_statx+0xff/0x520 fs/stat.c:193
 vfs_fstatat fs/stat.c:215 [inline]
 __do_sys_newfstatat fs/stat.c:383 [inline]
 __se_sys_newfstatat+0xc6/0x340 fs/stat.c:377
 __x64_sys_newfstatat+0x9b/0xb0 fs/stat.c:377
 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 ffff8881101c3bb0
 which belongs to the cache dentry of size 208
The buggy address is located 0 bytes inside of
 208-byte region [ffff8881101c3bb0, ffff8881101c3c80)
The buggy address belongs to the page:
page:ffffea00044070c0 refcount:1 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x1101c3
flags: 0x4000000000000200(slab)
raw: 4000000000000200 0000000000000000 0000000200000001 ffff88810018a480
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 0x12cd0(GFP_KERNEL|__GFP_NOWARN|__GFP_NORETRY|__GFP_RECLAIMABLE), pid 106, ts 4638975791, free_ts 0
 set_page_owner include/linux/page_owner.h:35 [inline]
 post_alloc_hook mm/page_alloc.c:2456 [inline]
 prep_new_page+0x179/0x180 mm/page_alloc.c:2462
 get_page_from_freelist+0x2235/0x23d0 mm/page_alloc.c:4254
 __alloc_pages_nodemask+0x268/0x5f0 mm/page_alloc.c:5370
 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+0x2a6/0x450 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+0x1af/0x2e0 mm/slub.c:2965
 __d_alloc+0x2d/0x6a0 fs/dcache.c:1714
 d_alloc fs/dcache.c:1793 [inline]
 d_alloc_parallel+0xd6/0x1320 fs/dcache.c:2547
 __lookup_slow+0x13e/0x3e0 fs/namei.c:1625
 lookup_slow+0x57/0x70 fs/namei.c:1657
 walk_component+0x325/0x460 fs/namei.c:1952
 lookup_last fs/namei.c:2403 [inline]
 path_lookupat+0x180/0x490 fs/namei.c:2427
 filename_lookup+0x1d5/0x600 fs/namei.c:2460
 user_path_at_empty+0x43/0x50 fs/namei.c:2740
 user_path_at include/linux/namei.h:60 [inline]
 vfs_statx+0xff/0x520 fs/stat.c:193
page_owner free stack trace missing

Memory state around the buggy address:
 ffff8881101c3a80: fc fc fc fc 00 00 00 00 00 00 00 00 00 00 00 00
 ffff8881101c3b00: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 fc fc
>ffff8881101c3b80: fc fc fc fc fc fc fa fb fb fb fb fb fb fb fb fb
                                     ^
 ffff8881101c3c00: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
 ffff8881101c3c80: fc fc fc fc fc fc fc fc fa fb fb fb fb fb fb fb
==================================================================
------------[ cut here ]------------
WARNING: CPU: 1 PID: 399 at fs/dcache.c:766 fast_dput+0x210/0x290 fs/dcache.c:766
Modules linked in:
CPU: 1 PID: 399 Comm: syz-executor Tainted: G    B   W         syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 10/02/2025
RIP: 0010:fast_dput+0x210/0x290 fs/dcache.c:766
Code: 04 f3 ff e9 46 fe ff ff 89 d9 80 e1 07 80 c1 03 38 c1 0f 8c 99 fe ff ff 48 89 df e8 3a 04 f3 ff e9 8c fe ff ff e8 90 14 b9 ff <0f> 0b e9 0b ff ff ff 89 d9 80 e1 07 80 c1 03 38 c1 0f 8c e4 fe ff
RSP: 0018:ffffc90000b57b80 EFLAGS: 00010293
RAX: ffffffff81aa9110 RBX: ffff8881101c3bb0 RCX: ffff88811e2f3b40
RDX: 0000000000000000 RSI: 00000000ffffff80 RDI: 0000000000000001
RBP: ffffc90000b57bb0 R08: 0000000000000004 R09: 0000000000000003
R10: fffff5200016af60 R11: 1ffff9200016af60 R12: 00000000ffffff80
R13: dffffc0000000000 R14: ffff8881101c3c08 R15: 1ffff11022038781
FS:  0000000000000000(0000) GS:ffff8881f7100000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 000000110c2e5dce CR3: 0000000114a60000 CR4: 00000000003506a0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
Call Trace:
 dput+0x21/0x80 fs/dcache.c:870
 incfs_free_mount_info+0x60/0x200 fs/incfs/data_mgmt.c:166
 incfs_kill_sb+0x1aa/0x210 fs/incfs/vfs.c:1979
 deactivate_locked_super+0xa0/0x100 fs/super.c:335
 deactivate_super+0xaf/0xe0 fs/super.c:366
 cleanup_mnt+0x446/0x500 fs/namespace.c:1114
 __cleanup_mnt+0x19/0x20 fs/namespace.c:1121
 task_work_run+0x127/0x190 kernel/task_work.c:189
 exit_task_work include/linux/task_work.h:33 [inline]
 do_exit+0xa4f/0x2480 kernel/exit.c:872
 do_group_exit+0x141/0x310 kernel/exit.c:986
 __do_sys_exit_group kernel/exit.c:997 [inline]
 __se_sys_exit_group kernel/exit.c:995 [inline]
 __x64_sys_exit_group+0x3f/0x40 kernel/exit.c:995
 do_syscall_64+0x31/0x40 arch/x86/entry/common.c:46
 entry_SYSCALL_64_after_hwframe+0x61/0xcb
RIP: 0033:0x7ff85ba556c9
Code: Unable to access opcode bytes at RIP 0x7ff85ba5569f.
RSP: 002b:00007ffd508c9e98 EFLAGS: 00000246 ORIG_RAX: 00000000000000e7
RAX: ffffffffffffffda RBX: 00007ff85bad7ddd RCX: 00007ff85ba556c9
RDX: 0000000000000000 RSI: 0000000000000000 RDI: 0000000000000001
RBP: 0000000000000009 R08: 00007ffd508c7c37 R09: 00007ffd508cb150
R10: 0000000000000009 R11: 0000000000000246 R12: 00007ffd508cb150
R13: 00007ff85bad7d7d R14: 000055558128f4a8 R15: 00007ffd508cc220
---[ end trace 50a1f69a7186f870 ]---

Crashes (16):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2025/11/11 06:53 android13-5.10-lts ab3e1c0dd1ff 4e1406b4 .config console log report info [disk image] [vmlinux] [kernel image] ci2-android-5-10 KASAN: use-after-free Read in fast_dput
2025/11/11 03:27 android13-5.10-lts ab3e1c0dd1ff 4e1406b4 .config console log report info [disk image] [vmlinux] [kernel image] ci2-android-5-10 KASAN: use-after-free Read in fast_dput
2025/10/27 00:15 android13-5.10-lts 2ece552169c2 c0460fcd .config console log report info [disk image] [vmlinux] [kernel image] ci2-android-5-10 KASAN: use-after-free Read in fast_dput
2025/10/26 16:49 android13-5.10-lts 2ece552169c2 c0460fcd .config console log report info [disk image] [vmlinux] [kernel image] ci2-android-5-10 KASAN: use-after-free Read in fast_dput
2025/10/25 08:46 android13-5.10-lts 2ece552169c2 c0460fcd .config console log report info [disk image] [vmlinux] [kernel image] ci2-android-5-10 KASAN: use-after-free Read in fast_dput
2025/10/24 11:51 android13-5.10-lts 2ece552169c2 c0460fcd .config console log report info [disk image] [vmlinux] [kernel image] ci2-android-5-10 KASAN: use-after-free Read in fast_dput
2025/10/24 06:56 android13-5.10-lts 2ece552169c2 c0460fcd .config console log report info [disk image] [vmlinux] [kernel image] ci2-android-5-10 KASAN: use-after-free Read in fast_dput
2025/10/23 19:33 android13-5.10-lts 2ece552169c2 c0460fcd .config console log report info [disk image] [vmlinux] [kernel image] ci2-android-5-10 KASAN: use-after-free Read in fast_dput
2025/10/20 03:42 android13-5.10-lts 2ece552169c2 1c8c8cd8 .config console log report info [disk image] [vmlinux] [kernel image] ci2-android-5-10 KASAN: use-after-free Read in fast_dput
2025/10/16 23:47 android13-5.10-lts 2ece552169c2 19568248 .config console log report info [disk image] [vmlinux] [kernel image] ci2-android-5-10 KASAN: use-after-free Read in fast_dput
2025/10/16 22:16 android13-5.10-lts 2ece552169c2 19568248 .config console log report info [disk image] [vmlinux] [kernel image] ci2-android-5-10 KASAN: use-after-free Read in fast_dput
2025/10/12 10:37 android13-5.10-lts 2ece552169c2 ff1712fe .config console log report info [disk image] [vmlinux] [kernel image] ci2-android-5-10 KASAN: use-after-free Read in fast_dput
2025/10/09 08:12 android13-5.10-lts 2ece552169c2 7e2882b3 .config console log report info [disk image] [vmlinux] [kernel image] ci2-android-5-10 KASAN: use-after-free Read in fast_dput
2025/10/08 14:38 android13-5.10-lts 2ece552169c2 7e2882b3 .config console log report info [disk image] [vmlinux] [kernel image] ci2-android-5-10 KASAN: use-after-free Read in fast_dput
2025/10/04 14:25 android13-5.10-lts 0a91f603159e 49379ee0 .config console log report info [disk image] [vmlinux] [kernel image] ci2-android-5-10 KASAN: use-after-free Read in fast_dput
2025/08/26 09:23 android13-5.10-lts 1154f779f3f3 bf27483f .config console log report info [disk image] [vmlinux] [kernel image] ci2-android-5-10 KASAN: use-after-free Read in fast_dput
* Struck through repros no longer work on HEAD.