================================================================== BUG: KASAN: use-after-free in xattr_find_entry fs/ext4/xattr.c:294 [inline] BUG: KASAN: use-after-free in ext4_xattr_ibody_get+0x606/0x670 fs/ext4/xattr.c:601 Read of size 4 at addr ffff888118702004 by task syz.2.17/523 CPU: 0 PID: 523 Comm: syz.2.17 Not tainted syzkaller #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 09/16/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+0x100/0x140 mm/kasan/report.c:452 __asan_report_load4_noabort+0x14/0x20 mm/kasan/report_generic.c:308 xattr_find_entry fs/ext4/xattr.c:294 [inline] ext4_xattr_ibody_get+0x606/0x670 fs/ext4/xattr.c:601 ext4_xattr_get+0x116/0x830 fs/ext4/xattr.c:655 ext4_get_acl+0x6c/0x6b0 fs/ext4/acl.c:162 get_acl+0x15f/0x270 fs/posix_acl.c:141 posix_acl_chmod+0xe1/0x240 fs/posix_acl.c:565 ext4_setattr+0xb65/0x1980 fs/ext4/inode.c:5741 notify_change+0xab5/0xe40 fs/attr.c:410 chmod_common+0x1e4/0x390 fs/open.c:584 do_fchmodat+0xd4/0x1a0 fs/open.c:622 __do_sys_chmod fs/open.c:640 [inline] __se_sys_chmod fs/open.c:638 [inline] __x64_sys_chmod+0x60/0x70 fs/open.c:638 do_syscall_64+0x31/0x40 arch/x86/entry/common.c:46 entry_SYSCALL_64_after_hwframe+0x61/0xcb RIP: 0033:0x7fe400d5de59 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:00007fe400bc0028 EFLAGS: 00000246 ORIG_RAX: 000000000000005a RAX: ffffffffffffffda RBX: 00007fe400fd6fa0 RCX: 00007fe400d5de59 RDX: 0000000000000000 RSI: 000000000000023f RDI: 0000200000000180 RBP: 00007fe400df3d6f R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000 R13: 00007fe400fd7038 R14: 00007fe400fd6fa0 R15: 00007fff68b6b748 Allocated by task 95: 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_kmalloc mm/kasan/common.c:509 [inline] __kasan_kmalloc+0xd4/0x100 mm/kasan/common.c:518 kasan_kmalloc include/linux/kasan.h:254 [inline] kmem_cache_alloc_trace+0x179/0x2e0 mm/slub.c:2979 kmalloc include/linux/slab.h:555 [inline] kernfs_get_open_node fs/kernfs/file.c:552 [inline] kernfs_fop_open+0x8c0/0xbb0 fs/kernfs/file.c:698 do_dentry_open+0x7a5/0x10a0 fs/open.c:819 vfs_open+0x73/0x80 fs/open.c:944 do_open fs/namei.c:3441 [inline] path_openat+0x26c3/0x3040 fs/namei.c:3559 do_filp_open+0x1df/0x400 fs/namei.c:3586 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 Freed by task 95: 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] kfree+0xc0/0x270 mm/slub.c:4196 kernfs_put_open_node+0x231/0x240 fs/kernfs/file.c:594 kernfs_fop_release+0x189/0x240 fs/kernfs/file.c:760 __fput+0x2dc/0x730 fs/file_table.c:281 ____fput+0x15/0x20 fs/file_table.c:314 task_work_run+0x127/0x190 kernel/task_work.c:189 tracehook_notify_resume include/linux/tracehook.h:188 [inline] exit_to_user_mode_loop+0xcb/0xe0 kernel/entry/common.c:175 exit_to_user_mode_prepare+0x76/0xa0 kernel/entry/common.c:202 syscall_exit_to_user_mode+0x1d/0x40 kernel/entry/common.c:277 do_syscall_64+0x3d/0x40 arch/x86/entry/common.c:56 entry_SYSCALL_64_after_hwframe+0x61/0xcb The buggy address belongs to the object at ffff888118702000 which belongs to the cache kmalloc-64 of size 64 The buggy address is located 4 bytes inside of 64-byte region [ffff888118702000, ffff888118702040) The buggy address belongs to the page: page:ffffea000461c080 refcount:1 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x118702 flags: 0x4000000000000200(slab) raw: 4000000000000200 dead000000000100 dead000000000122 ffff888100043800 raw: 0000000000000000 0000000000200020 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 0x116cc0(GFP_USER|__GFP_NOWARN|__GFP_RETRY_MAYFAIL|__GFP_NORETRY), pid 459, ts 39345955353, free_ts 39330179012 set_page_owner include/linux/page_owner.h:35 [inline] post_alloc_hook mm/page_alloc.c:2456 [inline] prep_new_page+0x176/0x190 mm/page_alloc.c:2462 get_page_from_freelist+0x225f/0x23f0 mm/page_alloc.c:4254 __alloc_pages_nodemask+0x29a/0x640 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+0x2f8/0x4c0 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] __kmalloc+0x1f9/0x330 mm/slub.c:4034 kmalloc include/linux/slab.h:560 [inline] inotify_handle_inode_event+0x172/0x520 fs/notify/inotify/inotify_fsnotify.c:95 inotify_ignored_and_remove_idr+0x29/0x70 fs/notify/inotify/inotify_user.c:491 inotify_freeing_mark+0x1d/0x30 fs/notify/inotify/inotify_fsnotify.c:139 fsnotify_free_mark fs/notify/mark.c:453 [inline] fsnotify_destroy_mark+0x12f/0x190 fs/notify/mark.c:462 __do_sys_inotify_rm_watch fs/notify/inotify/inotify_user.c:802 [inline] __se_sys_inotify_rm_watch+0xcb/0x140 fs/notify/inotify/inotify_user.c:779 __x64_sys_inotify_rm_watch+0x5b/0x70 fs/notify/inotify/inotify_user.c:779 do_syscall_64+0x31/0x40 arch/x86/entry/common.c:46 entry_SYSCALL_64_after_hwframe+0x61/0xcb 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/0x390 mm/page_alloc.c:5454 free_pages+0x82/0x90 mm/page_alloc.c:5465 tlb_batch_list_free mm/mmu_gather.c:61 [inline] tlb_finish_mmu+0x258/0x310 mm/mmu_gather.c:329 unmap_region+0x355/0x3c0 mm/mmap.c:2811 __do_munmap+0x63c/0x850 mm/mmap.c:3041 __vm_munmap mm/mmap.c:3094 [inline] __do_sys_munmap mm/mmap.c:3120 [inline] __se_sys_munmap+0x12c/0x1c0 mm/mmap.c:3116 __x64_sys_munmap+0x5b/0x70 mm/mmap.c:3116 do_syscall_64+0x31/0x40 arch/x86/entry/common.c:46 entry_SYSCALL_64_after_hwframe+0x61/0xcb Memory state around the buggy address: ffff888118701f00: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ffff888118701f80: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 >ffff888118702000: fa fb fb fb fb fb fb fb fc fc fc fc fc fc fc fc ^ ffff888118702080: fa fb fb fb fb fb fb fb fc fc fc fc fc fc fc fc ffff888118702100: 00 00 00 00 00 fc fc fc fc fc fc fc fc fc fc fc ================================================================== EXT4-fs error (device loop2): xattr_find_entry:297: inode #12: comm syz.2.17: corrupted xattr entries