ntfs3: loop4: Different NTFS sector size (2048) and media sector size (512). ================================================================== BUG: KASAN: slab-out-of-bounds in ntfs_iget5+0x2fd4/0x3670 fs/ntfs3/inode.c:531 Read of size 8 at addr ffff888085ec7f60 by task syz-executor.4/15701 CPU: 0 PID: 15701 Comm: syz-executor.4 Not tainted 6.3.0-syzkaller-11301-g1ae78a14516b #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 04/14/2023 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:351 print_report mm/kasan/report.c:462 [inline] kasan_report+0x11c/0x130 mm/kasan/report.c:572 ntfs_iget5+0x2fd4/0x3670 fs/ntfs3/inode.c:531 ntfs_fill_super+0x209b/0x3c20 fs/ntfs3/super.c:1057 get_tree_bdev+0x44a/0x770 fs/super.c:1303 vfs_get_tree+0x8d/0x350 fs/super.c:1510 do_new_mount fs/namespace.c:3039 [inline] path_mount+0x134b/0x1e40 fs/namespace.c:3369 do_mount fs/namespace.c:3382 [inline] __do_sys_mount fs/namespace.c:3591 [inline] __se_sys_mount fs/namespace.c:3568 [inline] __x64_sys_mount+0x283/0x300 fs/namespace.c:3568 do_syscall_x64 arch/x86/entry/common.c:50 [inline] do_syscall_64+0x39/0xb0 arch/x86/entry/common.c:80 entry_SYSCALL_64_after_hwframe+0x63/0xcd RIP: 0033:0x7f218a88d69a Code: 48 c7 c2 b8 ff ff ff f7 d8 64 89 02 b8 ff ff ff ff eb d2 e8 b8 04 00 00 0f 1f 84 00 00 00 00 00 49 89 ca b8 a5 00 00 00 0f 05 <48> 3d 01 f0 ff ff 73 01 c3 48 c7 c1 b8 ff ff ff f7 d8 64 89 01 48 RSP: 002b:00007f218b5b2f88 EFLAGS: 00000202 ORIG_RAX: 00000000000000a5 RAX: ffffffffffffffda RBX: 000000000001f3c1 RCX: 00007f218a88d69a RDX: 0000000020000180 RSI: 0000000020000040 RDI: 00007f218b5b2fe0 RBP: 00007f218b5b3020 R08: 00007f218b5b3020 R09: 0000000001004018 R10: 0000000001004018 R11: 0000000000000202 R12: 0000000020000180 R13: 0000000020000040 R14: 00007f218b5b2fe0 R15: 0000000020000000 Allocated by task 15692: kasan_save_stack+0x22/0x40 mm/kasan/common.c:45 kasan_set_track+0x25/0x30 mm/kasan/common.c:52 __kasan_slab_alloc+0x7f/0x90 mm/kasan/common.c:328 kasan_slab_alloc include/linux/kasan.h:186 [inline] slab_post_alloc_hook mm/slab.h:711 [inline] slab_alloc_node mm/slub.c:3451 [inline] slab_alloc mm/slub.c:3459 [inline] __kmem_cache_alloc_lru mm/slub.c:3466 [inline] kmem_cache_alloc+0x17c/0x3b0 mm/slub.c:3475 kmem_cache_zalloc include/linux/slab.h:670 [inline] alloc_buffer_head+0x24/0x150 fs/buffer.c:2974 folio_alloc_buffers+0x2f2/0x810 fs/buffer.c:871 folio_create_empty_buffers+0x2c/0x470 fs/buffer.c:1606 ext4_block_write_begin+0xb9c/0xde0 fs/ext4/inode.c:1040 ext4_da_write_begin+0x407/0x8c0 fs/ext4/inode.c:2916 generic_perform_write+0x256/0x570 mm/filemap.c:3923 ext4_buffered_write_iter+0x15b/0x460 fs/ext4/file.c:289 ext4_file_write_iter+0xbe0/0x1740 fs/ext4/file.c:710 __kernel_write_iter+0x262/0x7a0 fs/read_write.c:517 dump_emit_page fs/coredump.c:885 [inline] dump_user_range+0x234/0x700 fs/coredump.c:912 elf_core_dump+0x277e/0x36e0 fs/binfmt_elf.c:2142 do_coredump+0x2ed0/0x3fb0 fs/coredump.c:762 get_signal+0x1bff/0x25b0 kernel/signal.c:2860 arch_do_signal_or_restart+0x79/0x5c0 arch/x86/kernel/signal.c:306 exit_to_user_mode_loop kernel/entry/common.c:168 [inline] exit_to_user_mode_prepare+0x11f/0x240 kernel/entry/common.c:204 irqentry_exit_to_user_mode+0x9/0x40 kernel/entry/common.c:310 exc_page_fault+0xc0/0x170 arch/x86/mm/fault.c:1593 asm_exc_page_fault+0x26/0x30 arch/x86/include/asm/idtentry.h:570 The buggy address belongs to the object at ffff888085ec7e80 which belongs to the cache buffer_head of size 168 The buggy address is located 56 bytes to the right of allocated 168-byte region [ffff888085ec7e80, ffff888085ec7f28) The buggy address belongs to the physical page: page:ffffea000217b1c0 refcount:1 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x85ec7 memcg:ffff8880296b0901 flags: 0xfff00000000200(slab|node=0|zone=1|lastcpupid=0x7ff) page_type: 0xffffffff() raw: 00fff00000000200 ffff88801565ec80 ffffea0000b99340 dead000000000006 raw: 0000000000000000 0000000000110011 00000001ffffffff ffff8880296b0901 page dumped because: kasan: bad access detected page_owner tracks the page as allocated page last allocated via order 0, migratetype Reclaimable, gfp_mask 0x112c50(GFP_NOFS|__GFP_NOWARN|__GFP_NORETRY|__GFP_HARDWALL|__GFP_RECLAIMABLE), pid 8828, tgid 8815 (syz-executor.0), ts 496959164869, free_ts 480779116070 set_page_owner include/linux/page_owner.h:31 [inline] post_alloc_hook+0x2db/0x350 mm/page_alloc.c:1722 prep_new_page mm/page_alloc.c:1729 [inline] get_page_from_freelist+0xf41/0x2c00 mm/page_alloc.c:3493 __alloc_pages+0x1cb/0x4a0 mm/page_alloc.c:4759 alloc_pages+0x1aa/0x270 mm/mempolicy.c:2277 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:3192 __slab_alloc.constprop.0+0x56/0xa0 mm/slub.c:3291 __slab_alloc_node mm/slub.c:3344 [inline] slab_alloc_node mm/slub.c:3441 [inline] slab_alloc mm/slub.c:3459 [inline] __kmem_cache_alloc_lru mm/slub.c:3466 [inline] kmem_cache_alloc+0x38e/0x3b0 mm/slub.c:3475 kmem_cache_zalloc include/linux/slab.h:670 [inline] alloc_buffer_head+0x24/0x150 fs/buffer.c:2974 folio_alloc_buffers+0x2f2/0x810 fs/buffer.c:871 folio_create_empty_buffers+0x2c/0x470 fs/buffer.c:1606 ext4_block_write_begin+0xb9c/0xde0 fs/ext4/inode.c:1040 ext4_da_write_begin+0x407/0x8c0 fs/ext4/inode.c:2916 generic_perform_write+0x256/0x570 mm/filemap.c:3923 ext4_buffered_write_iter+0x15b/0x460 fs/ext4/file.c:289 ext4_file_write_iter+0xbe0/0x1740 fs/ext4/file.c:710 page last free stack trace: reset_page_owner include/linux/page_owner.h:24 [inline] free_pages_prepare mm/page_alloc.c:1302 [inline] free_unref_page_prepare+0x62e/0xcb0 mm/page_alloc.c:2555 free_unref_page+0x33/0x370 mm/page_alloc.c:2650 __unfreeze_partials+0x17c/0x1a0 mm/slub.c:2636 qlink_free mm/kasan/quarantine.c:166 [inline] qlist_free_all+0x6a/0x170 mm/kasan/quarantine.c:185 kasan_quarantine_reduce+0x195/0x220 mm/kasan/quarantine.c:292 __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:711 [inline] slab_alloc_node mm/slub.c:3451 [inline] __kmem_cache_alloc_node+0x17c/0x320 mm/slub.c:3490 kmalloc_trace+0x26/0xe0 mm/slab_common.c:1057 kmalloc include/linux/slab.h:559 [inline] kzalloc include/linux/slab.h:680 [inline] kobject_uevent_env+0x232/0x16c0 lib/kobject_uevent.c:524 gadget_unbind_driver+0x89/0x470 drivers/usb/gadget/udc/core.c:1616 device_remove+0xc8/0x170 drivers/base/dd.c:567 __device_release_driver drivers/base/dd.c:1272 [inline] device_release_driver_internal+0x443/0x610 drivers/base/dd.c:1295 driver_detach+0xd9/0x1b0 drivers/base/dd.c:1358 bus_remove_driver+0x13b/0x2c0 drivers/base/bus.c:735 driver_unregister+0x77/0xb0 drivers/base/driver.c:274 usb_gadget_unregister_driver+0x4c/0x70 drivers/usb/gadget/udc/core.c:1678 Memory state around the buggy address: ffff888085ec7e00: 00 00 00 00 00 00 00 00 fc fc fc fc fc fc fc fc ffff888085ec7e80: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 >ffff888085ec7f00: 00 00 00 00 00 fc fc fc fc fc fc fc fc fc fc fc ^ ffff888085ec7f80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ffff888085ec8000: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ==================================================================