================================================================== BUG: KASAN: use-after-free in __lock_acquire+0x3d4d/0x3e00 kernel/locking/lockdep.c:3305 Read of size 8 at addr ffff8801cdee8c00 by task syz-executor4/22866 CPU: 0 PID: 22866 Comm: syz-executor4 Not tainted 4.15.0-rc6+ #155 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_load8_noabort+0x14/0x20 mm/kasan/report.c:430 __lock_acquire+0x3d4d/0x3e00 kernel/locking/lockdep.c:3305 lock_acquire+0x1d5/0x580 kernel/locking/lockdep.c:3914 __raw_spin_lock include/linux/spinlock_api_smp.h:142 [inline] _raw_spin_lock+0x2a/0x40 kernel/locking/spinlock.c:144 spin_lock include/linux/spinlock.h:310 [inline] shmem_fault+0x615/0x960 mm/shmem.c:1981 __do_fault+0xeb/0x30f mm/memory.c:3196 do_read_fault mm/memory.c:3606 [inline] do_fault mm/memory.c:3706 [inline] handle_pte_fault mm/memory.c:3937 [inline] __handle_mm_fault+0x1d8f/0x3ce0 mm/memory.c:4061 handle_mm_fault+0x334/0x8d0 mm/memory.c:4098 __do_page_fault+0x5c9/0xc90 arch/x86/mm/fault.c:1429 do_page_fault+0xee/0x720 arch/x86/mm/fault.c:1504 page_fault+0x4c/0x60 arch/x86/entry/entry_64.S:1243 RIP: 0023:0xf7faec79 RSP: 002b:000000002098d000 EFLAGS: 00010296 RAX: 0000000000000000 RBX: 00000000000001fe RCX: 000000002098d000 RDX: 0000000020651000 RSI: 0000000020c6f000 RDI: 000000002095c000 RBP: 0000000000000000 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000000 R12: 0000000000000000 R13: 0000000000000000 R14: 0000000000000000 R15: 0000000000000000 Allocated by task 22864: 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:3544 shmem_alloc_inode+0x1b/0x40 mm/shmem.c:3836 alloc_inode+0x65/0x180 fs/inode.c:208 new_inode_pseudo+0x69/0x190 fs/inode.c:890 new_inode+0x1c/0x40 fs/inode.c:919 shmem_get_inode+0xe1/0x920 mm/shmem.c:2157 __shmem_file_setup+0x3f5/0x6a0 mm/shmem.c:4211 shmem_kernel_file_setup mm/shmem.c:4249 [inline] shmem_zero_setup+0x96/0x3a0 mm/shmem.c:4293 mmap_region+0x121b/0x15a0 mm/mmap.c:1721 do_mmap+0x6c0/0xe00 mm/mmap.c:1483 do_mmap_pgoff include/linux/mm.h:2217 [inline] vm_mmap_pgoff+0x1de/0x280 mm/util.c:333 SYSC_mmap_pgoff mm/mmap.c:1533 [inline] SyS_mmap_pgoff+0x23b/0x5f0 mm/mmap.c:1491 do_syscall_32_irqs_on arch/x86/entry/common.c:327 [inline] do_fast_syscall_32+0x3ee/0xf9d arch/x86/entry/common.c:389 entry_SYSENTER_compat+0x54/0x63 arch/x86/entry/entry_64_compat.S:129 Freed by task 22871: 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:3488 [inline] kmem_cache_free+0x83/0x2a0 mm/slab.c:3746 shmem_destroy_callback+0x5a/0xa0 mm/shmem.c:3847 __rcu_reclaim kernel/rcu/rcu.h:195 [inline] rcu_do_batch kernel/rcu/tree.c:2758 [inline] invoke_rcu_callbacks kernel/rcu/tree.c:3012 [inline] __rcu_process_callbacks kernel/rcu/tree.c:2979 [inline] rcu_process_callbacks+0xd6c/0x17f0 kernel/rcu/tree.c:2996 __do_softirq+0x2d7/0xb85 kernel/softirq.c:285 The buggy address belongs to the object at ffff8801cdee8a60 which belongs to the cache shmem_inode_cache of size 1200 The buggy address is located 416 bytes inside of 1200-byte region [ffff8801cdee8a60, ffff8801cdee8f10) The buggy address belongs to the page: page:0000000076aceb0e count:1 mapcount:0 mapping:000000004dd37f74 index:0xffff8801cdee8ffd flags: 0x2fffc0000000100(slab) raw: 02fffc0000000100 ffff8801cdee8000 ffff8801cdee8ffd 0000000100000003 raw: ffffea00073fc460 ffffea000762bce0 ffff8801d9ea24c0 0000000000000000 page dumped because: kasan: bad access detected Memory state around the buggy address: ffff8801cdee8b00: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ffff8801cdee8b80: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb >ffff8801cdee8c00: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ^ ffff8801cdee8c80: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ffff8801cdee8d00: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ==================================================================