================================================================== BUG: KASAN: double-free in slab_free mm/slub.c:3539 [inline] BUG: KASAN: double-free in kfree+0xe2/0x580 mm/slub.c:4567 CPU: 1 PID: 7674 Comm: kworker/1:11 Not tainted 6.0.0-syzkaller-02734-g0326074ff465 #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 09/22/2022 Workqueue: events mptcp_worker Call Trace: __dump_stack lib/dump_stack.c:88 [inline] dump_stack_lvl+0xcd/0x134 lib/dump_stack.c:106 print_address_description mm/kasan/report.c:317 [inline] print_report.cold+0x2ba/0x719 mm/kasan/report.c:433 kasan_report_invalid_free+0x81/0x190 mm/kasan/report.c:462 ____kasan_slab_free+0x18b/0x1c0 mm/kasan/common.c:356 kasan_slab_free include/linux/kasan.h:200 [inline] slab_free_hook mm/slub.c:1759 [inline] slab_free_freelist_hook+0x8b/0x1c0 mm/slub.c:1785 slab_free mm/slub.c:3539 [inline] kfree+0xe2/0x580 mm/slub.c:4567 tcp_disconnect+0x980/0x1e20 net/ipv4/tcp.c:3145 __mptcp_close_ssk+0x5ca/0x7e0 net/mptcp/protocol.c:2327 mptcp_do_fastclose net/mptcp/protocol.c:2592 [inline] mptcp_worker+0x78c/0xff0 net/mptcp/protocol.c:2627 process_one_work+0x991/0x1610 kernel/workqueue.c:2289 worker_thread+0x665/0x1080 kernel/workqueue.c:2436 kthread+0x2e4/0x3a0 kernel/kthread.c:376 ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:306 Allocated by task 10347: kasan_save_stack+0x1e/0x40 mm/kasan/common.c:38 kasan_set_track mm/kasan/common.c:45 [inline] set_alloc_info mm/kasan/common.c:437 [inline] ____kasan_kmalloc mm/kasan/common.c:516 [inline] ____kasan_kmalloc mm/kasan/common.c:475 [inline] __kasan_kmalloc+0xa9/0xd0 mm/kasan/common.c:525 kmalloc include/linux/slab.h:600 [inline] kzalloc include/linux/slab.h:733 [inline] sctp_add_bind_addr+0x93/0x3d0 net/sctp/bind_addr.c:144 sctp_copy_local_addr_list+0x325/0x4f0 net/sctp/protocol.c:165 sctp_copy_one_addr net/sctp/bind_addr.c:460 [inline] sctp_bind_addr_copy+0xde/0x460 net/sctp/bind_addr.c:56 sctp_connect_new_asoc+0x1cd/0x770 net/sctp/socket.c:1093 __sctp_connect+0x3d0/0xc30 net/sctp/socket.c:1195 __sctp_setsockopt_connectx+0x102/0x170 net/sctp/socket.c:1334 sctp_getsockopt_connectx3 net/sctp/socket.c:1419 [inline] sctp_getsockopt+0x279d/0x6e90 net/sctp/socket.c:8108 __sys_getsockopt+0x216/0x690 net/socket.c:2296 __do_sys_getsockopt net/socket.c:2311 [inline] __se_sys_getsockopt net/socket.c:2308 [inline] __x64_sys_getsockopt+0xba/0x150 net/socket.c:2308 do_syscall_x64 arch/x86/entry/common.c:50 [inline] do_syscall_64+0x35/0xb0 arch/x86/entry/common.c:80 entry_SYSCALL_64_after_hwframe+0x63/0xcd Freed by task 6096: kasan_save_stack+0x1e/0x40 mm/kasan/common.c:38 kasan_set_track+0x21/0x30 mm/kasan/common.c:45 kasan_set_free_info+0x20/0x30 mm/kasan/generic.c:370 ____kasan_slab_free mm/kasan/common.c:367 [inline] ____kasan_slab_free+0x166/0x1c0 mm/kasan/common.c:329 kasan_slab_free include/linux/kasan.h:200 [inline] slab_free_hook mm/slub.c:1759 [inline] slab_free_freelist_hook+0x8b/0x1c0 mm/slub.c:1785 slab_free mm/slub.c:3539 [inline] kmem_cache_free_bulk.part.0+0x205/0x880 mm/slub.c:3665 kfree_bulk include/linux/slab.h:456 [inline] kfree_rcu_work+0x56c/0xa60 kernel/rcu/tree.c:3038 process_one_work+0x991/0x1610 kernel/workqueue.c:2289 worker_thread+0x665/0x1080 kernel/workqueue.c:2436 kthread+0x2e4/0x3a0 kernel/kthread.c:376 ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:306 Last potentially related work creation: kasan_save_stack+0x1e/0x40 mm/kasan/common.c:38 __kasan_record_aux_stack+0xbe/0xd0 mm/kasan/generic.c:348 kvfree_call_rcu+0x74/0x8f0 kernel/rcu/tree.c:3341 sctp_bind_addr_clean+0x135/0x1f0 net/sctp/bind_addr.c:125 sctp_association_free+0x28c/0x7d0 net/sctp/associola.c:358 sctp_cmd_delete_tcb net/sctp/sm_sideeffect.c:944 [inline] sctp_cmd_interpreter net/sctp/sm_sideeffect.c:1328 [inline] sctp_side_effects net/sctp/sm_sideeffect.c:1199 [inline] sctp_do_sm+0x385c/0x4ec0 net/sctp/sm_sideeffect.c:1170 sctp_assoc_bh_rcv+0x386/0x6c0 net/sctp/associola.c:1053 sctp_inq_push+0x1d2/0x270 net/sctp/inqueue.c:80 sctp_backlog_rcv+0x196/0x5a0 net/sctp/input.c:346 sk_backlog_rcv include/net/sock.h:1109 [inline] __release_sock+0x12f/0x3a0 net/core/sock.c:2906 release_sock+0x54/0x1b0 net/core/sock.c:3462 sctp_getsockopt+0x2c0/0x6e90 net/sctp/socket.c:8270 __sys_getsockopt+0x216/0x690 net/socket.c:2296 __do_sys_getsockopt net/socket.c:2311 [inline] __se_sys_getsockopt net/socket.c:2308 [inline] __x64_sys_getsockopt+0xba/0x150 net/socket.c:2308 do_syscall_x64 arch/x86/entry/common.c:50 [inline] do_syscall_64+0x35/0xb0 arch/x86/entry/common.c:80 entry_SYSCALL_64_after_hwframe+0x63/0xcd Second to last potentially related work creation: kasan_save_stack+0x1e/0x40 mm/kasan/common.c:38 __kasan_record_aux_stack+0xbe/0xd0 mm/kasan/generic.c:348 kvfree_call_rcu+0x74/0x8f0 kernel/rcu/tree.c:3341 sctp_bind_addr_clean+0x135/0x1f0 net/sctp/bind_addr.c:125 sctp_association_free+0x28c/0x7d0 net/sctp/associola.c:358 sctp_cmd_delete_tcb net/sctp/sm_sideeffect.c:944 [inline] sctp_cmd_interpreter net/sctp/sm_sideeffect.c:1328 [inline] sctp_side_effects net/sctp/sm_sideeffect.c:1199 [inline] sctp_do_sm+0x385c/0x4ec0 net/sctp/sm_sideeffect.c:1170 sctp_assoc_bh_rcv+0x386/0x6c0 net/sctp/associola.c:1053 sctp_inq_push+0x1d2/0x270 net/sctp/inqueue.c:80 sctp_backlog_rcv+0x196/0x5a0 net/sctp/input.c:346 sk_backlog_rcv include/net/sock.h:1109 [inline] __release_sock+0x12f/0x3a0 net/core/sock.c:2906 release_sock+0x54/0x1b0 net/core/sock.c:3462 sctp_getsockopt+0x2c0/0x6e90 net/sctp/socket.c:8270 __sys_getsockopt+0x216/0x690 net/socket.c:2296 __do_sys_getsockopt net/socket.c:2311 [inline] __se_sys_getsockopt net/socket.c:2308 [inline] __x64_sys_getsockopt+0xba/0x150 net/socket.c:2308 do_syscall_x64 arch/x86/entry/common.c:50 [inline] do_syscall_64+0x35/0xb0 arch/x86/entry/common.c:80 entry_SYSCALL_64_after_hwframe+0x63/0xcd The buggy address belongs to the object at ffff88801d8eeb00 which belongs to the cache kmalloc-64 of size 64 The buggy address is located 0 bytes inside of 64-byte region [ffff88801d8eeb00, ffff88801d8eeb40) The buggy address belongs to the physical page: page:ffffea0000763b80 refcount:1 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x1d8ee flags: 0xfff00000000200(slab|node=0|zone=1|lastcpupid=0x7ff) raw: 00fff00000000200 ffffea000085abc0 dead000000000002 ffff888011841640 raw: 0000000000000000 0000000000200020 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 2, tgid 2 (kthreadd), ts 7646838819, free_ts 7168969483 prep_new_page mm/page_alloc.c:2532 [inline] get_page_from_freelist+0x109b/0x2ce0 mm/page_alloc.c:4283 __alloc_pages+0x1c7/0x510 mm/page_alloc.c:5549 alloc_pages+0x1a6/0x270 mm/mempolicy.c:2270 alloc_slab_page mm/slub.c:1829 [inline] allocate_slab+0x27e/0x3d0 mm/slub.c:1974 new_slab mm/slub.c:2034 [inline] ___slab_alloc+0x84f/0xe80 mm/slub.c:3036 __slab_alloc.constprop.0+0x4d/0xa0 mm/slub.c:3123 slab_alloc_node mm/slub.c:3214 [inline] __kmalloc_node+0x2e2/0x380 mm/slub.c:4473 kmalloc_node include/linux/slab.h:623 [inline] __vmalloc_area_node mm/vmalloc.c:3012 [inline] __vmalloc_node_range+0xa36/0x13a0 mm/vmalloc.c:3196 alloc_thread_stack_node kernel/fork.c:312 [inline] dup_task_struct kernel/fork.c:977 [inline] copy_process+0x156c/0x7090 kernel/fork.c:2085 kernel_clone+0xe7/0xab0 kernel/fork.c:2671 kernel_thread+0xb5/0xf0 kernel/fork.c:2724 create_kthread kernel/kthread.c:399 [inline] kthreadd+0x4ea/0x750 kernel/kthread.c:745 ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:306 page last free stack trace: reset_page_owner include/linux/page_owner.h:24 [inline] free_pages_prepare mm/page_alloc.c:1449 [inline] free_pcp_prepare+0x5e4/0xd20 mm/page_alloc.c:1499 free_unref_page_prepare mm/page_alloc.c:3380 [inline] free_unref_page+0x19/0x4d0 mm/page_alloc.c:3476 __vunmap+0x85d/0xd30 mm/vmalloc.c:2696 free_work+0x58/0x70 mm/vmalloc.c:97 process_one_work+0x991/0x1610 kernel/workqueue.c:2289 worker_thread+0x665/0x1080 kernel/workqueue.c:2436 kthread+0x2e4/0x3a0 kernel/kthread.c:376 ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:306 Memory state around the buggy address: ffff88801d8eea00: 00 00 00 00 00 00 00 00 fc fc fc fc fc fc fc fc ffff88801d8eea80: 00 00 00 00 00 00 00 fc fc fc fc fc fc fc fc fc >ffff88801d8eeb00: fa fb fb fb fb fb fb fb fc fc fc fc fc fc fc fc ^ ffff88801d8eeb80: 00 00 00 00 00 00 fc fc fc fc fc fc fc fc fc fc ffff88801d8eec00: 00 00 00 00 00 00 00 00 fc fc fc fc fc fc fc fc ==================================================================