================================================================== BUG: KASAN: use-after-free in rxrpc_send_keepalive+0x8a2/0x940 net/rxrpc/output.c:634 Read of size 8 at addr ffff888096b58018 by task kworker/1:4/8754 CPU: 1 PID: 8754 Comm: kworker/1:4 Not tainted 5.4.0-rc1+ #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 Workqueue: krxrpcd rxrpc_peer_keepalive_worker Call Trace: __dump_stack lib/dump_stack.c:77 [inline] dump_stack+0x172/0x1f0 lib/dump_stack.c:113 print_address_description.constprop.0.cold+0xd4/0x30b mm/kasan/report.c:374 __kasan_report.cold+0x1b/0x41 mm/kasan/report.c:506 kasan_report+0x12/0x20 mm/kasan/common.c:634 __asan_report_load8_noabort+0x14/0x20 mm/kasan/generic_report.c:132 rxrpc_send_keepalive+0x8a2/0x940 net/rxrpc/output.c:634 rxrpc_peer_keepalive_dispatch net/rxrpc/peer_event.c:369 [inline] rxrpc_peer_keepalive_worker+0x7be/0xd02 net/rxrpc/peer_event.c:430 process_one_work+0x9af/0x1740 kernel/workqueue.c:2269 worker_thread+0x98/0xe40 kernel/workqueue.c:2415 kthread+0x361/0x430 kernel/kthread.c:255 ret_from_fork+0x24/0x30 arch/x86/entry/entry_64.S:352 Allocated by task 8724: save_stack+0x23/0x90 mm/kasan/common.c:69 set_track mm/kasan/common.c:77 [inline] __kasan_kmalloc mm/kasan/common.c:510 [inline] __kasan_kmalloc.constprop.0+0xcf/0xe0 mm/kasan/common.c:483 kasan_kmalloc+0x9/0x10 mm/kasan/common.c:524 __do_kmalloc_node mm/slab.c:3615 [inline] __kmalloc_node_track_caller+0x4e/0x70 mm/slab.c:3629 __kmalloc_reserve.isra.0+0x40/0xf0 net/core/skbuff.c:141 __alloc_skb+0x10b/0x5e0 net/core/skbuff.c:209 alloc_skb_fclone include/linux/skbuff.h:1099 [inline] sk_stream_alloc_skb net/ipv4/tcp.c:875 [inline] sk_stream_alloc_skb+0x113/0xc50 net/ipv4/tcp.c:852 tcp_sendmsg_locked+0xc70/0x3220 net/ipv4/tcp.c:1283 tcp_sendmsg+0x30/0x50 net/ipv4/tcp.c:1434 inet_sendmsg+0x9e/0xe0 net/ipv4/af_inet.c:807 sock_sendmsg_nosec net/socket.c:637 [inline] sock_sendmsg+0xd7/0x130 net/socket.c:657 sock_write_iter+0x27c/0x3e0 net/socket.c:989 call_write_iter include/linux/fs.h:1895 [inline] new_sync_write+0x4d3/0x770 fs/read_write.c:483 __vfs_write+0xe1/0x110 fs/read_write.c:496 vfs_write+0x268/0x5d0 fs/read_write.c:558 ksys_write+0x14f/0x290 fs/read_write.c:611 __do_sys_write fs/read_write.c:623 [inline] __se_sys_write fs/read_write.c:620 [inline] __x64_sys_write+0x73/0xb0 fs/read_write.c:620 do_syscall_64+0xfa/0x760 arch/x86/entry/common.c:290 entry_SYSCALL_64_after_hwframe+0x49/0xbe Freed by task 8729: save_stack+0x23/0x90 mm/kasan/common.c:69 set_track mm/kasan/common.c:77 [inline] kasan_set_free_info mm/kasan/common.c:332 [inline] __kasan_slab_free+0x102/0x150 mm/kasan/common.c:471 kasan_slab_free+0xe/0x10 mm/kasan/common.c:480 __cache_free mm/slab.c:3425 [inline] kfree+0x10a/0x2c0 mm/slab.c:3756 skb_free_head+0x93/0xb0 net/core/skbuff.c:591 skb_release_data+0x42d/0x7c0 net/core/skbuff.c:611 skb_release_all+0x4d/0x60 net/core/skbuff.c:665 __kfree_skb+0x16/0x30 net/core/skbuff.c:679 sk_wmem_free_skb include/net/sock.h:1478 [inline] tcp_rtx_queue_unlink_and_free include/net/tcp.h:1801 [inline] tcp_clean_rtx_queue net/ipv4/tcp_input.c:3161 [inline] tcp_ack+0x1c20/0x58a0 net/ipv4/tcp_input.c:3688 tcp_rcv_established+0x6dd/0x1e90 net/ipv4/tcp_input.c:5696 tcp_v4_do_rcv+0x610/0x8c0 net/ipv4/tcp_ipv4.c:1559 tcp_v4_rcv+0x2d80/0x3800 net/ipv4/tcp_ipv4.c:1940 ip_protocol_deliver_rcu+0x5a/0x880 net/ipv4/ip_input.c:204 ip_local_deliver_finish+0x23b/0x390 net/ipv4/ip_input.c:231 NF_HOOK include/linux/netfilter.h:305 [inline] NF_HOOK include/linux/netfilter.h:299 [inline] ip_local_deliver+0x1e9/0x520 net/ipv4/ip_input.c:252 dst_input include/net/dst.h:442 [inline] ip_sublist_rcv_finish+0x9b/0x2d0 net/ipv4/ip_input.c:534 ip_list_rcv_finish net/ipv4/ip_input.c:572 [inline] ip_sublist_rcv+0x827/0xd50 net/ipv4/ip_input.c:580 ip_list_rcv+0x370/0x4ac net/ipv4/ip_input.c:614 __netif_receive_skb_list_ptype net/core/dev.c:5274 [inline] __netif_receive_skb_list_core+0x5fc/0x9d0 net/core/dev.c:5322 __netif_receive_skb_list net/core/dev.c:5374 [inline] netif_receive_skb_list_internal+0x7eb/0xe60 net/core/dev.c:5469 gro_normal_list.part.0+0x1e/0xb0 net/core/dev.c:5892 gro_normal_list net/core/dev.c:6298 [inline] napi_complete_done+0x20d/0x520 net/core/dev.c:6285 virtqueue_napi_complete+0x31/0xa0 drivers/net/virtio_net.c:329 virtnet_poll+0xbad/0xe90 drivers/net/virtio_net.c:1432 napi_poll net/core/dev.c:6614 [inline] net_rx_action+0x508/0x1120 net/core/dev.c:6682 __do_softirq+0x262/0x98c kernel/softirq.c:292 The buggy address belongs to the object at ffff888096b58000 which belongs to the cache kmalloc-1k of size 1024 The buggy address is located 24 bytes inside of 1024-byte region [ffff888096b58000, ffff888096b58400) The buggy address belongs to the page: page:ffffea00025ad600 refcount:1 mapcount:0 mapping:ffff8880aa400c40 index:0x0 compound_mapcount: 0 flags: 0x1fffc0000010200(slab|head) raw: 01fffc0000010200 ffffea0001d6a288 ffffea0002575f88 ffff8880aa400c40 raw: 0000000000000000 ffff888096b58000 0000000100000007 0000000000000000 page dumped because: kasan: bad access detected Memory state around the buggy address: ffff888096b57f00: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ffff888096b57f80: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 >ffff888096b58000: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ^ ffff888096b58080: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ffff888096b58100: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ==================================================================