KASAN: use-after-free Read in hfsplus_btree_open (6)

Status: upstream: reported on 2026/09/11 19:38
Reported-by: syzbot+a297ae080caacdbef658@syzkaller.appspotmail.com
First crash: 10h39m, last: 10h39m
Similar bugs (9)
Kernel Title Rank 🛈 Repro Cause bisect Fix bisect Count Last Reported Patched Status
linux-6.1 KASAN: use-after-free Read in hfsplus_btree_open 19 2 1068d 1140d 0/3 auto-obsoleted due to no activity on 2024/01/17 21:37
linux-5.15 KASAN: use-after-free Read in hfsplus_btree_open 19 5 1022d 1263d 0/3 auto-obsoleted due to no activity on 2024/03/04 05:58
linux-5.15 KASAN: use-after-free Read in hfsplus_btree_open (3) 19 1 46d 46d 0/3 upstream: reported on 2026/07/28 01:25
linux-6.1 KASAN: use-after-free Read in hfsplus_btree_open (5) 19 1 108d 108d 0/3 auto-obsoleted due to no activity on 2026/09/03 09:45
linux-6.1 KASAN: use-after-free Read in hfsplus_btree_open (4) 19 1 225d 225d 0/3 auto-obsoleted due to no activity on 2026/05/09 12:26
linux-6.1 KASAN: use-after-free Read in hfsplus_btree_open (2) 19 2 952d 962d 0/3 auto-obsoleted due to no activity on 2024/05/12 07:07
linux-6.1 KASAN: use-after-free Read in hfsplus_btree_open (3) 19 1 750d 750d 0/3 auto-obsoleted due to no activity on 2024/11/30 09:06
upstream KASAN: use-after-free Read in hfsplus_btree_open hfs 19 8 1235d 1376d 0/29 auto-obsoleted due to no activity on 2023/08/23 09:08
linux-5.15 KASAN: use-after-free Read in hfsplus_btree_open (2) 19 2 483d 553d 0/3 auto-obsoleted due to no activity on 2025/08/24 11:57

Sample crash report:
loop2: detected capacity change from 0 to 1024
==================================================================
BUG: KASAN: use-after-free in hfsplus_btree_open+0x912/0xd00 fs/hfsplus/btree.c:155
Read of size 4 at addr ffff8880713d9064 by task syz.2.2982/17939

CPU: 0 PID: 17939 Comm: syz.2.2982 Not tainted syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 07/24/2026
Call Trace:
 <TASK>
 dump_stack_lvl+0x188/0x24e lib/dump_stack.c:106
 print_address_description mm/kasan/report.c:316 [inline]
 print_report+0xa8/0x210 mm/kasan/report.c:420
 kasan_report+0x10b/0x140 mm/kasan/report.c:524
 hfsplus_btree_open+0x912/0xd00 fs/hfsplus/btree.c:155
 hfsplus_fill_super+0xa5d/0x1e20 fs/hfsplus/super.c:492
 mount_bdev+0x28a/0x3c0 fs/super.c:1454
 legacy_get_tree+0xe6/0x180 fs/fs_context.c:632
 vfs_get_tree+0x88/0x270 fs/super.c:1584
 do_new_mount+0x247/0xa40 fs/namespace.c:3078
 do_mount fs/namespace.c:3421 [inline]
 __do_sys_mount fs/namespace.c:3629 [inline]
 __se_sys_mount+0x2e3/0x3d0 fs/namespace.c:3606
 do_syscall_x64 arch/x86/entry/common.c:46 [inline]
 do_syscall_64+0x4c/0xa0 arch/x86/entry/common.c:76
 entry_SYSCALL_64_after_hwframe+0x68/0xd2
RIP: 0033:0x7f733eb9f3ca
Code: 48 c7 c2 e8 ff ff ff f7 d8 64 89 02 b8 ff ff ff ff c3 66 2e 0f 1f 84 00 00 00 00 00 0f 1f 40 00 49 89 ca b8 a5 00 00 00 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:00007f733f9b3e58 EFLAGS: 00000246 ORIG_RAX: 00000000000000a5
RAX: ffffffffffffffda RBX: 00007f733f9b3ee0 RCX: 00007f733eb9f3ca
RDX: 0000200000000600 RSI: 0000200000000080 RDI: 00007f733f9b3ea0
RBP: 0000200000000600 R08: 00007f733f9b3ee0 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000246 R12: 0000200000000080
R13: 00007f733f9b3ea0 R14: 00000000000005f0 R15: 00002000000000c0
 </TASK>

Allocated by task 14370:
 kasan_save_stack mm/kasan/common.c:46 [inline]
 kasan_set_track+0x4b/0x70 mm/kasan/common.c:53
 __kasan_slab_alloc+0x6b/0x80 mm/kasan/common.c:329
 kasan_slab_alloc include/linux/kasan.h:201 [inline]
 slab_post_alloc_hook+0x4b/0x490 mm/slab.h:737
 slab_alloc_node mm/slub.c:3359 [inline]
 slab_alloc mm/slub.c:3367 [inline]
 __kmem_cache_alloc_lru mm/slub.c:3374 [inline]
 kmem_cache_alloc_lru+0x182/0x2e0 mm/slub.c:3390
 alloc_inode_sb include/linux/fs.h:3278 [inline]
 f2fs_alloc_inode+0x154/0x610 fs/f2fs/super.c:1419
 alloc_inode fs/inode.c:261 [inline]
 iget_locked+0x1a7/0x8c0 fs/inode.c:1373
 f2fs_iget+0x52/0x4b20 fs/f2fs/inode.c:495
 f2fs_fill_super+0x3a63/0x6ba0 fs/f2fs/super.c:4329
 mount_bdev+0x28a/0x3c0 fs/super.c:1454
 legacy_get_tree+0xe6/0x180 fs/fs_context.c:632
 vfs_get_tree+0x88/0x270 fs/super.c:1584
 do_new_mount+0x247/0xa40 fs/namespace.c:3078
 do_mount fs/namespace.c:3421 [inline]
 __do_sys_mount fs/namespace.c:3629 [inline]
 __se_sys_mount+0x2e3/0x3d0 fs/namespace.c:3606
 do_syscall_x64 arch/x86/entry/common.c:46 [inline]
 do_syscall_64+0x4c/0xa0 arch/x86/entry/common.c:76
 entry_SYSCALL_64_after_hwframe+0x68/0xd2

Last potentially related work creation:
 kasan_save_stack+0x3a/0x60 mm/kasan/common.c:46
 __kasan_record_aux_stack+0xb2/0xc0 mm/kasan/generic.c:486
 call_rcu+0x14f/0x950 kernel/rcu/tree.c:2849
 destroy_inode fs/inode.c:316 [inline]
 evict+0x810/0x8b0 fs/inode.c:720
 f2fs_put_super+0x674/0xbf0 fs/f2fs/super.c:1653
 generic_shutdown_super+0x130/0x340 fs/super.c:501
 kill_block_super+0x7c/0xe0 fs/super.c:1481
 kill_f2fs_super+0x310/0x3d0 fs/f2fs/super.c:4714
 deactivate_locked_super+0x93/0xf0 fs/super.c:332
 cleanup_mnt+0x471/0x4f0 fs/namespace.c:1191
 task_work_run+0x1d0/0x260 kernel/task_work.c:203
 resume_user_mode_work include/linux/resume_user_mode.h:49 [inline]
 exit_to_user_mode_loop+0xe6/0x110 kernel/entry/common.c:177
 exit_to_user_mode_prepare+0xee/0x180 kernel/entry/common.c:210
 __syscall_exit_to_user_mode_work kernel/entry/common.c:292 [inline]
 syscall_exit_to_user_mode+0x16/0x40 kernel/entry/common.c:303
 do_syscall_64+0x58/0xa0 arch/x86/entry/common.c:82
 entry_SYSCALL_64_after_hwframe+0x68/0xd2

Second to last potentially related work creation:
 kasan_save_stack+0x3a/0x60 mm/kasan/common.c:46
 __kasan_record_aux_stack+0xb2/0xc0 mm/kasan/generic.c:486
 call_rcu+0x14f/0x950 kernel/rcu/tree.c:2849
 destroy_inode fs/inode.c:316 [inline]
 evict+0x810/0x8b0 fs/inode.c:720
 f2fs_put_super+0x674/0xbf0 fs/f2fs/super.c:1653
 generic_shutdown_super+0x130/0x340 fs/super.c:501
 kill_block_super+0x7c/0xe0 fs/super.c:1481
 kill_f2fs_super+0x310/0x3d0 fs/f2fs/super.c:4714
 deactivate_locked_super+0x93/0xf0 fs/super.c:332
 cleanup_mnt+0x471/0x4f0 fs/namespace.c:1191
 task_work_run+0x1d0/0x260 kernel/task_work.c:203
 resume_user_mode_work include/linux/resume_user_mode.h:49 [inline]
 exit_to_user_mode_loop+0xe6/0x110 kernel/entry/common.c:177
 exit_to_user_mode_prepare+0xee/0x180 kernel/entry/common.c:210
 __syscall_exit_to_user_mode_work kernel/entry/common.c:292 [inline]
 syscall_exit_to_user_mode+0x16/0x40 kernel/entry/common.c:303
 do_syscall_64+0x58/0xa0 arch/x86/entry/common.c:82
 entry_SYSCALL_64_after_hwframe+0x68/0xd2

The buggy address belongs to the object at ffff8880713d8908
 which belongs to the cache f2fs_inode_cache of size 2184
The buggy address is located 1884 bytes inside of
 2184-byte region [ffff8880713d8908, ffff8880713d9190)

The buggy address belongs to the physical page:
page:ffffea0001c4f600 refcount:1 mapcount:0 mapping:0000000000000000 index:0xffff8880713d9b18 pfn:0x713d8
head:ffffea0001c4f600 order:3 compound_mapcount:0 compound_pincount:0
memcg:ffff88802254f401
flags: 0xfff00000010200(slab|head|node=0|zone=1|lastcpupid=0x7ff)
raw: 00fff00000010200 0000000000000000 dead000000000122 ffff88801b38e500
raw: ffff8880713d9b18 00000000800e000d 00000001ffffffff ffff88802254f401
page dumped because: kasan: bad access detected
page_owner tracks the page as allocated
page last allocated via order 3, migratetype Reclaimable, gfp_mask 0x1d2050(__GFP_IO|__GFP_NOWARN|__GFP_NORETRY|__GFP_COMP|__GFP_NOMEMALLOC|__GFP_HARDWALL|__GFP_RECLAIMABLE), pid 4593, tgid 4592 (syz.2.69), ts 93967025120, free_ts 84367081102
 set_page_owner include/linux/page_owner.h:31 [inline]
 post_alloc_hook+0x173/0x1a0 mm/page_alloc.c:2560
 prep_new_page mm/page_alloc.c:2567 [inline]
 get_page_from_freelist+0x206b/0x2180 mm/page_alloc.c:4358
 __alloc_pages+0x1ec/0x4f0 mm/page_alloc.c:5658
 alloc_slab_page+0x5d/0x180 mm/slub.c:1799
 allocate_slab mm/slub.c:1944 [inline]
 new_slab+0x87/0x2d0 mm/slub.c:1997
 ___slab_alloc+0xbc5/0x1240 mm/slub.c:3154
 __slab_alloc mm/slub.c:3240 [inline]
 slab_alloc_node mm/slub.c:3325 [inline]
 slab_alloc mm/slub.c:3367 [inline]
 __kmem_cache_alloc_lru mm/slub.c:3374 [inline]
 kmem_cache_alloc_lru+0x104/0x2e0 mm/slub.c:3390
 alloc_inode_sb include/linux/fs.h:3278 [inline]
 f2fs_alloc_inode+0x154/0x610 fs/f2fs/super.c:1419
 alloc_inode fs/inode.c:261 [inline]
 iget_locked+0x1a7/0x8c0 fs/inode.c:1373
 f2fs_iget+0x52/0x4b20 fs/f2fs/inode.c:495
 f2fs_fill_super+0x3a63/0x6ba0 fs/f2fs/super.c:4329
 mount_bdev+0x28a/0x3c0 fs/super.c:1454
 legacy_get_tree+0xe6/0x180 fs/fs_context.c:632
 vfs_get_tree+0x88/0x270 fs/super.c:1584
 do_new_mount+0x247/0xa40 fs/namespace.c:3078
 do_mount fs/namespace.c:3421 [inline]
 __do_sys_mount fs/namespace.c:3629 [inline]
 __se_sys_mount+0x2e3/0x3d0 fs/namespace.c:3606
page last free stack trace:
 reset_page_owner include/linux/page_owner.h:24 [inline]
 free_pages_prepare mm/page_alloc.c:1487 [inline]
 free_pcp_prepare mm/page_alloc.c:1537 [inline]
 free_unref_page_prepare+0x8e5/0x9e0 mm/page_alloc.c:3414
 free_unref_page+0x2e/0x3f0 mm/page_alloc.c:3509
 free_slab mm/slub.c:2036 [inline]
 discard_slab mm/slub.c:2042 [inline]
 __unfreeze_partials+0x188/0x1e0 mm/slub.c:2591
 put_cpu_partial+0x17c/0x250 mm/slub.c:2667
 qlink_free mm/kasan/quarantine.c:168 [inline]
 qlist_free_all+0x76/0xe0 mm/kasan/quarantine.c:187
 kasan_quarantine_reduce+0x144/0x160 mm/kasan/quarantine.c:294
 __kasan_slab_alloc+0x1e/0x80 mm/kasan/common.c:306
 kasan_slab_alloc include/linux/kasan.h:201 [inline]
 slab_post_alloc_hook+0x4b/0x490 mm/slab.h:737
 slab_alloc_node mm/slub.c:3359 [inline]
 __kmem_cache_alloc_node+0x19d/0x270 mm/slub.c:3398
 kmalloc_node_trace+0x22/0xe0 mm/slab_common.c:1039
 kmalloc_node include/linux/slab.h:585 [inline]
 kzalloc_node include/linux/slab.h:710 [inline]
 __get_vm_area_node+0x122/0x330 mm/vmalloc.c:2563
 __vmalloc_node_range+0x357/0x1380 mm/vmalloc.c:3260
 __vmalloc_node mm/vmalloc.c:3365 [inline]
 vzalloc+0x75/0x80 mm/vmalloc.c:3438
 alloc_counters+0xc8/0x720 net/ipv4/netfilter/ip_tables.c:801
 copy_entries_to_user net/ipv4/netfilter/ip_tables.c:823 [inline]
 get_entries net/ipv4/netfilter/ip_tables.c:1022 [inline]
 do_ipt_get_ctl+0xa8e/0x11a0 net/ipv4/netfilter/ip_tables.c:1667
 nf_getsockopt+0x25e/0x280 net/netfilter/nf_sockopt.c:116

Memory state around the buggy address:
 ffff8880713d8f00: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
 ffff8880713d8f80: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
>ffff8880713d9000: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
                                                       ^
 ffff8880713d9080: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
 ffff8880713d9100: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
==================================================================

Crashes (1):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2026/09/11 19:38 linux-6.1.y cf82dcca9634 b6a5eeb7 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan KASAN: use-after-free Read in hfsplus_btree_open
* Struck through repros no longer work on HEAD.