[v5.15] KASAN: use-after-free Read in hfsplus_btree_open (3)

0 views
Skip to first unread message

syzbot

unread,
Jul 27, 2026, 9:25:36 PM (12 hours ago) Jul 27
to syzkaller...@googlegroups.com
Hello,

syzbot found the following issue on:

HEAD commit: 674f684f7c61 Linux 5.15.212
git tree: linux-5.15.y
console output: https://syzkaller.appspot.com/x/log.txt?x=112391b9580000
kernel config: https://syzkaller.appspot.com/x/.config?x=f161cbc9aef65db0
dashboard link: https://syzkaller.appspot.com/bug?extid=4b7bdbb7e31de0ef18d1
compiler: Debian clang version 22.1.8 (++20260613092233+e80beda6e255-1~exp1~20260613092250.77), Debian LLD 22.1.8

Unfortunately, I don't have any reproducer for this issue yet.

Downloadable assets:
disk image: https://storage.googleapis.com/syzbot-assets/f55be2937b89/disk-674f684f.raw.xz
vmlinux: https://storage.googleapis.com/syzbot-assets/a19fb0ffc049/vmlinux-674f684f.xz
kernel image: https://storage.googleapis.com/syzbot-assets/365d4529a007/bzImage-674f684f.xz

IMPORTANT: if you fix the issue, please add the following tag to the commit:
Reported-by: syzbot+4b7bdb...@syzkaller.appspotmail.com

loop1: detected capacity change from 0 to 1024
==================================================================
BUG: KASAN: use-after-free in hfsplus_btree_open+0xae6/0x1170 fs/hfsplus/btree.c:155
Read of size 4 at addr ffff88807479d3d4 by task syz.1.25748/2855

CPU: 1 PID: 2855 Comm: syz.1.25748 Not tainted syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 07/16/2026
Call Trace:
<TASK>
dump_stack_lvl+0x188/0x250 lib/dump_stack.c:106
print_address_description+0x60/0x2d0 mm/kasan/report.c:248
__kasan_report mm/kasan/report.c:434 [inline]
kasan_report+0xdf/0x130 mm/kasan/report.c:451
hfsplus_btree_open+0xae6/0x1170 fs/hfsplus/btree.c:155
hfsplus_fill_super+0xa5d/0x1e20 fs/hfsplus/super.c:492
mount_bdev+0x28a/0x3c0 fs/super.c:1400
legacy_get_tree+0xe6/0x180 fs/fs_context.c:611
vfs_get_tree+0x88/0x270 fs/super.c:1530
do_new_mount+0x247/0xa40 fs/namespace.c:3034
do_mount fs/namespace.c:3377 [inline]
__do_sys_mount fs/namespace.c:3585 [inline]
__se_sys_mount+0x2e3/0x3d0 fs/namespace.c:3562
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:0x7f4fbbeb610a
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:00007f4fba10ce58 EFLAGS: 00000246 ORIG_RAX: 00000000000000a5
RAX: ffffffffffffffda RBX: 00007f4fba10cee0 RCX: 00007f4fbbeb610a
RDX: 00002000000000c0 RSI: 0000200000000080 RDI: 00007f4fba10cea0
RBP: 00002000000000c0 R08: 00007f4fba10cee0 R09: 0000000000004800
R10: 0000000000004800 R11: 0000000000000246 R12: 0000200000000080
R13: 00007f4fba10cea0 R14: 00000000000006bb R15: 0000200000000340
</TASK>

Allocated by task 24883:
kasan_save_stack mm/kasan/common.c:38 [inline]
kasan_set_track mm/kasan/common.c:46 [inline]
set_alloc_info mm/kasan/common.c:434 [inline]
__kasan_slab_alloc+0x92/0xc0 mm/kasan/common.c:467
kasan_slab_alloc include/linux/kasan.h:254 [inline]
slab_post_alloc_hook+0x4c/0x380 mm/slab.h:519
slab_alloc_node mm/slub.c:3225 [inline]
slab_alloc mm/slub.c:3233 [inline]
kmem_cache_alloc+0x15d/0x280 mm/slub.c:3238
f2fs_kmem_cache_alloc fs/f2fs/f2fs.h:2648 [inline]
f2fs_alloc_inode+0x149/0x5b0 fs/f2fs/super.c:1396
alloc_inode fs/inode.c:261 [inline]
iget_locked+0x18c/0x820 fs/inode.c:1308
f2fs_iget+0x52/0x4bb0 fs/f2fs/inode.c:517
f2fs_fill_super+0x4c33/0x7050 fs/f2fs/super.c:4309
mount_bdev+0x28a/0x3c0 fs/super.c:1400
legacy_get_tree+0xe6/0x180 fs/fs_context.c:611
vfs_get_tree+0x88/0x270 fs/super.c:1530
do_new_mount+0x247/0xa40 fs/namespace.c:3034
do_mount fs/namespace.c:3377 [inline]
__do_sys_mount fs/namespace.c:3585 [inline]
__se_sys_mount+0x2e3/0x3d0 fs/namespace.c:3562
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+0x35/0x60 mm/kasan/common.c:38
kasan_record_aux_stack+0xb8/0x100 mm/kasan/generic.c:348
__call_rcu kernel/rcu/tree.c:3011 [inline]
call_rcu+0x189/0x900 kernel/rcu/tree.c:3091
destroy_inode fs/inode.c:316 [inline]
evict+0x810/0x8b0 fs/inode.c:662
dispose_list fs/inode.c:680 [inline]
evict_inodes+0x650/0x6e0 fs/inode.c:734
generic_shutdown_super+0x93/0x300 fs/super.c:454
kill_block_super+0x7c/0xe0 fs/super.c:1427
kill_f2fs_super+0x310/0x3d0 fs/f2fs/super.c:4584
deactivate_locked_super+0x93/0xf0 fs/super.c:335
cleanup_mnt+0x426/0x4d0 fs/namespace.c:1148
task_work_run+0x125/0x1a0 kernel/task_work.c:188
tracehook_notify_resume include/linux/tracehook.h:189 [inline]
exit_to_user_mode_loop+0x10f/0x130 kernel/entry/common.c:181
exit_to_user_mode_prepare+0xee/0x180 kernel/entry/common.c:214
__syscall_exit_to_user_mode_work kernel/entry/common.c:296 [inline]
syscall_exit_to_user_mode+0x16/0x40 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+0x35/0x60 mm/kasan/common.c:38
kasan_record_aux_stack+0xb8/0x100 mm/kasan/generic.c:348
__call_rcu kernel/rcu/tree.c:3011 [inline]
call_rcu+0x189/0x900 kernel/rcu/tree.c:3091
destroy_inode fs/inode.c:316 [inline]
evict+0x810/0x8b0 fs/inode.c:662
f2fs_fill_super+0x59b1/0x7050 fs/f2fs/super.c:4505
mount_bdev+0x28a/0x3c0 fs/super.c:1400
legacy_get_tree+0xe6/0x180 fs/fs_context.c:611
vfs_get_tree+0x88/0x270 fs/super.c:1530
do_new_mount+0x247/0xa40 fs/namespace.c:3034
do_mount fs/namespace.c:3377 [inline]
__do_sys_mount fs/namespace.c:3585 [inline]
__se_sys_mount+0x2e3/0x3d0 fs/namespace.c:3562
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 ffff88807479cc00
which belongs to the cache f2fs_inode_cache of size 2304
The buggy address is located 2004 bytes inside of
2304-byte region [ffff88807479cc00, ffff88807479d500)
The buggy address belongs to the page:
page:ffffea0001d1e600 refcount:1 mapcount:0 mapping:0000000000000000 index:0xffff888074798000 pfn:0x74798
head:ffffea0001d1e600 order:3 compound_mapcount:0 compound_pincount:0
memcg:ffff88802868b701
flags: 0xfff00000010200(slab|head|node=0|zone=1|lastcpupid=0x7ff)
raw: 00fff00000010200 0000000000000000 dead000000000122 ffff88801e2af500
raw: ffff888074798000 00000000800d0009 00000001ffffffff ffff88802868b701
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 5432, ts 121789671301, free_ts 120533783836
prep_new_page mm/page_alloc.c:2426 [inline]
get_page_from_freelist+0x24f6/0x2670 mm/page_alloc.c:4192
__alloc_pages+0x1ee/0x480 mm/page_alloc.c:5501
alloc_slab_page mm/slub.c:1780 [inline]
allocate_slab mm/slub.c:1917 [inline]
new_slab+0xc0/0x4b0 mm/slub.c:1980
___slab_alloc+0x807/0xdd0 mm/slub.c:3013
__slab_alloc mm/slub.c:3100 [inline]
slab_alloc_node mm/slub.c:3191 [inline]
slab_alloc mm/slub.c:3233 [inline]
kmem_cache_alloc+0xf0/0x280 mm/slub.c:3238
f2fs_kmem_cache_alloc fs/f2fs/f2fs.h:2648 [inline]
f2fs_alloc_inode+0x149/0x5b0 fs/f2fs/super.c:1396
alloc_inode fs/inode.c:261 [inline]
iget_locked+0x18c/0x820 fs/inode.c:1308
f2fs_iget+0x52/0x4bb0 fs/f2fs/inode.c:517
f2fs_fill_super+0x4063/0x7050 fs/f2fs/super.c:4193
mount_bdev+0x28a/0x3c0 fs/super.c:1400
legacy_get_tree+0xe6/0x180 fs/fs_context.c:611
vfs_get_tree+0x88/0x270 fs/super.c:1530
do_new_mount+0x247/0xa40 fs/namespace.c:3034
do_mount fs/namespace.c:3377 [inline]
__do_sys_mount fs/namespace.c:3585 [inline]
__se_sys_mount+0x2e3/0x3d0 fs/namespace.c:3562
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
page last free stack trace:
reset_page_owner include/linux/page_owner.h:24 [inline]
free_pages_prepare mm/page_alloc.c:1340 [inline]
free_pcp_prepare mm/page_alloc.c:1391 [inline]
free_unref_page_prepare+0x637/0x6c0 mm/page_alloc.c:3317
free_unref_page+0x8f/0x2a0 mm/page_alloc.c:3396
qlist_free_all+0x35/0x90 mm/kasan/quarantine.c:176
kasan_quarantine_reduce+0x150/0x160 mm/kasan/quarantine.c:283
__kasan_slab_alloc+0x2f/0xc0 mm/kasan/common.c:444
kasan_slab_alloc include/linux/kasan.h:254 [inline]
slab_post_alloc_hook+0x4c/0x380 mm/slab.h:519
slab_alloc_node mm/slub.c:3225 [inline]
slab_alloc mm/slub.c:3233 [inline]
__kmalloc+0x189/0x340 mm/slub.c:4408
kmalloc include/linux/slab.h:612 [inline]
tomoyo_realpath_from_path+0xed/0x5e0 security/tomoyo/realpath.c:254
tomoyo_get_realpath security/tomoyo/file.c:151 [inline]
tomoyo_path_perm+0x23f/0x5d0 security/tomoyo/file.c:822
security_inode_getattr+0xcf/0x120 security/security.c:1349
vfs_getattr+0x26/0x3a0 fs/stat.c:157
vfs_fstat fs/stat.c:182 [inline]
__do_sys_newfstat fs/stat.c:421 [inline]
__se_sys_newfstat fs/stat.c:418 [inline]
__x64_sys_newfstat+0x137/0x210 fs/stat.c:418
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

Memory state around the buggy address:
ffff88807479d280: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
ffff88807479d300: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
>ffff88807479d380: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
^
ffff88807479d400: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
ffff88807479d480: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
==================================================================


---
This report is generated by a bot. It may contain errors.
See https://goo.gl/tpsmEJ for more information about syzbot.
syzbot engineers can be reached at syzk...@googlegroups.com.

syzbot will keep track of this issue. See:
https://goo.gl/tpsmEJ#status for how to communicate with syzbot.

If the report is already addressed, let syzbot know by replying with:
#syz fix: exact-commit-title

If you want to overwrite report's subsystems, reply with:
#syz set subsystems: new-subsystem
(See the list of subsystem names on the web dashboard)

If the report is a duplicate of another one, reply with:
#syz dup: exact-subject-of-another-report

If you want to undo deduplication, reply with:
#syz undup
Reply all
Reply to author
Forward
0 new messages