ntfs3: loop1: Different NTFS' sector size (2048) and media sector size (512) ================================================================== BUG: KASAN: use-after-free in ntfs_iget5+0x2d08/0x3310 fs/ntfs3/inode.c:519 Read of size 8 at addr ffff88804172ff60 by task syz-executor.1/20229 CPU: 0 PID: 20229 Comm: syz-executor.1 Not tainted 6.3.0-rc4-syzkaller-00243-g6ab608fe852b #0 Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.14.0-2 04/01/2014 Call Trace: __dump_stack lib/dump_stack.c:88 [inline] dump_stack_lvl+0xd9/0x150 lib/dump_stack.c:106 print_address_description.constprop.0+0x2c/0x3c0 mm/kasan/report.c:319 print_report mm/kasan/report.c:430 [inline] kasan_report+0x11c/0x130 mm/kasan/report.c:536 ntfs_iget5+0x2d08/0x3310 fs/ntfs3/inode.c:519 ntfs_fill_super+0x2028/0x3ab0 fs/ntfs3/super.c:1044 get_tree_bdev+0x444/0x760 fs/super.c:1303 vfs_get_tree+0x8d/0x350 fs/super.c:1510 do_new_mount fs/namespace.c:3042 [inline] path_mount+0x1342/0x1e40 fs/namespace.c:3372 do_mount fs/namespace.c:3385 [inline] __do_sys_mount fs/namespace.c:3594 [inline] __se_sys_mount fs/namespace.c:3571 [inline] __ia32_sys_mount+0x282/0x300 fs/namespace.c:3571 do_syscall_32_irqs_on arch/x86/entry/common.c:112 [inline] __do_fast_syscall_32+0x65/0xf0 arch/x86/entry/common.c:178 do_fast_syscall_32+0x33/0x70 arch/x86/entry/common.c:203 entry_SYSENTER_compat_after_hwframe+0x70/0x82 RIP: 0023:0xf7f30579 Code: b8 01 10 06 03 74 b4 01 10 07 03 74 b0 01 10 08 03 74 d8 01 00 00 00 00 00 00 00 00 00 00 00 00 00 51 52 55 89 e5 0f 34 cd 80 <5d> 5a 59 c3 90 90 90 90 8d b4 26 00 00 00 00 8d b4 26 00 00 00 00 RSP: 002b:00000000f7f2b410 EFLAGS: 00000296 ORIG_RAX: 0000000000000015 RAX: ffffffffffffffda RBX: 00000000f7f2b480 RCX: 000000002001f3c0 RDX: 000000002001f380 RSI: 0000000000000014 RDI: 00000000f7f2b4c0 RBP: 00000000f7f2b4c0 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000292 R12: 0000000000000000 R13: 0000000000000000 R14: 0000000000000000 R15: 0000000000000000 The buggy address belongs to the physical page: page:ffffea000105cbc0 refcount:0 mapcount:0 mapping:0000000000000000 index:0x2 pfn:0x4172f flags: 0x4fff00000000000(node=1|zone=1|lastcpupid=0x7ff) raw: 04fff00000000000 ffffea000105ac88 ffffea0001052b48 0000000000000000 raw: 0000000000000002 0000000000000000 00000000ffffffff 0000000000000000 page dumped because: kasan: bad access detected page_owner tracks the page as freed page last allocated via order 0, migratetype Reclaimable, gfp_mask 0x112c50(GFP_NOFS|__GFP_NOWARN|__GFP_NORETRY|__GFP_HARDWALL|__GFP_RECLAIMABLE), pid 4561, tgid 4561 (jbd2/sda1-8), ts 1821390932553, free_ts 1845729473212 prep_new_page mm/page_alloc.c:2553 [inline] get_page_from_freelist+0x1190/0x2e20 mm/page_alloc.c:4326 __alloc_pages+0x1cb/0x4a0 mm/page_alloc.c:5592 alloc_pages+0x1aa/0x270 mm/mempolicy.c:2283 alloc_slab_page mm/slub.c:1851 [inline] allocate_slab+0x25f/0x390 mm/slub.c:1998 new_slab mm/slub.c:2051 [inline] ___slab_alloc+0xa91/0x1400 mm/slub.c:3193 __slab_alloc.constprop.0+0x56/0xa0 mm/slub.c:3292 __slab_alloc_node mm/slub.c:3345 [inline] slab_alloc_node mm/slub.c:3442 [inline] slab_alloc mm/slub.c:3460 [inline] __kmem_cache_alloc_lru mm/slub.c:3467 [inline] kmem_cache_alloc+0x38e/0x3b0 mm/slub.c:3476 kmem_cache_zalloc include/linux/slab.h:710 [inline] alloc_buffer_head+0x24/0x150 fs/buffer.c:2947 jbd2_journal_write_metadata_buffer+0xd0/0xb90 fs/jbd2/journal.c:360 jbd2_journal_commit_transaction+0x16a4/0x63b0 fs/jbd2/commit.c:668 kjournald2+0x1d4/0x890 fs/jbd2/journal.c:209 kthread+0x2e8/0x3a0 kernel/kthread.c:376 ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:308 page last free stack trace: reset_page_owner include/linux/page_owner.h:24 [inline] free_pages_prepare mm/page_alloc.c:1454 [inline] free_pcp_prepare+0x5d5/0xa50 mm/page_alloc.c:1504 free_unref_page_prepare mm/page_alloc.c:3388 [inline] free_unref_page+0x1d/0x490 mm/page_alloc.c:3483 qlink_free mm/kasan/quarantine.c:168 [inline] qlist_free_all+0x6a/0x170 mm/kasan/quarantine.c:187 kasan_quarantine_reduce+0x192/0x220 mm/kasan/quarantine.c:294 __kasan_slab_alloc+0x63/0x90 mm/kasan/common.c:305 kasan_slab_alloc include/linux/kasan.h:186 [inline] slab_post_alloc_hook mm/slab.h:769 [inline] slab_alloc_node mm/slub.c:3452 [inline] slab_alloc mm/slub.c:3460 [inline] __kmem_cache_alloc_lru mm/slub.c:3467 [inline] kmem_cache_alloc+0x17c/0x3b0 mm/slub.c:3476 vm_area_dup+0x21/0x1f0 kernel/fork.c:466 __split_vma+0x199/0x810 mm/mmap.c:2172 do_vmi_align_munmap+0x34a/0xf60 mm/mmap.c:2320 do_vmi_munmap+0x26e/0x2c0 mm/mmap.c:2452 __vm_munmap+0x136/0x280 mm/mmap.c:2726 __do_sys_munmap mm/mmap.c:2751 [inline] __se_sys_munmap mm/mmap.c:2748 [inline] __ia32_sys_munmap+0x57/0x80 mm/mmap.c:2748 do_syscall_32_irqs_on arch/x86/entry/common.c:112 [inline] __do_fast_syscall_32+0x65/0xf0 arch/x86/entry/common.c:178 do_fast_syscall_32+0x33/0x70 arch/x86/entry/common.c:203 entry_SYSENTER_compat_after_hwframe+0x70/0x82 Memory state around the buggy address: ffff88804172fe00: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ffff88804172fe80: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff >ffff88804172ff00: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ^ ffff88804172ff80: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ffff888041730000: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ================================================================== ---------------- Code disassembly (best guess), 2 bytes skipped: 0: 10 06 adc %al,(%rsi) 2: 03 74 b4 01 add 0x1(%rsp,%rsi,4),%esi 6: 10 07 adc %al,(%rdi) 8: 03 74 b0 01 add 0x1(%rax,%rsi,4),%esi c: 10 08 adc %cl,(%rax) e: 03 74 d8 01 add 0x1(%rax,%rbx,8),%esi 1e: 00 51 52 add %dl,0x52(%rcx) 21: 55 push %rbp 22: 89 e5 mov %esp,%ebp 24: 0f 34 sysenter 26: cd 80 int $0x80 * 28: 5d pop %rbp <-- trapping instruction 29: 5a pop %rdx 2a: 59 pop %rcx 2b: c3 retq 2c: 90 nop 2d: 90 nop 2e: 90 nop 2f: 90 nop 30: 8d b4 26 00 00 00 00 lea 0x0(%rsi,%riz,1),%esi 37: 8d b4 26 00 00 00 00 lea 0x0(%rsi,%riz,1),%esi