================================================================== BUG: KASAN: use-after-free in __hlist_del include/linux/list.h:835 [inline] BUG: KASAN: use-after-free in hlist_del include/linux/list.h:852 [inline] BUG: KASAN: use-after-free in __cpuhp_state_remove_instance+0x58b/0x5b0 kernel/cpu.c:2002 Read of size 8 at addr ffff8880135b5b98 by task syz-executor.1/10895 CPU: 3 PID: 10895 Comm: syz-executor.1 Not tainted 5.12.0-rc1-syzkaller #0 Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.14.0-2 04/01/2014 Call Trace: __dump_stack lib/dump_stack.c:79 [inline] dump_stack+0xfa/0x151 lib/dump_stack.c:120 print_address_description.constprop.0.cold+0x5b/0x2f8 mm/kasan/report.c:232 __kasan_report mm/kasan/report.c:399 [inline] kasan_report.cold+0x7c/0xd8 mm/kasan/report.c:416 __hlist_del include/linux/list.h:835 [inline] hlist_del include/linux/list.h:852 [inline] __cpuhp_state_remove_instance+0x58b/0x5b0 kernel/cpu.c:2002 cpuhp_state_remove_instance_nocalls include/linux/cpuhotplug.h:407 [inline] io_wq_create+0x6ca/0xbf0 fs/io-wq.c:1056 io_init_wq_offload fs/io_uring.c:7792 [inline] io_uring_alloc_task_context+0x1bf/0x6a0 fs/io_uring.c:7811 io_uring_add_task_file+0x261/0x350 fs/io_uring.c:8773 io_uring_install_fd fs/io_uring.c:9381 [inline] io_uring_create fs/io_uring.c:9532 [inline] io_uring_setup+0x14c7/0x2be0 fs/io_uring.c:9571 do_syscall_32_irqs_on arch/x86/entry/common.c:77 [inline] __do_fast_syscall_32+0x56/0x80 arch/x86/entry/common.c:139 do_fast_syscall_32+0x2f/0x70 arch/x86/entry/common.c:164 entry_SYSENTER_compat_after_hwframe+0x4d/0x5c RIP: 0023:0xf7f32549 Code: 03 74 c0 01 10 05 03 74 b8 01 10 06 03 74 b4 01 10 07 03 74 b0 01 10 08 03 74 d8 01 00 00 00 00 00 51 52 55 89 e5 0f 34 cd 80 <5d> 5a 59 c3 90 90 90 90 8d b4 26 00 00 00 00 8d b4 26 00 00 00 00 RSP: 002b:00000000f550b5ac EFLAGS: 00000282 ORIG_RAX: 00000000000001a9 RAX: ffffffffffffffda RBX: 000000000000768c RCX: 00000000200077c0 RDX: 00000000f550b670 RSI: 000000000816c000 RDI: 0000000020ffb000 RBP: 0000000020007880 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000000 R12: 0000000000000000 R13: 0000000000000000 R14: 0000000000000000 R15: 0000000000000000 Allocated by task 10895: kasan_save_stack+0x1b/0x40 mm/kasan/common.c:38 kasan_set_track mm/kasan/common.c:46 [inline] set_alloc_info mm/kasan/common.c:427 [inline] ____kasan_kmalloc mm/kasan/common.c:506 [inline] ____kasan_kmalloc mm/kasan/common.c:465 [inline] __kasan_kmalloc+0x99/0xc0 mm/kasan/common.c:515 kmalloc include/linux/slab.h:554 [inline] kzalloc include/linux/slab.h:684 [inline] io_wq_create+0xc0/0xbf0 fs/io-wq.c:1002 io_init_wq_offload fs/io_uring.c:7792 [inline] io_uring_alloc_task_context+0x1bf/0x6a0 fs/io_uring.c:7811 io_uring_add_task_file+0x261/0x350 fs/io_uring.c:8773 io_uring_install_fd fs/io_uring.c:9381 [inline] io_uring_create fs/io_uring.c:9532 [inline] io_uring_setup+0x14c7/0x2be0 fs/io_uring.c:9571 do_syscall_32_irqs_on arch/x86/entry/common.c:77 [inline] __do_fast_syscall_32+0x56/0x80 arch/x86/entry/common.c:139 do_fast_syscall_32+0x2f/0x70 arch/x86/entry/common.c:164 entry_SYSENTER_compat_after_hwframe+0x4d/0x5c Freed by task 10895: kasan_save_stack+0x1b/0x40 mm/kasan/common.c:38 kasan_set_track+0x1c/0x30 mm/kasan/common.c:46 kasan_set_free_info+0x20/0x30 mm/kasan/generic.c:357 ____kasan_slab_free mm/kasan/common.c:360 [inline] ____kasan_slab_free mm/kasan/common.c:325 [inline] __kasan_slab_free+0xf5/0x130 mm/kasan/common.c:367 kasan_slab_free include/linux/kasan.h:199 [inline] slab_free_hook mm/slub.c:1562 [inline] slab_free_freelist_hook+0x72/0x1b0 mm/slub.c:1600 slab_free mm/slub.c:3161 [inline] kfree+0xe5/0x7b0 mm/slub.c:4213 io_wq_destroy fs/io-wq.c:1091 [inline] io_wq_put+0x4d0/0x6d0 fs/io-wq.c:1098 io_wq_create+0x92d/0xbf0 fs/io-wq.c:1053 io_init_wq_offload fs/io_uring.c:7792 [inline] io_uring_alloc_task_context+0x1bf/0x6a0 fs/io_uring.c:7811 io_uring_add_task_file+0x261/0x350 fs/io_uring.c:8773 io_uring_install_fd fs/io_uring.c:9381 [inline] io_uring_create fs/io_uring.c:9532 [inline] io_uring_setup+0x14c7/0x2be0 fs/io_uring.c:9571 do_syscall_32_irqs_on arch/x86/entry/common.c:77 [inline] __do_fast_syscall_32+0x56/0x80 arch/x86/entry/common.c:139 do_fast_syscall_32+0x2f/0x70 arch/x86/entry/common.c:164 entry_SYSENTER_compat_after_hwframe+0x4d/0x5c Last potentially related work creation: kasan_save_stack+0x1b/0x40 mm/kasan/common.c:38 kasan_record_aux_stack+0xe5/0x110 mm/kasan/generic.c:345 insert_work+0x48/0x370 kernel/workqueue.c:1331 __queue_work+0x5c1/0xf00 kernel/workqueue.c:1497 queue_work_on+0xae/0xc0 kernel/workqueue.c:1524 queue_work include/linux/workqueue.h:507 [inline] netdevice_queue_work drivers/infiniband/core/roce_gid_mgmt.c:658 [inline] netdevice_event+0x3aa/0x720 drivers/infiniband/core/roce_gid_mgmt.c:801 notifier_call_chain+0xb5/0x200 kernel/notifier.c:83 call_netdevice_notifiers_info+0xb5/0x130 net/core/dev.c:2063 call_netdevice_notifiers_extack net/core/dev.c:2075 [inline] call_netdevice_notifiers net/core/dev.c:2089 [inline] __dev_notify_flags+0x110/0x2b0 net/core/dev.c:8695 dev_change_flags+0x112/0x170 net/core/dev.c:8733 do_setlink+0x89a/0x3a70 net/core/rtnetlink.c:2708 __rtnl_newlink+0xdc6/0x1710 net/core/rtnetlink.c:3376 rtnl_newlink+0x64/0xa0 net/core/rtnetlink.c:3491 rtnetlink_rcv_msg+0x44e/0xad0 net/core/rtnetlink.c:5553 netlink_rcv_skb+0x153/0x420 net/netlink/af_netlink.c:2502 netlink_unicast_kernel net/netlink/af_netlink.c:1312 [inline] netlink_unicast+0x533/0x7d0 net/netlink/af_netlink.c:1338 netlink_sendmsg+0x856/0xd90 net/netlink/af_netlink.c:1927 sock_sendmsg_nosec net/socket.c:654 [inline] sock_sendmsg+0xcf/0x120 net/socket.c:674 __sys_sendto+0x21c/0x320 net/socket.c:1977 __do_compat_sys_socketcall+0x47f/0x660 net/compat.c:476 do_syscall_32_irqs_on arch/x86/entry/common.c:77 [inline] __do_fast_syscall_32+0x56/0x80 arch/x86/entry/common.c:139 do_fast_syscall_32+0x2f/0x70 arch/x86/entry/common.c:164 entry_SYSENTER_compat_after_hwframe+0x4d/0x5c Second to last potentially related work creation: kasan_save_stack+0x1b/0x40 mm/kasan/common.c:38 kasan_record_aux_stack+0xe5/0x110 mm/kasan/generic.c:345 insert_work+0x48/0x370 kernel/workqueue.c:1331 __queue_work+0x5c1/0xf00 kernel/workqueue.c:1497 queue_work_on+0xae/0xc0 kernel/workqueue.c:1524 queue_work include/linux/workqueue.h:507 [inline] call_usermodehelper_exec+0x1f0/0x4c0 kernel/umh.c:433 kobject_uevent_env+0xf9f/0x1680 lib/kobject_uevent.c:617 rx_queue_add_kobject net/core/net-sysfs.c:1020 [inline] net_rx_queue_update_kobjects+0xee/0x450 net/core/net-sysfs.c:1060 register_queue_kobjects net/core/net-sysfs.c:1742 [inline] netdev_register_kobject+0x275/0x430 net/core/net-sysfs.c:1990 register_netdevice+0xd33/0x14a0 net/core/dev.c:10178 veth_newlink+0x401/0xa00 drivers/net/veth.c:1385 __rtnl_newlink+0x1059/0x1710 net/core/rtnetlink.c:3443 rtnl_newlink+0x64/0xa0 net/core/rtnetlink.c:3491 rtnetlink_rcv_msg+0x44e/0xad0 net/core/rtnetlink.c:5553 netlink_rcv_skb+0x153/0x420 net/netlink/af_netlink.c:2502 netlink_unicast_kernel net/netlink/af_netlink.c:1312 [inline] netlink_unicast+0x533/0x7d0 net/netlink/af_netlink.c:1338 netlink_sendmsg+0x856/0xd90 net/netlink/af_netlink.c:1927 sock_sendmsg_nosec net/socket.c:654 [inline] sock_sendmsg+0xcf/0x120 net/socket.c:674 __sys_sendto+0x21c/0x320 net/socket.c:1977 __do_compat_sys_socketcall+0x47f/0x660 net/compat.c:476 do_syscall_32_irqs_on arch/x86/entry/common.c:77 [inline] __do_fast_syscall_32+0x56/0x80 arch/x86/entry/common.c:139 do_fast_syscall_32+0x2f/0x70 arch/x86/entry/common.c:164 entry_SYSENTER_compat_after_hwframe+0x4d/0x5c The buggy address belongs to the object at ffff8880135b5b00 which belongs to the cache kmalloc-192 of size 192 The buggy address is located 152 bytes inside of 192-byte region [ffff8880135b5b00, ffff8880135b5bc0) The buggy address belongs to the page: page:000000008d77a240 refcount:1 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x135b5 flags: 0xfff00000000200(slab) raw: 00fff00000000200 dead000000000100 dead000000000122 ffff888010842a00 raw: 0000000000000000 0000000080100010 00000001ffffffff 0000000000000000 page dumped because: kasan: bad access detected Memory state around the buggy address: ffff8880135b5a80: 00 00 00 00 00 00 00 00 fc fc fc fc fc fc fc fc ffff8880135b5b00: fa fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb >ffff8880135b5b80: fb fb fb fb fb fb fb fb fc fc fc fc fc fc fc fc ^ ffff8880135b5c00: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ffff8880135b5c80: 00 00 00 fc fc fc fc fc fc fc fc fc fc fc fc fc ==================================================================