================================================================== 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:2142 [inline] BUG: KASAN: use-after-free in sock_def_write_space+0x609/0x630 net/core/sock.c:2926 Read of size 8 at addr ffff888056a2b5c0 by task syz-executor.3/26272 CPU: 1 PID: 26272 Comm: syz-executor.3 Not tainted 5.8.0-rc2-syzkaller #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 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:2142 [inline] sock_def_write_space+0x609/0x630 net/core/sock.c:2926 sock_wfree+0x1cc/0x240 net/core/sock.c:2060 skb_release_head_state+0x9f/0x250 net/core/skbuff.c:651 skb_release_all net/core/skbuff.c:662 [inline] _kfree_skb_defer net/core/skbuff.c:872 [inline] napi_consume_skb net/core/skbuff.c:917 [inline] napi_consume_skb+0x12e/0x370 net/core/skbuff.c:894 free_old_xmit_skbs+0xd5/0x230 drivers/net/virtio_net.c:1389 virtnet_poll_tx+0x1e9/0x370 drivers/net/virtio_net.c:1516 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 do_softirq kernel/softirq.c:337 [inline] do_softirq+0x16b/0x1e0 kernel/softirq.c:324 __local_bh_enable_ip+0x1f8/0x250 kernel/softirq.c:189 local_bh_enable include/linux/bottom_half.h:32 [inline] rcu_read_unlock_bh include/linux/rcupdate.h:723 [inline] ip_finish_output2+0x869/0x21f0 net/ipv4/ip_output.c:229 __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_mc_output+0x212/0x700 net/ipv4/ip_output.c:415 dst_output include/net/dst.h:435 [inline] ip_local_out net/ipv4/ip_output.c:125 [inline] ip_send_skb+0xd4/0x260 net/ipv4/ip_output.c:1566 udp_send_skb+0x6cd/0x11a0 net/ipv4/udp.c:894 udp_sendmsg+0x1c6b/0x26c0 net/ipv4/udp.c:1181 inet_sendmsg+0x99/0xe0 net/ipv4/af_inet.c:814 sock_sendmsg_nosec net/socket.c:652 [inline] sock_sendmsg+0xcf/0x120 net/socket.c:672 ____sys_sendmsg+0x331/0x810 net/socket.c:2352 ___sys_sendmsg+0xf3/0x170 net/socket.c:2406 __sys_sendmmsg+0x195/0x480 net/socket.c:2496 __do_sys_sendmmsg net/socket.c:2525 [inline] __se_sys_sendmmsg net/socket.c:2522 [inline] __x64_sys_sendmmsg+0x99/0x100 net/socket.c:2522 do_syscall_64+0x60/0xe0 arch/x86/entry/common.c:359 entry_SYSCALL_64_after_hwframe+0x44/0xa9 RIP: 0033:0x45cb29 Code: Bad RIP value. RSP: 002b:00007f7ccbe2fc78 EFLAGS: 00000246 ORIG_RAX: 0000000000000133 RAX: ffffffffffffffda RBX: 00000000004fd760 RCX: 000000000045cb29 RDX: 04000000000001a8 RSI: 0000000020007fc0 RDI: 0000000000000004 RBP: 000000000078bf00 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 00000000ffffffff R13: 0000000000000903 R14: 00000000004cbe13 R15: 00007f7ccbe306d4 Allocated by task 26261: 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:1392 sock_create net/socket.c:1479 [inline] __sys_socket+0xef/0x200 net/socket.c:1521 __do_sys_socket net/socket.c:1530 [inline] __se_sys_socket net/socket.c:1528 [inline] __x64_sys_socket+0x6f/0xb0 net/socket.c:1528 do_syscall_64+0x60/0xe0 arch/x86/entry/common.c:359 entry_SYSCALL_64_after_hwframe+0x44/0xa9 Freed by task 16: 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:2396 [inline] rcu_core+0x5c7/0x1160 kernel/rcu/tree.c:2623 __do_softirq+0x34c/0xa60 kernel/softirq.c:292 The buggy address belongs to the object at ffff888056a2b540 which belongs to the cache sock_inode_cache of size 1216 The buggy address is located 128 bytes inside of 1216-byte region [ffff888056a2b540, ffff888056a2ba00) The buggy address belongs to the page: page:ffffea00015a8ac0 refcount:1 mapcount:0 mapping:0000000000000000 index:0xffff888056a2bffd flags: 0xfffe0000000200(slab) raw: 00fffe0000000200 ffffea00021cf648 ffffea00015a2648 ffff88821b77e8c0 raw: ffff888056a2bffd ffff888056a2b000 0000000100000002 0000000000000000 page dumped because: kasan: bad access detected Memory state around the buggy address: ffff888056a2b480: fb fb fb fb fb fb fb fb fc fc fc fc fc fc fc fc ffff888056a2b500: fc fc fc fc fc fc fc fc fb fb fb fb fb fb fb fb >ffff888056a2b580: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ^ ffff888056a2b600: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ffff888056a2b680: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ==================================================================