================================================================== BUG: KASAN: slab-use-after-free in irq_can_move_pcntxt kernel/irq/internals.h:328 [inline] BUG: KASAN: slab-use-after-free in migrate_one_irq kernel/irq/cpuhotplug.c:57 [inline] BUG: KASAN: slab-use-after-free in irq_migrate_all_off_this_cpu+0xaaf/0xc30 kernel/irq/cpuhotplug.c:181 Read of size 8 at addr ffff8880618ea9a8 by task migration/3/32 CPU: 3 UID: 0 PID: 32 Comm: migration/3 Not tainted syzkaller #0 PREEMPT(full) Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2 04/01/2014 Stopper: multi_cpu_stop+0x0/0x4b0 kernel/stop_machine.c:199 <- __stop_cpus.constprop.0+0xb1/0x140 Call Trace: __dump_stack lib/dump_stack.c:94 [inline] dump_stack_lvl+0x100/0x190 lib/dump_stack.c:120 print_address_description mm/kasan/report.c:378 [inline] print_report+0x13d/0x4b0 mm/kasan/report.c:482 kasan_report+0xdf/0x1c0 mm/kasan/report.c:595 irq_can_move_pcntxt kernel/irq/internals.h:328 [inline] migrate_one_irq kernel/irq/cpuhotplug.c:57 [inline] irq_migrate_all_off_this_cpu+0xaaf/0xc30 kernel/irq/cpuhotplug.c:181 fixup_irqs+0x2b/0x280 arch/x86/kernel/irq.c:474 cpu_disable_common arch/x86/kernel/smpboot.c:1371 [inline] native_cpu_disable+0x59/0x80 arch/x86/kernel/smpboot.c:1383 __cpu_disable arch/x86/include/asm/smp.h:73 [inline] take_cpu_down+0xb6/0x190 kernel/cpu.c:1282 multi_cpu_stop+0x16a/0x4b0 kernel/stop_machine.c:239 cpu_stopper_thread+0x21e/0x450 kernel/stop_machine.c:510 smpboot_thread_fn+0x3d3/0xab0 kernel/smpboot.c:160 kthread+0x373/0x450 kernel/kthread.c:436 ret_from_fork+0x730/0xd60 arch/x86/kernel/process.c:158 ret_from_fork_asm+0x1a/0x30 arch/x86/entry/entry_64.S:245 Allocated by task 20131: kasan_save_stack+0x30/0x50 mm/kasan/common.c:57 kasan_save_track+0x14/0x30 mm/kasan/common.c:78 poison_kmalloc_redzone mm/kasan/common.c:398 [inline] __kasan_kmalloc+0xaa/0xb0 mm/kasan/common.c:415 kasan_kmalloc include/linux/kasan.h:263 [inline] __kmalloc_cache_noprof+0x2e7/0x6b0 mm/slub.c:5484 _kmalloc_noprof include/linux/slab.h:988 [inline] _kzalloc_noprof include/linux/slab.h:1309 [inline] sctp_transport_new+0xa4/0x760 net/sctp/transport.c:95 sctp_assoc_add_peer+0x34b/0x1550 net/sctp/associola.c:627 sctp_process_param net/sctp/sm_make_chunk.c:2571 [inline] sctp_process_init+0x2845/0x2e90 net/sctp/sm_make_chunk.c:2391 sctp_cmd_process_init net/sctp/sm_sideeffect.c:712 [inline] sctp_cmd_interpreter net/sctp/sm_sideeffect.c:1399 [inline] sctp_side_effects net/sctp/sm_sideeffect.c:1204 [inline] sctp_do_sm+0x3c60/0x5c90 net/sctp/sm_sideeffect.c:1175 sctp_assoc_bh_rcv+0x392/0x740 net/sctp/associola.c:1048 sctp_inq_push+0x1db/0x280 net/sctp/inqueue.c:88 sctp_backlog_rcv+0x169/0x590 net/sctp/input.c:331 sk_backlog_rcv include/net/sock.h:1190 [inline] __release_sock+0x3a2/0x440 net/core/sock.c:3260 release_sock+0x1e5/0x280 net/core/sock.c:3859 sctp_wait_for_connect+0x1f3/0x640 net/sctp/socket.c:9419 __sctp_connect+0x9bb/0xc70 net/sctp/socket.c:1248 __sctp_setsockopt_connectx+0x100/0x190 net/sctp/socket.c:1337 sctp_getsockopt_connectx3 net/sctp/socket.c:1422 [inline] sctp_getsockopt+0x3e94/0x7090 net/sctp/socket.c:8200 do_sock_getsockopt+0x50a/0x6e0 net/socket.c:2503 __sys_getsockopt+0x133/0x1d0 net/socket.c:2534 __do_sys_getsockopt net/socket.c:2541 [inline] __se_sys_getsockopt net/socket.c:2538 [inline] __ia32_sys_getsockopt+0xbc/0x160 net/socket.c:2538 do_syscall_32_irqs_on arch/x86/entry/syscall_32.c:79 [inline] __do_fast_syscall_32+0x13a/0x8b0 arch/x86/entry/syscall_32.c:291 do_fast_syscall_32+0x32/0x70 arch/x86/entry/syscall_32.c:316 entry_SYSENTER_compat_after_hwframe+0x84/0x8e Freed by task 23: kasan_save_stack+0x30/0x50 mm/kasan/common.c:57 kasan_save_track+0x14/0x30 mm/kasan/common.c:78 kasan_save_free_info+0x3b/0x70 mm/kasan/generic.c:584 poison_slab_object mm/kasan/common.c:253 [inline] __kasan_slab_free+0x5f/0x80 mm/kasan/common.c:285 kasan_slab_free include/linux/kasan.h:235 [inline] slab_free_hook mm/slub.c:2678 [inline] slab_free mm/slub.c:6372 [inline] kfree+0x22b/0x6c0 mm/slub.c:6687 rcu_do_batch kernel/rcu/tree.c:2650 [inline] rcu_core+0x5f0/0x1260 kernel/rcu/tree.c:2919 handle_softirqs+0x1e6/0x9d0 kernel/softirq.c:645 run_ksoftirqd kernel/softirq.c:1108 [inline] run_ksoftirqd+0x38/0x60 kernel/softirq.c:1100 smpboot_thread_fn+0x3d3/0xab0 kernel/smpboot.c:160 kthread+0x373/0x450 kernel/kthread.c:436 ret_from_fork+0x730/0xd60 arch/x86/kernel/process.c:158 ret_from_fork_asm+0x1a/0x30 arch/x86/entry/entry_64.S:245 Last potentially related work creation: kasan_save_stack+0x30/0x50 mm/kasan/common.c:57 kasan_record_aux_stack+0xa7/0xc0 mm/kasan/generic.c:556 __call_rcu_common.constprop.0+0xa5/0x9b0 kernel/rcu/tree.c:3181 sctp_transport_destroy net/sctp/transport.c:164 [inline] sctp_transport_put+0x114/0x180 net/sctp/transport.c:477 sctp_association_free+0x4d3/0x7d0 net/sctp/associola.c:380 sctp_cmd_delete_tcb net/sctp/sm_sideeffect.c:950 [inline] sctp_cmd_interpreter net/sctp/sm_sideeffect.c:1340 [inline] sctp_side_effects net/sctp/sm_sideeffect.c:1204 [inline] sctp_do_sm+0x15b5/0x5c90 net/sctp/sm_sideeffect.c:1175 sctp_assoc_bh_rcv+0x392/0x740 net/sctp/associola.c:1048 sctp_inq_push+0x1db/0x280 net/sctp/inqueue.c:88 sctp_backlog_rcv+0x169/0x590 net/sctp/input.c:331 sk_backlog_rcv include/net/sock.h:1190 [inline] __release_sock+0x3a2/0x440 net/core/sock.c:3260 release_sock+0x1e5/0x280 net/core/sock.c:3859 sctp_close+0x469/0x980 net/sctp/socket.c:1537 inet_release+0xed/0x200 net/ipv4/af_inet.c:442 inet6_release+0x4f/0x70 net/ipv6/af_inet6.c:472 __sock_release+0xb3/0x260 net/socket.c:735 sock_close+0x1c/0x30 net/socket.c:1526 __fput+0x3ff/0xb50 fs/file_table.c:512 task_work_run+0x150/0x240 kernel/task_work.c:233 resume_user_mode_work include/linux/resume_user_mode.h:50 [inline] __exit_to_user_mode_loop kernel/entry/common.c:70 [inline] exit_to_user_mode_loop+0x1d8/0x700 kernel/entry/common.c:101 __exit_to_user_mode_prepare include/linux/irq-entry-common.h:207 [inline] syscall_exit_to_user_mode_prepare include/linux/irq-entry-common.h:230 [inline] syscall_exit_to_user_mode include/linux/entry-common.h:336 [inline] __do_fast_syscall_32+0x59f/0x8b0 arch/x86/entry/syscall_32.c:294 do_fast_syscall_32+0x32/0x70 arch/x86/entry/syscall_32.c:316 entry_SYSENTER_compat_after_hwframe+0x84/0x8e The buggy address belongs to the object at ffff8880618ea800 which belongs to the cache kmalloc-1k of size 1024 The buggy address is located 424 bytes inside of freed 1024-byte region [ffff8880618ea800, ffff8880618eac00) The buggy address belongs to the physical page: page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x618e8 head: order:3 mapcount:0 entire_mapcount:0 nr_pages_mapped:0 pincount:0 flags: 0x4fff00000000040(head|node=1|zone=1|lastcpupid=0x7ff) page_type: f5(slab) raw: 04fff00000000040 ffff88801c042dc0 dead000000000100 dead000000000122 raw: 0000000000000000 0000000800100010 00000000f5000000 0000000000000000 head: 04fff00000000040 ffff88801c042dc0 dead000000000100 dead000000000122 head: 0000000000000000 0000000800100010 00000000f5000000 0000000000000000 head: 04fff00000000003 fffffffffffffe01 00000000ffffffff 00000000ffffffff head: ffffffffffffffff 0000000000000000 00000000ffffffff 0000000000000008 page dumped because: kasan: bad access detected page_owner tracks the page as allocated page last allocated via order 3, migratetype Unmovable, gfp_mask 0x1d20c0(__GFP_IO|__GFP_FS|__GFP_NOWARN|__GFP_NORETRY|__GFP_COMP|__GFP_NOMEMALLOC|__GFP_HARDWALL), pid 14850, tgid 14849 (syz.4.2731), ts 457010784297 set_page_owner include/linux/page_owner.h:33 [inline] post_alloc_hook+0xfd/0x120 mm/page_alloc.c:1871 prep_new_page mm/page_alloc.c:1879 [inline] get_page_from_freelist+0x110d/0x35b0 mm/page_alloc.c:3943 __alloc_frozen_pages_noprof+0x2eb/0x3300 mm/page_alloc.c:5436 alloc_slab_page mm/slub.c:3267 [inline] allocate_slab mm/slub.c:3382 [inline] new_slab+0xa5/0x640 mm/slub.c:3428 refill_objects+0xe3/0x410 mm/slub.c:7305 refill_sheaf mm/slub.c:2805 [inline] __pcs_replace_empty_main+0x372/0x680 mm/slub.c:4677 alloc_from_pcs mm/slub.c:4775 [inline] slab_alloc_node mm/slub.c:4907 [inline] __do_kmalloc_node mm/slub.c:5336 [inline] __kvmalloc_node_noprof+0x791/0x970 mm/slub.c:6900 _kvmalloc_array_node_noprof include/linux/slab.h:1371 [inline] io_alloc_cache_init+0x38/0x170 io_uring/alloc_cache.c:25 io_rsrc_cache_init+0x26/0x50 io_uring/rsrc.c:249 io_ring_ctx_alloc io_uring/io_uring.c:270 [inline] io_uring_create io_uring/io_uring.c:2976 [inline] io_uring_setup.cold+0x4c0/0x1c5e io_uring/io_uring.c:3111 __do_sys_io_uring_setup io_uring/io_uring.c:3145 [inline] __se_sys_io_uring_setup io_uring/io_uring.c:3136 [inline] __ia32_sys_io_uring_setup+0xc2/0x170 io_uring/io_uring.c:3136 do_syscall_32_irqs_on arch/x86/entry/syscall_32.c:79 [inline] __do_fast_syscall_32+0x13a/0x8b0 arch/x86/entry/syscall_32.c:291 do_fast_syscall_32+0x32/0x70 arch/x86/entry/syscall_32.c:316 entry_SYSENTER_compat_after_hwframe+0x84/0x8e page last free pid 5698 tgid 5698 ts 456898305856 stack trace: reset_page_owner include/linux/page_owner.h:26 [inline] __free_pages_prepare mm/page_alloc.c:1418 [inline] __free_frozen_pages+0x79f/0x10f0 mm/page_alloc.c:2962 __folio_put+0x3b4/0x5f0 mm/folio.c:105 folio_put include/linux/mm.h:2160 [inline] put_page include/linux/mm.h:2229 [inline] put_netmem include/net/netmem.h:394 [inline] skb_page_unref include/linux/skbuff_ref.h:43 [inline] __skb_frag_unref include/linux/skbuff_ref.h:56 [inline] skb_release_data+0x649/0x8e0 net/core/skbuff.c:1116 skb_release_all net/core/skbuff.c:1197 [inline] __kfree_skb net/core/skbuff.c:1211 [inline] napi_consume_skb+0x2c0/0x320 net/core/skbuff.c:1542 skb_defer_free_flush+0x1f1/0x290 net/core/dev.c:6920 net_rx_action+0x3ca/0xf20 net/core/dev.c:7988 handle_softirqs+0x1e6/0x9d0 kernel/softirq.c:645 do_softirq kernel/softirq.c:546 [inline] do_softirq+0xaf/0xf0 kernel/softirq.c:533 __local_bh_enable_ip+0xff/0x120 kernel/softirq.c:473 local_bh_enable include/linux/bottom_half.h:33 [inline] rcu_read_unlock_bh include/linux/rcupdate.h:923 [inline] __dev_queue_xmit+0xa27/0x4970 net/core/dev.c:4961 dev_queue_xmit include/linux/netdevice.h:3461 [inline] neigh_hh_output include/net/neighbour.h:544 [inline] neigh_output include/net/neighbour.h:558 [inline] ip_finish_output2+0xf4a/0x2400 net/ipv4/ip_output.c:236 __ip_finish_output.part.0+0x444/0x6f0 net/ipv4/ip_output.c:314 __ip_finish_output net/ipv4/ip_output.c:302 [inline] ip_finish_output net/ipv4/ip_output.c:324 [inline] NF_HOOK_COND include/linux/netfilter.h:314 [inline] ip_output+0x39b/0xc10 net/ipv4/ip_output.c:437 dst_output include/net/dst.h:470 [inline] ip_local_out+0x193/0x1f0 net/ipv4/ip_output.c:131 __ip_queue_xmit+0x885/0x1f40 net/ipv4/ip_output.c:533 __tcp_transmit_skb+0x3506/0x4f20 net/ipv4/tcp_output.c:1716 Memory state around the buggy address: ffff8880618ea880: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ffff8880618ea900: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb >ffff8880618ea980: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ^ ffff8880618eaa00: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ffff8880618eaa80: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ==================================================================