RDX: 0000000020f77ffc RSI: 00000000000089e2 RDI: 0000000000000016 RBP: 0000000000000086 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000212 R12: 00000000004b759b R13: 00007f183274fbc8 R14: 00000000004b759b R15: 0000000000000000 ================================================================== BUG: KASAN: use-after-free in __fput+0x6b1/0x7f0 fs/file_table.c:212 Read of size 2 at addr ffff8801cf487530 by task syz-executor1/12949 CPU: 1 PID: 12949 Comm: syz-executor1 Not tainted 4.14.0-mm1+ #26 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 Call Trace: __dump_stack lib/dump_stack.c:17 [inline] dump_stack+0x194/0x257 lib/dump_stack.c:53 print_address_description+0x73/0x250 mm/kasan/report.c:252 kasan_report_error mm/kasan/report.c:351 [inline] kasan_report+0x25b/0x340 mm/kasan/report.c:409 __asan_report_load2_noabort+0x14/0x20 mm/kasan/report.c:428 __fput+0x6b1/0x7f0 fs/file_table.c:212 ____fput+0x15/0x20 fs/file_table.c:244 task_work_run+0x199/0x270 kernel/task_work.c:113 tracehook_notify_resume include/linux/tracehook.h:191 [inline] exit_to_usermode_loop+0x296/0x310 arch/x86/entry/common.c:162 prepare_exit_to_usermode arch/x86/entry/common.c:195 [inline] syscall_return_slowpath+0x490/0x550 arch/x86/entry/common.c:264 entry_SYSCALL_64_fastpath+0x94/0x96 RIP: 0033:0x4529d9 RSP: 002b:00007f183274fc58 EFLAGS: 00000212 ORIG_RAX: 0000000000000010 RAX: fffffffffffffff4 RBX: 0000000000758020 RCX: 00000000004529d9 RDX: 0000000020f77ffc RSI: 00000000000089e2 RDI: 0000000000000016 RBP: 0000000000000354 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000212 R12: 00000000006f2080 R13: 0000000000000015 R14: 00007f18327506d4 R15: ffffffffffffffff Allocated by task 12949: save_stack+0x43/0xd0 mm/kasan/kasan.c:447 set_track mm/kasan/kasan.c:459 [inline] kasan_kmalloc+0xad/0xe0 mm/kasan/kasan.c:551 kasan_slab_alloc+0x12/0x20 mm/kasan/kasan.c:489 kmem_cache_alloc+0x12e/0x760 mm/slab.c:3548 sock_alloc_inode+0x70/0x300 net/socket.c:250 alloc_inode+0x65/0x180 fs/inode.c:208 new_inode_pseudo+0x69/0x190 fs/inode.c:889 sock_alloc+0x41/0x270 net/socket.c:565 kcm_clone net/kcm/kcmsock.c:1637 [inline] kcm_ioctl+0x864/0x1610 net/kcm/kcmsock.c:1713 sock_do_ioctl+0x65/0xb0 net/socket.c:960 sock_ioctl+0x2c2/0x440 net/socket.c:1057 vfs_ioctl fs/ioctl.c:46 [inline] do_vfs_ioctl+0x1b1/0x1530 fs/ioctl.c:686 SYSC_ioctl fs/ioctl.c:701 [inline] SyS_ioctl+0x8f/0xc0 fs/ioctl.c:692 entry_SYSCALL_64_fastpath+0x1f/0x96 Freed by task 12949: save_stack+0x43/0xd0 mm/kasan/kasan.c:447 set_track mm/kasan/kasan.c:459 [inline] kasan_slab_free+0x71/0xc0 mm/kasan/kasan.c:524 __cache_free mm/slab.c:3492 [inline] kmem_cache_free+0x77/0x280 mm/slab.c:3750 sock_destroy_inode+0x56/0x70 net/socket.c:280 destroy_inode+0x15d/0x200 fs/inode.c:265 evict+0x57e/0x920 fs/inode.c:569 iput_final fs/inode.c:1514 [inline] iput+0x7b9/0xaf0 fs/inode.c:1541 sock_release+0x168/0x1e0 net/socket.c:606 sock_close+0x16/0x20 net/socket.c:1125 __fput+0x333/0x7f0 fs/file_table.c:210 ____fput+0x15/0x20 fs/file_table.c:244 task_work_run+0x199/0x270 kernel/task_work.c:113 tracehook_notify_resume include/linux/tracehook.h:191 [inline] exit_to_usermode_loop+0x296/0x310 arch/x86/entry/common.c:162 prepare_exit_to_usermode arch/x86/entry/common.c:195 [inline] syscall_return_slowpath+0x490/0x550 arch/x86/entry/common.c:264 entry_SYSCALL_64_fastpath+0x94/0x96 The buggy address belongs to the object at ffff8801cf487500 which belongs to the cache sock_inode_cache of size 1048 The buggy address is located 48 bytes inside of 1048-byte region [ffff8801cf487500, ffff8801cf487918) The buggy address belongs to the page: page:ffffea00073d21c0 count:1 mapcount:0 mapping:ffff8801cf487040 index:0xffff8801cf487ffd flags: 0x2fffc0000000100(slab) raw: 02fffc0000000100 ffff8801cf487040 ffff8801cf487ffd 0000000100000003 raw: ffffea0006f849e0 ffffea0006f858a0 ffff8801d9d31b40 0000000000000000 page dumped because: kasan: bad access detected Memory state around the buggy address: ffff8801cf487400: fb fb fb fb fb fb fb fb fb fb fb fc fc fc fc fc ffff8801cf487480: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc >ffff8801cf487500: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ^ ffff8801cf487580: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ffff8801cf487600: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ==================================================================