================================================================== 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 ffff8880234ea818 by task syz.3.211/6438 CPU: 0 PID: 6438 Comm: syz.3.211 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:0x7f93eb58efc9 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:00007f93ec406038 EFLAGS: 00000246 ORIG_RAX: 00000000000000a5 RAX: ffffffffffffffda RBX: 00007f93eb7e5fa0 RCX: 00007f93eb58efc9 RDX: 0000000000000000 RSI: 0000200000000000 RDI: 0000000000000000 RBP: 00007f93eb611f91 R08: 0000000000000000 R09: 0000000000000000 R10: 00000000001c0030 R11: 0000000000000246 R12: 0000000000000000 R13: 00007f93eb7e6038 R14: 00007f93eb7e5fa0 R15: 00007ffe4291be48 Allocated by task 6438: 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 6438: 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] netdevice_queue_work drivers/infiniband/core/roce_gid_mgmt.c:658 [inline] netdevice_event+0x769/0x890 drivers/infiniband/core/roce_gid_mgmt.c:801 notifier_call_chain+0x197/0x390 kernel/notifier.c:93 call_netdevice_notifiers_extack net/core/dev.c:2064 [inline] call_netdevice_notifiers net/core/dev.c:2078 [inline] unregister_netdevice_many_notify+0xf36/0x1810 net/core/dev.c:11086 unregister_netdevice_many net/core/dev.c:11142 [inline] default_device_exit_batch+0x9cb/0xa60 net/core/dev.c:11620 ops_exit_list net/core/net_namespace.c:178 [inline] cleanup_net+0x77f/0xb90 net/core/net_namespace.c:652 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] netdevice_queue_work drivers/infiniband/core/roce_gid_mgmt.c:658 [inline] netdevice_event+0x769/0x890 drivers/infiniband/core/roce_gid_mgmt.c:801 notifier_call_chain+0x197/0x390 kernel/notifier.c:93 call_netdevice_notifiers_extack net/core/dev.c:2064 [inline] call_netdevice_notifiers net/core/dev.c:2078 [inline] register_netdevice+0x160c/0x1ae0 net/core/dev.c:10313 __ip_tunnel_create+0x3b4/0x4c0 net/ipv4/ip_tunnel.c:267 ip_tunnel_init_net+0x2c3/0x770 net/ipv4/ip_tunnel.c:1104 ops_init+0x397/0x640 net/core/net_namespace.c:139 setup_net+0x3a5/0xa00 net/core/net_namespace.c:343 copy_net_ns+0x36d/0x5e0 net/core/net_namespace.c:520 create_new_namespaces+0x3d3/0x6f0 kernel/nsproxy.c:110 unshare_nsproxy_namespaces+0x11a/0x160 kernel/nsproxy.c:228 ksys_unshare+0x4c0/0x890 kernel/fork.c:3439 __do_sys_unshare kernel/fork.c:3510 [inline] __se_sys_unshare kernel/fork.c:3508 [inline] __x64_sys_unshare+0x38/0x40 kernel/fork.c:3508 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 ffff8880234ea800 which belongs to the cache kmalloc-192 of size 192 The buggy address is located 24 bytes inside of freed 192-byte region [ffff8880234ea800, ffff8880234ea8c0) The buggy address belongs to the physical page: page:ffffea00008d3a80 refcount:1 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x234ea flags: 0xfff00000000800(slab|node=0|zone=1|lastcpupid=0x7ff) page_type: 0xffffffff() raw: 00fff00000000800 ffff888017841a00 ffffea000086ce40 dead000000000004 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 0x12c00(GFP_NOIO|__GFP_NOWARN|__GFP_NORETRY), pid 11, tgid 11 (kworker/u4:0), ts 9417065616, free_ts 9414572956 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 __do_kmalloc_node mm/slab_common.c:1006 [inline] __kmalloc_node+0xa4/0x230 mm/slab_common.c:1014 kmalloc_node include/linux/slab.h:620 [inline] kvmalloc_node+0x70/0x180 mm/util.c:617 kvzalloc_node include/linux/slab.h:742 [inline] sbitmap_init_node+0x2c9/0x630 lib/sbitmap.c:132 blk_mq_alloc_hctx block/blk-mq.c:3852 [inline] blk_mq_alloc_and_init_hctx+0x4f2/0xd40 block/blk-mq.c:4309 blk_mq_realloc_hw_ctxs+0x18d/0xb40 block/blk-mq.c:4342 blk_mq_init_allocated_queue+0x406/0x1580 block/blk-mq.c:4401 blk_mq_init_queue_data block/blk-mq.c:4205 [inline] blk_mq_init_queue+0x76/0xe0 block/blk-mq.c:4215 scsi_alloc_sdev+0x70e/0xab0 drivers/scsi/scsi_scan.c:335 scsi_probe_and_add_lun+0x1be/0x4480 drivers/scsi/scsi_scan.c:1189 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: ffff8880234ea700: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ffff8880234ea780: 00 00 00 00 fc fc fc fc fc fc fc fc fc fc fc fc >ffff8880234ea800: fa fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ^ ffff8880234ea880: fb fb fb fb fb fb fb fb fc fc fc fc fc fc fc fc ffff8880234ea900: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ==================================================================