page_cache_read mm/filemap.c:2296 [inline] filemap_fault+0xc18/0x1c50 mm/filemap.c:2480 ext4_filemap_fault+0x84/0xb0 fs/ext4/inode.c:6233 ================================================================== __do_fault+0xfa/0x380 mm/memory.c:3223 do_read_fault mm/memory.c:3633 [inline] do_fault mm/memory.c:3759 [inline] handle_pte_fault mm/memory.c:3989 [inline] __handle_mm_fault+0x22e9/0x3280 mm/memory.c:4113 BUG: KASAN: use-after-free in ceph_destroy_options+0xda/0x100 net/ceph/ceph_common.c:283 Read of size 8 at addr ffff8880882dc5d0 by task syz-executor.1/26229 handle_mm_fault+0x288/0x7a0 mm/memory.c:4150 __do_page_fault+0x4bc/0xb40 arch/x86/mm/fault.c:1442 page_fault+0x45/0x50 arch/x86/entry/entry_64.S:1122 RIP: 0000:0x55b43f2d38c0 RSP: c036b2f0:00007ffec0368410 EFLAGS: 7ffec0368390 CPU: 0 PID: 26229 Comm: syz-executor.1 Not tainted 4.14.180-syzkaller #0 Mem-Info: 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+0x13e/0x194 lib/dump_stack.c:58 active_anon:231267 inactive_anon:1111063 isolated_anon:0 active_file:40 inactive_file:22 isolated_file:0 unevictable:13431 dirty:0 writeback:3 unstable:0 slab_reclaimable:16019 slab_unreclaimable:117569 mapped:61027 shmem:14712 pagetables:11384 bounce:0 free:25003 free_pcp:30 free_cma:0 print_address_description.cold+0x7c/0x1e2 mm/kasan/report.c:252 kasan_report_error mm/kasan/report.c:351 [inline] kasan_report mm/kasan/report.c:409 [inline] kasan_report.cold+0xa9/0x2ae mm/kasan/report.c:393 ceph_destroy_options+0xda/0x100 net/ceph/ceph_common.c:283 ceph_mount+0xd4c/0x1815 fs/ceph/super.c:1036 Node 0 active_anon:912444kB inactive_anon:868272kB active_file:112kB inactive_file:0kB unevictable:44244kB isolated(anon):0kB isolated(file):0kB mapped:234792kB dirty:0kB writeback:12kB shmem:47864kB shmem_thp: 0kB shmem_pmdmapped: 0kB anon_thp: 313344kB writeback_tmp:0kB unstable:0kB all_unreclaimable? yes mount_fs+0x92/0x2a0 fs/super.c:1237 Node 1 active_anon:12624kB inactive_anon:3575980kB active_file:48kB inactive_file:96kB unevictable:9480kB isolated(anon):0kB isolated(file):0kB mapped:9316kB dirty:0kB writeback:0kB shmem:10984kB shmem_thp: 0kB shmem_pmdmapped: 0kB anon_thp: 0kB writeback_tmp:0kB unstable:0kB all_unreclaimable? yes vfs_kern_mount.part.0+0x5b/0x3c0 fs/namespace.c:1046 vfs_kern_mount fs/namespace.c:1036 [inline] do_new_mount fs/namespace.c:2549 [inline] do_mount+0x3c9/0x24f0 fs/namespace.c:2879 Node 0 SYSC_mount fs/namespace.c:3095 [inline] SyS_mount+0xa8/0x120 fs/namespace.c:3072 DMA free:10448kB min:220kB low:272kB high:324kB active_anon:648kB inactive_anon:4288kB active_file:0kB inactive_file:0kB unevictable:0kB writepending:0kB present:15992kB managed:15908kB mlocked:0kB kernel_stack:0kB pagetables:156kB bounce:0kB free_pcp:0kB local_pcp:0kB free_cma:0kB do_syscall_64+0x1d5/0x640 arch/x86/entry/common.c:292 entry_SYSCALL_64_after_hwframe+0x42/0xb7 RIP: 0033:0x45ca29 lowmem_reserve[]: RSP: 002b:00007fb72a6d0c78 EFLAGS: 00000246 ORIG_RAX: 00000000000000a5 RAX: ffffffffffffffda RBX: 00000000004f6280 RCX: 000000000045ca29 RDX: 0000000020000040 RSI: 00000000200000c0 RDI: 0000000020000480 RBP: 000000000078bfa0 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 00000000ffffffff R13: 0000000000000751 R14: 00000000004ca3aa R15: 00007fb72a6d16d4 0 Allocated by task 26229: save_stack+0x32/0xa0 mm/kasan/kasan.c:447 set_track mm/kasan/kasan.c:459 [inline] kasan_kmalloc mm/kasan/kasan.c:551 [inline] kasan_kmalloc+0xbf/0xe0 mm/kasan/kasan.c:529 kmem_cache_alloc_trace+0x14d/0x7b0 mm/slab.c:3618 kmalloc include/linux/slab.h:488 [inline] kzalloc include/linux/slab.h:661 [inline] ceph_parse_options+0xb8/0xe80 net/ceph/ceph_common.c:349 2557 parse_mount_options fs/ceph/super.c:501 [inline] ceph_mount+0x44f/0x1815 fs/ceph/super.c:1025 mount_fs+0x92/0x2a0 fs/super.c:1237 vfs_kern_mount.part.0+0x5b/0x3c0 fs/namespace.c:1046 vfs_kern_mount fs/namespace.c:1036 [inline] do_new_mount fs/namespace.c:2549 [inline] do_mount+0x3c9/0x24f0 fs/namespace.c:2879 SYSC_mount fs/namespace.c:3095 [inline] SyS_mount+0xa8/0x120 fs/namespace.c:3072 2557 do_syscall_64+0x1d5/0x640 arch/x86/entry/common.c:292 entry_SYSCALL_64_after_hwframe+0x42/0xb7 Freed by task 26229: save_stack+0x32/0xa0 mm/kasan/kasan.c:447 set_track mm/kasan/kasan.c:459 [inline] kasan_slab_free+0x75/0xc0 mm/kasan/kasan.c:524 __cache_free mm/slab.c:3496 [inline] kfree+0xcb/0x260 mm/slab.c:3815 ceph_destroy_client+0x90/0xb0 net/ceph/ceph_common.c:671 create_fs_client fs/ceph/super.c:684 [inline] ceph_mount+0xd25/0x1815 fs/ceph/super.c:1032 2557 mount_fs+0x92/0x2a0 fs/super.c:1237 vfs_kern_mount.part.0+0x5b/0x3c0 fs/namespace.c:1046 vfs_kern_mount fs/namespace.c:1036 [inline] do_new_mount fs/namespace.c:2549 [inline] do_mount+0x3c9/0x24f0 fs/namespace.c:2879 SYSC_mount fs/namespace.c:3095 [inline] SyS_mount+0xa8/0x120 fs/namespace.c:3072 do_syscall_64+0x1d5/0x640 arch/x86/entry/common.c:292 2557 entry_SYSCALL_64_after_hwframe+0x42/0xb7 The buggy address belongs to the object at ffff8880882dc500 which belongs to the cache kmalloc-256 of size 256 The buggy address is located 208 bytes inside of 256-byte region [ffff8880882dc500, ffff8880882dc600) The buggy address belongs to the page: page:ffffea000220b700 count:1 mapcount:0 mapping:ffff8880882dc000 index:0x0 flags: 0xfffe0000000100(slab) raw: 00fffe0000000100 ffff8880882dc000 0000000000000000 000000010000000c raw: ffffea00027dc5a0 ffffea00023caa20 ffff88812fe547c0 0000000000000000 Node 0 page dumped because: kasan: bad access detected Memory state around the buggy address: ffff8880882dc480: fb fb fb fb fb fb fb fb fc fc fc fc fc fc fc fc ffff8880882dc500: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb >ffff8880882dc580: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ^ ffff8880882dc600: fc fc fc fc fc fc fc fc fb fb fb fb fb fb fb fb ffff8880882dc680: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb DMA32 free:36028kB min:36272kB low:45340kB high:54408kB active_anon:911896kB inactive_anon:863984kB active_file:0kB inactive_file:456kB unevictable:44252kB writepending:60kB present:3129332kB managed:2621260kB mlocked:44252kB kernel_stack:10016kB pagetables:17596kB bounce:0kB free_pcp:0kB local_pcp:0kB free_cma:0kB ==================================================================