================================================================== 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+0x104/0x290 net/rxrpc/local_object.c:389 Write of size 8 at addr ffff888048454820 by task krxrpcio/7001/6766 CPU: 1 PID: 6766 Comm: krxrpcio/7001 Not tainted 6.1.0-syzkaller-13064-g75caf5940899 #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+0x1e3/0x2d0 lib/dump_stack.c:106 print_address_description+0x74/0x340 mm/kasan/report.c:306 print_report+0x107/0x220 mm/kasan/report.c:417 kasan_report+0x139/0x170 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+0x104/0x290 net/rxrpc/local_object.c:389 rxrpc_io_thread+0x1d28/0x1f30 net/rxrpc/io_thread.c:492 kthread+0x266/0x300 kernel/kthread.c:376 ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:308 Allocated by task 5058: kasan_save_stack mm/kasan/common.c:45 [inline] kasan_set_track+0x4c/0x70 mm/kasan/common.c:52 ____kasan_kmalloc mm/kasan/common.c:371 [inline] __kasan_kmalloc+0x97/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+0xad/0x190 mm/slab_common.c:988 kmalloc_reserve net/core/skbuff.c:492 [inline] __alloc_skb+0x12c/0x2c0 net/core/skbuff.c:565 alloc_skb_fclone include/linux/skbuff.h:1320 [inline] tcp_stream_alloc_skb+0x3c/0x300 net/ipv4/tcp.c:862 tcp_sendmsg_locked+0xdcf/0x41e0 net/ipv4/tcp.c:1325 tcp_sendmsg+0x2c/0x40 net/ipv4/tcp.c:1483 sock_sendmsg_nosec net/socket.c:714 [inline] sock_sendmsg net/socket.c:734 [inline] sock_write_iter+0x3d4/0x540 net/socket.c:1108 call_write_iter include/linux/fs.h:2186 [inline] new_sync_write fs/read_write.c:491 [inline] vfs_write+0x7b5/0xbb0 fs/read_write.c:584 ksys_write+0x19b/0x2c0 fs/read_write.c:637 do_syscall_x64 arch/x86/entry/common.c:50 [inline] do_syscall_64+0x2b/0x70 arch/x86/entry/common.c:80 entry_SYSCALL_64_after_hwframe+0x63/0xcd Freed by task 5541: kasan_save_stack mm/kasan/common.c:45 [inline] kasan_set_track+0x4c/0x70 mm/kasan/common.c:52 kasan_save_free_info+0x27/0x40 mm/kasan/generic.c:518 ____kasan_slab_free+0xd6/0x120 mm/kasan/common.c:236 kasan_slab_free include/linux/kasan.h:177 [inline] slab_free_hook mm/slub.c:1781 [inline] slab_free_freelist_hook+0x12e/0x1a0 mm/slub.c:1807 slab_free mm/slub.c:3787 [inline] __kmem_cache_free+0x71/0x110 mm/slub.c:3800 skb_free_head net/core/skbuff.c:822 [inline] skb_release_data+0x4f6/0x710 net/core/skbuff.c:851 skb_release_all net/core/skbuff.c:916 [inline] __kfree_skb+0x5b/0x1d0 net/core/skbuff.c:930 tcp_clean_rtx_queue+0xa21/0x2da0 net/ipv4/tcp_input.c:3334 tcp_ack+0x1a50/0x3e50 net/ipv4/tcp_input.c:3884 tcp_rcv_established+0xdfe/0x1a10 net/ipv4/tcp_input.c:5926 tcp_v4_do_rcv+0x479/0xac0 net/ipv4/tcp_ipv4.c:1721 tcp_v4_rcv+0x2831/0x3120 net/ipv4/tcp_ipv4.c:2142 ip_protocol_deliver_rcu+0x5d5/0xd40 net/ipv4/ip_input.c:205 ip_local_deliver_finish+0x269/0x480 net/ipv4/ip_input.c:233 dst_input include/net/dst.h:454 [inline] ip_sublist_rcv_finish net/ipv4/ip_input.c:580 [inline] ip_list_rcv_finish net/ipv4/ip_input.c:630 [inline] ip_sublist_rcv+0xa8b/0xb70 net/ipv4/ip_input.c:638 ip_list_rcv+0x443/0x490 net/ipv4/ip_input.c:673 __netif_receive_skb_list_ptype net/core/dev.c:5525 [inline] __netif_receive_skb_list_core+0x71e/0x930 net/core/dev.c:5573 __netif_receive_skb_list+0x4b1/0x580 net/core/dev.c:5625 netif_receive_skb_list_internal+0x539/0x870 net/core/dev.c:5716 gro_normal_list include/net/gro.h:433 [inline] napi_complete_done+0x333/0x840 net/core/dev.c:6056 virtqueue_napi_complete drivers/net/virtio_net.c:405 [inline] virtnet_poll+0xbd9/0x12a0 drivers/net/virtio_net.c:1682 __napi_poll+0xbe/0x4b0 net/core/dev.c:6485 napi_poll net/core/dev.c:6552 [inline] net_rx_action+0x76c/0x1100 net/core/dev.c:6663 __do_softirq+0x277/0x75b kernel/softirq.c:571 Last potentially related work creation: kasan_save_stack+0x3b/0x60 mm/kasan/common.c:45 __kasan_record_aux_stack+0xb0/0xc0 mm/kasan/generic.c:488 __call_rcu_common kernel/rcu/tree.c:2753 [inline] call_rcu+0x163/0xab0 kernel/rcu/tree.c:2866 rxrpc_clean_up_connection+0x316/0x380 net/rxrpc/conn_object.c:318 rxrpc_discard_expired_client_conns+0x39b/0x4d0 net/rxrpc/conn_client.c:1059 process_one_work+0x81c/0xd10 kernel/workqueue.c:2289 worker_thread+0xb14/0x1330 kernel/workqueue.c:2436 kthread+0x266/0x300 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+0x3b/0x60 mm/kasan/common.c:45 __kasan_record_aux_stack+0xb0/0xc0 mm/kasan/generic.c:488 kvfree_call_rcu+0x118/0x8c0 kernel/rcu/tree.c:3374 cgroup_migrate_finish+0x206/0x420 kernel/cgroup/cgroup.c:2713 cgroup_attach_task+0x5f7/0x740 kernel/cgroup/cgroup.c:2912 cgroup_attach_task_all+0xaa/0x120 kernel/cgroup/cgroup-v1.c:70 kvm_vm_worker_thread+0x350/0x4e0 arch/x86/kvm/../../../virt/kvm/kvm_main.c:6120 kthread+0x266/0x300 kernel/kthread.c:376 ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:308 The buggy address belongs to the object at ffff888048454800 which belongs to the cache kmalloc-1k of size 1024 The buggy address is located 32 bytes inside of 1024-byte region [ffff888048454800, ffff888048454c00) The buggy address belongs to the physical page: page:ffffea0001211400 refcount:1 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x48450 head:ffffea0001211400 order:3 compound_mapcount:0 subpages_mapcount:0 compound_pincount:0 flags: 0xfff00000010200(slab|head|node=0|zone=1|lastcpupid=0x7ff) raw: 00fff00000010200 ffff888012841dc0 ffffea0000ae0a00 dead000000000002 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 0x1d20c0(__GFP_IO|__GFP_FS|__GFP_NOWARN|__GFP_NORETRY|__GFP_COMP|__GFP_NOMEMALLOC|__GFP_HARDWALL), pid 5052, tgid 5052 (sshd), ts 276866769460, free_ts 276836239091 prep_new_page mm/page_alloc.c:2531 [inline] get_page_from_freelist+0x72b/0x7a0 mm/page_alloc.c:4283 __alloc_pages+0x259/0x560 mm/page_alloc.c:5549 alloc_slab_page+0xbd/0x190 mm/slub.c:1851 allocate_slab+0x5e/0x3c0 mm/slub.c:1998 new_slab mm/slub.c:2051 [inline] ___slab_alloc+0x7f4/0xeb0 mm/slub.c:3193 __slab_alloc mm/slub.c:3292 [inline] __slab_alloc_node mm/slub.c:3345 [inline] slab_alloc_node mm/slub.c:3442 [inline] __kmem_cache_alloc_node+0x25b/0x340 mm/slub.c:3491 __do_kmalloc_node mm/slab_common.c:967 [inline] __kmalloc_node_track_caller+0x9c/0x190 mm/slab_common.c:988 kmalloc_reserve net/core/skbuff.c:492 [inline] __alloc_skb+0x12c/0x2c0 net/core/skbuff.c:565 alloc_skb_fclone include/linux/skbuff.h:1320 [inline] tcp_stream_alloc_skb+0x3c/0x300 net/ipv4/tcp.c:862 tcp_sendmsg_locked+0xdcf/0x41e0 net/ipv4/tcp.c:1325 tcp_sendmsg+0x2c/0x40 net/ipv4/tcp.c:1483 sock_sendmsg_nosec net/socket.c:714 [inline] sock_sendmsg net/socket.c:734 [inline] sock_write_iter+0x3d4/0x540 net/socket.c:1108 call_write_iter include/linux/fs.h:2186 [inline] new_sync_write fs/read_write.c:491 [inline] vfs_write+0x7b5/0xbb0 fs/read_write.c:584 ksys_write+0x19b/0x2c0 fs/read_write.c:637 do_syscall_x64 arch/x86/entry/common.c:50 [inline] do_syscall_64+0x2b/0x70 arch/x86/entry/common.c:80 entry_SYSCALL_64_after_hwframe+0x63/0xcd 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+0x751/0x780 mm/page_alloc.c:1496 free_unref_page_prepare mm/page_alloc.c:3369 [inline] free_unref_page+0x19/0x4c0 mm/page_alloc.c:3464 qlist_free_all+0x2b/0x70 mm/kasan/quarantine.c:187 kasan_quarantine_reduce+0x156/0x170 mm/kasan/quarantine.c:294 __kasan_slab_alloc+0x1f/0x70 mm/kasan/common.c:302 kasan_slab_alloc include/linux/kasan.h:201 [inline] slab_post_alloc_hook mm/slab.h:761 [inline] slab_alloc_node mm/slub.c:3452 [inline] __kmem_cache_alloc_node+0x1e0/0x340 mm/slub.c:3491 __do_kmalloc_node mm/slab_common.c:967 [inline] __kmalloc_node_track_caller+0x9c/0x190 mm/slab_common.c:988 kmalloc_reserve net/core/skbuff.c:492 [inline] __alloc_skb+0x12c/0x2c0 net/core/skbuff.c:565 alloc_skb_fclone include/linux/skbuff.h:1320 [inline] tcp_stream_alloc_skb+0x3c/0x300 net/ipv4/tcp.c:862 tcp_sendmsg_locked+0xdcf/0x41e0 net/ipv4/tcp.c:1325 tcp_sendmsg+0x2c/0x40 net/ipv4/tcp.c:1483 sock_sendmsg_nosec net/socket.c:714 [inline] sock_sendmsg net/socket.c:734 [inline] sock_write_iter+0x3d4/0x540 net/socket.c:1108 call_write_iter include/linux/fs.h:2186 [inline] new_sync_write fs/read_write.c:491 [inline] vfs_write+0x7b5/0xbb0 fs/read_write.c:584 ksys_write+0x19b/0x2c0 fs/read_write.c:637 do_syscall_x64 arch/x86/entry/common.c:50 [inline] do_syscall_64+0x2b/0x70 arch/x86/entry/common.c:80 entry_SYSCALL_64_after_hwframe+0x63/0xcd Memory state around the buggy address: ffff888048454700: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ffff888048454780: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc >ffff888048454800: fa fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ^ ffff888048454880: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ffff888048454900: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ==================================================================