loop4: detected capacity change from 0 to 4096
==================================================================
BUG: KASAN: slab-out-of-bounds in ntfs_iget5+0x149/0x38a0 fs/ntfs3/inode.c:526
Read of size 8 at addr ffff8880708aff60 by task syz.4.774/6199

CPU: 1 PID: 6199 Comm: syz.4.774 Not tainted 6.1.127-syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 12/27/2024
Call Trace:
 <TASK>
 __dump_stack lib/dump_stack.c:88 [inline]
 dump_stack_lvl+0x1e3/0x2cb lib/dump_stack.c:106
 print_address_description mm/kasan/report.c:316 [inline]
 print_report+0x15f/0x4f0 mm/kasan/report.c:427
 kasan_report+0x136/0x160 mm/kasan/report.c:531
 ntfs_iget5+0x149/0x38a0 fs/ntfs3/inode.c:526
 ntfs_fill_super+0x23ec/0x4410 fs/ntfs3/super.c:1009
 get_tree_bdev+0x3fe/0x620 fs/super.c:1366
 vfs_get_tree+0x88/0x270 fs/super.c:1573
 do_new_mount+0x2ba/0xb40 fs/namespace.c:3056
 do_mount fs/namespace.c:3399 [inline]
 __do_sys_mount fs/namespace.c:3607 [inline]
 __se_sys_mount+0x2d5/0x3c0 fs/namespace.c:3584
 do_syscall_x64 arch/x86/entry/common.c:51 [inline]
 do_syscall_64+0x3b/0xb0 arch/x86/entry/common.c:81
 entry_SYSCALL_64_after_hwframe+0x68/0xd2
RIP: 0033:0x7f7563b8e4ca
Code: d8 64 89 02 48 c7 c0 ff ff ff ff eb a6 e8 de 1a 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 a8 ff ff ff f7 d8 64 89 01 48
RSP: 002b:00007f7564a66e68 EFLAGS: 00000246 ORIG_RAX: 00000000000000a5
RAX: ffffffffffffffda RBX: 00007f7564a66ef0 RCX: 00007f7563b8e4ca
RDX: 000000002001f6c0 RSI: 000000002001f700 RDI: 00007f7564a66eb0
RBP: 000000002001f6c0 R08: 00007f7564a66ef0 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000246 R12: 000000002001f700
R13: 00007f7564a66eb0 R14: 000000000001f6f6 R15: 000000002001f740
 </TASK>

Allocated by task 6136:
 kasan_save_stack mm/kasan/common.c:45 [inline]
 kasan_set_track+0x4b/0x70 mm/kasan/common.c:52
 __kasan_slab_alloc+0x65/0x70 mm/kasan/common.c:328
 kasan_slab_alloc include/linux/kasan.h:201 [inline]
 slab_post_alloc_hook+0x52/0x3a0 mm/slab.h:737
 slab_alloc_node mm/slub.c:3398 [inline]
 slab_alloc mm/slub.c:3406 [inline]
 __kmem_cache_alloc_lru mm/slub.c:3413 [inline]
 kmem_cache_alloc+0x10c/0x2d0 mm/slub.c:3422
 radix_tree_node_alloc+0x196/0x3b0 lib/radix-tree.c:251
 __radix_tree_create lib/radix-tree.c:622 [inline]
 radix_tree_insert+0x205/0x670 lib/radix-tree.c:710
 alloc_extent_buffer+0xa28/0x1130 fs/btrfs/extent_io.c:4685
 btrfs_find_create_tree_block fs/btrfs/disk-io.c:915 [inline]
 read_tree_block fs/btrfs/disk-io.c:934 [inline]
 load_super_root+0xa3/0x320 fs/btrfs/disk-io.c:2877
 open_ctree+0x16fc/0x2cf8 fs/btrfs/disk-io.c:3647
 btrfs_fill_super+0x1c7/0x2d0 fs/btrfs/super.c:1469
 btrfs_mount_root+0x803/0x930 fs/btrfs/super.c:1835
 legacy_get_tree+0xeb/0x180 fs/fs_context.c:632
 vfs_get_tree+0x88/0x270 fs/super.c:1573
 fc_mount fs/namespace.c:1043 [inline]
 vfs_kern_mount+0xb8/0x150 fs/namespace.c:1073
 btrfs_mount+0x39b/0xb40 fs/btrfs/super.c:1895
 legacy_get_tree+0xeb/0x180 fs/fs_context.c:632
 vfs_get_tree+0x88/0x270 fs/super.c:1573
 do_new_mount+0x2ba/0xb40 fs/namespace.c:3056
 do_mount fs/namespace.c:3399 [inline]
 __do_sys_mount fs/namespace.c:3607 [inline]
 __se_sys_mount+0x2d5/0x3c0 fs/namespace.c:3584
 do_syscall_x64 arch/x86/entry/common.c:51 [inline]
 do_syscall_64+0x3b/0xb0 arch/x86/entry/common.c:81
 entry_SYSCALL_64_after_hwframe+0x68/0xd2

Freed by task 21:
 kasan_save_stack mm/kasan/common.c:45 [inline]
 kasan_set_track+0x4b/0x70 mm/kasan/common.c:52
 kasan_save_free_info+0x27/0x40 mm/kasan/generic.c:516
 ____kasan_slab_free+0xd6/0x120 mm/kasan/common.c:236
 kasan_slab_free include/linux/kasan.h:177 [inline]
 slab_free_hook mm/slub.c:1724 [inline]
 slab_free_freelist_hook mm/slub.c:1750 [inline]
 slab_free mm/slub.c:3661 [inline]
 kmem_cache_free+0x292/0x510 mm/slub.c:3683
 rcu_do_batch kernel/rcu/tree.c:2297 [inline]
 rcu_core+0xade/0x1820 kernel/rcu/tree.c:2557
 handle_softirqs+0x2ee/0xa40 kernel/softirq.c:571
 run_ksoftirqd+0xc6/0x120 kernel/softirq.c:938
 smpboot_thread_fn+0x52c/0xa30 kernel/smpboot.c:164
 kthread+0x28d/0x320 kernel/kthread.c:376
 ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:295

Last potentially related work creation:
 kasan_save_stack+0x3b/0x60 mm/kasan/common.c:45
 __kasan_record_aux_stack+0xb0/0xc0 mm/kasan/generic.c:486
 call_rcu+0x163/0xa10 kernel/rcu/tree.c:2845
 radix_tree_node_free lib/radix-tree.c:308 [inline]
 delete_node+0x1ac/0x770 lib/radix-tree.c:571
 radix_tree_delete_item+0x2dc/0x3e0 lib/radix-tree.c:1428
 release_extent_buffer+0x1c5/0x2b0 fs/btrfs/extent_io.c:4741
 try_release_extent_buffer+0xe45/0xfd0 fs/btrfs/extent_io.c:5840
 btree_release_folio+0x133/0x330 fs/btrfs/disk-io.c:830
 btree_invalidate_folio+0x7d/0x540 fs/btrfs/disk-io.c:839
 folio_invalidate mm/truncate.c:158 [inline]
 truncate_cleanup_folio+0x252/0x660 mm/truncate.c:178
 truncate_inode_pages_range+0x2e6/0x1340 mm/truncate.c:368
 evict_inode_truncate_pages fs/btrfs/inode.c:5363 [inline]
 btrfs_evict_inode+0x232/0x10a0 fs/btrfs/inode.c:5486
 evict+0x529/0x930 fs/inode.c:705
 close_ctree+0x751/0xc81 fs/btrfs/disk-io.c:4775
 generic_shutdown_super+0x130/0x340 fs/super.c:501
 kill_anon_super+0x37/0x60 fs/super.c:1128
 btrfs_kill_super+0x3d/0x50 fs/btrfs/super.c:2449
 deactivate_locked_super+0xa0/0x110 fs/super.c:332
 cleanup_mnt+0x490/0x520 fs/namespace.c:1186
 task_work_run+0x246/0x300 kernel/task_work.c:203
 resume_user_mode_work include/linux/resume_user_mode.h:49 [inline]
 exit_to_user_mode_loop+0xde/0x100 kernel/entry/common.c:177
 exit_to_user_mode_prepare+0xb1/0x140 kernel/entry/common.c:210
 __syscall_exit_to_user_mode_work kernel/entry/common.c:292 [inline]
 syscall_exit_to_user_mode+0x60/0x270 kernel/entry/common.c:303
 do_syscall_64+0x47/0xb0 arch/x86/entry/common.c:87
 entry_SYSCALL_64_after_hwframe+0x68/0xd2

Second to last potentially related work creation:
 kasan_save_stack+0x3b/0x60 mm/kasan/common.c:45
 __kasan_record_aux_stack+0xb0/0xc0 mm/kasan/generic.c:486
 call_rcu+0x163/0xa10 kernel/rcu/tree.c:2845
 xa_node_free lib/xarray.c:260 [inline]
 xas_delete_node lib/xarray.c:497 [inline]
 update_node lib/xarray.c:761 [inline]
 xas_store+0xda2/0x1960 lib/xarray.c:846
 memcg_destroy_list_lru mm/list_lru.c:385 [inline]
 list_lru_destroy+0x34d/0x840 mm/list_lru.c:597
 deactivate_locked_super+0xb8/0x110 fs/super.c:340
 btrfs_mount_root+0x8a3/0x930 fs/btrfs/super.c:1841
 legacy_get_tree+0xeb/0x180 fs/fs_context.c:632
 vfs_get_tree+0x88/0x270 fs/super.c:1573
 fc_mount fs/namespace.c:1043 [inline]
 vfs_kern_mount+0xb8/0x150 fs/namespace.c:1073
 btrfs_mount+0x39b/0xb40 fs/btrfs/super.c:1895
 legacy_get_tree+0xeb/0x180 fs/fs_context.c:632
 vfs_get_tree+0x88/0x270 fs/super.c:1573
 do_new_mount+0x2ba/0xb40 fs/namespace.c:3056
 do_mount fs/namespace.c:3399 [inline]
 __do_sys_mount fs/namespace.c:3607 [inline]
 __se_sys_mount+0x2d5/0x3c0 fs/namespace.c:3584
 do_syscall_x64 arch/x86/entry/common.c:51 [inline]
 do_syscall_64+0x3b/0xb0 arch/x86/entry/common.c:81
 entry_SYSCALL_64_after_hwframe+0x68/0xd2

The buggy address belongs to the object at ffff8880708afc80
 which belongs to the cache radix_tree_node of size 576
The buggy address is located 160 bytes to the right of
 576-byte region [ffff8880708afc80, ffff8880708afec0)

The buggy address belongs to the physical page:
page:ffffea0001c22b00 refcount:1 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x708ac
head:ffffea0001c22b00 order:2 compound_mapcount:0 compound_pincount:0
memcg:ffff888028f06f01
flags: 0xfff00000010200(slab|head|node=0|zone=1|lastcpupid=0x7ff)
raw: 00fff00000010200 0000000000000000 dead000000000001 ffff888017c4fdc0
raw: 0000000000000000 0000000000170017 00000001ffffffff ffff888028f06f01
page dumped because: kasan: bad access detected
page_owner tracks the page as allocated
page last allocated via order 2, migratetype Reclaimable, gfp_mask 0x152810(GFP_NOWAIT|__GFP_NOWARN|__GFP_NORETRY|__GFP_COMP|__GFP_HARDWALL|__GFP_RECLAIMABLE), pid 4242, tgid 4242 (udevd), ts 82820067879, free_ts 81849643639
 set_page_owner include/linux/page_owner.h:31 [inline]
 post_alloc_hook+0x18d/0x1b0 mm/page_alloc.c:2532
 prep_new_page mm/page_alloc.c:2539 [inline]
 get_page_from_freelist+0x3731/0x38d0 mm/page_alloc.c:4328
 __alloc_pages+0x28d/0x770 mm/page_alloc.c:5605
 alloc_slab_page+0x6a/0x150 mm/slub.c:1794
 allocate_slab mm/slub.c:1939 [inline]
 new_slab+0x84/0x2d0 mm/slub.c:1992
 ___slab_alloc+0xc20/0x1270 mm/slub.c:3180
 __slab_alloc mm/slub.c:3279 [inline]
 slab_alloc_node mm/slub.c:3364 [inline]
 slab_alloc mm/slub.c:3406 [inline]
 __kmem_cache_alloc_lru mm/slub.c:3413 [inline]
 kmem_cache_alloc_lru+0x1a5/0x2d0 mm/slub.c:3429
 xas_alloc lib/xarray.c:377 [inline]
 xas_create+0x10cf/0x16c0 lib/xarray.c:679
 xas_store+0x9f/0x1960 lib/xarray.c:789
 __filemap_add_folio+0x7da/0x1b00 mm/filemap.c:908
 filemap_add_folio+0x11d/0x570 mm/filemap.c:962
 page_cache_ra_unbounded+0x20c/0x7b0 mm/readahead.c:251
 do_page_cache_ra mm/readahead.c:300 [inline]
 force_page_cache_ra mm/readahead.c:331 [inline]
 page_cache_sync_ra+0x3c5/0x480 mm/readahead.c:713
 page_cache_sync_readahead include/linux/pagemap.h:1248 [inline]
 filemap_get_pages mm/filemap.c:2664 [inline]
 filemap_read+0x7fa/0x31d0 mm/filemap.c:2758
 blkdev_read_iter+0x3e1/0x520 block/fops.c:613
 call_read_iter include/linux/fs.h:2259 [inline]
 new_sync_read fs/read_write.c:389 [inline]
 vfs_read+0x88d/0xbf0 fs/read_write.c:470
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 mm/page_alloc.c:1509 [inline]
 free_unref_page_prepare+0x12a6/0x15b0 mm/page_alloc.c:3384
 free_unref_page+0x33/0x3e0 mm/page_alloc.c:3479
 free_slab mm/slub.c:2031 [inline]
 discard_slab mm/slub.c:2037 [inline]
 __unfreeze_partials+0x1b7/0x210 mm/slub.c:2586
 put_cpu_partial+0x17b/0x250 mm/slub.c:2662
 qlink_free mm/kasan/quarantine.c:168 [inline]
 qlist_free_all+0x76/0xe0 mm/kasan/quarantine.c:187
 kasan_quarantine_reduce+0x156/0x170 mm/kasan/quarantine.c:294
 __kasan_slab_alloc+0x1f/0x70 mm/kasan/common.c:305
 kasan_slab_alloc include/linux/kasan.h:201 [inline]
 slab_post_alloc_hook+0x52/0x3a0 mm/slab.h:737
 slab_alloc_node mm/slub.c:3398 [inline]
 __kmem_cache_alloc_node+0x137/0x260 mm/slub.c:3437
 __do_kmalloc_node mm/slab_common.c:935 [inline]
 __kmalloc+0xa1/0x230 mm/slab_common.c:949
 kmalloc include/linux/slab.h:568 [inline]
 kernfs_fop_write_iter+0x157/0x4f0 fs/kernfs/file.c:311
 call_write_iter include/linux/fs.h:2265 [inline]
 new_sync_write fs/read_write.c:491 [inline]
 vfs_write+0x857/0xbc0 fs/read_write.c:584
 ksys_write+0x19c/0x2c0 fs/read_write.c:637
 do_syscall_x64 arch/x86/entry/common.c:51 [inline]
 do_syscall_64+0x3b/0xb0 arch/x86/entry/common.c:81
 entry_SYSCALL_64_after_hwframe+0x68/0xd2

Memory state around the buggy address:
 ffff8880708afe00: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
 ffff8880708afe80: fb fb fb fb fb fb fb fb fc fc fc fc fc fc fc fc
>ffff8880708aff00: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
                                                       ^
 ffff8880708aff80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
 ffff8880708b0000: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
==================================================================