================================================================== 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 ffff888020793c98 by task syz-executor.3/11023 CPU: 2 PID: 11023 Comm: syz-executor.3 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/0x2c6 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_sq_offload_create fs/io_uring.c:7930 [inline] io_uring_create fs/io_uring.c:9486 [inline] io_uring_setup+0x1dcb/0x2be0 fs/io_uring.c:9571 do_syscall_64+0x2d/0x70 arch/x86/entry/common.c:46 entry_SYSCALL_64_after_hwframe+0x44/0xae RIP: 0033:0x466459 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 bc ff ff ff f7 d8 64 89 01 48 RSP: 002b:00007fd28c773108 EFLAGS: 00000202 ORIG_RAX: 00000000000001a9 RAX: ffffffffffffffda RBX: 000000000056bf60 RCX: 0000000000466459 RDX: 0000000020ffc000 RSI: 00000000200001c0 RDI: 000000000000359d RBP: 00000000200001c0 R08: 0000000020000280 R09: 0000000020000280 R10: 0000000020000240 R11: 0000000000000202 R12: 0000000020000280 R13: 0000000020ffc000 R14: 0000000020000240 R15: 0000000020ffc000 Allocated by task 11023: 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+0x96/0xc0 mm/kasan/common.c:515 kasan_kmalloc include/linux/kasan.h:233 [inline] kmem_cache_alloc_trace+0x1ef/0x430 mm/slab.c:3570 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_sq_offload_create fs/io_uring.c:7930 [inline] io_uring_create fs/io_uring.c:9486 [inline] io_uring_setup+0x1dcb/0x2be0 fs/io_uring.c:9571 do_syscall_64+0x2d/0x70 arch/x86/entry/common.c:46 entry_SYSCALL_64_after_hwframe+0x44/0xae Freed by task 11023: 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+0xc7/0x100 mm/kasan/common.c:367 kasan_slab_free include/linux/kasan.h:199 [inline] __cache_free mm/slab.c:3440 [inline] kfree+0x104/0x2a0 mm/slab.c:3796 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_sq_offload_create fs/io_uring.c:7930 [inline] io_uring_create fs/io_uring.c:9486 [inline] io_uring_setup+0x1dcb/0x2be0 fs/io_uring.c:9571 do_syscall_64+0x2d/0x70 arch/x86/entry/common.c:46 entry_SYSCALL_64_after_hwframe+0x44/0xae Last potentially related work creation: kasan_save_stack+0x1b/0x40 mm/kasan/common.c:38 kasan_record_aux_stack+0xa4/0xd0 mm/kasan/generic.c:345 __call_rcu kernel/rcu/tree.c:3039 [inline] call_rcu+0xb1/0x700 kernel/rcu/tree.c:3114 neigh_parms_release net/core/neighbour.c:1662 [inline] neigh_parms_release+0x1e3/0x260 net/core/neighbour.c:1652 addrconf_ifdown.isra.0+0xfe9/0x15b0 net/ipv6/addrconf.c:3850 addrconf_notify+0x55c/0x23e0 net/ipv6/addrconf.c:3631 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] unregister_netdevice_many+0x942/0x1760 net/core/dev.c:10905 default_device_exit_batch+0x2fa/0x3c0 net/core/dev.c:11425 ops_exit_list+0x10d/0x160 net/core/net_namespace.c:178 cleanup_net+0x4ea/0xb10 net/core/net_namespace.c:595 process_one_work+0x98d/0x1600 kernel/workqueue.c:2275 worker_thread+0x64c/0x1120 kernel/workqueue.c:2421 kthread+0x3b1/0x4a0 kernel/kthread.c:292 ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:294 Second to last potentially related work creation: kasan_save_stack+0x1b/0x40 mm/kasan/common.c:38 kasan_record_aux_stack+0xa4/0xd0 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 udc_bind_to_driver+0x3c1/0x760 drivers/usb/gadget/udc/core.c:1447 usb_gadget_probe_driver+0x31f/0x3f0 drivers/usb/gadget/udc/core.c:1500 raw_ioctl_run drivers/usb/gadget/legacy/raw_gadget.c:513 [inline] raw_ioctl+0x1878/0x2720 drivers/usb/gadget/legacy/raw_gadget.c:1214 vfs_ioctl fs/ioctl.c:48 [inline] __do_sys_ioctl fs/ioctl.c:753 [inline] __se_sys_ioctl fs/ioctl.c:739 [inline] __x64_sys_ioctl+0x193/0x200 fs/ioctl.c:739 do_syscall_64+0x2d/0x70 arch/x86/entry/common.c:46 entry_SYSCALL_64_after_hwframe+0x44/0xae The buggy address belongs to the object at ffff888020793c00 which belongs to the cache kmalloc-192 of size 192 The buggy address is located 152 bytes inside of 192-byte region [ffff888020793c00, ffff888020793cc0) The buggy address belongs to the page: page:00000000a92c6042 refcount:1 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x20793 flags: 0xfff00000000200(slab) raw: 00fff00000000200 ffffea00005303c8 ffffea0000786348 ffff888010840000 raw: 0000000000000000 ffff888020793000 0000000100000010 0000000000000000 page dumped because: kasan: bad access detected Memory state around the buggy address: ffff888020793b80: fb fb fb fb fb fb fb fb fc fc fc fc fc fc fc fc ffff888020793c00: fa fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb >ffff888020793c80: fb fb fb fb fb fb fb fb fc fc fc fc fc fc fc fc ^ ffff888020793d00: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ffff888020793d80: fb fb fb fb fb fb fb fb fc fc fc fc fc fc fc fc ==================================================================