syzbot


KASAN: slab-use-after-free Read in lmLogInit

Status: upstream: reported C repro on 2025/10/26 04:56
Bug presence: origin:upstream
[Documentation on labels]
Reported-by: syzbot+4132d7149bed686243fd@syzkaller.appspotmail.com
First crash: 16d, last: 15d
Bug presence (1)
Date Name Commit Repro Result
2025/10/26 upstream (ToT) 72761a7e3122 C [report] KASAN: slab-use-after-free Read in lmLogInit
Similar bugs (1)
Kernel Title Rank 🛈 Repro Cause bisect Fix bisect Count Last Reported Patched Status
upstream KASAN: slab-use-after-free Read in lmLogInit jfs 19 C error 18 10d 446d 0/29 upstream: reported C repro on 2024/08/22 05:37

Sample crash report:
==================================================================
BUG: KASAN: slab-use-after-free in lbmLogShutdown fs/jfs/jfs_logmgr.c:1863 [inline]
BUG: KASAN: slab-use-after-free in lmLogInit+0x1165/0x1a30 fs/jfs/jfs_logmgr.c:1416
Read of size 8 at addr ffff88802e77f318 by task syz.1.557/7526

CPU: 1 PID: 7526 Comm: syz.1.557 Not tainted syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 10/02/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
 lbmLogShutdown fs/jfs/jfs_logmgr.c:1863 [inline]
 lmLogInit+0x1165/0x1a30 fs/jfs/jfs_logmgr.c:1416
 open_inline_log fs/jfs/jfs_logmgr.c:1175 [inline]
 lmLogOpen+0x4ef/0xfb0 fs/jfs/jfs_logmgr.c:1069
 jfs_mount_rw+0xea/0x670 fs/jfs/jfs_mount.c:257
 jfs_remount+0x396/0x5b0 fs/jfs/super.c:454
 reconfigure_super+0x21e/0x880 fs/super.c:1151
 do_remount fs/namespace.c:2927 [inline]
 path_mount+0xd19/0xfe0 fs/namespace.c:3705
 do_mount fs/namespace.c:3726 [inline]
 __do_sys_mount fs/namespace.c:3935 [inline]
 __se_sys_mount+0x2da/0x3c0 fs/namespace.c:3912
 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:0x7f039618efc9
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:00007f0397072038 EFLAGS: 00000246 ORIG_RAX: 00000000000000a5
RAX: ffffffffffffffda RBX: 00007f03963e5fa0 RCX: 00007f039618efc9
RDX: 0000000000000000 RSI: 0000200000000000 RDI: 0000000000000000
RBP: 00007f0396211f91 R08: 0000000000000000 R09: 0000000000000000
R10: 00000000001c0030 R11: 0000000000000246 R12: 0000000000000000
R13: 00007f03963e6038 R14: 00007f03963e5fa0 R15: 00007ffc84490668
 </TASK>

Allocated by task 7526:
 kasan_save_stack mm/kasan/common.c:45 [inline]
 kasan_set_track+0x4e/0x70 mm/kasan/common.c:52
 ____kasan_kmalloc mm/kasan/common.c:374 [inline]
 __kasan_kmalloc+0x8f/0xa0 mm/kasan/common.c:383
 kmalloc include/linux/slab.h:600 [inline]
 lbmLogInit fs/jfs/jfs_logmgr.c:1822 [inline]
 lmLogInit+0x355/0x1a30 fs/jfs/jfs_logmgr.c:1270
 open_inline_log fs/jfs/jfs_logmgr.c:1175 [inline]
 lmLogOpen+0x4ef/0xfb0 fs/jfs/jfs_logmgr.c:1069
 jfs_mount_rw+0xea/0x670 fs/jfs/jfs_mount.c:257
 jfs_remount+0x396/0x5b0 fs/jfs/super.c:454
 reconfigure_super+0x21e/0x880 fs/super.c:1151
 do_remount fs/namespace.c:2927 [inline]
 path_mount+0xd19/0xfe0 fs/namespace.c:3705
 do_mount fs/namespace.c:3726 [inline]
 __do_sys_mount fs/namespace.c:3935 [inline]
 __se_sys_mount+0x2da/0x3c0 fs/namespace.c:3912
 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 7526:
 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+0xba/0x1f0 mm/slub.c:3843
 lbmLogShutdown fs/jfs/jfs_logmgr.c:1865 [inline]
 lmLogInit+0x1193/0x1a30 fs/jfs/jfs_logmgr.c:1416
 open_inline_log fs/jfs/jfs_logmgr.c:1175 [inline]
 lmLogOpen+0x4ef/0xfb0 fs/jfs/jfs_logmgr.c:1069
 jfs_mount_rw+0xea/0x670 fs/jfs/jfs_mount.c:257
 jfs_remount+0x396/0x5b0 fs/jfs/super.c:454
 reconfigure_super+0x21e/0x880 fs/super.c:1151
 do_remount fs/namespace.c:2927 [inline]
 path_mount+0xd19/0xfe0 fs/namespace.c:3705
 do_mount fs/namespace.c:3726 [inline]
 __do_sys_mount fs/namespace.c:3935 [inline]
 __se_sys_mount+0x2da/0x3c0 fs/namespace.c:3912
 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

Last potentially related work creation:
 kasan_save_stack+0x3e/0x60 mm/kasan/common.c:45
 __kasan_record_aux_stack+0xaf/0xc0 mm/kasan/generic.c:492
 insert_work+0x3d/0x310 kernel/workqueue.c:1651
 __queue_work+0xc39/0x1020 kernel/workqueue.c:1800
 queue_work_on+0x121/0x1e0 kernel/workqueue.c:1835
 inet6addr_event+0xa0/0xd0 drivers/infiniband/core/roce_gid_mgmt.c:882
 notifier_call_chain+0x197/0x390 kernel/notifier.c:93
 atomic_notifier_call_chain+0xda/0x180 kernel/notifier.c:231
 ipv6_add_addr+0xdad/0x1090 net/ipv6/addrconf.c:1189
 addrconf_add_linklocal+0x289/0x6b0 net/ipv6/addrconf.c:3284
 addrconf_addr_gen+0x4ac/0x5a0 net/ipv6/addrconf.c:3415
 addrconf_init_auto_addrs+0x70e/0xaa0 net/ipv6/addrconf.c:-1
 addrconf_notify+0xb62/0x1010 net/ipv6/addrconf.c:3712
 notifier_call_chain+0x197/0x390 kernel/notifier.c:93
 netdev_state_change+0xd6/0x150 net/core/dev.c:1408
 linkwatch_do_dev+0x10d/0x160 net/core/link_watch.c:191
 __linkwatch_run_queue+0x40f/0x660 net/core/link_watch.c:244
 linkwatch_event+0x4c/0x60 net/core/link_watch.c:287
 process_one_work kernel/workqueue.c:2634 [inline]
 process_scheduled_works+0xa45/0x15b0 kernel/workqueue.c:2711
 worker_thread+0xa55/0xfc0 kernel/workqueue.c:2792
 kthread+0x2fa/0x390 kernel/kthread.c:388
 ret_from_fork+0x48/0x80 arch/x86/kernel/process.c:152
 ret_from_fork_asm+0x11/0x20 arch/x86/entry/entry_64.S:293

Second to last potentially related work creation:
 kasan_save_stack+0x3e/0x60 mm/kasan/common.c:45
 __kasan_record_aux_stack+0xaf/0xc0 mm/kasan/generic.c:492
 insert_work+0x3d/0x310 kernel/workqueue.c:1651
 __queue_work+0xc39/0x1020 kernel/workqueue.c:1800
 queue_work_on+0x121/0x1e0 kernel/workqueue.c:1835
 queue_work include/linux/workqueue.h:562 [inline]
 call_usermodehelper_exec+0x286/0x490 kernel/umh.c:434
 kobject_uevent_env+0x681/0x8c0 lib/kobject_uevent.c:633
 kernel_add_sysfs_param+0xfb/0x120 kernel/params.c:817
 param_sysfs_builtin+0x1e0/0x280 kernel/params.c:852
 param_sysfs_builtin_init+0x2d/0x30 kernel/params.c:988
 do_one_initcall+0x1fd/0x750 init/main.c:1250
 do_initcall_level+0x137/0x1f0 init/main.c:1312
 do_initcalls+0x69/0xd0 init/main.c:1328
 kernel_init_freeable+0x3d2/0x570 init/main.c:1565
 kernel_init+0x1d/0x1c0 init/main.c:1455
 ret_from_fork+0x48/0x80 arch/x86/kernel/process.c:152
 ret_from_fork_asm+0x11/0x20 arch/x86/entry/entry_64.S:293

The buggy address belongs to the object at ffff88802e77f300
 which belongs to the cache kmalloc-192 of size 192
The buggy address is located 24 bytes inside of
 freed 192-byte region [ffff88802e77f300, ffff88802e77f3c0)

The buggy address belongs to the physical page:
page:ffffea0000b9dfc0 refcount:1 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x2e77f
anon flags: 0xfff00000000800(slab|node=0|zone=1|lastcpupid=0x7ff)
page_type: 0xffffffff()
raw: 00fff00000000800 ffff888017841a00 0000000000000000 dead000000000001
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 0x12cc0(GFP_KERNEL|__GFP_NOWARN|__GFP_NORETRY), pid 1, tgid 1 (swapper/0), ts 23370242276, free_ts 0
 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_page_interleave+0x24/0x1e0 mm/mempolicy.c:2120
 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]
 __kmem_cache_alloc_node+0x1a2/0x260 mm/slub.c:3534
 kmalloc_trace+0x2a/0xe0 mm/slab_common.c:1098
 kmalloc include/linux/slab.h:600 [inline]
 kzalloc include/linux/slab.h:721 [inline]
 call_usermodehelper_setup+0x8e/0x260 kernel/umh.c:363
 kobject_uevent_env+0x65d/0x8c0 lib/kobject_uevent.c:629
 kernel_add_sysfs_param+0xfb/0x120 kernel/params.c:817
 param_sysfs_builtin+0x1e0/0x280 kernel/params.c:852
 param_sysfs_builtin_init+0x2d/0x30 kernel/params.c:988
 do_one_initcall+0x1fd/0x750 init/main.c:1250
 do_initcall_level+0x137/0x1f0 init/main.c:1312
page_owner free stack trace missing

Memory state around the buggy address:
 ffff88802e77f200: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
 ffff88802e77f280: 00 fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
>ffff88802e77f300: fa fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
                            ^
 ffff88802e77f380: fb fb fb fb fb fb fb fb fc fc fc fc fc fc fc fc
 ffff88802e77f400: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
==================================================================

Crashes (8):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2025/10/26 22:15 linux-6.6.y 4a243110dc88 c0460fcd .config console log report syz / log C [disk image] [vmlinux] [kernel image] [mounted in repro (corrupt fs)] ci2-linux-6-6-kasan KASAN: slab-use-after-free Read in lmLogInit
2025/10/26 18:59 linux-6.6.y 4a243110dc88 c0460fcd .config console log report syz / log C [disk image] [vmlinux] [kernel image] [mounted in repro (corrupt fs)] ci2-linux-6-6-kasan KASAN: slab-use-after-free Read in lmLogInit
2025/10/26 12:30 linux-6.6.y 4a243110dc88 c0460fcd .config console log report syz / log C [disk image] [vmlinux] [kernel image] [mounted in repro (corrupt fs)] ci2-linux-6-6-kasan KASAN: slab-use-after-free Read in lmLogInit
2025/10/26 07:29 linux-6.6.y 4a243110dc88 c0460fcd .config console log report syz / log C [disk image] [vmlinux] [kernel image] [mounted in repro (corrupt fs)] ci2-linux-6-6-kasan KASAN: slab-use-after-free Read in lmLogInit
2025/10/26 15:51 linux-6.6.y 4a243110dc88 c0460fcd .config console log report syz / log [disk image] [vmlinux] [kernel image] [mounted in repro (corrupt fs)] ci2-linux-6-6-kasan KASAN: slab-use-after-free Read in lmLogInit
2025/10/26 13:41 linux-6.6.y 4a243110dc88 c0460fcd .config console log report syz / log [disk image] [vmlinux] [kernel image] [mounted in repro (corrupt fs)] ci2-linux-6-6-kasan KASAN: slab-use-after-free Read in lmLogInit
2025/10/26 09:43 linux-6.6.y 4a243110dc88 c0460fcd .config console log report syz / log [disk image] [vmlinux] [kernel image] [mounted in repro (corrupt fs)] ci2-linux-6-6-kasan KASAN: slab-use-after-free Read in lmLogInit
2025/10/26 04:55 linux-6.6.y 4a243110dc88 c0460fcd .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-6-kasan KASAN: slab-use-after-free Read in lmLogInit
* Struck through repros no longer work on HEAD.