loop4: detected capacity change from 0 to 4096 ================================================================== BUG: KASAN: slab-use-after-free in ntfs_iget5+0x3168/0x3830 fs/ntfs3/inode.c:531 Read of size 8 at addr ffff8880866d6700 by task syz-executor.4/12570 CPU: 1 PID: 12570 Comm: syz-executor.4 Not tainted 6.5.0-rc6-syzkaller #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 07/26/2023 Call Trace: __dump_stack lib/dump_stack.c:88 [inline] dump_stack_lvl+0xd9/0x1b0 lib/dump_stack.c:106 print_address_description mm/kasan/report.c:364 [inline] print_report+0xc4/0x620 mm/kasan/report.c:475 kasan_report+0xda/0x110 mm/kasan/report.c:588 ntfs_iget5+0x3168/0x3830 fs/ntfs3/inode.c:531 ntfs_fill_super+0x26fa/0x43b0 fs/ntfs3/super.c:1215 get_tree_bdev+0x43e/0x7d0 fs/super.c:1318 vfs_get_tree+0x88/0x350 fs/super.c:1519 do_new_mount fs/namespace.c:3335 [inline] path_mount+0x1492/0x1ed0 fs/namespace.c:3662 do_mount fs/namespace.c:3675 [inline] __do_sys_mount fs/namespace.c:3884 [inline] __se_sys_mount fs/namespace.c:3861 [inline] __x64_sys_mount+0x293/0x310 fs/namespace.c:3861 do_syscall_x64 arch/x86/entry/common.c:50 [inline] do_syscall_64+0x38/0xb0 arch/x86/entry/common.c:80 entry_SYSCALL_64_after_hwframe+0x63/0xcd RIP: 0033:0x7f6be387e1ea Code: d8 64 89 02 48 c7 c0 ff ff ff ff eb a6 e8 de 09 00 00 66 2e 0f 1f 84 00 00 00 00 00 0f 1f 40 00 49 89 ca b8 a5 00 00 00 0f 05 <48> 3d 01 f0 ff ff 73 01 c3 48 c7 c1 b0 ff ff ff f7 d8 64 89 01 48 RSP: 002b:00007f6be4660ee8 EFLAGS: 00000202 ORIG_RAX: 00000000000000a5 RAX: ffffffffffffffda RBX: 00007f6be4660f80 RCX: 00007f6be387e1ea RDX: 0000000020000140 RSI: 0000000020000040 RDI: 00007f6be4660f40 RBP: 0000000020000140 R08: 00007f6be4660f80 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000202 R12: 0000000020000040 R13: 00007f6be4660f40 R14: 000000000001f79f R15: 0000000020000000 Allocated by task 10204: kasan_save_stack+0x33/0x50 mm/kasan/common.c:45 kasan_set_track+0x25/0x30 mm/kasan/common.c:52 __kasan_slab_alloc+0x81/0x90 mm/kasan/common.c:328 kasan_slab_alloc include/linux/kasan.h:186 [inline] slab_post_alloc_hook mm/slab.h:762 [inline] slab_alloc_node mm/slab.c:3237 [inline] slab_alloc mm/slab.c:3246 [inline] __kmem_cache_alloc_lru mm/slab.c:3423 [inline] kmem_cache_alloc_lru+0x1ff/0x680 mm/slab.c:3439 alloc_inode_sb include/linux/fs.h:2735 [inline] reiserfs_alloc_inode+0x26/0xb0 fs/reiserfs/super.c:642 alloc_inode+0x5d/0x220 fs/inode.c:259 new_inode_pseudo fs/inode.c:1017 [inline] new_inode+0x22/0x260 fs/inode.c:1043 reiserfs_mkdir+0x214/0x9a0 fs/reiserfs/namei.c:813 xattr_mkdir fs/reiserfs/xattr.c:77 [inline] create_privroot fs/reiserfs/xattr.c:890 [inline] reiserfs_xattr_init+0x57f/0xbb0 fs/reiserfs/xattr.c:1006 reiserfs_fill_super+0x2139/0x3150 fs/reiserfs/super.c:2175 mount_bdev+0x30d/0x3d0 fs/super.c:1391 legacy_get_tree+0x109/0x220 fs/fs_context.c:611 vfs_get_tree+0x88/0x350 fs/super.c:1519 do_new_mount fs/namespace.c:3335 [inline] path_mount+0x1492/0x1ed0 fs/namespace.c:3662 do_mount fs/namespace.c:3675 [inline] __do_sys_mount fs/namespace.c:3884 [inline] __se_sys_mount fs/namespace.c:3861 [inline] __x64_sys_mount+0x293/0x310 fs/namespace.c:3861 do_syscall_x64 arch/x86/entry/common.c:50 [inline] do_syscall_64+0x38/0xb0 arch/x86/entry/common.c:80 entry_SYSCALL_64_after_hwframe+0x63/0xcd Last potentially related work creation: kasan_save_stack+0x33/0x50 mm/kasan/common.c:45 __kasan_record_aux_stack+0x78/0x80 mm/kasan/generic.c:492 __call_rcu_common.constprop.0+0x9a/0x790 kernel/rcu/tree.c:2649 destroy_inode+0x129/0x1b0 fs/inode.c:314 iput_final fs/inode.c:1788 [inline] iput.part.0+0x55e/0x7a0 fs/inode.c:1814 iput+0x5c/0x80 fs/inode.c:1804 reiserfs_new_inode+0x4b5/0x2100 fs/reiserfs/inode.c:2154 reiserfs_mkdir+0x4c0/0x9a0 fs/reiserfs/namei.c:843 xattr_mkdir fs/reiserfs/xattr.c:77 [inline] create_privroot fs/reiserfs/xattr.c:890 [inline] reiserfs_xattr_init+0x57f/0xbb0 fs/reiserfs/xattr.c:1006 reiserfs_fill_super+0x2139/0x3150 fs/reiserfs/super.c:2175 mount_bdev+0x30d/0x3d0 fs/super.c:1391 legacy_get_tree+0x109/0x220 fs/fs_context.c:611 vfs_get_tree+0x88/0x350 fs/super.c:1519 do_new_mount fs/namespace.c:3335 [inline] path_mount+0x1492/0x1ed0 fs/namespace.c:3662 do_mount fs/namespace.c:3675 [inline] __do_sys_mount fs/namespace.c:3884 [inline] __se_sys_mount fs/namespace.c:3861 [inline] __x64_sys_mount+0x293/0x310 fs/namespace.c:3861 do_syscall_x64 arch/x86/entry/common.c:50 [inline] do_syscall_64+0x38/0xb0 arch/x86/entry/common.c:80 entry_SYSCALL_64_after_hwframe+0x63/0xcd The buggy address belongs to the object at ffff8880866d6100 which belongs to the cache reiser_inode_cache of size 1568 The buggy address is located 1536 bytes inside of freed 1568-byte region [ffff8880866d6100, ffff8880866d6720) The buggy address belongs to the physical page: page:ffffea000219b580 refcount:1 mapcount:0 mapping:0000000000000000 index:0xffff8880866d6ffe pfn:0x866d6 memcg:ffff888077d75d81 flags: 0xfff00000000200(slab|node=0|zone=1|lastcpupid=0x7ff) page_type: 0x1() raw: 00fff00000000200 ffff888141686e00 ffffea000219c490 ffffea0000ef9010 raw: ffff8880866d6ffe ffff8880866d6100 0000000100000001 ffff888077d75d81 page dumped because: kasan: bad access detected page_owner tracks the page as allocated page last allocated via order 0, migratetype Reclaimable, gfp_mask 0x3420d0(__GFP_IO|__GFP_FS|__GFP_NOWARN|__GFP_COMP|__GFP_HARDWALL|__GFP_THISNODE|__GFP_RECLAIMABLE), pid 10204, tgid 10200 (syz-executor.1), ts 462014347701, free_ts 461820568771 set_page_owner include/linux/page_owner.h:31 [inline] post_alloc_hook+0x2d2/0x350 mm/page_alloc.c:1570 prep_new_page mm/page_alloc.c:1577 [inline] get_page_from_freelist+0x10a9/0x31e0 mm/page_alloc.c:3221 __alloc_pages+0x1d0/0x4a0 mm/page_alloc.c:4477 __alloc_pages_node include/linux/gfp.h:237 [inline] kmem_getpages mm/slab.c:1356 [inline] cache_grow_begin+0x99/0x3a0 mm/slab.c:2550 cache_alloc_refill+0x294/0x3a0 mm/slab.c:2923 ____cache_alloc mm/slab.c:2999 [inline] ____cache_alloc mm/slab.c:2982 [inline] __do_cache_alloc mm/slab.c:3182 [inline] slab_alloc_node mm/slab.c:3230 [inline] slab_alloc mm/slab.c:3246 [inline] __kmem_cache_alloc_lru mm/slab.c:3423 [inline] kmem_cache_alloc_lru+0x56c/0x680 mm/slab.c:3439 alloc_inode_sb include/linux/fs.h:2735 [inline] reiserfs_alloc_inode+0x26/0xb0 fs/reiserfs/super.c:642 alloc_inode+0x5d/0x220 fs/inode.c:259 iget5_locked fs/inode.c:1282 [inline] iget5_locked+0x63/0xe0 fs/inode.c:1275 reiserfs_fill_super+0x10e7/0x3150 fs/reiserfs/super.c:2053 mount_bdev+0x30d/0x3d0 fs/super.c:1391 legacy_get_tree+0x109/0x220 fs/fs_context.c:611 vfs_get_tree+0x88/0x350 fs/super.c:1519 do_new_mount fs/namespace.c:3335 [inline] path_mount+0x1492/0x1ed0 fs/namespace.c:3662 do_mount fs/namespace.c:3675 [inline] __do_sys_mount fs/namespace.c:3884 [inline] __se_sys_mount fs/namespace.c:3861 [inline] __x64_sys_mount+0x293/0x310 fs/namespace.c:3861 do_syscall_x64 arch/x86/entry/common.c:50 [inline] do_syscall_64+0x38/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:1161 [inline] free_unref_page_prepare+0x508/0xb90 mm/page_alloc.c:2348 free_unref_page+0x33/0x3b0 mm/page_alloc.c:2443 slab_destroy mm/slab.c:1608 [inline] slabs_destroy+0x85/0xc0 mm/slab.c:1628 cache_flusharray mm/slab.c:3341 [inline] ___cache_free+0x2b6/0x420 mm/slab.c:3404 qlink_free mm/kasan/quarantine.c:166 [inline] qlist_free_all+0x4c/0x1b0 mm/kasan/quarantine.c:185 kasan_quarantine_reduce+0x18b/0x1d0 mm/kasan/quarantine.c:292 __kasan_slab_alloc+0x65/0x90 mm/kasan/common.c:305 kasan_slab_alloc include/linux/kasan.h:186 [inline] slab_post_alloc_hook mm/slab.h:762 [inline] slab_alloc_node mm/slab.c:3237 [inline] slab_alloc mm/slab.c:3246 [inline] __kmem_cache_alloc_lru mm/slab.c:3423 [inline] kmem_cache_alloc_lru+0x1ff/0x680 mm/slab.c:3439 __d_alloc+0x32/0xac0 fs/dcache.c:1769 d_alloc_pseudo+0x1c/0x70 fs/dcache.c:1899 alloc_file_pseudo+0xdc/0x240 fs/file_table.c:329 sock_alloc_file+0x50/0x1d0 net/socket.c:466 sock_map_fd net/socket.c:491 [inline] __sys_socket+0x1b0/0x250 net/socket.c:1660 __do_sys_socket net/socket.c:1665 [inline] __se_sys_socket net/socket.c:1663 [inline] __x64_sys_socket+0x72/0xb0 net/socket.c:1663 do_syscall_x64 arch/x86/entry/common.c:50 [inline] do_syscall_64+0x38/0xb0 arch/x86/entry/common.c:80 entry_SYSCALL_64_after_hwframe+0x63/0xcd Memory state around the buggy address: ffff8880866d6600: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ffff8880866d6680: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb >ffff8880866d6700: fb fb fb fb fc fc fc fc fc fc fc fc fc fc fc fc ^ ffff8880866d6780: fc fc fc fc 00 00 00 00 00 00 00 00 00 00 00 00 ffff8880866d6800: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ==================================================================