Hello,
syzbot found the following issue on:
HEAD commit: 4791134e4aeb Linux 6.6.118
git tree: linux-6.6.y
console output:
https://syzkaller.appspot.com/x/log.txt?x=16d9bcc2580000
kernel config:
https://syzkaller.appspot.com/x/.config?x=12606d4b8832c7e4
dashboard link:
https://syzkaller.appspot.com/bug?extid=e87c4983f6a921e84439
compiler: Debian clang version 20.1.8 (++20250708063551+0c9f909b7976-1~exp1~20250708183702.136), Debian LLD 20.1.8
Unfortunately, I don't have any reproducer for this issue yet.
Downloadable assets:
disk image:
https://storage.googleapis.com/syzbot-assets/ca168ecfe887/disk-4791134e.raw.xz
vmlinux:
https://storage.googleapis.com/syzbot-assets/adda86b1a76b/vmlinux-4791134e.xz
kernel image:
https://storage.googleapis.com/syzbot-assets/cc2019969cb7/bzImage-4791134e.xz
IMPORTANT: if you fix the issue, please add the following tag to the commit:
Reported-by:
syzbot+e87c49...@syzkaller.appspotmail.com
==================================================================
BUG: KASAN: slab-use-after-free in jfs_readdir+0x1173/0x3a90 fs/jfs/jfs_dtree.c:2870
Read of size 8 at addr ffff88802cfe27f0 by task syz.3.160/6716
CPU: 1 PID: 6716 Comm: syz.3.160 Not tainted syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 10/25/2025
Call Trace:
<TASK>
dump_stack_lvl+0x16c/0x230 lib/dump_stack.c:106
print_address_description mm/kasan/report.c:364 [inline]
print_report+0xac/0x220 mm/kasan/report.c:468
kasan_report+0x117/0x150 mm/kasan/report.c:581
jfs_readdir+0x1173/0x3a90 fs/jfs/jfs_dtree.c:2870
wrap_directory_iterator+0x92/0xd0 fs/readdir.c:67
iterate_dir+0x1c2/0x580 fs/readdir.c:106
__do_sys_getdents64 fs/readdir.c:405 [inline]
__se_sys_getdents64+0xe9/0x260 fs/readdir.c:390
do_syscall_x64 arch/x86/entry/common.c:51 [inline]
do_syscall_64+0x55/0xb0 arch/x86/entry/common.c:81
entry_SYSCALL_64_after_hwframe+0x68/0xd2
RIP: 0033:0x7f294518f749
Code: ff ff c3 66 2e 0f 1f 84 00 00 00 00 00 0f 1f 40 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 a8 ff ff ff f7 d8 64 89 01 48
RSP: 002b:00007f2945f6c038 EFLAGS: 00000246 ORIG_RAX: 00000000000000d9
RAX: ffffffffffffffda RBX: 00007f29453e6090 RCX: 00007f294518f749
RDX: 0000000000000000 RSI: 0000000000000000 RDI: 0000000000000005
RBP: 00007f2945213f91 R08: 0000000000000000 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000
R13: 00007f29453e6128 R14: 00007f29453e6090 R15: 00007ffd58ced438
</TASK>
Allocated by task 6696:
kasan_save_stack mm/kasan/common.c:45 [inline]
kasan_set_track+0x4e/0x70 mm/kasan/common.c:52
__kasan_slab_alloc+0x6c/0x80 mm/kasan/common.c:328
kasan_slab_alloc include/linux/kasan.h:188 [inline]
slab_post_alloc_hook+0x6e/0x4d0 mm/slab.h:767
slab_alloc_node mm/slub.c:3495 [inline]
slab_alloc mm/slub.c:3503 [inline]
__kmem_cache_alloc_lru mm/slub.c:3510 [inline]
kmem_cache_alloc+0x11e/0x2e0 mm/slub.c:3519
mempool_alloc+0x1a1/0x4f0 mm/mempool.c:418
alloc_metapage fs/jfs/jfs_metapage.c:176 [inline]
__get_metapage+0x54c/0xfa0 fs/jfs/jfs_metapage.c:651
dtSplitRoot+0x203/0x16b0 fs/jfs/jfs_dtree.c:1910
dtSplitUp fs/jfs/jfs_dtree.c:993 [inline]
dtInsert+0xeec/0x5f40 fs/jfs/jfs_dtree.c:871
jfs_create+0x6a1/0xa40 fs/jfs/namei.c:137
lookup_open fs/namei.c:3496 [inline]
open_last_lookups fs/namei.c:3564 [inline]
path_openat+0x1277/0x3190 fs/namei.c:3794
do_filp_open+0x1c5/0x3d0 fs/namei.c:3824
do_sys_openat2+0x12c/0x1c0 fs/open.c:1421
do_sys_open fs/open.c:1436 [inline]
__do_sys_openat fs/open.c:1452 [inline]
__se_sys_openat fs/open.c:1447 [inline]
__x64_sys_openat+0x139/0x160 fs/open.c:1447
do_syscall_x64 arch/x86/entry/common.c:51 [inline]
do_syscall_64+0x55/0xb0 arch/x86/entry/common.c:81
entry_SYSCALL_64_after_hwframe+0x68/0xd2
Freed by task 6716:
kasan_save_stack mm/kasan/common.c:45 [inline]
kasan_set_track+0x4e/0x70 mm/kasan/common.c:52
kasan_save_free_info+0x2e/0x50 mm/kasan/generic.c:522
____kasan_slab_free+0x126/0x1e0 mm/kasan/common.c:236
kasan_slab_free include/linux/kasan.h:164 [inline]
slab_free_hook mm/slub.c:1811 [inline]
slab_free_freelist_hook+0x130/0x1b0 mm/slub.c:1837
slab_free mm/slub.c:3830 [inline]
kmem_cache_free+0xf8/0x280 mm/slub.c:3852
free_metapage fs/jfs/jfs_metapage.c:191 [inline]
drop_metapage fs/jfs/jfs_metapage.c:228 [inline]
release_metapage+0x6ed/0x870 fs/jfs/jfs_metapage.c:786
dtReadNext fs/jfs/jfs_dtree.c:3190 [inline]
jfs_readdir+0xeb2/0x3a90 fs/jfs/jfs_dtree.c:2863
wrap_directory_iterator+0x92/0xd0 fs/readdir.c:67
iterate_dir+0x1c2/0x580 fs/readdir.c:106
__do_sys_getdents64 fs/readdir.c:405 [inline]
__se_sys_getdents64+0xe9/0x260 fs/readdir.c:390
do_syscall_x64 arch/x86/entry/common.c:51 [inline]
do_syscall_64+0x55/0xb0 arch/x86/entry/common.c:81
entry_SYSCALL_64_after_hwframe+0x68/0xd2
The buggy address belongs to the object at ffff88802cfe27c0
which belongs to the cache jfs_mp of size 184
The buggy address is located 48 bytes inside of
freed 184-byte region [ffff88802cfe27c0, ffff88802cfe2878)
The buggy address belongs to the physical page:
page:ffffea0000b3f880 refcount:1 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x2cfe2
flags: 0xfff00000000800(slab|node=0|zone=1|lastcpupid=0x7ff)
page_type: 0xffffffff()
raw: 00fff00000000800 ffff888142edbb40 dead000000000122 0000000000000000
raw: 0000000000000000 0000000080100010 00000001ffffffff 0000000000000000
page dumped because: kasan: bad access detected
page_owner tracks the page as allocated
page last allocated via order 0, migratetype Unmovable, gfp_mask 0x192800(GFP_NOWAIT|__GFP_NOWARN|__GFP_NORETRY|__GFP_NOMEMALLOC|__GFP_HARDWALL), pid 6696, tgid 6695 (syz.3.160), ts 156530975012, free_ts 156523788264
set_page_owner include/linux/page_owner.h:31 [inline]
post_alloc_hook+0x1cd/0x210 mm/page_alloc.c:1554
prep_new_page mm/page_alloc.c:1561 [inline]
get_page_from_freelist+0x195c/0x19f0 mm/page_alloc.c:3191
__alloc_pages+0x1e3/0x460 mm/page_alloc.c:4457
alloc_slab_page+0x5d/0x170 mm/slub.c:1881
allocate_slab mm/slub.c:2028 [inline]
new_slab+0x87/0x2e0 mm/slub.c:2081
___slab_alloc+0xc6d/0x1300 mm/slub.c:3253
__slab_alloc mm/slub.c:3339 [inline]
__slab_alloc_node mm/slub.c:3392 [inline]
slab_alloc_node mm/slub.c:3485 [inline]
slab_alloc mm/slub.c:3503 [inline]
__kmem_cache_alloc_lru mm/slub.c:3510 [inline]
kmem_cache_alloc+0x1b7/0x2e0 mm/slub.c:3519
mempool_alloc+0x1a1/0x4f0 mm/mempool.c:418
alloc_metapage fs/jfs/jfs_metapage.c:176 [inline]
__get_metapage+0x54c/0xfa0 fs/jfs/jfs_metapage.c:651
diReadSpecial+0x25b/0x710 fs/jfs/jfs_imap.c:447
jfs_mount+0x2a2/0x860 fs/jfs/jfs_mount.c:138
jfs_fill_super+0x4e2/0xac0 fs/jfs/super.c:556
mount_bdev+0x22b/0x2d0 fs/super.c:1643
legacy_get_tree+0xea/0x180 fs/fs_context.c:662
vfs_get_tree+0x8c/0x280 fs/super.c:1764
do_new_mount+0x24b/0xa40 fs/namespace.c:3386
page last free stack trace:
reset_page_owner include/linux/page_owner.h:24 [inline]
free_pages_prepare mm/page_alloc.c:1154 [inline]
free_unref_page_prepare+0x7ce/0x8e0 mm/page_alloc.c:2336
free_unref_page+0x32/0x2e0 mm/page_alloc.c:2429
__slab_free+0x35e/0x410 mm/slub.c:3736
qlink_free mm/kasan/quarantine.c:166 [inline]
qlist_free_all+0x75/0xe0 mm/kasan/quarantine.c:185
kasan_quarantine_reduce+0x143/0x160 mm/kasan/quarantine.c:292
__kasan_slab_alloc+0x22/0x80 mm/kasan/common.c:305
kasan_slab_alloc include/linux/kasan.h:188 [inline]
slab_post_alloc_hook+0x6e/0x4d0 mm/slab.h:767
slab_alloc_node mm/slub.c:3495 [inline]
__kmem_cache_alloc_node+0x13e/0x260 mm/slub.c:3534
__do_kmalloc_node mm/slab_common.c:1006 [inline]
__kmalloc+0xa4/0x240 mm/slab_common.c:1020
kmalloc include/linux/slab.h:604 [inline]
tomoyo_realpath_from_path+0xe3/0x5d0 security/tomoyo/realpath.c:251
tomoyo_get_realpath security/tomoyo/file.c:151 [inline]
tomoyo_path_perm+0x20f/0x4b0 security/tomoyo/file.c:822
security_inode_getattr+0xd3/0x120 security/security.c:2153
vfs_getattr fs/stat.c:173 [inline]
vfs_fstat fs/stat.c:198 [inline]
__do_sys_newfstat fs/stat.c:473 [inline]
__se_sys_newfstat fs/stat.c:470 [inline]
__x64_sys_newfstat+0x101/0x1f0 fs/stat.c:470
do_syscall_x64 arch/x86/entry/common.c:51 [inline]
do_syscall_64+0x55/0xb0 arch/x86/entry/common.c:81
entry_SYSCALL_64_after_hwframe+0x68/0xd2
Memory state around the buggy address:
ffff88802cfe2680: 00 fc fc fc fc fc fc fc fc 00 00 00 00 00 00 00
ffff88802cfe2700: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
>ffff88802cfe2780: fc fc fc fc fc fc fc fc fa fb fb fb fb fb fb fb
^
ffff88802cfe2800: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fc
ffff88802cfe2880: fc fc fc fc fc fc fc 00 00 00 00 00 00 00 00 00
==================================================================
---
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