================================================================== 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:268 [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:2088 [inline] BUG: KASAN: use-after-free in sock_def_write_space+0x651/0x680 net/core/sock.c:2794 Read of size 8 at addr ffff88806fc51ab8 by task sshd/10579 CPU: 0 PID: 10579 Comm: sshd Not tainted 5.3.0-rc2+ #94 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+0x172/0x1f0 lib/dump_stack.c:113 print_address_description.cold+0xd4/0x306 mm/kasan/report.c:351 __kasan_report.cold+0x1b/0x36 mm/kasan/report.c:482 kasan_report+0x12/0x17 mm/kasan/common.c:612 __asan_report_load8_noabort+0x14/0x20 mm/kasan/generic_report.c:132 __read_once_size include/linux/compiler.h:199 [inline] list_empty include/linux/list.h:268 [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:2088 [inline] sock_def_write_space+0x651/0x680 net/core/sock.c:2794 sock_wfree+0x154/0x190 net/core/sock.c:1950 skb_release_head_state+0xeb/0x250 net/core/skbuff.c:652 skb_release_all+0x16/0x60 net/core/skbuff.c:663 __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:3611 [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/0x15d0 drivers/net/virtio_net.c:1562 __netdev_start_xmit include/linux/netdevice.h:4406 [inline] netdev_start_xmit include/linux/netdevice.h:4420 [inline] xmit_one net/core/dev.c:3280 [inline] dev_hard_start_xmit+0x1a3/0x9c0 net/core/dev.c:3296 sch_direct_xmit+0x372/0xc30 net/sched/sch_generic.c:308 __dev_xmit_skb net/core/dev.c:3477 [inline] __dev_queue_xmit+0x256b/0x3650 net/core/dev.c:3838 dev_queue_xmit+0x18/0x20 net/core/dev.c:3902 neigh_hh_output include/net/neighbour.h:500 [inline] neigh_output include/net/neighbour.h:509 [inline] ip_finish_output2+0x1726/0x2570 net/ipv4/ip_output.c:228 __ip_finish_output net/ipv4/ip_output.c:308 [inline] __ip_finish_output+0x5fc/0xb90 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/0x640 net/ipv4/ip_output.c:432 dst_output include/net/dst.h:436 [inline] ip_local_out+0xbb/0x190 net/ipv4/ip_output.c:125 __ip_queue_xmit+0x86f/0x1bd0 net/ipv4/ip_output.c:532 ip_queue_xmit+0x5a/0x70 include/net/ip.h:236 __tcp_transmit_skb+0x1a38/0x3830 net/ipv4/tcp_output.c:1158 tcp_transmit_skb net/ipv4/tcp_output.c:1174 [inline] tcp_write_xmit+0xe3b/0x56d0 net/ipv4/tcp_output.c:2425 __tcp_push_pending_frames+0xb4/0x350 net/ipv4/tcp_output.c:2601 tcp_push+0x47f/0x6f0 net/ipv4/tcp.c:724 tcp_sendmsg_locked+0x2a99/0x38d0 net/ipv4/tcp.c:1382 tcp_sendmsg+0x30/0x50 net/ipv4/tcp.c:1420 inet_sendmsg+0x9e/0xe0 net/ipv4/af_inet.c:807 sock_sendmsg_nosec net/socket.c:637 [inline] sock_sendmsg+0xd7/0x130 net/socket.c:657 sock_write_iter+0x27c/0x3e0 net/socket.c:989 call_write_iter include/linux/fs.h:1870 [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+0x14f/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+0xfd/0x6a0 arch/x86/entry/common.c:296 entry_SYSCALL_64_after_hwframe+0x49/0xbe RIP: 0033:0x7fa614dec370 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:00007ffdd87247b8 EFLAGS: 00000246 ORIG_RAX: 0000000000000001 RAX: ffffffffffffffda RBX: 00000000000001b8 RCX: 00007fa614dec370 RDX: 00000000000001b8 RSI: 0000563e18014200 RDI: 0000000000000003 RBP: 0000563e18014200 R08: 0000000000000001 R09: 0101010101010101 R10: 0000000000000008 R11: 0000000000000246 R12: 00007ffdd872481c R13: 0000563e16a16fb4 R14: 0000000000000028 R15: 0000563e16a18ca0 Allocated by task 935: save_stack+0x23/0x90 mm/kasan/common.c:69 set_track mm/kasan/common.c:77 [inline] __kasan_kmalloc mm/kasan/common.c:487 [inline] __kasan_kmalloc.constprop.0+0xcf/0xe0 mm/kasan/common.c:460 kasan_slab_alloc+0xf/0x20 mm/kasan/common.c:495 slab_post_alloc_hook mm/slab.h:520 [inline] slab_alloc mm/slab.c:3319 [inline] kmem_cache_alloc+0x121/0x710 mm/slab.c:3483 sock_alloc_inode+0x1c/0x1d0 net/socket.c:239 alloc_inode+0x68/0x1e0 fs/inode.c:227 new_inode_pseudo+0x19/0xf0 fs/inode.c:916 sock_alloc+0x41/0x270 net/socket.c:558 __sock_create+0xc2/0x730 net/socket.c:1382 sock_create net/socket.c:1469 [inline] __sys_socket+0x103/0x220 net/socket.c:1511 __do_sys_socket net/socket.c:1520 [inline] __se_sys_socket net/socket.c:1518 [inline] __x64_sys_socket+0x73/0xb0 net/socket.c:1518 do_syscall_64+0xfd/0x6a0 arch/x86/entry/common.c:296 entry_SYSCALL_64_after_hwframe+0x49/0xbe Freed by task 1031: save_stack+0x23/0x90 mm/kasan/common.c:69 set_track mm/kasan/common.c:77 [inline] __kasan_slab_free+0x102/0x150 mm/kasan/common.c:449 kasan_slab_free+0xe/0x10 mm/kasan/common.c:457 __cache_free mm/slab.c:3425 [inline] kmem_cache_free+0x86/0x320 mm/slab.c:3693 sock_free_inode+0x20/0x30 net/socket.c:260 i_callback+0x44/0x80 fs/inode.c:216 __rcu_reclaim kernel/rcu/rcu.h:222 [inline] rcu_do_batch kernel/rcu/tree.c:2114 [inline] rcu_core+0x67f/0x1580 kernel/rcu/tree.c:2314 rcu_core_si+0x9/0x10 kernel/rcu/tree.c:2323 __do_softirq+0x262/0x98c kernel/softirq.c:292 The buggy address belongs to the object at ffff88806fc51a40 which belongs to the cache sock_inode_cache(81:syz3) of size 1152 The buggy address is located 120 bytes inside of 1152-byte region [ffff88806fc51a40, ffff88806fc51ec0) The buggy address belongs to the page: page:ffffea0001bf1440 refcount:1 mapcount:0 mapping:ffff8880a7d81700 index:0xffff88806fc51ffd flags: 0x1fffc0000000200(slab) raw: 01fffc0000000200 ffffea0001696bc8 ffffea0000350908 ffff8880a7d81700 raw: ffff88806fc51ffd ffff88806fc51040 0000000100000002 0000000000000000 page dumped because: kasan: bad access detected Memory state around the buggy address: ffff88806fc51980: fb fb fb fb fb fb fb fb fc fc fc fc fc fc fc fc ffff88806fc51a00: fc fc fc fc fc fc fc fc fb fb fb fb fb fb fb fb >ffff88806fc51a80: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ^ ffff88806fc51b00: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ffff88806fc51b80: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ==================================================================