================================================================== 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 ffff888022108518 by task syz.3.868/7764 CPU: 1 PID: 7764 Comm: syz.3.868 Not tainted syzkaller #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 10/02/2025 Call Trace: 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:0x7fe6d618efc9 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:00007fe6d7016038 EFLAGS: 00000246 ORIG_RAX: 00000000000000a5 RAX: ffffffffffffffda RBX: 00007fe6d63e5fa0 RCX: 00007fe6d618efc9 RDX: 0000000000000000 RSI: 0000200000000000 RDI: 0000000000000000 RBP: 00007fe6d6211f91 R08: 0000000000000000 R09: 0000000000000000 R10: 00000000001c0030 R11: 0000000000000246 R12: 0000000000000000 R13: 00007fe6d63e6038 R14: 00007fe6d63e5fa0 R15: 00007ffd0acbbe78 Allocated by task 7764: 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 7764: 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 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 device_add+0x5e8/0xc20 drivers/base/core.c:3664 device_create_groups_vargs drivers/base/core.c:4410 [inline] device_create_with_groups+0x25d/0x2f0 drivers/base/core.c:4490 misc_register+0x40d/0x690 drivers/char/misc.c:264 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 ffff888022108500 which belongs to the cache kmalloc-192 of size 192 The buggy address is located 24 bytes inside of freed 192-byte region [ffff888022108500, ffff8880221085c0) The buggy address belongs to the physical page: page:ffffea0000884200 refcount:1 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x22108 flags: 0xfff00000000800(slab|node=0|zone=1|lastcpupid=0x7ff) page_type: 0xffffffff() raw: 00fff00000000800 ffff888017841a00 ffffea000088fdc0 dead000000000002 raw: 0000000000000000 0000000000100010 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 23, tgid 23 (kworker/1:0), ts 6853935075, free_ts 6853270256 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_pages_node include/linux/gfp.h:237 [inline] alloc_slab_page+0x4f/0x170 mm/slub.c:1883 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_node_trace+0x26/0xe0 mm/slab_common.c:1111 kmalloc_node include/linux/slab.h:616 [inline] kzalloc_node include/linux/slab.h:732 [inline] alloc_worker kernel/workqueue.c:2072 [inline] create_worker+0x119/0x7b0 kernel/workqueue.c:2180 maybe_create_worker kernel/workqueue.c:2463 [inline] manage_workers kernel/workqueue.c:2515 [inline] worker_thread+0x4d9/0xfc0 kernel/workqueue.c:2767 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 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 mm_free_pgd kernel/fork.c:809 [inline] __mmdrop+0xb4/0x3d0 kernel/fork.c:925 free_bprm+0x171/0x3e0 fs/exec.c:1514 kernel_execve+0x3c2/0x9c0 fs/exec.c:2060 call_usermodehelper_exec_async+0x20b/0x350 kernel/umh.c:110 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: ffff888022108400: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ffff888022108480: 00 00 00 00 fc fc fc fc fc fc fc fc fc fc fc fc >ffff888022108500: fa fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ^ ffff888022108580: fb fb fb fb fb fb fb fb fc fc fc fc fc fc fc fc ffff888022108600: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ==================================================================