loop0: detected capacity change from 0 to 4096 ntfs3: loop0: Different NTFS' sector size and media sector size ================================================================== BUG: KASAN: slab-out-of-bounds in memcmp+0xa6/0xb0 lib/string.c:939 Read of size 1 at addr ffff88802015fe20 by task syz-executor.0/6029 CPU: 0 PID: 6029 Comm: syz-executor.0 Not tainted 5.14.0-rc5-syzkaller #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/12/2023 Call Trace: __dump_stack lib/dump_stack.c:88 [inline] dump_stack_lvl+0x57/0x7d lib/dump_stack.c:105 print_address_description.constprop.0.cold+0x6c/0x309 mm/kasan/report.c:233 __kasan_report mm/kasan/report.c:419 [inline] kasan_report.cold+0x83/0xdf mm/kasan/report.c:436 memcmp+0xa6/0xb0 lib/string.c:939 memcmp include/linux/fortify-string.h:235 [inline] mi_find_attr+0xf0/0x1e0 fs/ntfs3/record.c:319 ni_find_attr+0x241/0x590 fs/ntfs3/frecord.c:218 ntfs_objid_init+0xaf/0x1f0 fs/ntfs3/fsntfs.c:2348 ntfs_fill_super+0x2c1c/0x3550 fs/ntfs3/super.c:1302 mount_bdev+0x2cb/0x3b0 fs/super.c:1368 legacy_get_tree+0xfa/0x1f0 fs/fs_context.c:610 vfs_get_tree+0x7f/0x2c0 fs/super.c:1498 do_new_mount fs/namespace.c:2905 [inline] path_mount+0x7f3/0x1a40 fs/namespace.c:3235 do_mount fs/namespace.c:3248 [inline] __do_sys_mount fs/namespace.c:3456 [inline] __se_sys_mount fs/namespace.c:3433 [inline] __x64_sys_mount+0x1f5/0x260 fs/namespace.c:3433 do_syscall_x64 arch/x86/entry/common.c:50 [inline] do_syscall_64+0x35/0x80 arch/x86/entry/common.c:80 entry_SYSCALL_64_after_hwframe+0x44/0xae RIP: 0033:0x7f73dc54960a 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:00007f73db8b9f88 EFLAGS: 00000246 ORIG_RAX: 00000000000000a5 RAX: ffffffffffffffda RBX: 000000000001f36b RCX: 00007f73dc54960a RDX: 000000002001f340 RSI: 000000002001f380 RDI: 00007f73db8b9fe0 RBP: 00007f73db8ba020 R08: 00007f73db8ba020 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 000000002001f340 R13: 000000002001f380 R14: 00007f73db8b9fe0 R15: 0000000020000000 Allocated by task 250: kasan_save_stack+0x1b/0x40 mm/kasan/common.c:38 kasan_set_track mm/kasan/common.c:46 [inline] set_alloc_info mm/kasan/common.c:434 [inline] ____kasan_kmalloc mm/kasan/common.c:513 [inline] ____kasan_kmalloc mm/kasan/common.c:472 [inline] __kasan_kmalloc+0x9b/0xd0 mm/kasan/common.c:522 kmalloc_node include/linux/slab.h:609 [inline] kzalloc_node include/linux/slab.h:732 [inline] sbitmap_queue_init_node+0x19c/0x3f0 lib/sbitmap.c:445 bt_alloc block/blk-mq-tag.c:471 [inline] blk_mq_init_bitmaps+0x57/0x130 block/blk-mq-tag.c:485 blk_mq_init_bitmap_tags block/blk-mq-tag.c:500 [inline] blk_mq_init_tags+0x163/0x240 block/blk-mq-tag.c:563 blk_mq_alloc_rq_map+0x39/0x180 block/blk-mq.c:2401 blk_mq_sched_alloc_tags block/blk-mq-sched.c:525 [inline] blk_mq_init_sched+0x208/0x1080 block/blk-mq-sched.c:612 elevator_init_mq block/elevator.c:694 [inline] elevator_init_mq+0x2e4/0x3c0 block/elevator.c:671 __device_add_disk+0x4a2/0xb70 block/genhd.c:474 sd_probe+0xa0e/0xf10 drivers/scsi/sd.c:3488 call_driver_probe drivers/base/dd.c:517 [inline] really_probe+0x1b9/0xb70 drivers/base/dd.c:595 __driver_probe_device+0x2a6/0x460 drivers/base/dd.c:747 driver_probe_device+0x44/0x110 drivers/base/dd.c:777 __device_attach_driver+0x185/0x250 drivers/base/dd.c:894 bus_for_each_drv+0x11e/0x1a0 drivers/base/bus.c:427 __device_attach_async_helper+0x191/0x230 drivers/base/dd.c:923 async_run_entry_fn+0x8e/0x4f0 kernel/async.c:127 process_one_work+0x84c/0x13d0 kernel/workqueue.c:2276 worker_thread+0x598/0x1040 kernel/workqueue.c:2422 kthread+0x38b/0x460 kernel/kthread.c:319 ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:295 The buggy address belongs to the object at ffff88802015f800 which belongs to the cache kmalloc-1k of size 1024 The buggy address is located 544 bytes to the right of 1024-byte region [ffff88802015f800, ffff88802015fc00) The buggy address belongs to the page: page:ffffea0000805600 refcount:1 mapcount:0 mapping:0000000000000000 index:0xffff88802015a800 pfn:0x20158 head:ffffea0000805600 order:3 compound_mapcount:0 compound_pincount:0 flags: 0xfff00000010200(slab|head|node=0|zone=1|lastcpupid=0x7ff) raw: 00fff00000010200 ffffea00009aa008 ffffea0000573208 ffff888010841dc0 raw: ffff88802015a800 000000000010000a 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 0xd2000(__GFP_NOWARN|__GFP_NORETRY|__GFP_COMP|__GFP_NOMEMALLOC), pid 9, ts 5478008587, free_ts 0 prep_new_page mm/page_alloc.c:2436 [inline] get_page_from_freelist+0xa72/0x2f80 mm/page_alloc.c:4169 __alloc_pages+0x1b2/0x500 mm/page_alloc.c:5391 __alloc_pages_node include/linux/gfp.h:570 [inline] alloc_slab_page mm/slub.c:1690 [inline] allocate_slab+0x96/0x4b0 mm/slub.c:1828 new_slab mm/slub.c:1891 [inline] new_slab_objects mm/slub.c:2637 [inline] ___slab_alloc+0x4ba/0x820 mm/slub.c:2800 __slab_alloc.constprop.0+0xa7/0xf0 mm/slub.c:2840 slab_alloc_node mm/slub.c:2922 [inline] __kmalloc_node+0x2df/0x380 mm/slub.c:4156 kmalloc_node include/linux/slab.h:614 [inline] kzalloc_node include/linux/slab.h:732 [inline] blk_alloc_flush_queue+0xf7/0x2d0 block/blk-flush.c:462 blk_mq_alloc_hctx block/blk-mq.c:2800 [inline] blk_mq_alloc_and_init_hctx block/blk-mq.c:3174 [inline] blk_mq_realloc_hw_ctxs+0xd22/0x15d0 block/blk-mq.c:3226 blk_mq_init_allocated_queue+0x2df/0x1580 block/blk-mq.c:3287 blk_mq_init_queue_data block/blk-mq.c:3122 [inline] blk_mq_init_queue+0x66/0xb0 block/blk-mq.c:3132 scsi_alloc_sdev+0x7e9/0xca0 drivers/scsi/scsi_scan.c:270 scsi_probe_and_add_lun+0x18a6/0x2d30 drivers/scsi/scsi_scan.c:1101 __scsi_scan_target+0x1ab/0xad0 drivers/scsi/scsi_scan.c:1583 scsi_scan_channel drivers/scsi/scsi_scan.c:1671 [inline] scsi_scan_channel+0xdf/0x160 drivers/scsi/scsi_scan.c:1647 scsi_scan_host_selected+0x1ef/0x2a0 drivers/scsi/scsi_scan.c:1700 do_scan_async+0x3a/0x450 drivers/scsi/scsi_scan.c:1849 page_owner free stack trace missing Memory state around the buggy address: ffff88802015fd00: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ffff88802015fd80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc >ffff88802015fe00: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ^ ffff88802015fe80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ffff88802015ff00: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ==================================================================