RDX: 0000000020615ffc RSI: 00000000000089e2 RDI: 0000000000000013 RBP: 0000000000000086 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000212 R12: 00000000004b7420 R13: 00007f22d3e51b58 R14: 00000000004b7430 R15: 0000000000000000 ================================================================== BUG: KASAN: use-after-free in __fput+0x6b1/0x7f0 Read of size 2 at addr ffff8801c0eb85b0 by task syz-executor6/19595 CPU: 1 PID: 19595 Comm: syz-executor6 Not tainted 4.14.0-rc4+ #80 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 Call Trace: dump_stack+0x194/0x257 print_address_description+0x73/0x250 kasan_report+0x25b/0x340 __asan_report_load2_noabort+0x14/0x20 __fput+0x6b1/0x7f0 ____fput+0x15/0x20 task_work_run+0x199/0x270 exit_to_usermode_loop+0x296/0x310 syscall_return_slowpath+0x42f/0x510 entry_SYSCALL_64_fastpath+0xbc/0xbe RIP: 0033:0x452719 RSP: 002b:00007f22d3e51be8 EFLAGS: 00000212 ORIG_RAX: 0000000000000010 RAX: fffffffffffffff4 RBX: 0000000000758020 RCX: 0000000000452719 RDX: 0000000020615ffc RSI: 00000000000089e2 RDI: 0000000000000013 RBP: 0000000000000395 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000212 R12: 00000000006f3698 R13: 0000000000000014 R14: 00007f22d3e526d4 R15: ffffffffffffffff Allocated by task 19595: save_stack_trace+0x16/0x20 save_stack+0x43/0xd0 kasan_kmalloc+0xad/0xe0 kasan_slab_alloc+0x12/0x20 kmem_cache_alloc+0x12e/0x760 sock_alloc_inode+0x70/0x300 alloc_inode+0x65/0x180 new_inode_pseudo+0x69/0x190 sock_alloc+0x41/0x270 kcm_ioctl+0x864/0x1610 sock_do_ioctl+0x65/0xb0 sock_ioctl+0x2c2/0x440 do_vfs_ioctl+0x1b1/0x1530 SyS_ioctl+0x8f/0xc0 entry_SYSCALL_64_fastpath+0x1f/0xbe Freed by task 19595: save_stack_trace+0x16/0x20 save_stack+0x43/0xd0 kasan_slab_free+0x71/0xc0 kmem_cache_free+0x77/0x280 sock_destroy_inode+0x56/0x70 destroy_inode+0x15d/0x200 evict+0x57e/0x920 iput+0x7b9/0xaf0 sock_release+0x168/0x1e0 sock_close+0x16/0x20 __fput+0x333/0x7f0 ____fput+0x15/0x20 task_work_run+0x199/0x270 exit_to_usermode_loop+0x296/0x310 syscall_return_slowpath+0x42f/0x510 entry_SYSCALL_64_fastpath+0xbc/0xbe The buggy address belongs to the object at ffff8801c0eb8580 which belongs to the cache sock_inode_cache of size 1040 The buggy address is located 48 bytes inside of 1040-byte region [ffff8801c0eb8580, ffff8801c0eb8990) The buggy address belongs to the page: page:ffffea000703ae00 count:1 mapcount:0 mapping:ffff8801c0eb80c0 index:0xffff8801c0eb8ffd flags: 0x200000000000100(slab) raw: 0200000000000100 ffff8801c0eb80c0 ffff8801c0eb8ffd 0000000100000003 raw: ffffea0007036620 ffffea0007036d20 ffff8801d9913cc0 0000000000000000 page dumped because: kasan: bad access detected Memory state around the buggy address: ffff8801c0eb8480: fb fb fb fb fb fb fb fb fb fb fc fc fc fc fc fc ffff8801c0eb8500: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc >ffff8801c0eb8580: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ^ ffff8801c0eb8600: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ffff8801c0eb8680: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ==================================================================