================================================================== 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 ffff888029626820 by task krxrpcio/7001/5350 CPU: 1 PID: 5350 Comm: krxrpcio/7001 Not tainted 6.1.0-syzkaller-09661-g13e3c7793e2f #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:284 [inline] print_report+0x15e/0x45d mm/kasan/report.c:395 kasan_report+0xbf/0x1f0 mm/kasan/report.c:495 __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:306 Allocated by task 2905: 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+0xa5/0xb0 mm/kasan/common.c:380 kasan_kmalloc include/linux/kasan.h:211 [inline] __do_kmalloc_node mm/slab_common.c:968 [inline] __kmalloc+0x5a/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.constprop.0+0x99/0xd0 net/mac80211/ieee80211_i.h:2260 ieee802_11_parse_elems net/mac80211/ieee80211_i.h:2267 [inline] ieee80211_bss_info_update+0x410/0xaf0 net/mac80211/scan.c:212 ieee80211_rx_bss_info net/mac80211/ibss.c:1120 [inline] ieee80211_rx_mgmt_probe_beacon net/mac80211/ibss.c:1609 [inline] ieee80211_ibss_rx_queued_mgmt+0x19fc/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:306 Freed by task 2905: kasan_save_stack+0x22/0x40 mm/kasan/common.c:45 kasan_set_track+0x25/0x30 mm/kasan/common.c:52 kasan_save_free_info+0x2e/0x40 mm/kasan/generic.c:518 ____kasan_slab_free mm/kasan/common.c:236 [inline] ____kasan_slab_free+0x160/0x1c0 mm/kasan/common.c:200 kasan_slab_free include/linux/kasan.h:177 [inline] slab_free_hook mm/slub.c:1781 [inline] slab_free_freelist_hook+0x8b/0x1c0 mm/slub.c:1807 slab_free mm/slub.c:3787 [inline] __kmem_cache_free+0xaf/0x3b0 mm/slub.c:3800 ieee80211_bss_info_update+0x4a2/0xaf0 net/mac80211/scan.c:223 ieee80211_rx_bss_info net/mac80211/ibss.c:1120 [inline] ieee80211_rx_mgmt_probe_beacon net/mac80211/ibss.c:1609 [inline] ieee80211_ibss_rx_queued_mgmt+0x19fc/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:306 Last potentially related work creation: kasan_save_stack+0x22/0x40 mm/kasan/common.c:45 __kasan_record_aux_stack+0xbc/0xd0 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_release_sock net/rxrpc/af_rxrpc.c:888 [inline] rxrpc_release+0x237/0x550 net/rxrpc/af_rxrpc.c:914 __sock_release net/socket.c:650 [inline] sock_release+0x8b/0x1b0 net/socket.c:678 afs_close_socket+0x1ce/0x330 fs/afs/rxrpc.c:125 afs_net_exit+0x179/0x320 fs/afs/main.c:158 ops_exit_list+0xb0/0x170 net/core/net_namespace.c:169 cleanup_net+0x4ee/0xb10 net/core/net_namespace.c:606 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:306 Second to last potentially related work creation: kasan_save_stack+0x22/0x40 mm/kasan/common.c:45 __kasan_record_aux_stack+0xbc/0xd0 mm/kasan/generic.c:488 insert_work+0x48/0x350 kernel/workqueue.c:1358 __queue_work+0x693/0x13b0 kernel/workqueue.c:1517 queue_work_on+0xf2/0x110 kernel/workqueue.c:1545 ops_exit_list+0xb0/0x170 net/core/net_namespace.c:169 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:3184 __do_sys_unshare kernel/fork.c:3255 [inline] __se_sys_unshare kernel/fork.c:3253 [inline] __x64_sys_unshare+0x31/0x40 kernel/fork.c:3253 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 ffff888029626800 which belongs to the cache kmalloc-1k of size 1024 The buggy address is located 32 bytes inside of 1024-byte region [ffff888029626800, ffff888029626c00) The buggy address belongs to the physical page: page:ffffea0000a58800 refcount:1 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x29620 head:ffffea0000a58800 order:3 compound_mapcount:0 compound_pincount:0 anon flags: 0xfff00000010200(slab|head|node=0|zone=1|lastcpupid=0x7ff) raw: 00fff00000010200 ffff888012441dc0 0000000000000000 dead000000000001 raw: 0000000000000000 0000000000100010 00000001ffffffff 0000000000000000 page dumped because: kasan: bad access detected page_owner tracks the page as allocated page last allocated via order 3, migratetype Unmovable, gfp_mask 0xd20c0(__GFP_IO|__GFP_FS|__GFP_NOWARN|__GFP_NORETRY|__GFP_COMP|__GFP_NOMEMALLOC), pid 5087, tgid 5087 (sshd), ts 47958859893, free_ts 47925936928 prep_new_page mm/page_alloc.c:2539 [inline] get_page_from_freelist+0x10b5/0x2d50 mm/page_alloc.c:4291 __alloc_pages+0x1cb/0x5b0 mm/page_alloc.c:5558 alloc_pages+0x1aa/0x270 mm/mempolicy.c:2285 alloc_slab_page mm/slub.c:1851 [inline] allocate_slab+0x25f/0x350 mm/slub.c:1998 new_slab mm/slub.c:2051 [inline] ___slab_alloc+0xa91/0x1400 mm/slub.c:3193 __slab_alloc.constprop.0+0x56/0xa0 mm/slub.c:3292 __slab_alloc_node mm/slub.c:3345 [inline] slab_alloc_node mm/slub.c:3442 [inline] __kmem_cache_alloc_node+0x1a4/0x430 mm/slub.c:3491 __do_kmalloc_node mm/slab_common.c:967 [inline] __kmalloc_node_track_caller+0x4b/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_fclone include/linux/skbuff.h:1320 [inline] tcp_stream_alloc_skb+0x3c/0x580 net/ipv4/tcp.c:862 tcp_sendmsg_locked+0xc4c/0x2960 net/ipv4/tcp.c:1325 tcp_sendmsg+0x2f/0x50 net/ipv4/tcp.c:1483 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 sock_write_iter+0x295/0x3d0 net/socket.c:1108 call_write_iter include/linux/fs.h:2186 [inline] new_sync_write fs/read_write.c:491 [inline] vfs_write+0x9ed/0xdd0 fs/read_write.c:584 page last free stack trace: reset_page_owner include/linux/page_owner.h:24 [inline] free_pages_prepare mm/page_alloc.c:1459 [inline] free_pcp_prepare+0x65c/0xd90 mm/page_alloc.c:1509 free_unref_page_prepare mm/page_alloc.c:3387 [inline] free_unref_page+0x1d/0x4d0 mm/page_alloc.c:3483 __folio_put_large mm/swap.c:118 [inline] __folio_put+0x109/0x140 mm/swap.c:126 folio_put include/linux/mm.h:1159 [inline] put_page+0x21b/0x280 include/linux/mm.h:1211 page_to_skb+0x96d/0xc60 drivers/net/virtio_net.c:558 receive_mergeable drivers/net/virtio_net.c:1126 [inline] receive_buf+0x11c5/0x5630 drivers/net/virtio_net.c:1265 virtnet_receive drivers/net/virtio_net.c:1560 [inline] virtnet_poll+0x704/0x1300 drivers/net/virtio_net.c:1678 __napi_poll+0xb8/0x770 net/core/dev.c:6485 napi_poll net/core/dev.c:6552 [inline] net_rx_action+0xa00/0xde0 net/core/dev.c:6663 __do_softirq+0x1fb/0xadc kernel/softirq.c:571 Memory state around the buggy address: ffff888029626700: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ffff888029626780: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc >ffff888029626800: fa fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ^ ffff888029626880: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ffff888029626900: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ==================================================================