================================================================== BUG: KASAN: use-after-free in rxrpc_send_keepalive+0x8a2/0x940 net/rxrpc/output.c:634 Read of size 8 at addr ffff8880942e7018 by task kworker/1:2/3511 CPU: 1 PID: 3511 Comm: kworker/1:2 Not tainted 5.4.0-rc3+ #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 12930: 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 include/linux/skbuff.h:1049 [inline] __tcp_send_ack.part.0+0x6a/0x5b0 net/ipv4/tcp_output.c:3675 __tcp_send_ack net/ipv4/tcp_output.c:3702 [inline] tcp_send_ack+0x88/0xa0 net/ipv4/tcp_output.c:3702 __tcp_ack_snd_check+0x165/0x900 net/ipv4/tcp_input.c:5241 tcp_rcv_established+0x1789/0x1e90 net/ipv4/tcp_input.c:5672 tcp_v4_do_rcv+0x610/0x8c0 net/ipv4/tcp_ipv4.c:1561 tcp_v4_rcv+0x2d80/0x3800 net/ipv4/tcp_ipv4.c:1942 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_rcv_finish+0x1d9/0x2f0 net/ipv4/ip_input.c:413 NF_HOOK include/linux/netfilter.h:305 [inline] NF_HOOK include/linux/netfilter.h:299 [inline] ip_rcv+0xe8/0x3f0 net/ipv4/ip_input.c:523 __netif_receive_skb_one_core+0x113/0x1a0 net/core/dev.c:5010 __netif_receive_skb+0x2c/0x1d0 net/core/dev.c:5124 netif_receive_skb_internal+0x108/0x390 net/core/dev.c:5214 napi_skb_finish net/core/dev.c:5677 [inline] napi_gro_receive+0x5fd/0x7a0 net/core/dev.c:5710 receive_buf+0xf8a/0x5840 drivers/net/virtio_net.c:1061 virtnet_receive drivers/net/virtio_net.c:1323 [inline] virtnet_poll+0x5f8/0xe90 drivers/net/virtio_net.c:1428 napi_poll net/core/dev.c:6392 [inline] net_rx_action+0x508/0x1120 net/core/dev.c:6460 __do_softirq+0x262/0x98c kernel/softirq.c:292 Freed by task 12930: 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 net/core/skbuff.c:679 [inline] consume_skb net/core/skbuff.c:838 [inline] consume_skb+0xfb/0x3b0 net/core/skbuff.c:832 __dev_kfree_skb_any+0xa4/0xd0 net/core/dev.c:2823 dev_consume_skb_any include/linux/netdevice.h:3624 [inline] napi_consume_skb+0x41a/0x580 net/core/skbuff.c:902 free_old_xmit_skbs+0xee/0x250 drivers/net/virtio_net.c:1366 start_xmit+0x122/0x1570 drivers/net/virtio_net.c:1562 __netdev_start_xmit include/linux/netdevice.h:4420 [inline] netdev_start_xmit include/linux/netdevice.h:4434 [inline] xmit_one net/core/dev.c:3280 [inline] dev_hard_start_xmit+0x1a3/0x9b0 net/core/dev.c:3296 sch_direct_xmit+0x372/0xc30 net/sched/sch_generic.c:313 __dev_xmit_skb net/core/dev.c:3481 [inline] __dev_queue_xmit+0x286f/0x3720 net/core/dev.c:3842 dev_queue_xmit+0x18/0x20 net/core/dev.c:3906 neigh_hh_output include/net/neighbour.h:500 [inline] neigh_output include/net/neighbour.h:509 [inline] ip_finish_output2+0x1759/0x2590 net/ipv4/ip_output.c:228 __ip_finish_output net/ipv4/ip_output.c:308 [inline] __ip_finish_output+0x604/0xbd0 net/ipv4/ip_output.c:290 ip_finish_output+0x38/0x1f0 net/ipv4/ip_output.c:318 NF_HOOK_COND include/linux/netfilter.h:294 [inline] ip_output+0x21f/0x670 net/ipv4/ip_output.c:432 dst_output include/net/dst.h:436 [inline] ip_local_out+0xbb/0x1b0 net/ipv4/ip_output.c:125 __ip_queue_xmit+0x86f/0x1c10 net/ipv4/ip_output.c:532 ip_queue_xmit+0x5a/0x70 include/net/ip.h:237 __tcp_transmit_skb+0x1a6b/0x3820 net/ipv4/tcp_output.c:1169 __tcp_send_ack.part.0+0x3c6/0x5b0 net/ipv4/tcp_output.c:3696 __tcp_send_ack net/ipv4/tcp_output.c:3702 [inline] tcp_send_ack+0x88/0xa0 net/ipv4/tcp_output.c:3702 __tcp_ack_snd_check+0x165/0x900 net/ipv4/tcp_input.c:5241 tcp_rcv_established+0x1789/0x1e90 net/ipv4/tcp_input.c:5672 tcp_v4_do_rcv+0x610/0x8c0 net/ipv4/tcp_ipv4.c:1561 tcp_v4_rcv+0x2d80/0x3800 net/ipv4/tcp_ipv4.c:1942 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_rcv_finish+0x1d9/0x2f0 net/ipv4/ip_input.c:413 NF_HOOK include/linux/netfilter.h:305 [inline] NF_HOOK include/linux/netfilter.h:299 [inline] ip_rcv+0xe8/0x3f0 net/ipv4/ip_input.c:523 __netif_receive_skb_one_core+0x113/0x1a0 net/core/dev.c:5010 __netif_receive_skb+0x2c/0x1d0 net/core/dev.c:5124 netif_receive_skb_internal+0x108/0x390 net/core/dev.c:5214 napi_skb_finish net/core/dev.c:5677 [inline] napi_gro_receive+0x5fd/0x7a0 net/core/dev.c:5710 receive_buf+0xf8a/0x5840 drivers/net/virtio_net.c:1061 virtnet_receive drivers/net/virtio_net.c:1323 [inline] virtnet_poll+0x5f8/0xe90 drivers/net/virtio_net.c:1428 napi_poll net/core/dev.c:6392 [inline] net_rx_action+0x508/0x1120 net/core/dev.c:6460 __do_softirq+0x262/0x98c kernel/softirq.c:292 The buggy address belongs to the object at ffff8880942e7000 which belongs to the cache kmalloc-1k of size 1024 The buggy address is located 24 bytes inside of 1024-byte region [ffff8880942e7000, ffff8880942e7400) The buggy address belongs to the page: page:ffffea000250b9c0 refcount:1 mapcount:0 mapping:ffff8880aa400c40 index:0xffff8880942e7800 flags: 0x1fffc0000000200(slab) raw: 01fffc0000000200 ffffea00028fe648 ffffea0002a37c88 ffff8880aa400c40 raw: ffff8880942e7800 ffff8880942e7000 0000000100000001 0000000000000000 page dumped because: kasan: bad access detected Memory state around the buggy address: ffff8880942e6f00: 00 00 00 00 00 00 00 00 fc fc fc fc fc fc fc fc ffff8880942e6f80: 00 00 00 00 00 00 00 00 fc fc fc fc fc fc fc fc >ffff8880942e7000: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ^ ffff8880942e7080: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ffff8880942e7100: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ==================================================================