================================================================== BUG: KASAN: slab-out-of-bounds in lockdep_set_quota_inode fs/ext4/super.c:6846 [inline] BUG: KASAN: slab-out-of-bounds in ext4_quota_enable fs/ext4/super.c:6977 [inline] BUG: KASAN: slab-out-of-bounds in ext4_enable_quotas+0xa74/0xd10 fs/ext4/super.c:7004 Read of size 1 at addr ffff8880878bac82 by task syz-executor.2/22905 CPU: 0 PID: 22905 Comm: syz-executor.2 Not tainted 6.3.0-rc3-next-20230324-syzkaller #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 03/02/2023 Call Trace: __dump_stack lib/dump_stack.c:88 [inline] dump_stack_lvl+0xd9/0x150 lib/dump_stack.c:106 print_address_description.constprop.0+0x2c/0x3c0 mm/kasan/report.c:351 print_report mm/kasan/report.c:462 [inline] kasan_report+0x11c/0x130 mm/kasan/report.c:572 lockdep_set_quota_inode fs/ext4/super.c:6846 [inline] ext4_quota_enable fs/ext4/super.c:6977 [inline] ext4_enable_quotas+0xa74/0xd10 fs/ext4/super.c:7004 __ext4_fill_super fs/ext4/super.c:5494 [inline] ext4_fill_super+0x9a95/0xad90 fs/ext4/super.c:5637 get_tree_bdev+0x444/0x760 fs/super.c:1303 vfs_get_tree+0x8d/0x350 fs/super.c:1510 do_new_mount fs/namespace.c:3039 [inline] path_mount+0x134b/0x1e40 fs/namespace.c:3369 do_mount fs/namespace.c:3382 [inline] __do_sys_mount fs/namespace.c:3591 [inline] __se_sys_mount fs/namespace.c:3568 [inline] __x64_sys_mount+0x283/0x300 fs/namespace.c:3568 do_syscall_x64 arch/x86/entry/common.c:50 [inline] do_syscall_64+0x39/0xb0 arch/x86/entry/common.c:80 entry_SYSCALL_64_after_hwframe+0x63/0xcd RIP: 0033:0x7f28e388d62a 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:00007f28e452af88 EFLAGS: 00000206 ORIG_RAX: 00000000000000a5 RAX: ffffffffffffffda RBX: 00000000000004a6 RCX: 00007f28e388d62a RDX: 00000000200004c0 RSI: 0000000020000500 RDI: 00007f28e452afe0 RBP: 00007f28e452b020 R08: 00007f28e452b020 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000206 R12: 00000000200004c0 R13: 0000000020000500 R14: 00007f28e452afe0 R15: 0000000020000240 Allocated by task 18077: kasan_save_stack+0x22/0x40 mm/kasan/common.c:45 kasan_set_track+0x25/0x30 mm/kasan/common.c:52 __kasan_slab_alloc+0x7f/0x90 mm/kasan/common.c:328 kasan_slab_alloc include/linux/kasan.h:186 [inline] slab_post_alloc_hook mm/slab.h:711 [inline] slab_alloc_node mm/slub.c:3452 [inline] slab_alloc mm/slub.c:3460 [inline] __kmem_cache_alloc_lru mm/slub.c:3467 [inline] kmem_cache_alloc_lru+0x20a/0x600 mm/slub.c:3483 alloc_inode_sb include/linux/fs.h:2689 [inline] f2fs_alloc_inode+0x104/0x5c0 fs/f2fs/super.c:1371 alloc_inode+0x61/0x230 fs/inode.c:260 iget_locked+0x1bb/0x660 fs/inode.c:1287 f2fs_iget+0x63/0x5600 fs/f2fs/inode.c:504 f2fs_fill_super+0x3bad/0x8b50 fs/f2fs/super.c:4356 mount_bdev+0x351/0x410 fs/super.c:1380 legacy_get_tree+0x109/0x220 fs/fs_context.c:610 vfs_get_tree+0x8d/0x350 fs/super.c:1510 do_new_mount fs/namespace.c:3039 [inline] path_mount+0x134b/0x1e40 fs/namespace.c:3369 do_mount fs/namespace.c:3382 [inline] __do_sys_mount fs/namespace.c:3591 [inline] __se_sys_mount fs/namespace.c:3568 [inline] __x64_sys_mount+0x283/0x300 fs/namespace.c:3568 do_syscall_x64 arch/x86/entry/common.c:50 [inline] do_syscall_64+0x39/0xb0 arch/x86/entry/common.c:80 entry_SYSCALL_64_after_hwframe+0x63/0xcd Last potentially related work creation: kasan_save_stack+0x22/0x40 mm/kasan/common.c:45 __kasan_record_aux_stack+0xbc/0xd0 mm/kasan/generic.c:491 __call_rcu_common.constprop.0+0x99/0x790 kernel/rcu/tree.c:2637 destroy_inode+0x129/0x1b0 fs/inode.c:315 iput_final fs/inode.c:1748 [inline] iput fs/inode.c:1774 [inline] iput+0x4a7/0x7a0 fs/inode.c:1760 f2fs_fill_super+0x452f/0x8b50 fs/f2fs/super.c:4539 mount_bdev+0x351/0x410 fs/super.c:1380 legacy_get_tree+0x109/0x220 fs/fs_context.c:610 vfs_get_tree+0x8d/0x350 fs/super.c:1510 do_new_mount fs/namespace.c:3039 [inline] path_mount+0x134b/0x1e40 fs/namespace.c:3369 do_mount fs/namespace.c:3382 [inline] __do_sys_mount fs/namespace.c:3591 [inline] __se_sys_mount fs/namespace.c:3568 [inline] __x64_sys_mount+0x283/0x300 fs/namespace.c:3568 do_syscall_x64 arch/x86/entry/common.c:50 [inline] do_syscall_64+0x39/0xb0 arch/x86/entry/common.c:80 entry_SYSCALL_64_after_hwframe+0x63/0xcd The buggy address belongs to the object at ffff8880878ba3a0 which belongs to the cache f2fs_inode_cache of size 2152 The buggy address is located 122 bytes to the right of allocated 2152-byte region [ffff8880878ba3a0, ffff8880878bac08) The buggy address belongs to the physical page: page:ffffea00021e2e00 refcount:1 mapcount:0 mapping:0000000000000000 index:0xffff8880878ba3a0 pfn:0x878b8 head:ffffea00021e2e00 order:3 entire_mapcount:0 nr_pages_mapped:0 pincount:0 memcg:ffff88807de11501 flags: 0xfff00000010200(slab|head|node=0|zone=1|lastcpupid=0x7ff) page_type: 0xffffffff() raw: 00fff00000010200 ffff88801c216c80 dead000000000122 0000000000000000 raw: ffff8880878ba3a0 00000000800e0009 00000001ffffffff ffff88807de11501 page dumped because: kasan: bad access detected page_owner tracks the page as allocated page last allocated via order 3, migratetype Reclaimable, gfp_mask 0x1d2050(__GFP_IO|__GFP_NOWARN|__GFP_NORETRY|__GFP_COMP|__GFP_NOMEMALLOC|__GFP_HARDWALL|__GFP_RECLAIMABLE), pid 7749, tgid 7747 (syz-executor.0), ts 604876022953, free_ts 435928918751 prep_new_page mm/page_alloc.c:1729 [inline] get_page_from_freelist+0xf75/0x2aa0 mm/page_alloc.c:3493 __alloc_pages+0x1cb/0x4a0 mm/page_alloc.c:4759 alloc_pages+0x1aa/0x270 mm/mempolicy.c:2283 alloc_slab_page mm/slub.c:1851 [inline] allocate_slab+0x28e/0x380 mm/slub.c:1998 new_slab mm/slub.c:2051 [inline] ___slab_alloc+0xa91/0x1400 mm/slub.c:3193 __slab_alloc.constprop.0+0x56/0xa0 mm/slub.c:3292 __slab_alloc_node mm/slub.c:3345 [inline] slab_alloc_node mm/slub.c:3442 [inline] slab_alloc mm/slub.c:3460 [inline] __kmem_cache_alloc_lru mm/slub.c:3467 [inline] kmem_cache_alloc_lru+0x4a8/0x600 mm/slub.c:3483 alloc_inode_sb include/linux/fs.h:2689 [inline] f2fs_alloc_inode+0x104/0x5c0 fs/f2fs/super.c:1371 alloc_inode+0x61/0x230 fs/inode.c:260 iget_locked+0x1bb/0x660 fs/inode.c:1287 f2fs_iget+0x63/0x5600 fs/f2fs/inode.c:504 f2fs_fill_super+0x2fed/0x8b50 fs/f2fs/super.c:4254 mount_bdev+0x351/0x410 fs/super.c:1380 legacy_get_tree+0x109/0x220 fs/fs_context.c:610 vfs_get_tree+0x8d/0x350 fs/super.c:1510 do_new_mount fs/namespace.c:3039 [inline] path_mount+0x134b/0x1e40 fs/namespace.c:3369 page last free stack trace: reset_page_owner include/linux/page_owner.h:24 [inline] free_pages_prepare mm/page_alloc.c:1302 [inline] free_unref_page_prepare+0x4d8/0xb80 mm/page_alloc.c:2555 free_unref_page+0x33/0x370 mm/page_alloc.c:2650 __unfreeze_partials+0x17c/0x1a0 mm/slub.c:2637 qlink_free mm/kasan/quarantine.c:168 [inline] qlist_free_all+0x6a/0x170 mm/kasan/quarantine.c:187 kasan_quarantine_reduce+0x195/0x220 mm/kasan/quarantine.c:294 __kasan_slab_alloc+0x63/0x90 mm/kasan/common.c:305 kasan_slab_alloc include/linux/kasan.h:186 [inline] slab_post_alloc_hook mm/slab.h:711 [inline] slab_alloc_node mm/slub.c:3452 [inline] slab_alloc mm/slub.c:3460 [inline] __kmem_cache_alloc_lru mm/slub.c:3467 [inline] kmem_cache_alloc+0x17c/0x3b0 mm/slub.c:3476 getname_flags.part.0+0x50/0x4f0 fs/namei.c:140 getname_flags include/linux/audit.h:321 [inline] getname+0x92/0xd0 fs/namei.c:219 do_sys_openat2+0xf5/0x4c0 fs/open.c:1350 do_sys_open fs/open.c:1372 [inline] __do_sys_openat fs/open.c:1388 [inline] __se_sys_openat fs/open.c:1383 [inline] __x64_sys_openat+0x143/0x1f0 fs/open.c:1383 do_syscall_x64 arch/x86/entry/common.c:50 [inline] do_syscall_64+0x39/0xb0 arch/x86/entry/common.c:80 entry_SYSCALL_64_after_hwframe+0x63/0xcd Memory state around the buggy address: ffff8880878bab80: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ffff8880878bac00: fb fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc >ffff8880878bac80: fc 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ^ ffff8880878bad00: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ffff8880878bad80: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ==================================================================