syzbot


KASAN: use-after-free Read in hpfs_get_ea

Status: upstream: reported C repro on 2025/07/27 17:28
Bug presence: origin:upstream
[Documentation on labels]
Reported-by: syzbot+98d90f982e59bdb12f21@syzkaller.appspotmail.com
First crash: 23d, last: 3d04h
Bug presence (1)
Date Name Commit Repro Result
2025/07/28 upstream (ToT) 038d61fd6422 C [report] KASAN: use-after-free Read in hpfs_get_ea
Similar bugs (3)
Kernel Title Rank 🛈 Repro Cause bisect Fix bisect Count Last Reported Patched Status
linux-5.15 KASAN: use-after-free Read in hpfs_get_ea origin:upstream 19 C 8 8d08h 24d 0/3 upstream: reported C repro on 2025/07/26 19:47
upstream KASAN: use-after-free Read in hpfs_get_ea fs 19 C error 31 1d15h 33d 0/29 upstream: reported C repro on 2025/07/17 19:14
linux-6.6 KASAN: use-after-free Read in hpfs_get_ea origin:upstream 19 C 3 23d 23d 0/2 upstream: reported C repro on 2025/07/27 17:30

Sample crash report:
hpfs: You really don't want any checks? You are crazy...
hpfs: hpfs_map_sector(): read error
hpfs: code page support is disabled
==================================================================
BUG: KASAN: use-after-free in strcmp+0xc0/0xf4 lib/string.c:361
Read of size 1 at addr ffff0000ecf0c8a6 by task syz.0.16/4452

CPU: 0 PID: 4452 Comm: syz.0.16 Not tainted 6.1.147-syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 05/07/2025
Call trace:
 dump_backtrace+0x1c8/0x1f4 arch/arm64/kernel/stacktrace.c:158
 show_stack+0x2c/0x3c arch/arm64/kernel/stacktrace.c:165
 __dump_stack+0x30/0x40 lib/dump_stack.c:88
 dump_stack_lvl+0xf8/0x160 lib/dump_stack.c:106
 print_address_description+0x88/0x200 mm/kasan/report.c:316
 print_report+0x50/0x68 mm/kasan/report.c:418
 kasan_report+0xa8/0x100 mm/kasan/report.c:522
 __asan_report_load1_noabort+0x2c/0x38 mm/kasan/report_generic.c:348
 strcmp+0xc0/0xf4 lib/string.c:361
 hpfs_get_ea+0xfc/0x968 fs/hpfs/ea.c:139
 hpfs_read_inode+0x15c/0xcac fs/hpfs/inode.c:63
 hpfs_fill_super+0xe64/0x1800 fs/hpfs/super.c:712
 mount_bdev+0x264/0x358 fs/super.c:1443
 hpfs_mount+0x44/0x58 fs/hpfs/super.c:758
 legacy_get_tree+0xd4/0x16c fs/fs_context.c:632
 vfs_get_tree+0x90/0x274 fs/super.c:1573
 do_new_mount+0x228/0x810 fs/namespace.c:3063
 path_mount+0x5b4/0xe78 fs/namespace.c:3393
 do_mount fs/namespace.c:3406 [inline]
 __do_sys_mount fs/namespace.c:3614 [inline]
 __se_sys_mount fs/namespace.c:3591 [inline]
 __arm64_sys_mount+0x49c/0x584 fs/namespace.c:3591
 __invoke_syscall arch/arm64/kernel/syscall.c:38 [inline]
 invoke_syscall+0x98/0x2bc arch/arm64/kernel/syscall.c:52
 el0_svc_common+0x138/0x258 arch/arm64/kernel/syscall.c:140
 do_el0_svc+0x58/0x13c arch/arm64/kernel/syscall.c:204
 el0_svc+0x58/0x138 arch/arm64/kernel/entry-common.c:637
 el0t_64_sync_handler+0x84/0xf0 arch/arm64/kernel/entry-common.c:655
 el0t_64_sync+0x18c/0x190 arch/arm64/kernel/entry.S:585

The buggy address belongs to the physical page:
page:0000000034adf97a refcount:0 mapcount:0 mapping:0000000000000000 index:0x1 pfn:0x12cf0c
flags: 0x5ffc00000000000(node=0|zone=2|lastcpupid=0x7ff)
raw: 05ffc00000000000 dead000000000100 dead000000000122 0000000000000000
raw: 0000000000000001 0000000000000000 00000000ffffffff 0000000000000000
page dumped because: kasan: bad access detected

Memory state around the buggy address:
 ffff0000ecf0c780: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
 ffff0000ecf0c800: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
>ffff0000ecf0c880: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
                               ^
 ffff0000ecf0c900: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
 ffff0000ecf0c980: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
==================================================================
hpfs: hpfs_map_sector(): read error
hpfs: hpfs_map_sector(): read error
hpfs: hpfs_map_sector(): read error
hpfs: hpfs_map_sector(): read error
hpfs: hpfs_map_4sectors(): unaligned read
hpfs: hpfs_map_4sectors(): unaligned read
hpfs: filesystem error: unable to find root dir

Crashes (7):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2025/07/27 18:15 linux-6.1.y 3594f306da12 fb8f743d .config console log report syz / log C [disk image] [vmlinux] [kernel image] [mounted in repro] ci2-linux-6-1-kasan-arm64 KASAN: use-after-free Read in hpfs_get_ea
2025/07/27 17:46 linux-6.1.y 3594f306da12 fb8f743d .config console log report syz / log C [disk image] [vmlinux] [kernel image] [mounted in repro] ci2-linux-6-1-kasan-arm64 KASAN: use-after-free Read in hpfs_get_ea
2025/07/27 18:05 linux-6.1.y 3594f306da12 fb8f743d .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan KASAN: use-after-free Read in hpfs_get_ea
2025/07/27 18:05 linux-6.1.y 3594f306da12 fb8f743d .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan KASAN: use-after-free Read in hpfs_get_ea
2025/08/17 05:16 linux-6.1.y 0bc96de781b4 1804e95e .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan-arm64 KASAN: use-after-free Read in hpfs_get_ea
2025/07/27 17:29 linux-6.1.y 3594f306da12 fb8f743d .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan-arm64 KASAN: use-after-free Read in hpfs_get_ea
2025/07/27 17:27 linux-6.1.y 3594f306da12 fb8f743d .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan-arm64 KASAN: use-after-free Read in hpfs_get_ea
* Struck through repros no longer work on HEAD.