[v5.15] KASAN: slab-out-of-bounds Read in lmWriteRecord

0 views
Skip to first unread message

syzbot

unread,
Jan 15, 2026, 2:37:21 AM (2 days ago) Jan 15
to syzkaller...@googlegroups.com
Hello,

syzbot found the following issue on:

HEAD commit: 68efe5a6c16a Linux 5.15.197
git tree: linux-5.15.y
console output: https://syzkaller.appspot.com/x/log.txt?x=1062aa3a580000
kernel config: https://syzkaller.appspot.com/x/.config?x=7e6ed99963d6ee1d
dashboard link: https://syzkaller.appspot.com/bug?extid=22cb558f3492e9e8282d
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/900f9b9bd850/disk-68efe5a6.raw.xz
vmlinux: https://storage.googleapis.com/syzbot-assets/1e089a5019a6/vmlinux-68efe5a6.xz
kernel image: https://storage.googleapis.com/syzbot-assets/b319f477b907/bzImage-68efe5a6.xz

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

==================================================================
BUG: KASAN: slab-out-of-bounds in lmWriteRecord+0x4c8/0x1aa0 fs/jfs/jfs_logmgr.c:433
Read of size 32 at addr ffff88805fa57e00 by task syz.4.16/4399

CPU: 1 PID: 4399 Comm: syz.4.16 Not tainted syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 10/25/2025
Call Trace:
<TASK>
dump_stack_lvl+0x168/0x230 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
check_region_inline mm/kasan/generic.c:-1 [inline]
kasan_check_range+0x27b/0x290 mm/kasan/generic.c:189
memcpy+0x25/0x60 mm/kasan/shadow.c:65
lmWriteRecord+0x4c8/0x1aa0 fs/jfs/jfs_logmgr.c:433
lmLog+0x6f6/0xa30 fs/jfs/jfs_logmgr.c:314
dtLog fs/jfs/jfs_txnmgr.c:1653 [inline]
txLog fs/jfs/jfs_txnmgr.c:1401 [inline]
txCommit+0x1c2b/0x51c0 fs/jfs/jfs_txnmgr.c:1265
jfs_mkdir+0x875/0xa70 fs/jfs/namei.c:290
vfs_mkdir+0x387/0x570 fs/namei.c:4073
do_mkdirat+0x1d7/0x5a0 fs/namei.c:4098
__do_sys_mkdirat fs/namei.c:4113 [inline]
__se_sys_mkdirat fs/namei.c:4111 [inline]
__x64_sys_mkdirat+0x85/0x90 fs/namei.c:4111
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:0x7f5be6382e97
Code: 73 01 c3 48 c7 c1 a8 ff ff ff f7 d8 64 89 01 48 83 c8 ff c3 66 2e 0f 1f 84 00 00 00 00 00 0f 1f 44 00 00 b8 02 01 00 00 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:00007f5be45c9e68 EFLAGS: 00000246 ORIG_RAX: 0000000000000102
RAX: ffffffffffffffda RBX: 00007f5be45c9ef0 RCX: 00007f5be6382e97
RDX: 00000000000001ff RSI: 0000200000000000 RDI: 00000000ffffff9c
RBP: 00002000000002c0 R08: 0000200000000080 R09: 0000000000000000
R10: 00002000000002c0 R11: 0000000000000246 R12: 0000200000000000
R13: 00007f5be45c9eb0 R14: 0000000000000000 R15: 0000000000000000
</TASK>

Allocated by task 4182:
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+0x9c/0xd0 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+0x100/0x290 mm/slub.c:3238
fib_table_insert+0x4ae/0x1b20 net/ipv4/fib_trie.c:1337
fib_magic+0x2c1/0x390 net/ipv4/fib_frontend.c:1106
fib_add_ifaddr+0x389/0x5e0 net/ipv4/fib_frontend.c:1143
fib_netdev_event+0x35c/0x480 net/ipv4/fib_frontend.c:1488
notifier_call_chain kernel/notifier.c:83 [inline]
raw_notifier_call_chain+0xcb/0x160 kernel/notifier.c:391
call_netdevice_notifiers_extack net/core/dev.c:2061 [inline]
call_netdevice_notifiers net/core/dev.c:2075 [inline]
__dev_notify_flags+0x178/0x2d0 net/core/dev.c:-1
dev_change_flags+0xe3/0x1a0 net/core/dev.c:8929
do_setlink+0xc01/0x3980 net/core/rtnetlink.c:2781
__rtnl_newlink net/core/rtnetlink.c:3452 [inline]
rtnl_newlink+0x1419/0x17d0 net/core/rtnetlink.c:3574
rtnetlink_rcv_msg+0x7ff/0xe90 net/core/rtnetlink.c:5684
netlink_rcv_skb+0x1e0/0x430 net/netlink/af_netlink.c:2507
netlink_unicast_kernel net/netlink/af_netlink.c:1318 [inline]
netlink_unicast+0x774/0x920 net/netlink/af_netlink.c:1344
netlink_sendmsg+0x8ab/0xbc0 net/netlink/af_netlink.c:1918
sock_sendmsg_nosec net/socket.c:706 [inline]
__sock_sendmsg net/socket.c:718 [inline]
__sys_sendto+0x423/0x580 net/socket.c:2073
__do_sys_sendto net/socket.c:2085 [inline]
__se_sys_sendto net/socket.c:2081 [inline]
__x64_sys_sendto+0xda/0xf0 net/socket.c:2081
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 ffff88805fa57dc0
which belongs to the cache ip_fib_alias of size 56
The buggy address is located 8 bytes to the right of
56-byte region [ffff88805fa57dc0, ffff88805fa57df8)
The buggy address belongs to the page:
page:ffffea00017e95c0 refcount:1 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x5fa57
flags: 0xfff00000000200(slab|node=0|zone=1|lastcpupid=0x7ff)
raw: 00fff00000000200 0000000000000000 dead000000000122 ffff8880177598c0
raw: 0000000000000000 00000000002e002e 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 0x12cc0(GFP_KERNEL|__GFP_NOWARN|__GFP_NORETRY), pid 4182, ts 64624054144, free_ts 22202008276
prep_new_page mm/page_alloc.c:2426 [inline]
get_page_from_freelist+0x1b77/0x1c60 mm/page_alloc.c:4192
__alloc_pages+0x1e1/0x470 mm/page_alloc.c:5487
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+0x81e/0xdf0 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+0x195/0x290 mm/slub.c:3238
fib_table_insert+0x4ae/0x1b20 net/ipv4/fib_trie.c:1337
fib_magic+0x2c1/0x390 net/ipv4/fib_frontend.c:1106
fib_add_ifaddr+0x389/0x5e0 net/ipv4/fib_frontend.c:1143
fib_netdev_event+0x35c/0x480 net/ipv4/fib_frontend.c:1488
notifier_call_chain kernel/notifier.c:83 [inline]
raw_notifier_call_chain+0xcb/0x160 kernel/notifier.c:391
call_netdevice_notifiers_extack net/core/dev.c:2061 [inline]
call_netdevice_notifiers net/core/dev.c:2075 [inline]
__dev_notify_flags+0x178/0x2d0 net/core/dev.c:-1
dev_change_flags+0xe3/0x1a0 net/core/dev.c:8929
do_setlink+0xc01/0x3980 net/core/rtnetlink.c:2781
__rtnl_newlink net/core/rtnetlink.c:3452 [inline]
rtnl_newlink+0x1419/0x17d0 net/core/rtnetlink.c:3574
rtnetlink_rcv_msg+0x7ff/0xe90 net/core/rtnetlink.c:5684
netlink_rcv_skb+0x1e0/0x430 net/netlink/af_netlink.c:2507
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+0x94/0x280 mm/page_alloc.c:3396
free_contig_range+0x96/0xf0 mm/page_alloc.c:9406
destroy_args+0x100/0xa20 mm/debug_vm_pgtable.c:1018
debug_vm_pgtable+0x318/0x370 mm/debug_vm_pgtable.c:1336
do_one_initcall+0x1ee/0x680 init/main.c:1316
do_initcall_level+0x137/0x1f0 init/main.c:1389
do_initcalls+0x4b/0x90 init/main.c:1405
kernel_init_freeable+0x3ce/0x560 init/main.c:1629
kernel_init+0x19/0x1b0 init/main.c:1520
ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:287

Memory state around the buggy address:
ffff88805fa57d00: fc fc fa fb fb fb fb fb fb fc fc fc fc 00 00 00
ffff88805fa57d80: 00 00 00 00 fc fc fc fc 00 00 00 00 00 00 00 fc
>ffff88805fa57e00: fc fc fc 00 00 00 00 00 00 00 fc fc fc fc 00 00
^
ffff88805fa57e80: 00 00 00 00 00 fc fc fc fc 00 00 00 00 00 00 00
ffff88805fa57f00: fc fc fc fc 00 00 00 00 00 00 00 fc fc fc fc 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

syzbot

unread,
Jan 15, 2026, 3:23:22 AM (2 days ago) Jan 15
to syzkaller...@googlegroups.com
syzbot has found a reproducer for the following issue on:

HEAD commit: 68efe5a6c16a Linux 5.15.197
git tree: linux-5.15.y
console output: https://syzkaller.appspot.com/x/log.txt?x=10fde59a580000
kernel config: https://syzkaller.appspot.com/x/.config?x=7e6ed99963d6ee1d
dashboard link: https://syzkaller.appspot.com/bug?extid=22cb558f3492e9e8282d
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=12ba4522580000
C reproducer: https://syzkaller.appspot.com/x/repro.c?x=13188dfa580000
mounted in repro: https://storage.googleapis.com/syzbot-assets/67810e3fba23/mount_0.gz
fsck result: failed (log: https://syzkaller.appspot.com/x/fsck.log?x=148aaa3a580000)

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

loop0: detected capacity change from 0 to 32768
UFO tlock:0xffffc90002892288
==================================================================
BUG: KASAN: use-after-free in lmWriteRecord+0x4c8/0x1aa0 fs/jfs/jfs_logmgr.c:433
Read of size 32 at addr ffff88807c9bae00 by task syz.0.17/4356

CPU: 0 PID: 4356 Comm: syz.0.17 Not tainted syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 10/25/2025
Call Trace:
<TASK>
dump_stack_lvl+0x168/0x230 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
check_region_inline mm/kasan/generic.c:-1 [inline]
kasan_check_range+0x27b/0x290 mm/kasan/generic.c:189
memcpy+0x25/0x60 mm/kasan/shadow.c:65
lmWriteRecord+0x4c8/0x1aa0 fs/jfs/jfs_logmgr.c:433
lmLog+0x6f6/0xa30 fs/jfs/jfs_logmgr.c:314
dtLog fs/jfs/jfs_txnmgr.c:1653 [inline]
txLog fs/jfs/jfs_txnmgr.c:1401 [inline]
txCommit+0x1c2b/0x51c0 fs/jfs/jfs_txnmgr.c:1265
jfs_mkdir+0x875/0xa70 fs/jfs/namei.c:290
vfs_mkdir+0x387/0x570 fs/namei.c:4073
do_mkdirat+0x1d7/0x5a0 fs/namei.c:4098
__do_sys_mkdirat fs/namei.c:4113 [inline]
__se_sys_mkdirat fs/namei.c:4111 [inline]
__x64_sys_mkdirat+0x85/0x90 fs/namei.c:4111
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:0x7fb7bb20ce97
Code: 73 01 c3 48 c7 c1 a8 ff ff ff f7 d8 64 89 01 48 83 c8 ff c3 66 2e 0f 1f 84 00 00 00 00 00 0f 1f 44 00 00 b8 02 01 00 00 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:00007fff32797068 EFLAGS: 00000246 ORIG_RAX: 0000000000000102
RAX: ffffffffffffffda RBX: 00007fff327970f0 RCX: 00007fb7bb20ce97
RDX: 00000000000001ff RSI: 0000200000000000 RDI: 00000000ffffff9c
RBP: 00002000000002c0 R08: 0000200000000080 R09: 0000000000000000
R10: 00002000000002c0 R11: 0000000000000246 R12: 0000200000000000
R13: 00007fff327970b0 R14: 0000000000000000 R15: 0000000000000000
</TASK>

Allocated by task 4126:
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+0x9c/0xd0 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+0x100/0x290 mm/slub.c:3238
vm_area_alloc+0x20/0xe0 kernel/fork.c:350
__mmap_region mm/mmap.c:1782 [inline]
mmap_region+0xac7/0x1660 mm/mmap.c:2933
do_mmap+0x81f/0xea0 mm/mmap.c:1586
vm_mmap_pgoff+0x1b2/0x2b0 mm/util.c:551
ksys_mmap_pgoff+0x542/0x780 mm/mmap.c:1635
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

Freed by task 4126:
kasan_save_stack mm/kasan/common.c:38 [inline]
kasan_set_track+0x4b/0x70 mm/kasan/common.c:46
kasan_set_free_info+0x1f/0x40 mm/kasan/generic.c:360
____kasan_slab_free+0xd5/0x110 mm/kasan/common.c:366
kasan_slab_free include/linux/kasan.h:230 [inline]
slab_free_hook mm/slub.c:1710 [inline]
slab_free_freelist_hook+0xea/0x170 mm/slub.c:1736
slab_free mm/slub.c:3504 [inline]
kmem_cache_free+0x8f/0x210 mm/slub.c:3520
remove_vma mm/mmap.c:188 [inline]
exit_mmap+0x4d8/0x5f0 mm/mmap.c:3227
__mmput+0x115/0x3b0 kernel/fork.c:1127
exit_mm+0x567/0x6c0 kernel/exit.c:550
do_exit+0x5a1/0x20a0 kernel/exit.c:870
do_group_exit+0x12e/0x300 kernel/exit.c:997
__do_sys_exit_group kernel/exit.c:1008 [inline]
__se_sys_exit_group kernel/exit.c:1006 [inline]
__x64_sys_exit_group+0x3b/0x40 kernel/exit.c:1006
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 ffff88807c9bad68
which belongs to the cache vm_area_struct of size 200
The buggy address is located 152 bytes inside of
200-byte region [ffff88807c9bad68, ffff88807c9bae30)
The buggy address belongs to the page:
page:ffffea0001f26e80 refcount:1 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x7c9ba
flags: 0xfff00000000200(slab|node=0|zone=1|lastcpupid=0x7ff)
raw: 00fff00000000200 0000000000000000 dead000000000122 ffff8880169e9a00
raw: 0000000000000000 00000000000f000f 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 0x12cc0(GFP_KERNEL|__GFP_NOWARN|__GFP_NORETRY), pid 4126, ts 60760471855, free_ts 60756826050
prep_new_page mm/page_alloc.c:2426 [inline]
get_page_from_freelist+0x1b77/0x1c60 mm/page_alloc.c:4192
__alloc_pages+0x1e1/0x470 mm/page_alloc.c:5487
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+0x81e/0xdf0 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+0x195/0x290 mm/slub.c:3238
vm_area_alloc+0x20/0xe0 kernel/fork.c:350
__mmap_region mm/mmap.c:1782 [inline]
mmap_region+0xac7/0x1660 mm/mmap.c:2933
do_mmap+0x81f/0xea0 mm/mmap.c:1586
vm_mmap_pgoff+0x1b2/0x2b0 mm/util.c:551
ksys_mmap_pgoff+0x542/0x780 mm/mmap.c:1635
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_list+0x122/0x7e0 mm/page_alloc.c:3433
release_pages+0x184b/0x1bb0 mm/swap.c:963
tlb_batch_pages_flush mm/mmu_gather.c:49 [inline]
tlb_flush_mmu_free mm/mmu_gather.c:240 [inline]
tlb_flush_mmu mm/mmu_gather.c:247 [inline]
tlb_finish_mmu+0x164/0x2e0 mm/mmu_gather.c:338
exit_mmap+0x3a6/0x5f0 mm/mmap.c:3218
__mmput+0x115/0x3b0 kernel/fork.c:1127
exec_mmap+0x4d1/0x5c0 fs/exec.c:1035
begin_new_exec+0x7e8/0x1160 fs/exec.c:1293
load_elf_binary+0x98e/0x2890 fs/binfmt_elf.c:1001
search_binary_handler fs/exec.c:1742 [inline]
exec_binprm fs/exec.c:1783 [inline]
bprm_execve+0xa92/0x17d0 fs/exec.c:1852
do_execveat_common+0x51e/0x6d0 fs/exec.c:1957
do_execve fs/exec.c:2027 [inline]
__do_sys_execve fs/exec.c:2103 [inline]
__se_sys_execve fs/exec.c:2098 [inline]
__x64_sys_execve+0x8e/0xa0 fs/exec.c:2098
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:
ffff88807c9bad00: fb fb fb fb fb fc fc fc fc fc fc fc fc fa fb fb
ffff88807c9bad80: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
>ffff88807c9bae00: fb fb fb fb fb fb fc fc fc fc fc fc fc fc fa fb
^
ffff88807c9bae80: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
ffff88807c9baf00: fb fb fb fb fb fb fb 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