================================================================== BUG: KASAN: slab-use-after-free in lbmIODone+0x135f/0x1750 fs/jfs/jfs_logmgr.c:2179 Read of size 4 at addr ffff88814adf6408 by task ksoftirqd/0/15 CPU: 0 PID: 15 Comm: ksoftirqd/0 Not tainted 6.2.0-syzkaller-13115-gee3f96b16468 #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 02/16/2023 Call Trace: __dump_stack lib/dump_stack.c:88 [inline] dump_stack_lvl+0x1e7/0x2d0 lib/dump_stack.c:106 print_address_description mm/kasan/report.c:319 [inline] print_report+0x163/0x540 mm/kasan/report.c:430 kasan_report+0x143/0x170 mm/kasan/report.c:536 lbmIODone+0x135f/0x1750 fs/jfs/jfs_logmgr.c:2179 req_bio_endio block/blk-mq.c:795 [inline] blk_update_request+0x4d7/0xfe0 block/blk-mq.c:927 blk_mq_end_request+0x3e/0x70 block/blk-mq.c:1054 blk_complete_reqs block/blk-mq.c:1132 [inline] blk_done_softirq+0xfc/0x150 block/blk-mq.c:1137 __do_softirq+0x311/0xb1a kernel/softirq.c:571 run_ksoftirqd+0xc5/0x120 kernel/softirq.c:934 smpboot_thread_fn+0x533/0xa30 kernel/smpboot.c:164 kthread+0x270/0x300 kernel/kthread.c:376 ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:308 Allocated by task 8640: kasan_save_stack mm/kasan/common.c:45 [inline] kasan_set_track+0x4f/0x70 mm/kasan/common.c:52 ____kasan_kmalloc mm/kasan/common.c:374 [inline] __kasan_kmalloc+0x98/0xb0 mm/kasan/common.c:383 kmalloc include/linux/slab.h:580 [inline] lbmLogInit fs/jfs/jfs_logmgr.c:1822 [inline] lmLogInit+0x3b4/0x1c90 fs/jfs/jfs_logmgr.c:1270 open_inline_log fs/jfs/jfs_logmgr.c:1175 [inline] lmLogOpen+0x556/0x1030 fs/jfs/jfs_logmgr.c:1069 jfs_mount_rw+0xf1/0x6a0 fs/jfs/jfs_mount.c:257 jfs_fill_super+0x681/0xc50 fs/jfs/super.c:565 mount_bdev+0x271/0x3a0 fs/super.c:1371 legacy_get_tree+0xef/0x190 fs/fs_context.c:610 vfs_get_tree+0x8c/0x270 fs/super.c:1501 do_new_mount+0x28f/0xae0 fs/namespace.c:3042 do_mount fs/namespace.c:3385 [inline] __do_sys_mount fs/namespace.c:3594 [inline] __se_sys_mount+0x2d9/0x3c0 fs/namespace.c:3571 do_syscall_x64 arch/x86/entry/common.c:50 [inline] do_syscall_64+0x41/0xc0 arch/x86/entry/common.c:80 entry_SYSCALL_64_after_hwframe+0x63/0xcd Freed by task 5104: kasan_save_stack mm/kasan/common.c:45 [inline] kasan_set_track+0x4f/0x70 mm/kasan/common.c:52 kasan_save_free_info+0x2b/0x40 mm/kasan/generic.c:521 ____kasan_slab_free+0xd6/0x120 mm/kasan/common.c:236 kasan_slab_free include/linux/kasan.h:162 [inline] slab_free_hook mm/slub.c:1781 [inline] slab_free_freelist_hook mm/slub.c:1807 [inline] slab_free mm/slub.c:3787 [inline] __kmem_cache_free+0x264/0x3c0 mm/slub.c:3800 lbmLogShutdown fs/jfs/jfs_logmgr.c:1865 [inline] lmLogShutdown+0x504/0x970 fs/jfs/jfs_logmgr.c:1684 lmLogClose+0x297/0x530 fs/jfs/jfs_logmgr.c:1460 jfs_umount+0x2ce/0x3a0 fs/jfs/jfs_umount.c:114 jfs_put_super+0x8a/0x190 fs/jfs/super.c:194 generic_shutdown_super+0x134/0x340 fs/super.c:491 kill_block_super+0x7e/0xe0 fs/super.c:1398 deactivate_locked_super+0xa4/0x110 fs/super.c:331 cleanup_mnt+0x490/0x520 fs/namespace.c:1177 task_work_run+0x24a/0x300 kernel/task_work.c:179 resume_user_mode_work include/linux/resume_user_mode.h:49 [inline] exit_to_user_mode_loop+0xd9/0x100 kernel/entry/common.c:171 exit_to_user_mode_prepare+0xb1/0x140 kernel/entry/common.c:203 __syscall_exit_to_user_mode_work kernel/entry/common.c:285 [inline] syscall_exit_to_user_mode+0x64/0x2e0 kernel/entry/common.c:296 do_syscall_64+0x4d/0xc0 arch/x86/entry/common.c:86 entry_SYSCALL_64_after_hwframe+0x63/0xcd Last potentially related work creation: kasan_save_stack+0x3f/0x60 mm/kasan/common.c:45 __kasan_record_aux_stack+0xb0/0xc0 mm/kasan/generic.c:491 insert_work+0x54/0x3d0 kernel/workqueue.c:1361 __queue_work+0xc70/0x1110 kernel/workqueue.c:1524 queue_work_on+0x14f/0x250 kernel/workqueue.c:1552 inet6addr_event+0xfc/0x160 drivers/infiniband/core/roce_gid_mgmt.c:883 notifier_call_chain kernel/notifier.c:87 [inline] atomic_notifier_call_chain+0x163/0x290 kernel/notifier.c:225 ipv6_add_addr+0xb91/0xe40 net/ipv6/addrconf.c:1165 inet6_addr_add+0x47c/0x9f0 net/ipv6/addrconf.c:2969 inet6_rtm_newaddr+0x85b/0x26e0 net/ipv6/addrconf.c:4932 rtnetlink_rcv_msg+0x825/0xf40 net/core/rtnetlink.c:6174 netlink_rcv_skb+0x1df/0x430 net/netlink/af_netlink.c:2574 netlink_unicast_kernel net/netlink/af_netlink.c:1339 [inline] netlink_unicast+0x7c3/0x990 net/netlink/af_netlink.c:1365 netlink_sendmsg+0xa2a/0xd60 net/netlink/af_netlink.c:1942 sock_sendmsg_nosec net/socket.c:722 [inline] sock_sendmsg net/socket.c:745 [inline] __sys_sendto+0x475/0x630 net/socket.c:2145 __do_sys_sendto net/socket.c:2157 [inline] __se_sys_sendto net/socket.c:2153 [inline] __x64_sys_sendto+0xde/0xf0 net/socket.c:2153 do_syscall_x64 arch/x86/entry/common.c:50 [inline] do_syscall_64+0x41/0xc0 arch/x86/entry/common.c:80 entry_SYSCALL_64_after_hwframe+0x63/0xcd Second to last potentially related work creation: kasan_save_stack+0x3f/0x60 mm/kasan/common.c:45 __kasan_record_aux_stack+0xb0/0xc0 mm/kasan/generic.c:491 insert_work+0x54/0x3d0 kernel/workqueue.c:1361 __queue_work+0xc70/0x1110 kernel/workqueue.c:1524 queue_work_on+0x14f/0x250 kernel/workqueue.c:1552 queue_work include/linux/workqueue.h:504 [inline] call_usermodehelper_exec+0x276/0x480 kernel/umh.c:437 kobject_uevent_env+0x6a9/0x8e0 lib/kobject_uevent.c:618 kernel_add_sysfs_param+0x106/0x130 kernel/params.c:817 param_sysfs_builtin+0x16e/0x1f0 kernel/params.c:852 param_sysfs_builtin_init+0x2d/0x30 kernel/params.c:986 do_one_initcall+0x2da/0xa90 init/main.c:1306 do_initcall_level+0x157/0x210 init/main.c:1379 do_initcalls+0x3f/0x80 init/main.c:1395 kernel_init_freeable+0x477/0x630 init/main.c:1634 kernel_init+0x1d/0x2a0 init/main.c:1522 ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:308 The buggy address belongs to the object at ffff88814adf6400 which belongs to the cache kmalloc-192 of size 192 The buggy address is located 8 bytes inside of freed 192-byte region [ffff88814adf6400, ffff88814adf64c0) The buggy address belongs to the physical page: page:ffffea00052b7d80 refcount:1 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x14adf6 flags: 0x57ff00000000200(slab|node=1|zone=2|lastcpupid=0x7ff) raw: 057ff00000000200 ffff888012441a00 dead000000000100 dead000000000122 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 17065065366, free_ts 0 prep_new_page mm/page_alloc.c:2552 [inline] get_page_from_freelist+0x37e0/0x3970 mm/page_alloc.c:4325 __alloc_pages+0x291/0x7f0 mm/page_alloc.c:5591 alloc_page_interleave+0x22/0x1d0 mm/mempolicy.c:2116 alloc_slab_page+0x6a/0x160 mm/slub.c:1851 allocate_slab mm/slub.c:1998 [inline] new_slab+0x84/0x2f0 mm/slub.c:2051 ___slab_alloc+0xa85/0x10a0 mm/slub.c:3193 __slab_alloc mm/slub.c:3292 [inline] __slab_alloc_node mm/slub.c:3345 [inline] slab_alloc_node mm/slub.c:3442 [inline] __kmem_cache_alloc_node+0x1b8/0x2a0 mm/slub.c:3491 kmalloc_trace+0x2a/0x60 mm/slab_common.c:1061 kmalloc include/linux/slab.h:580 [inline] kzalloc include/linux/slab.h:720 [inline] call_usermodehelper_setup+0x8e/0x260 kernel/umh.c:366 kobject_uevent_env+0x68c/0x8e0 lib/kobject_uevent.c:614 kernel_add_sysfs_param+0x106/0x130 kernel/params.c:817 param_sysfs_builtin+0x16e/0x1f0 kernel/params.c:852 param_sysfs_builtin_init+0x2d/0x30 kernel/params.c:986 do_one_initcall+0x2da/0xa90 init/main.c:1306 do_initcall_level+0x157/0x210 init/main.c:1379 do_initcalls+0x3f/0x80 init/main.c:1395 page_owner free stack trace missing Memory state around the buggy address: ffff88814adf6300: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ffff88814adf6380: 00 fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc >ffff88814adf6400: fa fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ^ ffff88814adf6480: fb fb fb fb fb fb fb fb fc fc fc fc fc fc fc fc ffff88814adf6500: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ==================================================================