[v6.6] KASAN: slab-out-of-bounds Read in dtSearch

0 views
Skip to first unread message

syzbot

unread,
Sep 18, 2025, 5:19:29 PM (9 hours ago) Sep 18
to syzkaller...@googlegroups.com
Hello,

syzbot found the following issue on:

HEAD commit: 60a9e718726f Linux 6.6.106
git tree: linux-6.6.y
console output: https://syzkaller.appspot.com/x/log.txt?x=14891c7c580000
kernel config: https://syzkaller.appspot.com/x/.config?x=12606d4b8832c7e4
dashboard link: https://syzkaller.appspot.com/bug?extid=082a2bbdc6023d25075f
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/eca27e056a5a/disk-60a9e718.raw.xz
vmlinux: https://storage.googleapis.com/syzbot-assets/bc64d4eeb7f6/vmlinux-60a9e718.xz
kernel image: https://storage.googleapis.com/syzbot-assets/a345041561ac/bzImage-60a9e718.xz

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

==================================================================
BUG: KASAN: slab-out-of-bounds in dtCompare fs/jfs/jfs_dtree.c:3333 [inline]
BUG: KASAN: slab-out-of-bounds in dtSearch+0x167a/0x21b0 fs/jfs/jfs_dtree.c:650
Read of size 1 at addr ffff888078394058 by task syz.3.60/6156

CPU: 1 PID: 6156 Comm: syz.3.60 Not tainted syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 08/18/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
dtCompare fs/jfs/jfs_dtree.c:3333 [inline]
dtSearch+0x167a/0x21b0 fs/jfs/jfs_dtree.c:650
jfs_lookup+0x156/0x380 fs/jfs/namei.c:1459
lookup_open fs/namei.c:3466 [inline]
open_last_lookups fs/namei.c:3556 [inline]
path_openat+0x10b8/0x3190 fs/namei.c:3786
do_filp_open+0x1c5/0x3d0 fs/namei.c:3816
do_sys_openat2+0x12c/0x1c0 fs/open.c:1419
do_sys_open fs/open.c:1434 [inline]
__do_sys_creat fs/open.c:1512 [inline]
__se_sys_creat fs/open.c:1506 [inline]
__x64_sys_creat+0x90/0xb0 fs/open.c:1506
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:0x7fd671f8eba9
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:00007fd6701d5038 EFLAGS: 00000246 ORIG_RAX: 0000000000000055
RAX: ffffffffffffffda RBX: 00007fd6721d6090 RCX: 00007fd671f8eba9
RDX: 0000000000000000 RSI: 0000000000000001 RDI: 0000200000000100
RBP: 00007fd672011e19 R08: 0000000000000000 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000
R13: 00007fd6721d6128 R14: 00007fd6721d6090 R15: 00007fff698feff8
</TASK>

Allocated by task 6146:
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_lru+0x115/0x2e0 mm/slub.c:3526
alloc_inode_sb include/linux/fs.h:2946 [inline]
jfs_alloc_inode+0x28/0x60 fs/jfs/super.c:105
alloc_inode fs/inode.c:261 [inline]
new_inode_pseudo+0x63/0x1d0 fs/inode.c:1049
new_inode+0x22/0x1b0 fs/inode.c:1075
ialloc+0x4c/0x950 fs/jfs/jfs_inode.c:48
jfs_create+0x18b/0xa40 fs/jfs/namei.c:92
lookup_open fs/namei.c:3488 [inline]
open_last_lookups fs/namei.c:3556 [inline]
path_openat+0x1277/0x3190 fs/namei.c:3786
do_filp_open+0x1c5/0x3d0 fs/namei.c:3816
do_sys_openat2+0x12c/0x1c0 fs/open.c:1419
do_sys_open fs/open.c:1434 [inline]
__do_sys_openat fs/open.c:1450 [inline]
__se_sys_openat fs/open.c:1445 [inline]
__x64_sys_openat+0x139/0x160 fs/open.c:1445
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 ffff888078393780
which belongs to the cache jfs_ip of size 2240
The buggy address is located 24 bytes to the right of
allocated 2240-byte region [ffff888078393780, ffff888078394040)

The buggy address belongs to the physical page:
page:ffffea0001e0e400 refcount:1 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x78390
head:ffffea0001e0e400 order:3 entire_mapcount:0 nr_pages_mapped:0 pincount:0
memcg:ffff888078b3f601
flags: 0xfff00000000840(slab|head|node=0|zone=1|lastcpupid=0x7ff)
page_type: 0xffffffff()
raw: 00fff00000000840 ffff888143697500 dead000000000122 0000000000000000
raw: 0000000000000000 00000000800d000d 00000001ffffffff ffff888078b3f601
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 6146, tgid 6145 (syz.3.60), ts 117972849676, free_ts 107685323473
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_lru+0x1ae/0x2e0 mm/slub.c:3526
alloc_inode_sb include/linux/fs.h:2946 [inline]
jfs_alloc_inode+0x28/0x60 fs/jfs/super.c:105
alloc_inode fs/inode.c:261 [inline]
new_inode_pseudo+0x63/0x1d0 fs/inode.c:1049
new_inode+0x22/0x1b0 fs/inode.c:1075
jfs_fill_super+0x396/0xac0 fs/jfs/super.c:544
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:3377
do_mount fs/namespace.c:3717 [inline]
__do_sys_mount fs/namespace.c:3926 [inline]
__se_sys_mount+0x2da/0x3c0 fs/namespace.c:3903
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
discard_slab mm/slub.c:2127 [inline]
__unfreeze_partials+0x1cf/0x210 mm/slub.c:2667
put_cpu_partial+0x17c/0x250 mm/slub.c:2743
__slab_free+0x31d/0x410 mm/slub.c:3700
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
kmem_cache_alloc_bulk+0x462/0x5b0 mm/slub.c:4077
__io_alloc_req_refill+0x261/0x480 io_uring/io_uring.c:1099
io_alloc_req io_uring/io_uring.h:379 [inline]
io_submit_sqes+0xc9e/0x1d00 io_uring/io_uring.c:2423
__do_sys_io_uring_enter io_uring/io_uring.c:3778 [inline]
__se_sys_io_uring_enter+0x2de/0x22e0 io_uring/io_uring.c:3713
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:
ffff888078393f00: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
ffff888078393f80: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
>ffff888078394000: 00 00 00 00 00 00 00 00 fc fc fc fc fc fc fc fc
^
ffff888078394080: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
ffff888078394100: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
==================================================================


---
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

syzbot

unread,
Sep 18, 2025, 6:29:31 PM (8 hours ago) Sep 18
to syzkaller...@googlegroups.com
syzbot has found a reproducer for the following issue on:

HEAD commit: 60a9e718726f Linux 6.6.106
git tree: linux-6.6.y
console output: https://syzkaller.appspot.com/x/log.txt?x=17751c7c580000
kernel config: https://syzkaller.appspot.com/x/.config?x=12606d4b8832c7e4
dashboard link: https://syzkaller.appspot.com/bug?extid=082a2bbdc6023d25075f
compiler: Debian clang version 20.1.8 (++20250708063551+0c9f909b7976-1~exp1~20250708183702.136), Debian LLD 20.1.8
syz repro: https://syzkaller.appspot.com/x/repro.syz?x=11936e42580000
C reproducer: https://syzkaller.appspot.com/x/repro.c?x=14aba534580000
mounted in repro: https://storage.googleapis.com/syzbot-assets/171aafc615ca/mount_0.gz
fsck result: failed (log: https://syzkaller.appspot.com/x/fsck.log?x=1412c0e2580000)

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

syz.0.17[5938]: memfd_create() called without MFD_EXEC or MFD_NOEXEC_SEAL set
loop0: detected capacity change from 0 to 32768
==================================================================
BUG: KASAN: slab-out-of-bounds in dtCompare fs/jfs/jfs_dtree.c:3333 [inline]
BUG: KASAN: slab-out-of-bounds in dtSearch+0x167a/0x21b0 fs/jfs/jfs_dtree.c:650
Read of size 1 at addr ffff8880621d4058 by task syz.0.17/5938

CPU: 1 PID: 5938 Comm: syz.0.17 Not tainted syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 08/18/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
dtCompare fs/jfs/jfs_dtree.c:3333 [inline]
dtSearch+0x167a/0x21b0 fs/jfs/jfs_dtree.c:650
jfs_lookup+0x156/0x380 fs/jfs/namei.c:1459
lookup_open fs/namei.c:3466 [inline]
open_last_lookups fs/namei.c:3556 [inline]
path_openat+0x10b8/0x3190 fs/namei.c:3786
do_filp_open+0x1c5/0x3d0 fs/namei.c:3816
do_sys_openat2+0x12c/0x1c0 fs/open.c:1419
do_sys_open fs/open.c:1434 [inline]
__do_sys_creat fs/open.c:1512 [inline]
__se_sys_creat fs/open.c:1506 [inline]
__x64_sys_creat+0x90/0xb0 fs/open.c:1506
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:0x7f397f38eba9
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:00007ffefb0cae08 EFLAGS: 00000246 ORIG_RAX: 0000000000000055
RAX: ffffffffffffffda RBX: 00007f397f5d5fa0 RCX: 00007f397f38eba9
RDX: 0000000000000000 RSI: 0000000000000001 RDI: 0000200000000100
RBP: 00007f397f411e19 R08: 0000000000000000 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000
R13: 00007f397f5d5fa0 R14: 00007f397f5d5fa0 R15: 0000000000000002
</TASK>

Allocated by task 5938:
The buggy address belongs to the object at ffff8880621d3780
which belongs to the cache jfs_ip of size 2240
The buggy address is located 24 bytes to the right of
allocated 2240-byte region [ffff8880621d3780, ffff8880621d4040)

The buggy address belongs to the physical page:
page:ffffea0001887400 refcount:1 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x621d0
head:ffffea0001887400 order:3 entire_mapcount:0 nr_pages_mapped:0 pincount:0
memcg:ffff88802459ac01
flags: 0xfff00000000840(slab|head|node=0|zone=1|lastcpupid=0x7ff)
page_type: 0xffffffff()
raw: 00fff00000000840 ffff8881422ce780 dead000000000122 0000000000000000
raw: 0000000000000000 00000000800d000d 00000001ffffffff ffff88802459ac01
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 5938, tgid 5938 (syz.0.17), ts 83243886862, free_ts 16436193775
free_contig_range+0xa1/0x160 mm/page_alloc.c:6369
destroy_args+0x80/0x850 mm/debug_vm_pgtable.c:1015
debug_vm_pgtable+0x3cc/0x410 mm/debug_vm_pgtable.c:1400
do_one_initcall+0x1fd/0x750 init/main.c:1238
do_initcall_level+0x137/0x1f0 init/main.c:1300
do_initcalls+0x69/0xd0 init/main.c:1316
kernel_init_freeable+0x3d2/0x570 init/main.c:1553
kernel_init+0x1d/0x1c0 init/main.c:1443
ret_from_fork+0x48/0x80 arch/x86/kernel/process.c:152
ret_from_fork_asm+0x11/0x20 arch/x86/entry/entry_64.S:293

Memory state around the buggy address:
ffff8880621d3f00: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
ffff8880621d3f80: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
>ffff8880621d4000: 00 00 00 00 00 00 00 00 fc fc fc fc fc fc fc fc
^
ffff8880621d4080: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
ffff8880621d4100: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
==================================================================


---
If you want syzbot to run the reproducer, reply with:
#syz test: git://repo/address.git branch-or-commit-hash
If you attach or paste a git patch, syzbot will apply it before testing.
Reply all
Reply to author
Forward
0 new messages