================================================================== 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+0x251/0x360 kernel/cpu.c:2002 Read of size 8 at addr ffff888020cc7e98 by task syz-executor.2/23889 CPU: 0 PID: 23889 Comm: syz-executor.2 Not tainted 5.12.0-rc1-syzkaller #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 Call Trace: __dump_stack lib/dump_stack.c:79 [inline] dump_stack+0x125/0x19e lib/dump_stack.c:120 print_address_description+0x5f/0x3a0 mm/kasan/report.c:232 __kasan_report mm/kasan/report.c:399 [inline] kasan_report+0x15e/0x210 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+0x251/0x360 kernel/cpu.c:2002 cpuhp_state_remove_instance_nocalls include/linux/cpuhotplug.h:407 [inline] io_wq_create+0x86d/0xa10 fs/io-wq.c:1056 io_init_wq_offload fs/io_uring.c:7792 [inline] io_uring_alloc_task_context+0x234/0x520 fs/io_uring.c:7811 io_uring_add_task_file+0x265/0x320 fs/io_uring.c:8773 __do_sys_io_uring_enter fs/io_uring.c:9171 [inline] __se_sys_io_uring_enter+0x19c/0x2080 fs/io_uring.c:9112 do_syscall_64+0x2d/0x70 arch/x86/entry/common.c:46 entry_SYSCALL_64_after_hwframe+0x44/0xae RIP: 0033:0x465f69 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:00007fbbd7153188 EFLAGS: 00000246 ORIG_RAX: 00000000000001aa RAX: ffffffffffffffda RBX: 000000000056c0b0 RCX: 0000000000465f69 RDX: 0000000000000000 RSI: 0000000000000302 RDI: 0000000000000003 RBP: 00000000004bfa67 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 000000000056c0b0 R13: 00007fff8c72bcaf R14: 00007fbbd7153300 R15: 0000000000022000 Allocated by task 23889: kasan_save_stack mm/kasan/common.c:38 [inline] kasan_set_track mm/kasan/common.c:46 [inline] set_alloc_info mm/kasan/common.c:427 [inline] ____kasan_kmalloc+0xc2/0xf0 mm/kasan/common.c:506 kasan_kmalloc include/linux/kasan.h:233 [inline] kmem_cache_alloc_trace+0x21b/0x340 mm/slub.c:2934 kmalloc include/linux/slab.h:554 [inline] kzalloc include/linux/slab.h:684 [inline] io_wq_create+0xb6/0xa10 fs/io-wq.c:1002 io_init_wq_offload fs/io_uring.c:7792 [inline] io_uring_alloc_task_context+0x234/0x520 fs/io_uring.c:7811 io_uring_add_task_file+0x265/0x320 fs/io_uring.c:8773 __do_sys_io_uring_enter fs/io_uring.c:9171 [inline] __se_sys_io_uring_enter+0x19c/0x2080 fs/io_uring.c:9112 do_syscall_64+0x2d/0x70 arch/x86/entry/common.c:46 entry_SYSCALL_64_after_hwframe+0x44/0xae Freed by task 23889: kasan_save_stack mm/kasan/common.c:38 [inline] kasan_set_track+0x3d/0x70 mm/kasan/common.c:46 kasan_set_free_info+0x1f/0x40 mm/kasan/generic.c:357 ____kasan_slab_free+0x100/0x140 mm/kasan/common.c:360 kasan_slab_free include/linux/kasan.h:199 [inline] slab_free_hook mm/slub.c:1562 [inline] slab_free_freelist_hook+0x13a/0x200 mm/slub.c:1600 slab_free mm/slub.c:3161 [inline] kfree+0xcf/0x2b0 mm/slub.c:4213 io_wq_create+0x7dc/0xa10 fs/io-wq.c:1053 io_init_wq_offload fs/io_uring.c:7792 [inline] io_uring_alloc_task_context+0x234/0x520 fs/io_uring.c:7811 io_uring_add_task_file+0x265/0x320 fs/io_uring.c:8773 __do_sys_io_uring_enter fs/io_uring.c:9171 [inline] __se_sys_io_uring_enter+0x19c/0x2080 fs/io_uring.c:9112 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+0x27/0x50 mm/kasan/common.c:38 kasan_record_aux_stack+0xee/0x120 mm/kasan/generic.c:345 insert_work+0x54/0x400 kernel/workqueue.c:1331 __queue_work+0x97f/0xcc0 kernel/workqueue.c:1497 queue_work_on+0xb5/0x100 kernel/workqueue.c:1524 queue_work include/linux/workqueue.h:507 [inline] call_usermodehelper_exec+0x206/0x3d0 kernel/umh.c:433 kobject_uevent_env+0x1349/0x1730 lib/kobject_uevent.c:617 kobject_synth_uevent+0x368/0x8a0 lib/kobject_uevent.c:208 uevent_store+0x20/0x60 drivers/base/core.c:2288 kernfs_fop_write_iter+0x3b6/0x510 fs/kernfs/file.c:296 call_write_iter include/linux/fs.h:1977 [inline] new_sync_write fs/read_write.c:518 [inline] vfs_write+0x896/0xab0 fs/read_write.c:605 ksys_write+0x11b/0x220 fs/read_write.c:658 do_syscall_64+0x2d/0x70 arch/x86/entry/common.c:46 entry_SYSCALL_64_after_hwframe+0x44/0xae Second to last potentially related work creation: kasan_save_stack+0x27/0x50 mm/kasan/common.c:38 kasan_record_aux_stack+0xee/0x120 mm/kasan/generic.c:345 insert_work+0x54/0x400 kernel/workqueue.c:1331 __queue_work+0x97f/0xcc0 kernel/workqueue.c:1497 queue_work_on+0xb5/0x100 kernel/workqueue.c:1524 queue_work include/linux/workqueue.h:507 [inline] call_usermodehelper_exec+0x206/0x3d0 kernel/umh.c:433 kobject_uevent_env+0x1349/0x1730 lib/kobject_uevent.c:617 device_add+0x1022/0x1670 drivers/base/core.c:3223 netdev_register_kobject+0x178/0x310 net/core/net-sysfs.c:1986 register_netdevice+0x122f/0x1b10 net/core/dev.c:10178 register_netdev+0x37/0x50 net/core/dev.c:10302 sit_init_net+0x1f6/0x580 net/ipv6/sit.c:1917 ops_init+0x327/0x410 net/core/net_namespace.c:140 __register_pernet_operations net/core/net_namespace.c:1131 [inline] register_pernet_operations+0x26f/0x740 net/core/net_namespace.c:1208 register_pernet_device+0x2f/0x80 net/core/net_namespace.c:1295 sit_init+0x20/0x167 net/ipv6/sit.c:1975 do_one_initcall+0x12b/0x310 init/main.c:1226 do_initcall_level+0x14a/0x1f5 init/main.c:1299 do_initcalls+0x4b/0x8c init/main.c:1315 kernel_init_freeable+0x2e3/0x406 init/main.c:1537 kernel_init+0xd/0x290 init/main.c:1424 ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:294 The buggy address belongs to the object at ffff888020cc7e00 which belongs to the cache kmalloc-192 of size 192 The buggy address is located 152 bytes inside of 192-byte region [ffff888020cc7e00, ffff888020cc7ec0) The buggy address belongs to the page: page:00000000a81e88ff refcount:1 mapcount:0 mapping:0000000000000000 index:0xffff888020cc7400 pfn:0x20cc7 flags: 0xfff00000000200(slab) raw: 00fff00000000200 ffffea000046e840 0000000900000009 ffff888010841a00 raw: ffff888020cc7400 000000008010000d 00000001ffffffff 0000000000000000 page dumped because: kasan: bad access detected Memory state around the buggy address: ffff888020cc7d80: 00 00 00 00 00 00 00 00 fc fc fc fc fc fc fc fc ffff888020cc7e00: fa fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb >ffff888020cc7e80: fb fb fb fb fb fb fb fb fc fc fc fc fc fc fc fc ^ ffff888020cc7f00: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ffff888020cc7f80: 00 00 00 fc fc fc fc fc fc fc fc fc fc fc fc fc ==================================================================