System zones: 0-1, 3-36 EXT4-fs (loop4): mounted filesystem without journal. Opts: grpquota,delalloc,resuid=0x0000000000000000,debug,dioread_nolock,bsddf,nomblk_io_submit,noauto_da_alloc,,errors=continue ================================================================== BUG: KASAN: use-after-free in ext4_get_inode_usage+0x3a1/0x520 fs/ext4/xattr.c:817 Read of size 4 at addr ffff88811e106070 by task syz.4.184/1062 CPU: 1 PID: 1062 Comm: syz.4.184 Not tainted syzkaller #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 04/18/2026 Call Trace: __dump_stack+0x21/0x24 lib/dump_stack.c:77 dump_stack_lvl+0x1a7/0x208 lib/dump_stack.c:118 print_address_description+0x7f/0x2c0 mm/kasan/report.c:248 __kasan_report mm/kasan/report.c:435 [inline] kasan_report+0xe2/0x130 mm/kasan/report.c:452 __asan_report_load4_noabort+0x14/0x20 mm/kasan/report_generic.c:308 ext4_get_inode_usage+0x3a1/0x520 fs/ext4/xattr.c:817 __dquot_transfer+0x192/0x20d0 fs/quota/dquot.c:2017 dquot_transfer+0x2f1/0x460 fs/quota/dquot.c:2169 ext4_setattr+0x715/0x1950 fs/ext4/inode.c:5577 notify_change+0xab3/0xe40 fs/attr.c:410 chown_common+0x335/0x500 fs/open.c:675 vfs_fchown fs/open.c:742 [inline] ksys_fchown+0xef/0x160 fs/open.c:753 __do_sys_fchown fs/open.c:761 [inline] __se_sys_fchown fs/open.c:759 [inline] __x64_sys_fchown+0x7a/0x90 fs/open.c:759 do_syscall_64+0x31/0x40 arch/x86/entry/common.c:46 entry_SYSCALL_64_after_hwframe+0x61/0xcb RIP: 0033:0x7fa4b0e8fe59 Code: ff c3 66 2e 0f 1f 84 00 00 00 00 00 0f 1f 44 00 00 48 89 f8 48 89 f7 48 89 d6 48 89 ca 4d 89 c2 4d 89 c8 4c 8b 4c 24 08 0f 05 <48> 3d 01 f0 ff ff 73 01 c3 48 c7 c1 e8 ff ff ff f7 d8 64 89 01 48 RSP: 002b:00007fa4af8ea028 EFLAGS: 00000246 ORIG_RAX: 000000000000005d RAX: ffffffffffffffda RBX: 00007fa4b1108fa0 RCX: 00007fa4b0e8fe59 RDX: 000000000000ee01 RSI: 0000000000000000 RDI: 0000000000000006 RBP: 00007fa4b0f25d6f R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000 R13: 00007fa4b1109038 R14: 00007fa4b1108fa0 R15: 00007ffdc0253de8 Allocated by task 375: 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:430 [inline] __kasan_slab_alloc+0xbd/0xf0 mm/kasan/common.c:463 kasan_slab_alloc include/linux/kasan.h:244 [inline] slab_post_alloc_hook+0x5d/0x2f0 mm/slab.h:580 slab_alloc_node mm/slub.c:2952 [inline] slab_alloc mm/slub.c:2960 [inline] kmem_cache_alloc+0x162/0x2d0 mm/slub.c:2965 kmem_cache_zalloc include/linux/slab.h:657 [inline] avc_alloc_node+0x83/0x350 security/selinux/avc.c:509 avc_insert security/selinux/avc.c:637 [inline] avc_compute_av+0x147/0x6b0 security/selinux/avc.c:1020 avc_has_perm_noaudit security/selinux/avc.c:1163 [inline] avc_has_perm+0x332/0x3d0 security/selinux/avc.c:1198 inode_has_perm security/selinux/hooks.c:1663 [inline] dentry_has_perm security/selinux/hooks.c:1680 [inline] selinux_inode_setattr+0x5f7/0x810 security/selinux/hooks.c:3169 security_inode_setattr+0xc0/0x120 security/security.c:1256 notify_change+0x963/0xe40 fs/attr.c:402 vfs_utimes+0x410/0x5b0 fs/utimes.c:65 do_utimes_path fs/utimes.c:97 [inline] do_utimes+0x1ad/0x2a0 fs/utimes.c:143 __do_sys_utimensat fs/utimes.c:162 [inline] __se_sys_utimensat fs/utimes.c:146 [inline] __x64_sys_utimensat+0x15b/0x240 fs/utimes.c:146 do_syscall_64+0x31/0x40 arch/x86/entry/common.c:46 entry_SYSCALL_64_after_hwframe+0x61/0xcb Freed by task 1064: kasan_save_stack mm/kasan/common.c:38 [inline] kasan_set_track+0x4a/0x70 mm/kasan/common.c:45 kasan_set_free_info+0x23/0x40 mm/kasan/generic.c:370 ____kasan_slab_free+0x125/0x160 mm/kasan/common.c:362 __kasan_slab_free+0x11/0x20 mm/kasan/common.c:370 kasan_slab_free include/linux/kasan.h:220 [inline] slab_free_hook mm/slub.c:1600 [inline] slab_free_freelist_hook+0xc5/0x190 mm/slub.c:1626 slab_free mm/slub.c:3208 [inline] kmem_cache_free+0x100/0x2d0 mm/slub.c:3224 avc_node_free+0x4d/0x60 security/selinux/avc.c:441 rcu_do_batch+0x4ef/0xab0 kernel/rcu/tree.c:2494 rcu_core+0x577/0xd80 kernel/rcu/tree.c:2735 rcu_core_si+0x9/0x10 kernel/rcu/tree.c:2748 __do_softirq+0x255/0x563 kernel/softirq.c:309 Last potentially related work creation: kasan_save_stack+0x3a/0x60 mm/kasan/common.c:38 __kasan_record_aux_stack+0xd2/0x100 mm/kasan/generic.c:348 kasan_record_aux_stack_noalloc+0xb/0x10 mm/kasan/generic.c:358 __call_rcu kernel/rcu/tree.c:2980 [inline] call_rcu+0x11a/0x10b0 kernel/rcu/tree.c:3054 avc_node_delete+0xe3/0x200 security/selinux/avc.c:449 avc_reclaim_node security/selinux/avc.c:489 [inline] avc_alloc_node+0x212/0x350 security/selinux/avc.c:518 avc_insert security/selinux/avc.c:637 [inline] avc_compute_av+0x147/0x6b0 security/selinux/avc.c:1020 avc_has_perm_noaudit+0x1fa/0x260 security/selinux/avc.c:1163 selinux_inode_permission+0x391/0x5f0 security/selinux/hooks.c:3124 security_inode_permission+0xa0/0x100 security/security.c:1247 inode_permission+0xf1/0x520 fs/namei.c:474 may_lookup fs/namei.c:1673 [inline] link_path_walk+0x1ee/0xba0 fs/namei.c:2225 path_openat+0x27c/0x31c0 fs/namei.c:3513 do_filp_open+0x1e2/0x410 fs/namei.c:3544 do_sys_openat2+0x19f/0x750 fs/open.c:1219 do_sys_open fs/open.c:1235 [inline] __do_sys_openat fs/open.c:1251 [inline] __se_sys_openat fs/open.c:1246 [inline] __x64_sys_openat+0x136/0x160 fs/open.c:1246 do_syscall_64+0x31/0x40 arch/x86/entry/common.c:46 entry_SYSCALL_64_after_hwframe+0x61/0xcb The buggy address belongs to the object at ffff88811e106068 which belongs to the cache avc_node of size 72 The buggy address is located 8 bytes inside of 72-byte region [ffff88811e106068, ffff88811e1060b0) The buggy address belongs to the page: page:ffffea0004784180 refcount:1 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x11e106 flags: 0x4000000000000200(slab) raw: 4000000000000200 dead000000000100 dead000000000122 ffff888100189e00 raw: 0000000000000000 0000000000270027 00000001ffffffff 0000000000000000 page dumped because: kasan: bad access detected page_owner tracks the page as allocated page last allocated via order 0, migratetype Unmovable, gfp_mask 0x112800(GFP_NOWAIT|__GFP_NOWARN|__GFP_NORETRY|__GFP_HARDWALL), pid 375, ts 49134035813, free_ts 49131962178 set_page_owner include/linux/page_owner.h:35 [inline] post_alloc_hook mm/page_alloc.c:2456 [inline] prep_new_page+0x179/0x180 mm/page_alloc.c:2462 get_page_from_freelist+0x223b/0x23d0 mm/page_alloc.c:4254 __alloc_pages_nodemask+0x290/0x620 mm/page_alloc.c:5384 alloc_slab_page mm/slub.c:-1 [inline] allocate_slab mm/slub.c:1813 [inline] new_slab+0x84/0x3f0 mm/slub.c:1874 new_slab_objects mm/slub.c:2632 [inline] ___slab_alloc+0x2a6/0x450 mm/slub.c:2796 __slab_alloc+0x63/0xa0 mm/slub.c:2836 slab_alloc_node mm/slub.c:2918 [inline] slab_alloc mm/slub.c:2960 [inline] kmem_cache_alloc+0x1ac/0x2d0 mm/slub.c:2965 kmem_cache_zalloc include/linux/slab.h:657 [inline] avc_alloc_node+0x83/0x350 security/selinux/avc.c:509 avc_insert security/selinux/avc.c:637 [inline] avc_compute_av+0x147/0x6b0 security/selinux/avc.c:1020 avc_has_perm_noaudit+0x1fa/0x260 security/selinux/avc.c:1163 selinux_inode_permission+0x391/0x5f0 security/selinux/hooks.c:3124 security_inode_permission+0xa0/0x100 security/security.c:1247 inode_permission+0xf1/0x520 fs/namei.c:474 may_lookup fs/namei.c:1673 [inline] link_path_walk+0x1ee/0xba0 fs/namei.c:2225 path_openat+0x27c/0x31c0 fs/namei.c:3513 do_filp_open+0x1e2/0x410 fs/namei.c:3544 page last free stack trace: reset_page_owner include/linux/page_owner.h:28 [inline] free_pages_prepare mm/page_alloc.c:1349 [inline] free_pcp_prepare mm/page_alloc.c:1421 [inline] free_unref_page_prepare+0x2b7/0x2d0 mm/page_alloc.c:3336 free_unref_page mm/page_alloc.c:3391 [inline] free_the_page mm/page_alloc.c:5443 [inline] __free_pages+0x146/0x3b0 mm/page_alloc.c:5454 free_pages+0x82/0x90 mm/page_alloc.c:5465 selinux_genfs_get_sid+0x20b/0x250 security/selinux/hooks.c:1332 inode_doinit_with_dentry+0x879/0xd70 security/selinux/hooks.c:1529 selinux_d_instantiate+0x27/0x40 security/selinux/hooks.c:6395 security_d_instantiate+0x9e/0xf0 security/security.c:1980 d_splice_alias+0x6d/0x390 fs/dcache.c:3038 kernfs_iop_lookup+0x2c5/0x310 fs/kernfs/dir.c:1178 __lookup_slow+0x2b8/0x410 fs/namei.c:1648 lookup_slow+0x57/0x70 fs/namei.c:1665 walk_component+0x325/0x460 fs/namei.c:1960 lookup_last fs/namei.c:2411 [inline] path_lookupat+0x180/0x490 fs/namei.c:2435 filename_lookup+0x213/0x6a0 fs/namei.c:2468 user_path_at_empty+0x43/0x50 fs/namei.c:2748 do_readlinkat+0xd9/0x490 fs/stat.c:414 Memory state around the buggy address: ffff88811e105f00: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ffff88811e105f80: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 >ffff88811e106000: fa fb fb fb fb fb fb fb fb fc fc fc fc fa fb fb ^ ffff88811e106080: fb fb fb fb fb fb fc fc fc fc fa fb fb fb fb fb ffff88811e106100: fb fb fb fc fc fc fc fa fb fb fb fb fb fb fb fb ==================================================================