================================================================== BUG: KASAN: use-after-free in __hlist_del include/linux/list.h:884 [inline] BUG: KASAN: use-after-free in hlist_del_init_rcu include/linux/rculist.h:184 [inline] BUG: KASAN: use-after-free in rxrpc_destroy_local+0x2ad/0x2f0 net/rxrpc/local_object.c:389 Write of size 8 at addr ffff888056a2b020 by task krxrpcio/7001/5106 CPU: 1 PID: 5106 Comm: krxrpcio/7001 Not tainted 6.1.0-syzkaller-13822-g6feb57c2fd7c #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 10/26/2022 Call Trace: __dump_stack lib/dump_stack.c:88 [inline] dump_stack_lvl+0xd1/0x138 lib/dump_stack.c:106 print_address_description mm/kasan/report.c:306 [inline] print_report+0x15e/0x461 mm/kasan/report.c:417 kasan_report+0xbf/0x1f0 mm/kasan/report.c:517 __hlist_del include/linux/list.h:884 [inline] hlist_del_init_rcu include/linux/rculist.h:184 [inline] rxrpc_destroy_local+0x2ad/0x2f0 net/rxrpc/local_object.c:389 rxrpc_io_thread+0xcde/0xfa0 net/rxrpc/io_thread.c:492 kthread+0x2e8/0x3a0 kernel/kthread.c:376 ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:308 Allocated by task 14580: kasan_save_stack+0x22/0x40 mm/kasan/common.c:45 kasan_set_track+0x25/0x30 mm/kasan/common.c:52 ____kasan_kmalloc mm/kasan/common.c:371 [inline] ____kasan_kmalloc mm/kasan/common.c:330 [inline] __kasan_kmalloc+0xa3/0xb0 mm/kasan/common.c:380 kasan_kmalloc include/linux/kasan.h:211 [inline] __do_kmalloc_node mm/slab_common.c:968 [inline] __kmalloc_node_track_caller+0x5b/0xc0 mm/slab_common.c:988 kmalloc_reserve net/core/skbuff.c:492 [inline] __alloc_skb+0xe9/0x310 net/core/skbuff.c:565 alloc_skb include/linux/skbuff.h:1270 [inline] _sctp_make_chunk+0x50/0x270 net/sctp/sm_make_chunk.c:1443 sctp_make_control+0x30/0x2d0 net/sctp/sm_make_chunk.c:1490 sctp_make_init+0x68a/0xd70 net/sctp/sm_make_chunk.c:319 sctp_sf_do_prm_asoc+0xbf/0x340 net/sctp/sm_statefuns.c:4990 sctp_do_sm+0x176/0x5290 net/sctp/sm_sideeffect.c:1167 sctp_primitive_ASSOCIATE+0x9c/0xc0 net/sctp/primitive.c:73 sctp_sendmsg_to_asoc+0xba0/0x1a30 net/sctp/socket.c:1835 sctp_sendmsg+0xf05/0x1d90 net/sctp/socket.c:2025 inet_sendmsg+0x9d/0xe0 net/ipv4/af_inet.c:827 sock_sendmsg_nosec net/socket.c:714 [inline] sock_sendmsg+0xd3/0x120 net/socket.c:734 __sys_sendto+0x23a/0x340 net/socket.c:2117 __do_sys_sendto net/socket.c:2129 [inline] __se_sys_sendto net/socket.c:2125 [inline] __x64_sys_sendto+0xe1/0x1b0 net/socket.c:2125 do_syscall_x64 arch/x86/entry/common.c:50 [inline] do_syscall_64+0x39/0xb0 arch/x86/entry/common.c:80 entry_SYSCALL_64_after_hwframe+0x63/0xcd Freed by task 14580: kasan_save_stack+0x22/0x40 mm/kasan/common.c:45 kasan_set_track+0x25/0x30 mm/kasan/common.c:52 kasan_save_free_info+0x2b/0x40 mm/kasan/generic.c:518 ____kasan_slab_free mm/kasan/common.c:236 [inline] ____kasan_slab_free+0x13b/0x1a0 mm/kasan/common.c:200 kasan_slab_free include/linux/kasan.h:177 [inline] __cache_free mm/slab.c:3394 [inline] __do_kmem_cache_free mm/slab.c:3580 [inline] __kmem_cache_free+0xcd/0x3b0 mm/slab.c:3587 skb_free_head+0xac/0x110 net/core/skbuff.c:822 skb_release_data+0x5f4/0x870 net/core/skbuff.c:851 skb_release_all net/core/skbuff.c:916 [inline] __kfree_skb net/core/skbuff.c:930 [inline] consume_skb net/core/skbuff.c:1098 [inline] consume_skb+0xcb/0x170 net/core/skbuff.c:1092 sctp_chunk_destroy net/sctp/sm_make_chunk.c:1503 [inline] sctp_chunk_put+0x1c4/0x2d0 net/sctp/sm_make_chunk.c:1530 sctp_packet_transmit+0x9d8/0x30d0 net/sctp/output.c:661 sctp_packet_singleton+0x190/0x360 net/sctp/outqueue.c:783 sctp_outq_flush_ctrl.constprop.0+0x53d/0xbb0 net/sctp/outqueue.c:914 sctp_outq_flush net/sctp/outqueue.c:1212 [inline] sctp_outq_uncork+0x10f/0x200 net/sctp/outqueue.c:764 sctp_cmd_interpreter net/sctp/sm_sideeffect.c:1816 [inline] sctp_side_effects net/sctp/sm_sideeffect.c:1199 [inline] sctp_do_sm+0x2823/0x5290 net/sctp/sm_sideeffect.c:1170 sctp_primitive_ASSOCIATE+0x9c/0xc0 net/sctp/primitive.c:73 sctp_sendmsg_to_asoc+0xba0/0x1a30 net/sctp/socket.c:1835 sctp_sendmsg+0xf05/0x1d90 net/sctp/socket.c:2025 inet_sendmsg+0x9d/0xe0 net/ipv4/af_inet.c:827 sock_sendmsg_nosec net/socket.c:714 [inline] sock_sendmsg+0xd3/0x120 net/socket.c:734 __sys_sendto+0x23a/0x340 net/socket.c:2117 __do_sys_sendto net/socket.c:2129 [inline] __se_sys_sendto net/socket.c:2125 [inline] __x64_sys_sendto+0xe1/0x1b0 net/socket.c:2125 do_syscall_x64 arch/x86/entry/common.c:50 [inline] do_syscall_64+0x39/0xb0 arch/x86/entry/common.c:80 entry_SYSCALL_64_after_hwframe+0x63/0xcd Last potentially related work creation: kasan_save_stack+0x22/0x40 mm/kasan/common.c:45 __kasan_record_aux_stack+0x7b/0x90 mm/kasan/generic.c:488 __call_rcu_common.constprop.0+0x99/0x820 kernel/rcu/tree.c:2753 rxrpc_put_local.part.0+0x128/0x170 net/rxrpc/local_object.c:332 rxrpc_put_local+0x25/0x30 net/rxrpc/local_object.c:324 rxrpc_clean_up_connection+0x3ac/0x4b0 net/rxrpc/conn_object.c:318 rxrpc_put_connection.part.0+0x1e8/0x210 net/rxrpc/conn_object.c:356 rxrpc_put_connection+0x25/0x30 net/rxrpc/conn_object.c:339 rxrpc_discard_expired_client_conns+0x388/0x500 net/rxrpc/conn_client.c:1059 process_one_work+0x9bf/0x1710 kernel/workqueue.c:2289 worker_thread+0x669/0x1090 kernel/workqueue.c:2436 kthread+0x2e8/0x3a0 kernel/kthread.c:376 ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:308 Second to last potentially related work creation: kasan_save_stack+0x22/0x40 mm/kasan/common.c:45 __kasan_record_aux_stack+0x7b/0x90 mm/kasan/generic.c:488 kvfree_call_rcu+0x78/0x8f0 kernel/rcu/tree.c:3374 batadv_hardif_release+0xa6/0xe0 net/batman-adv/hard-interface.c:55 kref_put include/linux/kref.h:65 [inline] batadv_hardif_put net/batman-adv/hard-interface.h:95 [inline] batadv_hard_if_event+0xcd0/0x1450 net/batman-adv/hard-interface.c:1002 notifier_call_chain+0xb5/0x200 kernel/notifier.c:87 call_netdevice_notifiers_info+0xb5/0x130 net/core/dev.c:1944 call_netdevice_notifiers_extack net/core/dev.c:1982 [inline] call_netdevice_notifiers net/core/dev.c:1996 [inline] unregister_netdevice_many_notify+0xa2b/0x19e0 net/core/dev.c:10839 ip_tunnel_delete_nets+0x3a3/0x5c0 net/ipv4/ip_tunnel.c:1126 ops_exit_list+0x125/0x170 net/core/net_namespace.c:174 setup_net+0x9bd/0xe60 net/core/net_namespace.c:356 copy_net_ns+0x31b/0x6b0 net/core/net_namespace.c:483 create_new_namespaces+0x3f6/0xb20 kernel/nsproxy.c:110 unshare_nsproxy_namespaces+0xc5/0x1f0 kernel/nsproxy.c:228 ksys_unshare+0x449/0x920 kernel/fork.c:3202 __do_sys_unshare kernel/fork.c:3273 [inline] __se_sys_unshare kernel/fork.c:3271 [inline] __x64_sys_unshare+0x31/0x40 kernel/fork.c:3271 do_syscall_x64 arch/x86/entry/common.c:50 [inline] do_syscall_64+0x39/0xb0 arch/x86/entry/common.c:80 entry_SYSCALL_64_after_hwframe+0x63/0xcd The buggy address belongs to the object at ffff888056a2b000 which belongs to the cache kmalloc-1k of size 1024 The buggy address is located 32 bytes inside of 1024-byte region [ffff888056a2b000, ffff888056a2b400) The buggy address belongs to the physical page: page:ffffea00015a8ac0 refcount:1 mapcount:0 mapping:0000000000000000 index:0xffff888056a2b800 pfn:0x56a2b flags: 0xfff00000000200(slab|node=0|zone=1|lastcpupid=0x7ff) raw: 00fff00000000200 ffff888012440700 ffffea0001e66c10 ffffea000086d110 raw: ffff888056a2b800 ffff888056a2b000 0000000100000001 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 0x342220(__GFP_HIGH|__GFP_ATOMIC|__GFP_NOWARN|__GFP_COMP|__GFP_HARDWALL|__GFP_THISNODE), pid 6678, tgid 6678 (kworker/u4:10), ts 427789967849, free_ts 427714364987 prep_new_page mm/page_alloc.c:2531 [inline] get_page_from_freelist+0x119c/0x2ce0 mm/page_alloc.c:4283 __alloc_pages+0x1cb/0x5b0 mm/page_alloc.c:5549 __alloc_pages_node include/linux/gfp.h:237 [inline] kmem_getpages mm/slab.c:1363 [inline] cache_grow_begin+0x94/0x390 mm/slab.c:2574 cache_alloc_refill+0x27f/0x380 mm/slab.c:2947 ____cache_alloc mm/slab.c:3023 [inline] ____cache_alloc mm/slab.c:3006 [inline] __do_cache_alloc mm/slab.c:3206 [inline] slab_alloc_node mm/slab.c:3254 [inline] __kmem_cache_alloc_node+0x44f/0x510 mm/slab.c:3544 __do_kmalloc_node mm/slab_common.c:967 [inline] __kmalloc+0x4a/0xd0 mm/slab_common.c:981 kmalloc include/linux/slab.h:584 [inline] kzalloc include/linux/slab.h:720 [inline] ieee802_11_parse_elems_full+0x106/0x1330 net/mac80211/util.c:1655 ieee802_11_parse_elems_crc net/mac80211/ieee80211_i.h:2260 [inline] ieee802_11_parse_elems net/mac80211/ieee80211_i.h:2267 [inline] ieee80211_rx_mgmt_probe_beacon net/mac80211/ibss.c:1605 [inline] ieee80211_ibss_rx_queued_mgmt+0xd58/0x3160 net/mac80211/ibss.c:1638 ieee80211_iface_process_skb net/mac80211/iface.c:1581 [inline] ieee80211_iface_work+0xa4d/0xd70 net/mac80211/iface.c:1635 process_one_work+0x9bf/0x1710 kernel/workqueue.c:2289 worker_thread+0x669/0x1090 kernel/workqueue.c:2436 kthread+0x2e8/0x3a0 kernel/kthread.c:376 ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:308 page last free stack trace: reset_page_owner include/linux/page_owner.h:24 [inline] free_pages_prepare mm/page_alloc.c:1446 [inline] free_pcp_prepare+0x65c/0xc00 mm/page_alloc.c:1496 free_unref_page_prepare mm/page_alloc.c:3369 [inline] free_unref_page_list+0x176/0xcd0 mm/page_alloc.c:3510 release_pages+0xcb1/0x1330 mm/swap.c:1076 tlb_batch_pages_flush+0xa8/0x1a0 mm/mmu_gather.c:97 tlb_flush_mmu_free mm/mmu_gather.c:292 [inline] tlb_flush_mmu mm/mmu_gather.c:299 [inline] tlb_finish_mmu+0x14b/0x7e0 mm/mmu_gather.c:391 exit_mmap+0x202/0x7b0 mm/mmap.c:3096 __mmput+0x128/0x4c0 kernel/fork.c:1207 mmput+0x60/0x70 kernel/fork.c:1229 exit_mm kernel/exit.c:563 [inline] do_exit+0x9ac/0x2950 kernel/exit.c:854 do_group_exit+0xd4/0x2a0 kernel/exit.c:1010 get_signal+0x21c3/0x2450 kernel/signal.c:2859 arch_do_signal_or_restart+0x79/0x5c0 arch/x86/kernel/signal.c:306 exit_to_user_mode_loop kernel/entry/common.c:168 [inline] exit_to_user_mode_prepare+0x15f/0x250 kernel/entry/common.c:203 __syscall_exit_to_user_mode_work kernel/entry/common.c:285 [inline] syscall_exit_to_user_mode+0x1d/0x50 kernel/entry/common.c:296 do_syscall_64+0x46/0xb0 arch/x86/entry/common.c:86 entry_SYSCALL_64_after_hwframe+0x63/0xcd Memory state around the buggy address: ffff888056a2af00: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ffff888056a2af80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc >ffff888056a2b000: fa fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ^ ffff888056a2b080: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ffff888056a2b100: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ==================================================================