================================================================== BUG: KASAN: use-after-free in list_empty include/linux/list.h:282 [inline] BUG: KASAN: use-after-free in waitqueue_active include/linux/wait.h:127 [inline] BUG: KASAN: use-after-free in wq_has_sleeper include/linux/wait.h:161 [inline] BUG: KASAN: use-after-free in skwq_has_sleeper include/net/sock.h:2152 [inline] BUG: KASAN: use-after-free in sock_def_write_space+0x609/0x630 net/core/sock.c:2917 Read of size 8 at addr ffff88803f0afb00 by task kworker/1:4/17066 CPU: 1 PID: 17066 Comm: kworker/1:4 Not tainted 5.8.0-rc4-syzkaller #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 Workqueue: events_power_efficient gc_worker Call Trace: __dump_stack lib/dump_stack.c:77 [inline] dump_stack+0x18f/0x20d lib/dump_stack.c:118 print_address_description.constprop.0.cold+0xae/0x436 mm/kasan/report.c:383 __kasan_report mm/kasan/report.c:513 [inline] kasan_report.cold+0x1f/0x37 mm/kasan/report.c:530 list_empty include/linux/list.h:282 [inline] waitqueue_active include/linux/wait.h:127 [inline] wq_has_sleeper include/linux/wait.h:161 [inline] skwq_has_sleeper include/net/sock.h:2152 [inline] sock_def_write_space+0x609/0x630 net/core/sock.c:2917 sock_wfree+0x1cc/0x240 net/core/sock.c:2051 skb_release_head_state+0x9f/0x250 net/core/skbuff.c:651 skb_release_all net/core/skbuff.c:662 [inline] __kfree_skb net/core/skbuff.c:678 [inline] consume_skb net/core/skbuff.c:837 [inline] consume_skb+0x89/0x160 net/core/skbuff.c:831 __dev_kfree_skb_any+0x9c/0xc0 net/core/dev.c:3107 dev_consume_skb_any include/linux/netdevice.h:3746 [inline] napi_consume_skb+0x24f/0x370 net/core/skbuff.c:901 free_old_xmit_skbs+0xd5/0x230 drivers/net/virtio_net.c:1389 start_xmit+0x123/0x15f0 drivers/net/virtio_net.c:1585 __netdev_start_xmit include/linux/netdevice.h:4619 [inline] netdev_start_xmit include/linux/netdevice.h:4633 [inline] xmit_one net/core/dev.c:3562 [inline] dev_hard_start_xmit+0x193/0x950 net/core/dev.c:3578 sch_direct_xmit+0x2ea/0xc00 net/sched/sch_generic.c:313 qdisc_restart net/sched/sch_generic.c:376 [inline] __qdisc_run+0x4b9/0x1630 net/sched/sch_generic.c:384 qdisc_run include/net/pkt_sched.h:134 [inline] qdisc_run include/net/pkt_sched.h:126 [inline] __dev_xmit_skb net/core/dev.c:3753 [inline] __dev_queue_xmit+0x1458/0x2d60 net/core/dev.c:4106 neigh_hh_output include/net/neighbour.h:498 [inline] neigh_output include/net/neighbour.h:507 [inline] ip_finish_output2+0x1523/0x21f0 net/ipv4/ip_output.c:228 __ip_finish_output net/ipv4/ip_output.c:306 [inline] __ip_finish_output+0x6e6/0xbc0 net/ipv4/ip_output.c:288 ip_finish_output+0x34/0x1f0 net/ipv4/ip_output.c:316 NF_HOOK_COND include/linux/netfilter.h:296 [inline] ip_output+0x196/0x310 net/ipv4/ip_output.c:430 dst_output include/net/dst.h:443 [inline] ip_local_out net/ipv4/ip_output.c:125 [inline] __ip_queue_xmit+0x8e9/0x19c0 net/ipv4/ip_output.c:530 __tcp_transmit_skb+0x1884/0x3690 net/ipv4/tcp_output.c:1246 tcp_transmit_skb net/ipv4/tcp_output.c:1264 [inline] tcp_write_xmit+0xebf/0x5c70 net/ipv4/tcp_output.c:2527 __tcp_push_pending_frames+0xaa/0x330 net/ipv4/tcp_output.c:2702 tcp_push_pending_frames include/net/tcp.h:1867 [inline] tcp_data_snd_check net/ipv4/tcp_input.c:5285 [inline] tcp_rcv_established+0x8ac/0x1e70 net/ipv4/tcp_input.c:5776 tcp_v4_do_rcv+0x5d1/0x870 net/ipv4/tcp_ipv4.c:1641 tcp_v4_rcv+0x2cef/0x3760 net/ipv4/tcp_ipv4.c:2023 ip_protocol_deliver_rcu+0x5c/0x880 net/ipv4/ip_input.c:204 ip_local_deliver_finish+0x20a/0x370 net/ipv4/ip_input.c:231 NF_HOOK include/linux/netfilter.h:307 [inline] NF_HOOK include/linux/netfilter.h:301 [inline] ip_local_deliver+0x1b3/0x200 net/ipv4/ip_input.c:252 dst_input include/net/dst.h:449 [inline] ip_sublist_rcv_finish+0x9a/0x2c0 net/ipv4/ip_input.c:550 ip_list_rcv_finish.constprop.0+0x514/0x6e0 net/ipv4/ip_input.c:600 ip_sublist_rcv net/ipv4/ip_input.c:608 [inline] ip_list_rcv+0x34e/0x488 net/ipv4/ip_input.c:643 __netif_receive_skb_list_ptype net/core/dev.c:5330 [inline] __netif_receive_skb_list_core+0x549/0x8e0 net/core/dev.c:5378 __netif_receive_skb_list net/core/dev.c:5430 [inline] netif_receive_skb_list_internal+0x777/0xd70 net/core/dev.c:5537 gro_normal_list net/core/dev.c:5648 [inline] gro_normal_list net/core/dev.c:5644 [inline] napi_complete_done+0x1f1/0x860 net/core/dev.c:6373 virtqueue_napi_complete+0x2c/0xc0 drivers/net/virtio_net.c:329 virtnet_poll+0xae0/0xd76 drivers/net/virtio_net.c:1455 napi_poll net/core/dev.c:6690 [inline] net_rx_action+0x4a1/0xe80 net/core/dev.c:6760 __do_softirq+0x34c/0xa60 kernel/softirq.c:292 asm_call_on_stack+0xf/0x20 arch/x86/entry/entry_64.S:711 __run_on_irqstack arch/x86/include/asm/irq_stack.h:22 [inline] run_on_irqstack_cond arch/x86/include/asm/irq_stack.h:48 [inline] do_softirq_own_stack+0x111/0x170 arch/x86/kernel/irq_64.c:77 invoke_softirq kernel/softirq.c:387 [inline] __irq_exit_rcu kernel/softirq.c:417 [inline] irq_exit_rcu+0x229/0x270 kernel/softirq.c:429 common_interrupt+0xa1/0x220 arch/x86/kernel/irq.c:239 asm_common_interrupt+0x1e/0x40 arch/x86/include/asm/idtentry.h:578 RIP: 0010:arch_local_irq_restore arch/x86/include/asm/paravirt.h:765 [inline] RIP: 0010:seqcount_lockdep_reader_access include/linux/seqlock.h:99 [inline] RIP: 0010:read_seqcount_begin.constprop.0+0x110/0x1f0 include/linux/seqlock.h:182 Code: 00 fc ff df 48 c1 e8 03 80 3c 10 00 0f 85 d0 00 00 00 48 83 3d a0 25 43 03 00 0f 84 92 00 00 00 e8 15 ff 01 fb 48 89 df 57 9d <0f> 1f 44 00 00 e8 06 ff 01 fb 44 8b 25 3f 09 3e 04 31 ff 44 89 e3 RSP: 0018:ffffc900180afc78 EFLAGS: 00000293 RAX: 0000000000000000 RBX: 0000000000000293 RCX: 0000000000000006 RDX: ffff8880443224c0 RSI: ffffffff8671baeb RDI: 0000000000000293 RBP: 0000000000000200 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000001 R11: 0000000000000000 R12: dffffc0000000000 R13: 0000000000000000 R14: 0000000000000000 R15: 0000000000000200 nf_conntrack_get_ht include/net/netfilter/nf_conntrack.h:300 [inline] gc_worker+0x176/0xb70 net/netfilter/nf_conntrack_core.c:1385 process_one_work+0x94c/0x1670 kernel/workqueue.c:2269 worker_thread+0x64c/0x1120 kernel/workqueue.c:2415 kthread+0x3b5/0x4a0 kernel/kthread.c:291 ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:293 Allocated by task 23242: save_stack+0x1b/0x40 mm/kasan/common.c:48 set_track mm/kasan/common.c:56 [inline] __kasan_kmalloc.constprop.0+0xc2/0xd0 mm/kasan/common.c:494 slab_post_alloc_hook mm/slab.h:586 [inline] slab_alloc mm/slab.c:3320 [inline] kmem_cache_alloc+0x12c/0x3b0 mm/slab.c:3484 sock_alloc_inode+0x18/0x1c0 net/socket.c:253 alloc_inode+0x61/0x230 fs/inode.c:232 new_inode_pseudo+0x14/0xe0 fs/inode.c:928 sock_alloc+0x3c/0x260 net/socket.c:573 __sock_create+0xb9/0x740 net/socket.c:1391 sock_create net/socket.c:1478 [inline] __sys_socket+0xef/0x200 net/socket.c:1520 __do_sys_socket net/socket.c:1529 [inline] __se_sys_socket net/socket.c:1527 [inline] __x64_sys_socket+0x6f/0xb0 net/socket.c:1527 do_syscall_64+0x60/0xe0 arch/x86/entry/common.c:384 entry_SYSCALL_64_after_hwframe+0x44/0xa9 Freed by task 9: save_stack+0x1b/0x40 mm/kasan/common.c:48 set_track mm/kasan/common.c:56 [inline] kasan_set_free_info mm/kasan/common.c:316 [inline] __kasan_slab_free+0xf5/0x140 mm/kasan/common.c:455 __cache_free mm/slab.c:3426 [inline] kmem_cache_free+0x7f/0x310 mm/slab.c:3694 i_callback+0x3f/0x70 fs/inode.c:221 rcu_do_batch kernel/rcu/tree.c:2414 [inline] rcu_core+0x5c7/0x1160 kernel/rcu/tree.c:2641 __do_softirq+0x34c/0xa60 kernel/softirq.c:292 The buggy address belongs to the object at ffff88803f0afa80 which belongs to the cache sock_inode_cache of size 1216 The buggy address is located 128 bytes inside of 1216-byte region [ffff88803f0afa80, ffff88803f0aff40) The buggy address belongs to the page: page:ffffea0000fc2bc0 refcount:1 mapcount:0 mapping:0000000000000000 index:0xffff88803f0afffd flags: 0xfffe0000000200(slab) raw: 00fffe0000000200 ffffea00012a28c8 ffffea0000e67e08 ffff8880a9741c40 raw: ffff88803f0afffd ffff88803f0af000 0000000100000003 0000000000000000 page dumped because: kasan: bad access detected Memory state around the buggy address: ffff88803f0afa00: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ffff88803f0afa80: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb >ffff88803f0afb00: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ^ ffff88803f0afb80: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ffff88803f0afc00: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ==================================================================