================================================================== BUG: KASAN: slab-out-of-bounds in hdr_find_e+0x255/0x580 fs/ntfs3/index.c:689 Read of size 2 at addr ffff88801e531f20 by task syz-executor.1/8259 CPU: 0 PID: 8259 Comm: syz-executor.1 Not tainted 6.0.0-syzkaller-09423-g493ffd6605b2 #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 09/22/2022 Call Trace: __dump_stack lib/dump_stack.c:88 [inline] dump_stack_lvl+0x1b1/0x28e lib/dump_stack.c:106 print_address_description+0x65/0x4b0 mm/kasan/report.c:317 print_report+0x108/0x1f0 mm/kasan/report.c:433 kasan_report+0xc3/0xf0 mm/kasan/report.c:495 hdr_find_e+0x255/0x580 fs/ntfs3/index.c:689 indx_find+0x4ff/0xb20 fs/ntfs3/index.c:1085 dir_search_u+0x161/0x320 fs/ntfs3/dir.c:254 ntfs_lookup+0x112/0x1b0 fs/ntfs3/namei.c:83 lookup_open fs/namei.c:3391 [inline] open_last_lookups fs/namei.c:3481 [inline] path_openat+0x10e6/0x2df0 fs/namei.c:3688 do_filp_open+0x264/0x4f0 fs/namei.c:3718 do_sys_openat2+0x124/0x4e0 fs/open.c:1310 do_sys_open fs/open.c:1326 [inline] __do_sys_openat fs/open.c:1342 [inline] __se_sys_openat fs/open.c:1337 [inline] __x64_sys_openat+0x243/0x290 fs/open.c:1337 do_syscall_x64 arch/x86/entry/common.c:50 [inline] do_syscall_64+0x3d/0xb0 arch/x86/entry/common.c:80 entry_SYSCALL_64_after_hwframe+0x63/0xcd RIP: 0033:0x7f3c9768b5a9 Code: ff ff c3 66 2e 0f 1f 84 00 00 00 00 00 0f 1f 40 00 48 89 f8 48 89 f7 48 89 d6 48 89 ca 4d 89 c2 4d 89 c8 4c 8b 4c 24 08 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:00007f3c98798168 EFLAGS: 00000246 ORIG_RAX: 0000000000000101 RAX: ffffffffffffffda RBX: 00007f3c977abf80 RCX: 00007f3c9768b5a9 RDX: 000000000000275a RSI: 0000000020000540 RDI: ffffffffffffff9c RBP: 00007f3c976e6580 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000 R13: 00007ffccba550ff R14: 00007f3c98798300 R15: 0000000000022000 Allocated by task 1: kasan_save_stack mm/kasan/common.c:38 [inline] kasan_set_track mm/kasan/common.c:45 [inline] set_alloc_info mm/kasan/common.c:437 [inline] ____kasan_kmalloc+0xcd/0x100 mm/kasan/common.c:516 kasan_kmalloc include/linux/kasan.h:234 [inline] __kmalloc_node+0x26f/0x420 mm/slub.c:4477 kmalloc_array_node include/linux/slab.h:695 [inline] kcalloc_node include/linux/slab.h:700 [inline] blk_mq_alloc_rq_map block/blk-mq.c:3247 [inline] blk_mq_alloc_map_and_rqs+0x128/0x990 block/blk-mq.c:3686 __blk_mq_alloc_map_and_rqs block/blk-mq.c:3708 [inline] __blk_mq_alloc_rq_maps block/blk-mq.c:4224 [inline] blk_mq_alloc_set_map_and_rqs+0x1b6/0x890 block/blk-mq.c:4255 blk_mq_alloc_tag_set+0x779/0xd70 block/blk-mq.c:4412 loop_add+0x2ee/0x9b0 drivers/block/loop.c:1979 loop_init+0x17c/0x22d drivers/block/loop.c:2237 do_one_initcall+0x1c9/0x400 init/main.c:1296 do_initcall_level+0x168/0x218 init/main.c:1369 do_initcalls+0x4b/0x8c init/main.c:1385 kernel_init_freeable+0x3f1/0x57b init/main.c:1623 kernel_init+0x19/0x2b0 init/main.c:1512 ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:306 The buggy address belongs to the object at ffff88801e531800 which belongs to the cache kmalloc-1k of size 1024 The buggy address is located 800 bytes to the right of 1024-byte region [ffff88801e531800, ffff88801e531c00) The buggy address belongs to the physical page: page:ffffea0000794c00 refcount:1 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x1e530 head:ffffea0000794c00 order:3 compound_mapcount:0 compound_pincount:0 flags: 0xfff00000010200(slab|head|node=0|zone=1|lastcpupid=0x7ff) raw: 00fff00000010200 0000000000000000 dead000000000122 ffff888012041dc0 raw: 0000000000000000 0000000000100010 00000001ffffffff 0000000000000000 page dumped because: kasan: bad access detected page_owner tracks the page as allocated page last allocated via order 3, migratetype Unmovable, gfp_mask 0xd20c0(__GFP_IO|__GFP_FS|__GFP_NOWARN|__GFP_NORETRY|__GFP_COMP|__GFP_NOMEMALLOC), pid 1, tgid 1 (swapper/0), ts 6181258743, free_ts 0 prep_new_page mm/page_alloc.c:2532 [inline] get_page_from_freelist+0x742/0x7c0 mm/page_alloc.c:4283 __alloc_pages+0x259/0x560 mm/page_alloc.c:5549 __alloc_pages_node include/linux/gfp.h:243 [inline] alloc_slab_page+0x2e/0xf0 mm/slub.c:1831 allocate_slab+0x5e/0x520 mm/slub.c:1974 new_slab mm/slub.c:2034 [inline] ___slab_alloc+0x3ee/0xc40 mm/slub.c:3036 __slab_alloc mm/slub.c:3123 [inline] slab_alloc_node mm/slub.c:3214 [inline] kmem_cache_alloc_node_trace+0x29c/0x360 mm/slub.c:3312 kmalloc_node include/linux/slab.h:618 [inline] kzalloc_node include/linux/slab.h:744 [inline] sbitmap_queue_init_node+0x174/0x860 lib/sbitmap.c:438 bt_alloc block/blk-mq-tag.c:535 [inline] blk_mq_init_bitmaps block/blk-mq-tag.c:547 [inline] blk_mq_init_tags+0x103/0x270 block/blk-mq-tag.c:578 blk_mq_alloc_rq_map block/blk-mq.c:3234 [inline] blk_mq_alloc_map_and_rqs+0xb6/0x990 block/blk-mq.c:3686 __blk_mq_alloc_map_and_rqs block/blk-mq.c:3708 [inline] __blk_mq_alloc_rq_maps block/blk-mq.c:4224 [inline] blk_mq_alloc_set_map_and_rqs+0x1b6/0x890 block/blk-mq.c:4255 blk_mq_alloc_tag_set+0x779/0xd70 block/blk-mq.c:4412 loop_add+0x2ee/0x9b0 drivers/block/loop.c:1979 loop_init+0x17c/0x22d drivers/block/loop.c:2237 do_one_initcall+0x1c9/0x400 init/main.c:1296 do_initcall_level+0x168/0x218 init/main.c:1369 do_initcalls+0x4b/0x8c init/main.c:1385 page_owner free stack trace missing Memory state around the buggy address: ffff88801e531e00: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ffff88801e531e80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc >ffff88801e531f00: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ^ ffff88801e531f80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ffff88801e532000: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ==================================================================