================================================================== BUG: KASAN: use-after-free in rxrpc_send_keepalive+0x8a2/0x940 net/rxrpc/output.c:634 Read of size 8 at addr ffff8880a73c4058 by task kworker/1:19/23330 CPU: 1 PID: 23330 Comm: kworker/1:19 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 28712: 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_connect+0x1042/0x4320 net/ipv4/tcp_output.c:3569 tcp_v6_connect+0x1540/0x2030 net/ipv6/tcp_ipv6.c:328 __inet_stream_connect+0x852/0xeb0 net/ipv4/af_inet.c:655 tcp_sendmsg_fastopen net/ipv4/tcp.c:1164 [inline] tcp_sendmsg_locked+0x23b9/0x3220 net/ipv4/tcp.c:1206 tcp_sendmsg+0x30/0x50 net/ipv4/tcp.c:1434 inet6_sendmsg+0x9e/0xe0 net/ipv6/af_inet6.c:576 sock_sendmsg_nosec net/socket.c:637 [inline] sock_sendmsg+0xd7/0x130 net/socket.c:657 __sys_sendto+0x262/0x380 net/socket.c:1952 __do_sys_sendto net/socket.c:1964 [inline] __se_sys_sendto net/socket.c:1960 [inline] __x64_sys_sendto+0xe1/0x1a0 net/socket.c:1960 do_syscall_64+0xfa/0x760 arch/x86/entry/common.c:290 entry_SYSCALL_64_after_hwframe+0x49/0xbe Freed by task 28712: 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_purge net/ipv4/tcp.c:2530 [inline] tcp_write_queue_purge+0x471/0x1310 net/ipv4/tcp.c:2543 tcp_v4_destroy_sock+0x100/0x820 net/ipv4/tcp_ipv4.c:2101 tcp_v6_destroy_sock+0x16/0x30 net/ipv6/tcp_ipv6.c:1819 inet_csk_destroy_sock+0x1a7/0x460 net/ipv4/inet_connection_sock.c:836 tcp_close+0xa93/0x10e0 net/ipv4/tcp.c:2497 inet_release+0xed/0x200 net/ipv4/af_inet.c:427 inet6_release+0x53/0x80 net/ipv6/af_inet6.c:470 __sock_release+0xce/0x280 net/socket.c:590 sock_close+0x1e/0x30 net/socket.c:1268 __fput+0x2ff/0x890 fs/file_table.c:280 ____fput+0x16/0x20 fs/file_table.c:313 task_work_run+0x145/0x1c0 kernel/task_work.c:113 get_signal+0x2078/0x2500 kernel/signal.c:2528 do_signal+0x87/0x1700 arch/x86/kernel/signal.c:815 exit_to_usermode_loop+0x286/0x380 arch/x86/entry/common.c:159 prepare_exit_to_usermode arch/x86/entry/common.c:194 [inline] syscall_return_slowpath arch/x86/entry/common.c:274 [inline] do_syscall_64+0x65f/0x760 arch/x86/entry/common.c:300 entry_SYSCALL_64_after_hwframe+0x49/0xbe The buggy address belongs to the object at ffff8880a73c4040 which belongs to the cache kmalloc-1k of size 1024 The buggy address is located 24 bytes inside of 1024-byte region [ffff8880a73c4040, ffff8880a73c4440) The buggy address belongs to the page: page:ffffea00029cf100 refcount:1 mapcount:0 mapping:ffff8880aa400c40 index:0x0 compound_mapcount: 0 flags: 0x1fffc0000010200(slab|head) raw: 01fffc0000010200 ffffea0002a0b208 ffffea000258fa08 ffff8880aa400c40 raw: 0000000000000000 ffff8880a73c4040 0000000100000007 0000000000000000 page dumped because: kasan: bad access detected Memory state around the buggy address: ffff8880a73c3f00: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ffff8880a73c3f80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc >ffff8880a73c4000: fc fc fc fc fc fc fc fc fb fb fb fb fb fb fb fb ^ ffff8880a73c4080: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ffff8880a73c4100: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ==================================================================