loop6: detected capacity change from 0 to 512 ================================================================== BUG: KASAN: slab-out-of-bounds in __ext4_iget+0x2ee/0x3ef0 fs/ext4/inode.c:4683 Read of size 8 at addr ffff888130c4fef8 by task syz.6.7009/25241 CPU: 1 PID: 25241 Comm: syz.6.7009 Not tainted 5.15.178-syzkaller-00013-g7d1f9b5c2ff5 #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 02/12/2025 Call Trace: __dump_stack lib/dump_stack.c:88 [inline] dump_stack_lvl+0x151/0x1c0 lib/dump_stack.c:106 print_address_description+0x87/0x3b0 mm/kasan/report.c:248 __kasan_report mm/kasan/report.c:427 [inline] kasan_report+0x179/0x1c0 mm/kasan/report.c:444 __asan_report_load8_noabort+0x14/0x20 mm/kasan/report_generic.c:309 __ext4_iget+0x2ee/0x3ef0 fs/ext4/inode.c:4683 ext4_quota_enable fs/ext4/super.c:6379 [inline] ext4_enable_quotas+0x556/0x980 fs/ext4/super.c:6415 ext4_fill_super+0x8b95/0x96e0 fs/ext4/super.c:4951 mount_bdev+0x282/0x3b0 fs/super.c:1400 ext4_mount+0x34/0x40 fs/ext4/super.c:6594 legacy_get_tree+0xf1/0x190 fs/fs_context.c:611 vfs_get_tree+0x88/0x290 fs/super.c:1530 do_new_mount+0x2ba/0xb30 fs/namespace.c:3012 path_mount+0x671/0x1070 fs/namespace.c:3342 do_mount fs/namespace.c:3355 [inline] __do_sys_mount fs/namespace.c:3563 [inline] __se_sys_mount+0x2c4/0x3b0 fs/namespace.c:3540 __x64_sys_mount+0xbf/0xd0 fs/namespace.c:3540 x64_sys_call+0x49d/0x9a0 arch/x86/include/generated/asm/syscalls_64.h:166 do_syscall_x64 arch/x86/entry/common.c:50 [inline] do_syscall_64+0x3b/0xb0 arch/x86/entry/common.c:80 entry_SYSCALL_64_after_hwframe+0x66/0xd0 RIP: 0033:0x7f500425c90a 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:00007f50028c4e68 EFLAGS: 00000246 ORIG_RAX: 00000000000000a5 RAX: ffffffffffffffda RBX: 00007f50028c4ef0 RCX: 00007f500425c90a RDX: 00004000000000c0 RSI: 0000400000000640 RDI: 00007f50028c4eb0 RBP: 00004000000000c0 R08: 00007f50028c4ef0 R09: 0000000003000010 R10: 0000000003000010 R11: 0000000000000246 R12: 0000400000000640 R13: 00007f50028c4eb0 R14: 000000000000051b R15: 0000400000000000 Allocated by task 2: 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:433 [inline] __kasan_slab_alloc+0xb1/0xe0 mm/kasan/common.c:466 kasan_slab_alloc include/linux/kasan.h:217 [inline] slab_post_alloc_hook+0x53/0x2c0 mm/slab.h:550 slab_alloc_node mm/slub.c:3240 [inline] slab_alloc mm/slub.c:3250 [inline] kmem_cache_alloc+0xf5/0x250 mm/slub.c:3255 radix_tree_node_alloc+0x198/0x3c0 lib/radix-tree.c:251 idr_get_free+0x2b6/0xa90 lib/radix-tree.c:1504 idr_alloc_u32 lib/idr.c:46 [inline] idr_alloc_cyclic+0x1ec/0x5d0 lib/idr.c:125 alloc_pid+0x332/0xb20 kernel/pid.c:233 copy_process+0x14d5/0x3290 kernel/fork.c:2279 kernel_clone+0x21e/0x9e0 kernel/fork.c:2661 kernel_thread+0x168/0x1e0 kernel/fork.c:2722 create_kthread kernel/kthread.c:360 [inline] kthreadd+0x35b/0x490 kernel/kthread.c:717 ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:287 Last potentially related work creation: kasan_save_stack+0x3b/0x60 mm/kasan/common.c:38 __kasan_record_aux_stack+0xd3/0xf0 mm/kasan/generic.c:348 kasan_record_aux_stack_noalloc+0xb/0x10 mm/kasan/generic.c:358 __call_rcu_common kernel/rcu/tree.c:3007 [inline] call_rcu+0x123/0x10b0 kernel/rcu/tree.c:3125 radix_tree_node_free lib/radix-tree.c:308 [inline] delete_node+0x1ae/0x790 lib/radix-tree.c:571 __radix_tree_delete+0x260/0x3a0 lib/radix-tree.c:1377 radix_tree_delete_item+0x2f1/0x3f0 lib/radix-tree.c:1428 idr_remove+0x42/0x60 lib/idr.c:154 kernfs_put+0x357/0x520 fs/kernfs/dir.c:545 kernfs_remove_by_name_ns+0xf4/0x160 fs/kernfs/dir.c:1595 kernfs_remove_by_name include/linux/kernfs.h:619 [inline] remove_files fs/sysfs/group.c:28 [inline] sysfs_remove_group+0x10c/0x2a0 fs/sysfs/group.c:289 sysfs_remove_groups+0x56/0xb0 fs/sysfs/group.c:313 device_remove_groups drivers/base/core.c:2508 [inline] device_remove_attrs+0xc6/0x140 drivers/base/core.c:2708 device_del+0x65b/0xe90 drivers/base/core.c:3609 netdev_unregister_kobject+0x18b/0x260 net/core/net-sysfs.c:1980 unregister_netdevice_many+0x1295/0x17c0 net/core/dev.c:11145 default_device_exit_batch+0x38a/0x3f0 net/core/dev.c:11651 ops_exit_list net/core/net_namespace.c:177 [inline] cleanup_net+0x6ce/0xc00 net/core/net_namespace.c:599 process_one_work+0x6bb/0xc10 kernel/workqueue.c:2325 worker_thread+0xad5/0x12a0 kernel/workqueue.c:2472 kthread+0x421/0x510 kernel/kthread.c:337 ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:287 Second to last potentially related work creation: kasan_save_stack+0x3b/0x60 mm/kasan/common.c:38 __kasan_record_aux_stack+0xd3/0xf0 mm/kasan/generic.c:348 kasan_record_aux_stack_noalloc+0xb/0x10 mm/kasan/generic.c:358 __call_rcu_common kernel/rcu/tree.c:3007 [inline] call_rcu+0x123/0x10b0 kernel/rcu/tree.c:3125 xa_node_free lib/xarray.c:258 [inline] xas_delete_node lib/xarray.c:494 [inline] update_node lib/xarray.c:758 [inline] xas_store+0xe8f/0x1760 lib/xarray.c:843 page_cache_delete mm/filemap.c:146 [inline] __delete_from_page_cache+0x3b9/0x5b0 mm/filemap.c:236 delete_from_page_cache+0xb9/0xf0 mm/filemap.c:270 truncate_inode_page+0x5d/0x70 mm/truncate.c:219 shmem_undo_range+0x477/0x1560 mm/shmem.c:961 shmem_truncate_range mm/shmem.c:1064 [inline] shmem_evict_inode+0x215/0x9d0 mm/shmem.c:1146 evict+0x529/0x930 fs/inode.c:622 iput_final fs/inode.c:1744 [inline] iput+0x63b/0x7e0 fs/inode.c:1770 dentry_unlink_inode+0x34e/0x430 fs/dcache.c:380 __dentry_kill+0x447/0x660 fs/dcache.c:586 dentry_kill+0xc0/0x2a0 dput+0x45/0x80 fs/dcache.c:893 __fput+0x59d/0x8c0 fs/file_table.c:288 ____fput+0x15/0x20 fs/file_table.c:308 task_work_run+0x129/0x190 kernel/task_work.c:188 exit_task_work include/linux/task_work.h:33 [inline] do_exit+0xc48/0x2ca0 kernel/exit.c:880 do_group_exit+0x141/0x310 kernel/exit.c:1002 get_signal+0x7a3/0x1630 kernel/signal.c:2907 arch_do_signal_or_restart+0xbd/0x1680 arch/x86/kernel/signal.c:867 handle_signal_work kernel/entry/common.c:154 [inline] exit_to_user_mode_loop+0xa0/0xe0 kernel/entry/common.c:178 exit_to_user_mode_prepare+0x5a/0xa0 kernel/entry/common.c:214 __syscall_exit_to_user_mode_work kernel/entry/common.c:296 [inline] syscall_exit_to_user_mode+0x26/0x160 kernel/entry/common.c:307 do_syscall_64+0x47/0xb0 arch/x86/entry/common.c:86 entry_SYSCALL_64_after_hwframe+0x66/0xd0 The buggy address belongs to the object at ffff888130c4fc80 which belongs to the cache radix_tree_node of size 576 The buggy address is located 56 bytes to the right of 576-byte region [ffff888130c4fc80, ffff888130c4fec0) The buggy address belongs to the page: page:ffffea0004c31300 refcount:1 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x130c4c head:ffffea0004c31300 order:2 compound_mapcount:0 compound_pincount:0 flags: 0x4000000000010200(slab|head|zone=1) raw: 4000000000010200 dead000000000100 dead000000000122 ffff88810004cf00 raw: 0000000000000000 0000000000170017 00000001ffffffff 0000000000000000 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 11523, ts 857517842447, free_ts 599525690897 set_page_owner include/linux/page_owner.h:33 [inline] post_alloc_hook+0x1a3/0x1b0 mm/page_alloc.c:2605 prep_new_page+0x1b/0x110 mm/page_alloc.c:2611 get_page_from_freelist+0x3550/0x35d0 mm/page_alloc.c:4485 __alloc_pages+0x27e/0x8f0 mm/page_alloc.c:5780 allocate_slab mm/slub.c:1932 [inline] new_slab+0x9a/0x4e0 mm/slub.c:1995 ___slab_alloc+0x39e/0x830 mm/slub.c:3028 __slab_alloc+0x4a/0x90 mm/slub.c:3115 slab_alloc_node mm/slub.c:3206 [inline] slab_alloc mm/slub.c:3250 [inline] kmem_cache_alloc+0x139/0x250 mm/slub.c:3255 xas_alloc lib/xarray.c:374 [inline] xas_create+0xfde/0x15d0 lib/xarray.c:676 xas_create_range+0x1fc/0x720 lib/xarray.c:716 shmem_add_to_page_cache+0x7fc/0xe90 mm/shmem.c:736 shmem_getpage_gfp+0x1559/0x23c0 mm/shmem.c:1942 shmem_fault+0x1b8/0x6c0 mm/shmem.c:2120 __do_fault+0x273/0x300 mm/memory.c:4189 do_read_fault mm/memory.c:4553 [inline] do_fault mm/memory.c:4694 [inline] handle_pte_fault+0xfdb/0x28f0 mm/memory.c:4908 do_handle_mm_fault+0x20bc/0x2400 mm/memory.c:5330 page last free stack trace: reset_page_owner include/linux/page_owner.h:26 [inline] free_pages_prepare mm/page_alloc.c:1472 [inline] free_pcp_prepare mm/page_alloc.c:1544 [inline] free_unref_page_prepare+0x7c8/0x7d0 mm/page_alloc.c:3534 free_unref_page+0xe8/0x750 mm/page_alloc.c:3616 free_the_page mm/page_alloc.c:805 [inline] __free_pages+0x61/0xf0 mm/page_alloc.c:5856 __free_slab+0xec/0x1d0 mm/slub.c:2020 free_slab mm/slub.c:2035 [inline] discard_slab+0x29/0x40 mm/slub.c:2041 __slab_free+0x205/0x290 mm/slub.c:3426 do_slab_free mm/slub.c:3509 [inline] ___cache_free+0x109/0x120 mm/slub.c:3530 qlink_free+0x4d/0x90 mm/kasan/quarantine.c:157 qlist_free_all+0x44/0xb0 mm/kasan/quarantine.c:176 kasan_quarantine_reduce+0x15a/0x180 mm/kasan/quarantine.c:283 __kasan_slab_alloc+0x2f/0xe0 mm/kasan/common.c:443 kasan_slab_alloc include/linux/kasan.h:217 [inline] slab_post_alloc_hook+0x53/0x2c0 mm/slab.h:550 slab_alloc_node mm/slub.c:3240 [inline] slab_alloc mm/slub.c:3250 [inline] __kmalloc+0x11e/0x2c0 mm/slub.c:4427 __kmalloc_node include/linux/slab.h:469 [inline] kmalloc_node include/linux/slab.h:626 [inline] kvmalloc_node+0x1f0/0x4d0 mm/util.c:628 kvmalloc include/linux/mm.h:851 [inline] seq_buf_alloc fs/seq_file.c:38 [inline] seq_read_iter+0x1ff/0xd00 fs/seq_file.c:210 kernfs_fop_read_iter+0x145/0x470 fs/kernfs/file.c:241 Memory state around the buggy address: ffff888130c4fd80: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ffff888130c4fe00: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 >ffff888130c4fe80: 00 00 00 00 00 00 00 00 fc fc fc fc fc fc fc fc ^ ffff888130c4ff00: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ffff888130c4ff80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ================================================================== EXT4-fs warning (device loop6): ext4_enable_quotas:6423: Failed to enable quota tracking (type=0, err=-13, ino=3). Please run e2fsck to fix. EXT4-fs (loop6): mount failed