================================================================== BUG: KASAN: use-after-free in filemap_fault+0x25f5/0x2a00 mm/filemap.c:2559 Read of size 8 at addr ffff88809f4d45a8 by task syz-executor4/12040 CPU: 0 PID: 12040 Comm: syz-executor4 Not tainted 4.20.0-next-20190107 #6 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+0x1db/0x2d0 lib/dump_stack.c:113 print_address_description.cold+0x7c/0x20d mm/kasan/report.c:187 kasan_report.cold+0x1b/0x40 mm/kasan/report.c:317 __asan_report_load8_noabort+0x14/0x20 mm/kasan/generic_report.c:135 filemap_fault+0x25f5/0x2a00 mm/filemap.c:2559 ext4_filemap_fault+0x83/0xaf fs/ext4/inode.c:6327 __do_fault+0x176/0x7b0 mm/memory.c:3013 do_shared_fault mm/memory.c:3479 [inline] do_fault mm/memory.c:3554 [inline] handle_pte_fault mm/memory.c:3781 [inline] __handle_mm_fault+0x3500/0x55a0 mm/memory.c:3905 handle_mm_fault+0x4ec/0xc80 mm/memory.c:3942 do_user_addr_fault arch/x86/mm/fault.c:1475 [inline] __do_page_fault+0x5da/0xd60 arch/x86/mm/fault.c:1541 do_page_fault+0xe6/0x7d8 arch/x86/mm/fault.c:1572 page_fault+0x1e/0x30 arch/x86/entry/entry_64.S:1143 RIP: 0033:0x43f1f9 Code: b7 0e 66 89 0f 48 83 c6 02 48 83 c7 02 0f 1f 40 00 f6 c2 04 74 0c 8b 0e 89 0f 48 83 c6 04 48 83 c7 04 f6 c2 08 74 0e 48 8b 0e <48> 89 0f 48 83 c6 08 48 83 c7 08 81 e2 f0 00 00 00 74 1f 0f 1f 40 RSP: 002b:00007fff846eaad8 EFLAGS: 00010202 RAX: 0000000020008ff8 RBX: 0000000000000005 RCX: 0031656c69662f2e RDX: 0000000000000008 RSI: 0000000000740348 RDI: 0000000020008ff8 RBP: 000000000073c040 R08: 0000000000740328 R09: 0000000000000000 R10: 00007fff846eab90 R11: 0000000000000246 R12: 0000000000000003 R13: fffffffffffffffe R14: 000000000073c04c R15: 000000000073c04c Allocated by task 12041: save_stack+0x45/0xd0 mm/kasan/common.c:73 set_track mm/kasan/common.c:85 [inline] kasan_kmalloc mm/kasan/common.c:482 [inline] kasan_kmalloc+0xcf/0xe0 mm/kasan/common.c:455 kasan_slab_alloc+0xf/0x20 mm/kasan/common.c:397 kmem_cache_alloc+0x12d/0x710 mm/slab.c:3541 vm_area_alloc+0x7a/0x1d0 kernel/fork.c:331 mmap_region+0x93b/0x1ca0 mm/mmap.c:1756 do_mmap+0xa09/0x1220 mm/mmap.c:1559 do_mmap_pgoff include/linux/mm.h:2421 [inline] vm_mmap_pgoff+0x20b/0x2b0 mm/util.c:350 ksys_mmap_pgoff+0x4f8/0x650 mm/mmap.c:1609 __do_sys_mmap arch/x86/kernel/sys_x86_64.c:100 [inline] __se_sys_mmap arch/x86/kernel/sys_x86_64.c:91 [inline] __x64_sys_mmap+0xe9/0x1b0 arch/x86/kernel/sys_x86_64.c:91 do_syscall_64+0x1a3/0x800 arch/x86/entry/common.c:290 entry_SYSCALL_64_after_hwframe+0x49/0xbe Freed by task 12042: save_stack+0x45/0xd0 mm/kasan/common.c:73 set_track mm/kasan/common.c:85 [inline] __kasan_slab_free+0x102/0x150 mm/kasan/common.c:444 kasan_slab_free+0xe/0x10 mm/kasan/common.c:452 __cache_free mm/slab.c:3485 [inline] kmem_cache_free+0x86/0x260 mm/slab.c:3747 vm_area_free+0x1d/0x30 kernel/fork.c:350 remove_vma+0x142/0x180 mm/mmap.c:185 remove_vma_list mm/mmap.c:2585 [inline] __do_munmap+0x72e/0xef0 mm/mmap.c:2828 do_munmap mm/mmap.c:2836 [inline] mmap_region+0x698/0x1ca0 mm/mmap.c:1729 do_mmap+0xa09/0x1220 mm/mmap.c:1559 do_mmap_pgoff include/linux/mm.h:2421 [inline] vm_mmap_pgoff+0x20b/0x2b0 mm/util.c:350 ksys_mmap_pgoff+0x4f8/0x650 mm/mmap.c:1609 __do_sys_mmap arch/x86/kernel/sys_x86_64.c:100 [inline] __se_sys_mmap arch/x86/kernel/sys_x86_64.c:91 [inline] __x64_sys_mmap+0xe9/0x1b0 arch/x86/kernel/sys_x86_64.c:91 do_syscall_64+0x1a3/0x800 arch/x86/entry/common.c:290 entry_SYSCALL_64_after_hwframe+0x49/0xbe The buggy address belongs to the object at ffff88809f4d4568 which belongs to the cache vm_area_struct(81:syz4) of size 200 The buggy address is located 64 bytes inside of 200-byte region [ffff88809f4d4568, ffff88809f4d4630) The buggy address belongs to the page: page:ffffea00027d3500 count:1 mapcount:0 mapping:ffff88808d26bb40 index:0x0 flags: 0x1fffc0000000200(slab) raw: 01fffc0000000200 ffffea00027df488 ffffea00023e06c8 ffff88808d26bb40 raw: 0000000000000000 ffff88809f4d4040 000000010000000f ffff8880a494a1c0 page dumped because: kasan: bad access detected page->mem_cgroup:ffff8880a494a1c0 Memory state around the buggy address: ffff88809f4d4480: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ffff88809f4d4500: fb fb fb fb fb fc fc fc fc fc fc fc fc fb fb fb >ffff88809f4d4580: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ^ ffff88809f4d4600: fb fb fb fb fb fb fc fc fc fc fc fc fc fc 00 00 ffff88809f4d4680: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ==================================================================