================================================================== BUG: KASAN: use-after-free in __read_once_size include/linux/compiler.h:199 [inline] 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:126 [inline] BUG: KASAN: use-after-free in wq_has_sleeper include/linux/wait.h:160 [inline] BUG: KASAN: use-after-free in skwq_has_sleeper include/net/sock.h:2082 [inline] BUG: KASAN: use-after-free in sock_def_write_space+0x642/0x670 net/core/sock.c:2813 Read of size 8 at addr ffff888091f51a78 by task sshd/9864 CPU: 0 PID: 9864 Comm: sshd Not tainted 5.5.0-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+0x197/0x210 lib/dump_stack.c:118 print_address_description.constprop.0.cold+0xd4/0x30b mm/kasan/report.c:374 __kasan_report.cold+0x1b/0x32 mm/kasan/report.c:506 kasan_report+0x12/0x20 mm/kasan/common.c:639 __asan_report_load8_noabort+0x14/0x20 mm/kasan/generic_report.c:135 __read_once_size include/linux/compiler.h:199 [inline] list_empty include/linux/list.h:282 [inline] waitqueue_active include/linux/wait.h:126 [inline] wq_has_sleeper include/linux/wait.h:160 [inline] skwq_has_sleeper include/net/sock.h:2082 [inline] sock_def_write_space+0x642/0x670 net/core/sock.c:2813 sock_wfree+0x1e1/0x260 net/core/sock.c:1958 skb_release_head_state+0xeb/0x260 net/core/skbuff.c:653 skb_release_all+0x16/0x60 net/core/skbuff.c:664 __kfree_skb net/core/skbuff.c:680 [inline] consume_skb net/core/skbuff.c:839 [inline] consume_skb+0xfb/0x410 net/core/skbuff.c:833 __dev_kfree_skb_any+0xa4/0xd0 net/core/dev.c:3017 dev_consume_skb_any include/linux/netdevice.h:3681 [inline] napi_consume_skb+0x41a/0x5d0 net/core/skbuff.c:903 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:4510 [inline] netdev_start_xmit include/linux/netdevice.h:4524 [inline] xmit_one net/core/dev.c:3470 [inline] dev_hard_start_xmit+0x1a3/0x9b0 net/core/dev.c:3486 sch_direct_xmit+0x372/0xd30 net/sched/sch_generic.c:313 __dev_xmit_skb net/core/dev.c:3671 [inline] __dev_queue_xmit+0x2707/0x35c0 net/core/dev.c:4032 dev_queue_xmit+0x18/0x20 net/core/dev.c:4096 neigh_hh_output include/net/neighbour.h:499 [inline] neigh_output include/net/neighbour.h:508 [inline] ip_finish_output2+0x17b7/0x2610 net/ipv4/ip_output.c:228 __ip_finish_output net/ipv4/ip_output.c:306 [inline] __ip_finish_output+0x604/0xc00 net/ipv4/ip_output.c:288 ip_finish_output+0x38/0x1f0 net/ipv4/ip_output.c:316 NF_HOOK_COND include/linux/netfilter.h:296 [inline] ip_output+0x22b/0x680 net/ipv4/ip_output.c:430 dst_output include/net/dst.h:436 [inline] ip_local_out+0xbb/0x1b0 net/ipv4/ip_output.c:125 __ip_queue_xmit+0x878/0x1c20 net/ipv4/ip_output.c:530 ip_queue_xmit+0x5a/0x70 include/net/ip.h:237 __tcp_transmit_skb+0x1ac9/0x3900 net/ipv4/tcp_output.c:1234 tcp_transmit_skb net/ipv4/tcp_output.c:1250 [inline] tcp_write_xmit+0xf91/0x5bf0 net/ipv4/tcp_output.c:2513 __tcp_push_pending_frames+0xb4/0x350 net/ipv4/tcp_output.c:2689 tcp_push+0x489/0x700 net/ipv4/tcp.c:725 tcp_sendmsg_locked+0x2a4d/0x3470 net/ipv4/tcp.c:1403 tcp_sendmsg+0x30/0x50 net/ipv4/tcp.c:1433 inet_sendmsg+0x9e/0xe0 net/ipv4/af_inet.c:807 sock_sendmsg_nosec net/socket.c:652 [inline] sock_sendmsg+0xd7/0x130 net/socket.c:672 sock_write_iter+0x2cb/0x400 net/socket.c:1004 call_write_iter include/linux/fs.h:1902 [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+0x220/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/0x790 arch/x86/entry/common.c:294 entry_SYSCALL_64_after_hwframe+0x49/0xbe RIP: 0033:0x7efde234f370 Code: 73 01 c3 48 8b 0d c8 4a 2b 00 31 d2 48 29 c2 64 89 11 48 83 c8 ff eb ea 90 90 83 3d 85 a2 2b 00 00 75 10 b8 01 00 00 00 0f 05 <48> 3d 01 f0 ff ff 73 31 c3 48 83 ec 08 e8 0e 8a 01 00 48 89 04 24 RSP: 002b:00007ffebdbfd698 EFLAGS: 00000246 ORIG_RAX: 0000000000000001 RAX: ffffffffffffffda RBX: 0000000000002338 RCX: 00007efde234f370 RDX: 0000000000002338 RSI: 000055ee802bb200 RDI: 0000000000000003 RBP: 000055ee802bb200 R08: 0000000000000001 R09: 0101010101010101 R10: 0000000000000008 R11: 0000000000000246 R12: 00007ffebdbfd6fc R13: 000055ee7f572fb4 R14: 0000000000000028 R15: 000055ee7f574ca0 Allocated by task 11677: save_stack+0x23/0x90 mm/kasan/common.c:72 set_track mm/kasan/common.c:80 [inline] __kasan_kmalloc mm/kasan/common.c:513 [inline] __kasan_kmalloc.constprop.0+0xcf/0xe0 mm/kasan/common.c:486 kasan_slab_alloc+0xf/0x20 mm/kasan/common.c:521 slab_post_alloc_hook mm/slab.h:584 [inline] slab_alloc mm/slab.c:3320 [inline] kmem_cache_alloc+0x121/0x710 mm/slab.c:3484 sock_alloc_inode+0x1c/0x1d0 net/socket.c:253 alloc_inode+0x68/0x1e0 fs/inode.c:231 new_inode_pseudo+0x19/0xf0 fs/inode.c:927 sock_alloc+0x41/0x270 net/socket.c:573 __sock_create+0xc2/0x730 net/socket.c:1397 sock_create net/socket.c:1484 [inline] __sys_socket+0x103/0x220 net/socket.c:1526 __do_sys_socket net/socket.c:1535 [inline] __se_sys_socket net/socket.c:1533 [inline] __x64_sys_socket+0x73/0xb0 net/socket.c:1533 do_syscall_64+0xfa/0x790 arch/x86/entry/common.c:294 entry_SYSCALL_64_after_hwframe+0x49/0xbe Freed by task 9: save_stack+0x23/0x90 mm/kasan/common.c:72 set_track mm/kasan/common.c:80 [inline] kasan_set_free_info mm/kasan/common.c:335 [inline] __kasan_slab_free+0x102/0x150 mm/kasan/common.c:474 kasan_slab_free+0xe/0x10 mm/kasan/common.c:483 __cache_free mm/slab.c:3426 [inline] kmem_cache_free+0x86/0x320 mm/slab.c:3694 sock_free_inode+0x20/0x30 net/socket.c:274 i_callback+0x44/0x80 fs/inode.c:220 rcu_do_batch kernel/rcu/tree.c:2186 [inline] rcu_core+0x5e1/0x1390 kernel/rcu/tree.c:2410 rcu_core_si+0x9/0x10 kernel/rcu/tree.c:2419 __do_softirq+0x262/0x98c kernel/softirq.c:292 The buggy address belongs to the object at ffff888091f51a00 which belongs to the cache sock_inode_cache(49:syz3) of size 1152 The buggy address is located 120 bytes inside of 1152-byte region [ffff888091f51a00, ffff888091f51e80) The buggy address belongs to the page: page:ffffea000247d440 refcount:1 mapcount:0 mapping:ffff88809d8881c0 index:0xffff888091f51ffd raw: 00fffe0000000200 ffffea000247ce88 ffffea000286f0c8 ffff88809d8881c0 raw: ffff888091f51ffd ffff888091f51000 0000000100000003 0000000000000000 page dumped because: kasan: bad access detected Memory state around the buggy address: ffff888091f51900: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ffff888091f51980: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc >ffff888091f51a00: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ^ ffff888091f51a80: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ffff888091f51b00: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ==================================================================