KASAN: use-after-free Read in pick_link

Status: premoderation: reported on 2026/07/20 09:03
Reported-by: syzbot+bf0ddcd3bc08837be857@syzkaller.appspotmail.com
First crash: 12d, last: 12d
Similar bugs (7)
Kernel Title Rank 🛈 Repro Cause bisect Fix bisect Count Last Reported Patched Status
android-6-1 KASAN: use-after-free Read in pick_link origin:upstream 19 syz, C error 5 17d 160d 0/2 upstream: reported C repro on 2026/02/22 08:05
upstream general protection fault in pick_link (2) ntfs3 2 syz, C error 7 396d 410d 29/29 fixed on 2025/09/04 16:57
android-6-12 KASAN: slab-use-after-free Read in pick_link origin:upstream 19 syz, C 4 122d 170d 0/1 premoderation: reported C repro on 2026/02/12 18:21
upstream KMSAN: uninit-value in pick_link squashfs 7 syz, C 9 727d 731d 28/29 fixed on 2024/10/03 15:25
upstream KMSAN: kernel-infoleak in _copy_to_iter (8) mm 21 syz, C 21180 1150d 1244d 22/29 fixed on 2023/06/08 14:41
upstream general protection fault in pick_link ntfs3 2 syz, C 5 475d 625d 28/29 fixed on 2025/05/06 15:33
linux-6.6 general protection fault in pick_link origin:upstream 2 syz, C done 2 356d 356d 2/2 fixed on 2025/09/19 10:03

Sample crash report:
loop9: detected capacity change from 0 to 256
==================================================================
BUG: KASAN: use-after-free in pick_link+0x57d/0xe00 fs/namei.c:1773
Read of size 8 at addr ffff888129854990 by task syz.9.2474/9117

CPU: 1 PID: 9117 Comm: syz.9.2474 Tainted: G        W         syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 05/09/2026
Call Trace:
 <TASK>
 __dump_stack+0x21/0x30 lib/dump_stack.c:88
 dump_stack_lvl+0x110/0x170 lib/dump_stack.c:106
 print_address_description+0x7f/0x2c0 mm/kasan/report.c:248
 __kasan_report mm/kasan/report.c:427 [inline]
 kasan_report+0x10f/0x150 mm/kasan/report.c:444
 __asan_report_load8_noabort+0x14/0x20 mm/kasan/report_generic.c:309
 pick_link+0x57d/0xe00 fs/namei.c:1773
 step_into+0xac8/0xce0 fs/namei.c:1840
 walk_component+0x263/0x460 fs/namei.c:1990
 link_path_walk+0x688/0xde0 fs/namei.c:-1
 path_parentat fs/namei.c:2510 [inline]
 __filename_parentat+0x254/0x690 fs/namei.c:2534
 filename_parentat fs/namei.c:2552 [inline]
 do_unlinkat+0xeb/0x6c0 fs/namei.c:4327
 __do_sys_unlinkat fs/namei.c:4399 [inline]
 __se_sys_unlinkat fs/namei.c:4392 [inline]
 __x64_sys_unlinkat+0xd8/0xf0 fs/namei.c:4392
 x64_sys_call+0x4c0/0x9a0 arch/x86/include/generated/asm/syscalls_64.h:264
 do_syscall_x64 arch/x86/entry/common.c:50 [inline]
 do_syscall_64+0x4c/0xa0 arch/x86/entry/common.c:80
 entry_SYSCALL_64_after_hwframe+0x66/0xd0
RIP: 0033:0x7fbd26d03e99
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:00007fbd2575d028 EFLAGS: 00000246 ORIG_RAX: 0000000000000107
RAX: ffffffffffffffda RBX: 00007fbd26f8bfa0 RCX: 00007fbd26d03e99
RDX: 0000000000000000 RSI: 00002000000001c0 RDI: 0000000000000009
RBP: 00007fbd26d99eaf R08: 0000000000000000 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000
R13: 00007fbd26f8c038 R14: 00007fbd26f8bfa0 R15: 00007ffc71021598
 </TASK>

Allocated by task 9117:
 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:433 [inline]
 __kasan_slab_alloc+0xb7/0xe0 mm/kasan/common.c:466
 kasan_slab_alloc include/linux/kasan.h:217 [inline]
 slab_post_alloc_hook+0x4f/0x2b0 mm/slab.h:550
 slab_alloc_node mm/slub.c:3245 [inline]
 slab_alloc mm/slub.c:3255 [inline]
 kmem_cache_alloc+0xf7/0x260 mm/slub.c:3260
 alloc_inode fs/inode.c:266 [inline]
 new_inode_pseudo+0x7a/0x210 fs/inode.c:1011
 new_inode+0x28/0x1e0 fs/inode.c:1040
 bpf_get_inode kernel/bpf/inode.c:116 [inline]
 bpf_symlink+0x65/0x270 kernel/bpf/inode.c:394
 vfs_symlink+0x29e/0x470 fs/namei.c:4437
 do_symlinkat+0x24a/0x5d0 fs/namei.c:4466
 __do_sys_symlinkat fs/namei.c:4483 [inline]
 __se_sys_symlinkat fs/namei.c:4480 [inline]
 __x64_sys_symlinkat+0x99/0xb0 fs/namei.c:4480
 x64_sys_call+0x74b/0x9a0 arch/x86/include/generated/asm/syscalls_64.h:267
 do_syscall_x64 arch/x86/entry/common.c:50 [inline]
 do_syscall_64+0x4c/0xa0 arch/x86/entry/common.c:80
 entry_SYSCALL_64_after_hwframe+0x66/0xd0

Freed by task 9119:
 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:365
 __kasan_slab_free+0x11/0x20 mm/kasan/common.c:373
 kasan_slab_free include/linux/kasan.h:193 [inline]
 slab_free_hook mm/slub.c:1728 [inline]
 slab_free_freelist_hook+0xc2/0x190 mm/slub.c:1754
 slab_free mm/slub.c:3526 [inline]
 kmem_cache_free+0x100/0x320 mm/slub.c:3544
 free_inode_nonrcu+0x1c/0x20 fs/inode.c:245
 bpf_destroy_inode+0x14a/0x170 kernel/bpf/inode.c:621
 destroy_inode fs/inode.c:314 [inline]
 evict+0x790/0x8b0 fs/inode.c:665
 iput_final fs/inode.c:1779 [inline]
 iput+0x651/0x7e0 fs/inode.c:1805
 do_unlinkat+0x380/0x6c0 fs/namei.c:4363
 __do_sys_unlinkat fs/namei.c:4399 [inline]
 __se_sys_unlinkat fs/namei.c:4392 [inline]
 __x64_sys_unlinkat+0xd8/0xf0 fs/namei.c:4392
 x64_sys_call+0x4c0/0x9a0 arch/x86/include/generated/asm/syscalls_64.h:264
 do_syscall_x64 arch/x86/entry/common.c:50 [inline]
 do_syscall_64+0x4c/0xa0 arch/x86/entry/common.c:80
 entry_SYSCALL_64_after_hwframe+0x66/0xd0

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_common kernel/rcu/tree.c:3011 [inline]
 call_rcu+0x10b/0xf60 kernel/rcu/tree.c:3129
 destroy_inode fs/inode.c:319 [inline]
 evict+0x810/0x8b0 fs/inode.c:665
 iput_final fs/inode.c:1779 [inline]
 iput+0x651/0x7e0 fs/inode.c:1805
 dentry_unlink_inode+0x338/0x3e0 fs/dcache.c:380
 __dentry_kill+0x45b/0x660 fs/dcache.c:586
 dentry_kill+0xc0/0x2a0 fs/dcache.c:-1
 dput+0x47/0x90 fs/dcache.c:893
 find_next_child fs/libfs.c:264 [inline]
 simple_recursive_removal+0x26d/0x830 fs/libfs.c:279
 debugfs_remove+0x56/0x70 fs/debugfs/inode.c:745
 kvm_destroy_vm_debugfs virt/kvm/kvm_main.c:975 [inline]
 kvm_destroy_vm virt/kvm/kvm_main.c:1220 [inline]
 kvm_put_kvm+0x132/0x1190 virt/kvm/kvm_main.c:1283
 kvm_vm_release+0x46/0x50 virt/kvm/kvm_main.c:1306
 __fput+0x22b/0x900 fs/file_table.c:311
 ____fput+0x15/0x20 fs/file_table.c:339
 task_work_run+0x127/0x190 kernel/task_work.c:188
 tracehook_notify_resume include/linux/tracehook.h:189 [inline]
 exit_to_user_mode_loop+0xd0/0xe0 kernel/entry/common.c:181
 exit_to_user_mode_prepare+0x87/0xd0 kernel/entry/common.c:214
 __syscall_exit_to_user_mode_work kernel/entry/common.c:296 [inline]
 syscall_exit_to_user_mode+0x1a/0x30 kernel/entry/common.c:307
 do_syscall_64+0x58/0xa0 arch/x86/entry/common.c:86
 entry_SYSCALL_64_after_hwframe+0x66/0xd0

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_common kernel/rcu/tree.c:3011 [inline]
 call_rcu+0x10b/0xf60 kernel/rcu/tree.c:3129
 destroy_inode fs/inode.c:319 [inline]
 evict+0x810/0x8b0 fs/inode.c:665
 iput_final fs/inode.c:1779 [inline]
 iput+0x651/0x7e0 fs/inode.c:1805
 dentry_unlink_inode+0x338/0x3e0 fs/dcache.c:380
 __dentry_kill+0x45b/0x660 fs/dcache.c:586
 dentry_kill+0xc0/0x2a0 fs/dcache.c:-1
 dput+0x47/0x90 fs/dcache.c:893
 lookup_fast+0x5e8/0x720 fs/namei.c:1637
 walk_component+0x81/0x460 fs/namei.c:1980
 lookup_last fs/namei.c:2439 [inline]
 path_lookupat+0x155/0x430 fs/namei.c:2463
 filename_lookup+0x21e/0x550 fs/namei.c:2492
 user_path_at_empty+0x46/0x1c0 fs/namei.c:2891
 do_readlinkat+0xd9/0x490 fs/stat.c:442
 __do_sys_readlink fs/stat.c:475 [inline]
 __se_sys_readlink fs/stat.c:472 [inline]
 __x64_sys_readlink+0x7f/0x90 fs/stat.c:472
 x64_sys_call+0x93c/0x9a0 arch/x86/include/generated/asm/syscalls_64.h:90
 do_syscall_x64 arch/x86/entry/common.c:50 [inline]
 do_syscall_64+0x4c/0xa0 arch/x86/entry/common.c:80
 entry_SYSCALL_64_after_hwframe+0x66/0xd0

The buggy address belongs to the object at ffff8881298546e0
 which belongs to the cache inode_cache of size 752
The buggy address is located 688 bytes inside of
 752-byte region [ffff8881298546e0, ffff8881298549d0)
The buggy address belongs to the page:
page:ffffea0004a61500 refcount:1 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x129854
head:ffffea0004a61500 order:2 compound_mapcount:0 compound_pincount:0
flags: 0x4000000000010200(slab|head|zone=1)
raw: 4000000000010200 0000000000000000 0000000100000001 ffff8881001c4f00
raw: 0000000000000000 0000000080120012 00000001ffffffff 0000000000000000
page dumped because: kasan: bad access detected
page_owner tracks the page as allocated
page last allocated via order 2, migratetype Reclaimable, gfp_mask 0x1d20d0(__GFP_IO|__GFP_FS|__GFP_NOWARN|__GFP_NORETRY|__GFP_COMP|__GFP_NOMEMALLOC|__GFP_HARDWALL|__GFP_RECLAIMABLE), pid 2324, ts 130311440133, free_ts 121267844683
 set_page_owner include/linux/page_owner.h:33 [inline]
 post_alloc_hook+0x192/0x1b0 mm/page_alloc.c:2607
 prep_new_page+0x1c/0x110 mm/page_alloc.c:2613
 get_page_from_freelist+0x2c3a/0x2cd0 mm/page_alloc.c:4487
 __alloc_pages+0x1a2/0x460 mm/page_alloc.c:5824
 alloc_slab_page mm/slub.c:-1 [inline]
 allocate_slab mm/slub.c:1937 [inline]
 new_slab+0xa0/0x4d0 mm/slub.c:2000
 ___slab_alloc+0x3ac/0x840 mm/slub.c:3033
 __slab_alloc+0x49/0x90 mm/slub.c:3120
 slab_alloc_node mm/slub.c:3211 [inline]
 slab_alloc mm/slub.c:3255 [inline]
 kmem_cache_alloc+0x138/0x260 mm/slub.c:3260
 alloc_inode fs/inode.c:266 [inline]
 iget_locked+0x1ee/0x850 fs/inode.c:1318
 kernfs_get_inode+0x4b/0x6d0 fs/kernfs/inode.c:254
 kernfs_iop_lookup+0x20f/0x310 fs/kernfs/dir.c:1160
 __lookup_slow+0x2b8/0x410 fs/namei.c:1671
 lookup_slow+0x57/0x70 fs/namei.c:1688
 walk_component+0x326/0x460 fs/namei.c:1984
 lookup_last fs/namei.c:2439 [inline]
 path_lookupat+0x155/0x430 fs/namei.c:2463
 filename_lookup+0x21e/0x550 fs/namei.c:2492
page last free stack trace:
 reset_page_owner include/linux/page_owner.h:26 [inline]
 free_pages_prepare mm/page_alloc.c:1474 [inline]
 free_pcp_prepare mm/page_alloc.c:1546 [inline]
 free_unref_page_prepare+0x5fa/0x600 mm/page_alloc.c:3536
 free_unref_page+0xae/0x540 mm/page_alloc.c:3618
 free_the_page mm/page_alloc.c:805 [inline]
 __free_pages+0x6c/0x100 mm/page_alloc.c:5900
 __free_slab+0xe5/0x1e0 mm/slub.c:2025
 free_slab mm/slub.c:2040 [inline]
 discard_slab mm/slub.c:2046 [inline]
 __unfreeze_partials+0x15a/0x190 mm/slub.c:2532
 put_cpu_partial+0xc6/0x120 mm/slub.c:2612
 __slab_free+0x1d4/0x290 mm/slub.c:3395
 do_slab_free mm/slub.c:3514 [inline]
 ___cache_free+0x104/0x120 mm/slub.c:3535
 qlink_free+0x4d/0x90 mm/kasan/quarantine.c:157
 qlist_free_all+0x5f/0xb0 mm/kasan/quarantine.c:176
 kasan_quarantine_reduce+0x14a/0x170 mm/kasan/quarantine.c:283
 __kasan_slab_alloc+0x2f/0xe0 mm/kasan/common.c:443
 kasan_slab_alloc include/linux/kasan.h:217 [inline]
 slab_post_alloc_hook+0x4f/0x2b0 mm/slab.h:550
 slab_alloc_node mm/slub.c:3245 [inline]
 slab_alloc mm/slub.c:3255 [inline]
 kmem_cache_alloc+0xf7/0x260 mm/slub.c:3260
 kmem_cache_zalloc include/linux/slab.h:740 [inline]
 __alloc_file+0x28/0x2a0 fs/file_table.c:132
 alloc_empty_file+0x97/0x180 fs/file_table.c:181

Memory state around the buggy address:
 ffff888129854880: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
 ffff888129854900: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
>ffff888129854980: fb fb fb fb fb fb fb fb fb fb fc fc fc fc fc fc
                         ^
 ffff888129854a00: fc fc fc fc fc fc fc fc fc fc 00 00 00 00 00 00
 ffff888129854a80: 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/07/20 09:02 android13-5.15-lts 31c263582f4e 72524a66 .config console log report info [disk image] [vmlinux] [kernel image] ci2-android-5-15 KASAN: use-after-free Read in pick_link
* Struck through repros no longer work on HEAD.