ntfs3: loop1: Different NTFS' sector size (1024) and media sector size (512) ntfs3: loop1: Mark volume as dirty due to NTFS errors ================================================================== BUG: KASAN: slab-out-of-bounds in memcmp lib/string.c:765 [inline] BUG: KASAN: slab-out-of-bounds in bcmp+0xbe/0x1e0 lib/string.c:797 Read of size 8 at addr ffff88807b877d18 by task syz-executor.1/14172 CPU: 0 PID: 14172 Comm: syz-executor.1 Not tainted 6.1.0-rc5-syzkaller-00241-gab290eaddc4c #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 10/26/2022 Call Trace: __dump_stack lib/dump_stack.c:88 [inline] dump_stack_lvl+0x1b1/0x28e lib/dump_stack.c:106 print_address_description+0x74/0x340 mm/kasan/report.c:284 print_report+0x107/0x1f0 mm/kasan/report.c:395 kasan_report+0xcd/0x100 mm/kasan/report.c:495 memcmp lib/string.c:765 [inline] bcmp+0xbe/0x1e0 lib/string.c:797 _Z6memcmpPKvU17pass_object_size0S0_U17pass_object_size0m include/linux/fortify-string.h:549 [inline] mi_find_attr+0x124/0x2b0 fs/ntfs3/record.c:310 ni_find_attr+0x38d/0x8c0 fs/ntfs3/frecord.c:202 indx_get_root fs/ntfs3/index.c:930 [inline] indx_find+0x1b9/0xb20 fs/ntfs3/index.c:1048 dir_search_u+0x161/0x320 fs/ntfs3/dir.c:254 ntfs_extend_init+0x1b4/0x5a0 fs/ntfs3/fsntfs.c:214 ntfs_fill_super+0x3f20/0x42a0 fs/ntfs3/super.c:1243 get_tree_bdev+0x400/0x620 fs/super.c:1324 vfs_get_tree+0x88/0x270 fs/super.c:1531 do_new_mount+0x289/0xad0 fs/namespace.c:3040 do_mount fs/namespace.c:3383 [inline] __do_sys_mount fs/namespace.c:3591 [inline] __se_sys_mount+0x2d3/0x3c0 fs/namespace.c:3568 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:0x7f9d8f88cb6a 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:00007f9d90537f88 EFLAGS: 00000202 ORIG_RAX: 00000000000000a5 RAX: ffffffffffffffda RBX: 0000000020000200 RCX: 00007f9d8f88cb6a RDX: 0000000020000000 RSI: 0000000020000100 RDI: 00007f9d90537fe0 RBP: 00007f9d90538020 R08: 00007f9d90538020 R09: 0000000020000000 R10: 0000000000000000 R11: 0000000000000202 R12: 0000000020000000 R13: 0000000020000100 R14: 00007f9d90537fe0 R15: 0000000020000140 Allocated by task 14172: kasan_save_stack mm/kasan/common.c:45 [inline] kasan_set_track+0x3d/0x60 mm/kasan/common.c:52 ____kasan_kmalloc mm/kasan/common.c:371 [inline] __kasan_kmalloc+0x97/0xb0 mm/kasan/common.c:380 kasan_kmalloc include/linux/kasan.h:211 [inline] __do_kmalloc_node mm/slab_common.c:955 [inline] __kmalloc+0xaf/0x1a0 mm/slab_common.c:968 kmalloc include/linux/slab.h:558 [inline] mi_init+0x72/0xe0 fs/ntfs3/record.c:105 ntfs_read_mft fs/ntfs3/inode.c:53 [inline] ntfs_iget5+0x309/0x36f0 fs/ntfs3/inode.c:501 ntfs_extend_init+0x13d/0x5a0 fs/ntfs3/fsntfs.c:199 ntfs_fill_super+0x3f20/0x42a0 fs/ntfs3/super.c:1243 get_tree_bdev+0x400/0x620 fs/super.c:1324 vfs_get_tree+0x88/0x270 fs/super.c:1531 do_new_mount+0x289/0xad0 fs/namespace.c:3040 do_mount fs/namespace.c:3383 [inline] __do_sys_mount fs/namespace.c:3591 [inline] __se_sys_mount+0x2d3/0x3c0 fs/namespace.c:3568 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 The buggy address belongs to the object at ffff88807b877800 which belongs to the cache kmalloc-1k of size 1024 The buggy address is located 280 bytes to the right of 1024-byte region [ffff88807b877800, ffff88807b877c00) The buggy address belongs to the physical page: page:ffffea0001ee1c00 refcount:1 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x7b870 head:ffffea0001ee1c00 order:3 compound_mapcount:0 compound_pincount:0 flags: 0xfff00000010200(slab|head|node=0|zone=1|lastcpupid=0x7ff) raw: 00fff00000010200 dead000000000100 dead000000000122 ffff888012841dc0 raw: 0000000000000000 0000000080100010 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 0xd2a20(GFP_ATOMIC|__GFP_NOWARN|__GFP_NORETRY|__GFP_COMP|__GFP_NOMEMALLOC), pid 3625, tgid 3625 (syz-fuzzer), ts 132147470648, free_ts 132144829251 prep_new_page mm/page_alloc.c:2539 [inline] get_page_from_freelist+0x742/0x7c0 mm/page_alloc.c:4288 __alloc_pages+0x259/0x560 mm/page_alloc.c:5555 alloc_slab_page+0x70/0xf0 mm/slub.c:1794 allocate_slab+0x5e/0x4b0 mm/slub.c:1939 new_slab mm/slub.c:1992 [inline] ___slab_alloc+0x782/0xe20 mm/slub.c:3180 __slab_alloc mm/slub.c:3279 [inline] slab_alloc_node mm/slub.c:3364 [inline] __kmem_cache_alloc_node+0x252/0x310 mm/slub.c:3437 __do_kmalloc_node mm/slab_common.c:954 [inline] __kmalloc_node_track_caller+0x9c/0x190 mm/slab_common.c:975 kmalloc_reserve net/core/skbuff.c:437 [inline] __alloc_skb+0x112/0x2b0 net/core/skbuff.c:509 alloc_skb include/linux/skbuff.h:1267 [inline] __tcp_send_ack+0x98/0x5f0 net/ipv4/tcp_output.c:3960 tcp_cleanup_rbuf net/ipv4/tcp.c:1628 [inline] tcp_recvmsg_locked+0x1cf3/0x25c0 net/ipv4/tcp.c:2649 tcp_recvmsg+0x337/0x870 net/ipv4/tcp.c:2679 inet_recvmsg+0x13a/0x250 net/ipv4/af_inet.c:861 sock_recvmsg_nosec net/socket.c:995 [inline] sock_recvmsg net/socket.c:1013 [inline] sock_read_iter+0x3fa/0x530 net/socket.c:1086 call_read_iter include/linux/fs.h:2185 [inline] new_sync_read fs/read_write.c:389 [inline] vfs_read+0x7ac/0xbf0 fs/read_write.c:470 ksys_read+0x177/0x2a0 fs/read_write.c:613 do_syscall_x64 arch/x86/entry/common.c:50 [inline] do_syscall_64+0x3d/0xb0 arch/x86/entry/common.c:80 page last free stack trace: reset_page_owner include/linux/page_owner.h:24 [inline] free_pages_prepare mm/page_alloc.c:1459 [inline] free_pcp_prepare+0x80c/0x8f0 mm/page_alloc.c:1509 free_unref_page_prepare mm/page_alloc.c:3387 [inline] free_unref_page+0x7d/0x5f0 mm/page_alloc.c:3483 skb_free_frag include/linux/skbuff.h:3190 [inline] skb_free_head net/core/skbuff.c:758 [inline] skb_release_data+0x58e/0x6d0 net/core/skbuff.c:789 skb_release_all net/core/skbuff.c:854 [inline] __kfree_skb+0x56/0x1d0 net/core/skbuff.c:868 tcp_eat_recv_skb net/ipv4/tcp.c:1638 [inline] tcp_recvmsg_locked+0x14ab/0x25c0 net/ipv4/tcp.c:2633 tcp_recvmsg+0x337/0x870 net/ipv4/tcp.c:2679 inet_recvmsg+0x13a/0x250 net/ipv4/af_inet.c:861 sock_recvmsg_nosec net/socket.c:995 [inline] sock_recvmsg net/socket.c:1013 [inline] sock_read_iter+0x3fa/0x530 net/socket.c:1086 call_read_iter include/linux/fs.h:2185 [inline] new_sync_read fs/read_write.c:389 [inline] vfs_read+0x7ac/0xbf0 fs/read_write.c:470 ksys_read+0x177/0x2a0 fs/read_write.c:613 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 Memory state around the buggy address: ffff88807b877c00: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ffff88807b877c80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc >ffff88807b877d00: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ^ ffff88807b877d80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ffff88807b877e00: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ==================================================================