================================================================== 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:147 [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 ffff88804d1325f8 by task syz-executor.3/13317 CPU: 1 PID: 13317 Comm: syz-executor.3 Not tainted 5.2.0-next-20190718 #41 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:147 [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_defer /net/core/skbuff.c:873 [inline] napi_consume_skb+0x19d/0x580 /net/core/skbuff.c:918 free_old_xmit_skbs+0xee/0x250 /drivers/net/virtio_net.c:1366 virtnet_poll_tx+0x214/0x3a0 /drivers/net/virtio_net.c:1493 napi_poll /net/core/dev.c:6347 [inline] net_rx_action+0x4d6/0x1030 /net/core/dev.c:6413 __do_softirq+0x262/0x98c /kernel/softirq.c:292 invoke_softirq /kernel/softirq.c:373 [inline] irq_exit+0x19b/0x1e0 /kernel/softirq.c:413 exiting_irq /./arch/x86/include/asm/apic.h:537 [inline] do_IRQ+0x12c/0x200 /arch/x86/kernel/irq.c:259 common_interrupt+0xf/0xf /arch/x86/entry/entry_64.S:605 RIP: 0010:__raw_spin_unlock_irq /./include/linux/spinlock_api_smp.h:169 [inline] RIP: 0010:_raw_spin_unlock_irq+0x54/0x90 /kernel/locking/spinlock.c:199 Code: c0 20 f1 d2 88 48 ba 00 00 00 00 00 fc ff df 48 c1 e8 03 80 3c 10 00 75 33 48 83 3d 35 dc 98 01 00 74 20 fb 66 0f 1f 44 00 00 01 00 00 00 e8 72 98 14 fa 65 8b 05 83 e8 c7 78 85 c0 74 06 41 RSP: 0018:ffff88805c1d7858 EFLAGS: 00000286 ORIG_RAX: ffffffffffffffd9 RAX: 1ffffffff11a5e24 RBX: ffff8880983d7148 RCX: 0000000000000006 RDX: dffffc0000000000 RSI: 0000000000000008 RDI: ffff888092452954 RBP: ffff88805c1d7860 R08: 1ffffffff14a7d50 R09: fffffbfff14a7d51 R10: fffffbfff14a7d50 R11: ffffffff8a53ea87 R12: ffff8880983d7040 R13: ffff8880983d7040 R14: 0000000000000004 R15: 0000000000000000 spin_unlock_irq /./include/linux/spinlock.h:388 [inline] shmem_getpage_gfp+0x11a8/0x2680 /mm/shmem.c:1888 shmem_getpage /mm/shmem.c:152 [inline] shmem_write_begin+0x105/0x1e0 /mm/shmem.c:2480 generic_perform_write+0x23b/0x540 /mm/filemap.c:3330 __generic_file_write_iter+0x25e/0x630 /mm/filemap.c:3459 generic_file_write_iter+0x41d/0x690 /mm/filemap.c:3491 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:0x459819 Code: fd b7 fb ff c3 66 2e 0f 1f 84 00 00 00 00 00 66 90 48 89 f8 48 89 f7 48 89 d6 48 89 ca 4d 89 c2 4d 89 c8 4c 8b 4c 24 08 0f 05 <48> 3d 01 f0 ff ff 0f 83 cb b7 fb ff c3 66 2e 0f 1f 84 00 00 00 00 RSP: 002b:00007f0935e9ac78 EFLAGS: 00000246 ORIG_RAX: 0000000000000001 RAX: ffffffffffffffda RBX: 0000000000000003 RCX: 0000000000459819 RDX: 00000000ffffff76 RSI: 0000000020000000 RDI: 0000000000000007 RBP: 000000000075bf20 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 00007f0935e9b6d4 R13: 00000000004c98c0 R14: 00000000004e0d38 R15: 00000000ffffffff Allocated by task 13313: 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 13328: 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 ffff88804d132580 which belongs to the cache sock_inode_cache(33:syz1) of size 1152 The buggy address is located 120 bytes inside of 1152-byte region [ffff88804d132580, ffff88804d132a00) The buggy address belongs to the page: page:ffffea0001344c80 refcount:1 mapcount:0 mapping:ffff888099da78c0 index:0xffff88804d132ffd flags: 0x1fffc0000000200(slab) raw: 01fffc0000000200 ffffea0001344b88 ffffea0001345008 ffff888099da78c0 raw: ffff88804d132ffd ffff88804d132080 0000000100000003 0000000000000000 page dumped because: kasan: bad access detected Memory state around the buggy address: ffff88804d132480: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ffff88804d132500: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc >ffff88804d132580: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ^ ffff88804d132600: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ffff88804d132680: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ==================================================================