================================================================== BUG: KASAN: slab-use-after-free in lbmIODone+0xeb7/0x11d0 fs/jfs/jfs_logmgr.c:2179 Read of size 4 at addr ffff88802b8c7808 by task ksoftirqd/1/21 CPU: 1 PID: 21 Comm: ksoftirqd/1 Not tainted 6.3.0-syzkaller-00113-g1a0beef98b58 #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 04/14/2023 Call Trace: __dump_stack lib/dump_stack.c:88 [inline] dump_stack_lvl+0xd9/0x150 lib/dump_stack.c:106 print_address_description.constprop.0+0x2c/0x3c0 mm/kasan/report.c:319 print_report mm/kasan/report.c:430 [inline] kasan_report+0x11c/0x130 mm/kasan/report.c:536 lbmIODone+0xeb7/0x11d0 fs/jfs/jfs_logmgr.c:2179 bio_endio+0x5bb/0x6c0 block/bio.c:1607 req_bio_endio block/blk-mq.c:795 [inline] blk_update_request+0x3ff/0x1400 block/blk-mq.c:927 blk_mq_end_request+0x4f/0x80 block/blk-mq.c:1054 lo_complete_rq+0x1c6/0x280 drivers/block/loop.c:370 blk_complete_reqs+0xad/0xe0 block/blk-mq.c:1132 __do_softirq+0x1d4/0x905 kernel/softirq.c:571 run_ksoftirqd kernel/softirq.c:934 [inline] run_ksoftirqd+0x31/0x60 kernel/softirq.c:926 smpboot_thread_fn+0x659/0x9e0 kernel/smpboot.c:164 kthread+0x2e8/0x3a0 kernel/kthread.c:376 ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:308 Allocated by task 13233: kasan_save_stack+0x22/0x40 mm/kasan/common.c:45 kasan_set_track+0x25/0x30 mm/kasan/common.c:52 ____kasan_kmalloc mm/kasan/common.c:374 [inline] ____kasan_kmalloc mm/kasan/common.c:333 [inline] __kasan_kmalloc+0xa2/0xb0 mm/kasan/common.c:383 kmalloc include/linux/slab.h:580 [inline] lbmLogInit fs/jfs/jfs_logmgr.c:1822 [inline] lmLogInit+0x3b3/0x1a50 fs/jfs/jfs_logmgr.c:1270 open_inline_log fs/jfs/jfs_logmgr.c:1175 [inline] lmLogOpen+0x7db/0x1430 fs/jfs/jfs_logmgr.c:1069 jfs_mount_rw+0x2ed/0x6d0 fs/jfs/jfs_mount.c:257 jfs_fill_super+0xa00/0xd40 fs/jfs/super.c:565 mount_bdev+0x351/0x410 fs/super.c:1380 legacy_get_tree+0x109/0x220 fs/fs_context.c:610 vfs_get_tree+0x8d/0x350 fs/super.c:1510 do_new_mount fs/namespace.c:3042 [inline] path_mount+0x1342/0x1e40 fs/namespace.c:3372 do_mount fs/namespace.c:3385 [inline] __do_sys_mount fs/namespace.c:3594 [inline] __se_sys_mount fs/namespace.c:3571 [inline] __x64_sys_mount+0x283/0x300 fs/namespace.c:3571 do_syscall_x64 arch/x86/entry/common.c:50 [inline] do_syscall_64+0x39/0xb0 arch/x86/entry/common.c:80 entry_SYSCALL_64_after_hwframe+0x63/0xcd Freed by task 5034: kasan_save_stack+0x22/0x40 mm/kasan/common.c:45 kasan_set_track+0x25/0x30 mm/kasan/common.c:52 kasan_save_free_info+0x2e/0x40 mm/kasan/generic.c:521 ____kasan_slab_free mm/kasan/common.c:236 [inline] ____kasan_slab_free+0x160/0x1c0 mm/kasan/common.c:200 kasan_slab_free include/linux/kasan.h:162 [inline] slab_free_hook mm/slub.c:1781 [inline] slab_free_freelist_hook+0x8b/0x1c0 mm/slub.c:1807 slab_free mm/slub.c:3787 [inline] __kmem_cache_free+0xaf/0x2d0 mm/slub.c:3800 lbmLogShutdown fs/jfs/jfs_logmgr.c:1865 [inline] lmLogShutdown+0x349/0x6e0 fs/jfs/jfs_logmgr.c:1684 lmLogClose+0x58a/0x720 fs/jfs/jfs_logmgr.c:1460 jfs_umount+0x2ef/0x430 fs/jfs/jfs_umount.c:114 jfs_put_super+0x85/0x1d0 fs/jfs/super.c:194 generic_shutdown_super+0x158/0x480 fs/super.c:500 kill_block_super+0x9b/0xf0 fs/super.c:1407 deactivate_locked_super+0x98/0x160 fs/super.c:331 deactivate_super+0xb1/0xd0 fs/super.c:362 cleanup_mnt+0x2ae/0x3d0 fs/namespace.c:1177 task_work_run+0x16f/0x270 kernel/task_work.c:179 resume_user_mode_work include/linux/resume_user_mode.h:49 [inline] exit_to_user_mode_loop kernel/entry/common.c:171 [inline] exit_to_user_mode_prepare+0x210/0x240 kernel/entry/common.c:204 __syscall_exit_to_user_mode_work kernel/entry/common.c:286 [inline] syscall_exit_to_user_mode+0x1d/0x50 kernel/entry/common.c:297 do_syscall_64+0x46/0xb0 arch/x86/entry/common.c:86 entry_SYSCALL_64_after_hwframe+0x63/0xcd Last potentially related work creation: kasan_save_stack+0x22/0x40 mm/kasan/common.c:45 __kasan_record_aux_stack+0xbc/0xd0 mm/kasan/generic.c:491 insert_work+0x48/0x350 kernel/workqueue.c:1361 __queue_work+0x625/0x1120 kernel/workqueue.c:1524 queue_work_on+0xf2/0x110 kernel/workqueue.c:1552 queue_work include/linux/workqueue.h:504 [inline] netdevice_queue_work drivers/infiniband/core/roce_gid_mgmt.c:659 [inline] netdevice_event+0x5e9/0x8f0 drivers/infiniband/core/roce_gid_mgmt.c:802 notifier_call_chain+0xb5/0x200 kernel/notifier.c:87 call_netdevice_notifiers_info+0xb5/0x130 net/core/dev.c:1937 __netdev_upper_dev_unlink+0x138/0x400 net/core/dev.c:7735 netdev_upper_dev_unlink+0x80/0xb0 net/core/dev.c:7762 del_nbp+0x72f/0xd40 net/bridge/br_if.c:362 br_del_if+0xea/0x270 net/bridge/br_if.c:738 do_set_master+0xe1/0x220 net/core/rtnetlink.c:2609 do_setlink+0x89e/0x3d30 net/core/rtnetlink.c:2826 __rtnl_newlink+0xd69/0x1840 net/core/rtnetlink.c:3623 rtnl_newlink+0x68/0xa0 net/core/rtnetlink.c:3670 rtnetlink_rcv_msg+0x43d/0xd50 net/core/rtnetlink.c:6181 netlink_rcv_skb+0x165/0x440 net/netlink/af_netlink.c:2577 netlink_unicast_kernel net/netlink/af_netlink.c:1339 [inline] netlink_unicast+0x547/0x7f0 net/netlink/af_netlink.c:1365 netlink_sendmsg+0x925/0xe30 net/netlink/af_netlink.c:1942 sock_sendmsg_nosec net/socket.c:724 [inline] sock_sendmsg+0xde/0x190 net/socket.c:747 ____sys_sendmsg+0x71c/0x900 net/socket.c:2501 ___sys_sendmsg+0x110/0x1b0 net/socket.c:2555 __sys_sendmsg+0xf7/0x1c0 net/socket.c:2584 do_syscall_x64 arch/x86/entry/common.c:50 [inline] do_syscall_64+0x39/0xb0 arch/x86/entry/common.c:80 entry_SYSCALL_64_after_hwframe+0x63/0xcd Second to last potentially related work creation: kasan_save_stack+0x22/0x40 mm/kasan/common.c:45 __kasan_record_aux_stack+0xbc/0xd0 mm/kasan/generic.c:491 insert_work+0x48/0x350 kernel/workqueue.c:1361 __queue_work+0x625/0x1120 kernel/workqueue.c:1524 queue_work_on+0xf2/0x110 kernel/workqueue.c:1552 queue_work include/linux/workqueue.h:504 [inline] netdevice_queue_work drivers/infiniband/core/roce_gid_mgmt.c:659 [inline] netdevice_event+0x5e9/0x8f0 drivers/infiniband/core/roce_gid_mgmt.c:802 notifier_call_chain+0xb5/0x200 kernel/notifier.c:87 call_netdevice_notifiers_info+0xb5/0x130 net/core/dev.c:1937 __netdev_upper_dev_link+0x3fd/0x7f0 net/core/dev.c:7639 netdev_upper_dev_link+0x8e/0xc0 net/core/dev.c:7680 ipvlan_link_new+0x50f/0xc20 drivers/net/ipvlan/ipvlan_main.c:618 rtnl_newlink_create net/core/rtnetlink.c:3440 [inline] __rtnl_newlink+0x10c2/0x1840 net/core/rtnetlink.c:3657 rtnl_newlink+0x68/0xa0 net/core/rtnetlink.c:3670 rtnetlink_rcv_msg+0x43d/0xd50 net/core/rtnetlink.c:6181 netlink_rcv_skb+0x165/0x440 net/netlink/af_netlink.c:2577 netlink_unicast_kernel net/netlink/af_netlink.c:1339 [inline] netlink_unicast+0x547/0x7f0 net/netlink/af_netlink.c:1365 netlink_sendmsg+0x925/0xe30 net/netlink/af_netlink.c:1942 sock_sendmsg_nosec net/socket.c:724 [inline] sock_sendmsg+0xde/0x190 net/socket.c:747 __sys_sendto+0x23a/0x340 net/socket.c:2142 __do_sys_sendto net/socket.c:2154 [inline] __se_sys_sendto net/socket.c:2150 [inline] __x64_sys_sendto+0xe1/0x1b0 net/socket.c:2150 do_syscall_x64 arch/x86/entry/common.c:50 [inline] do_syscall_64+0x39/0xb0 arch/x86/entry/common.c:80 entry_SYSCALL_64_after_hwframe+0x63/0xcd The buggy address belongs to the object at ffff88802b8c7800 which belongs to the cache kmalloc-192 of size 192 The buggy address is located 8 bytes inside of freed 192-byte region [ffff88802b8c7800, ffff88802b8c78c0) The buggy address belongs to the physical page: page:ffffea0000ae31c0 refcount:1 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x2b8c7 flags: 0xfff00000000200(slab|node=0|zone=1|lastcpupid=0x7ff) raw: 00fff00000000200 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 8352097430, free_ts 0 prep_new_page mm/page_alloc.c:2553 [inline] get_page_from_freelist+0x1190/0x2e20 mm/page_alloc.c:4326 __alloc_pages+0x1cb/0x4a0 mm/page_alloc.c:5592 alloc_page_interleave+0x1e/0x200 mm/mempolicy.c:2110 alloc_pages+0x233/0x270 mm/mempolicy.c:2272 alloc_slab_page mm/slub.c:1851 [inline] allocate_slab+0x25f/0x390 mm/slub.c:1998 new_slab mm/slub.c:2051 [inline] ___slab_alloc+0xa91/0x1400 mm/slub.c:3193 __slab_alloc.constprop.0+0x56/0xa0 mm/slub.c:3292 __slab_alloc_node mm/slub.c:3345 [inline] slab_alloc_node mm/slub.c:3442 [inline] __kmem_cache_alloc_node+0x136/0x320 mm/slub.c:3491 kmalloc_trace+0x26/0xe0 mm/slab_common.c:1061 kmalloc include/linux/slab.h:580 [inline] kzalloc include/linux/slab.h:720 [inline] call_usermodehelper_setup+0x9c/0x340 kernel/umh.c:363 kobject_uevent_env+0xedd/0x16c0 lib/kobject_uevent.c:614 kernel_add_sysfs_param kernel/params.c:817 [inline] param_sysfs_builtin kernel/params.c:852 [inline] param_sysfs_builtin_init+0x21d/0x460 kernel/params.c:986 do_one_initcall+0x102/0x540 init/main.c:1310 do_initcall_level init/main.c:1383 [inline] do_initcalls init/main.c:1399 [inline] do_basic_setup init/main.c:1418 [inline] kernel_init_freeable+0x696/0xc00 init/main.c:1638 kernel_init+0x1e/0x2c0 init/main.c:1526 ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:308 page_owner free stack trace missing Memory state around the buggy address: ffff88802b8c7700: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ffff88802b8c7780: fb fb fb fb fb fb fb fb fc fc fc fc fc fc fc fc >ffff88802b8c7800: fa fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ^ ffff88802b8c7880: fb fb fb fb fb fb fb fb fc fc fc fc fc fc fc fc ffff88802b8c7900: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ==================================================================