================================================================== BUG: KASAN: use-after-free in ext4_xattr_delete_inode+0xba6/0xbb0 fs/ext4/xattr.c:2911 Read of size 4 at addr ffff88811ee53000 by task syz-executor/422 CPU: 0 PID: 422 Comm: syz-executor Not tainted 5.15.180-syzkaller-1080043-g88c4075c39ed #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 04/19/2025 Call Trace: __dump_stack+0x21/0x30 lib/dump_stack.c:88 dump_stack_lvl+0xee/0x150 lib/dump_stack.c:106 print_address_description+0x7f/0x2c0 mm/kasan/report.c:248 __kasan_report mm/kasan/report.c:427 [inline] kasan_report+0xf1/0x140 mm/kasan/report.c:444 __asan_report_load4_noabort+0x14/0x20 mm/kasan/report_generic.c:308 ext4_xattr_delete_inode+0xba6/0xbb0 fs/ext4/xattr.c:2911 ext4_evict_inode+0xe44/0x1450 fs/ext4/inode.c:300 evict+0x485/0x870 fs/inode.c:647 iput_final fs/inode.c:1769 [inline] iput+0x635/0x7c0 fs/inode.c:1795 d_delete_notify include/linux/fsnotify.h:278 [inline] vfs_rmdir+0x33f/0x460 fs/namei.c:4162 do_rmdir+0x259/0x6a0 fs/namei.c:4210 __do_sys_unlinkat fs/namei.c:4390 [inline] __se_sys_unlinkat fs/namei.c:4384 [inline] __x64_sys_unlinkat+0xc7/0xf0 fs/namei.c:4384 x64_sys_call+0x4c0/0x9a0 arch/x86/include/generated/asm/syscalls_64.h:264 do_syscall_x64 arch/x86/entry/common.c:50 [inline] do_syscall_64+0x4c/0xa0 arch/x86/entry/common.c:80 entry_SYSCALL_64_after_hwframe+0x66/0xd0 RIP: 0033:0x7f8d0faefcf7 Code: 73 01 c3 48 c7 c1 a8 ff ff ff f7 d8 64 89 01 48 83 c8 ff c3 66 2e 0f 1f 84 00 00 00 00 00 0f 1f 44 00 00 b8 07 01 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:00007ffecf41e8e8 EFLAGS: 00000207 ORIG_RAX: 0000000000000107 RAX: ffffffffffffffda RBX: 0000000000000065 RCX: 00007f8d0faefcf7 RDX: 0000000000000200 RSI: 00007ffecf41fa90 RDI: 00000000ffffff9c RBP: 00007f8d0fb631cc R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000100 R11: 0000000000000207 R12: 00007ffecf41fa90 R13: 00007f8d0fb631cc R14: 000000000000ce2b R15: 00007ffecf421c40 Allocated by task 302: 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+0xbd/0xf0 mm/kasan/common.c:466 kasan_slab_alloc include/linux/kasan.h:217 [inline] slab_post_alloc_hook+0x4f/0x2b0 mm/slab.h:550 slab_alloc_node mm/slub.c:3240 [inline] slab_alloc mm/slub.c:3250 [inline] kmem_cache_alloc+0xf7/0x260 mm/slub.c:3255 kmem_cache_zalloc include/linux/slab.h:737 [inline] __kernfs_new_node+0xdb/0x680 fs/kernfs/dir.c:593 kernfs_new_node+0x150/0x260 fs/kernfs/dir.c:669 __kernfs_create_file+0x4e/0x270 fs/kernfs/file.c:987 sysfs_add_file_mode_ns+0x29a/0x350 fs/sysfs/file.c:317 create_files fs/sysfs/group.c:64 [inline] internal_create_group+0x489/0xcf0 fs/sysfs/group.c:149 internal_create_groups fs/sysfs/group.c:189 [inline] sysfs_create_groups+0x58/0x120 fs/sysfs/group.c:215 device_add_groups drivers/base/core.c:2501 [inline] device_add_attrs+0x8c/0x700 drivers/base/core.c:2649 device_add+0x5e3/0xed0 drivers/base/core.c:3373 netdev_register_kobject+0x179/0x320 net/core/net-sysfs.c:2014 register_netdevice+0xdfa/0x13a0 net/core/dev.c:10404 register_netdev+0x3e/0x50 net/core/dev.c:10528 sit_init_net+0x246/0x480 net/ipv6/sit.c:1925 ops_init+0x1ba/0x4a0 net/core/net_namespace.c:138 setup_net+0x344/0xa90 net/core/net_namespace.c:332 copy_net_ns+0x355/0x5c0 net/core/net_namespace.c:476 create_new_namespaces+0x3a2/0x660 kernel/nsproxy.c:110 unshare_nsproxy_namespaces+0x120/0x170 kernel/nsproxy.c:226 ksys_unshare+0x4ac/0x7b0 kernel/fork.c:3166 __do_sys_unshare kernel/fork.c:3240 [inline] __se_sys_unshare kernel/fork.c:3238 [inline] __x64_sys_unshare+0x38/0x40 kernel/fork.c:3238 x64_sys_call+0x442/0x9a0 arch/x86/include/generated/asm/syscalls_64.h:273 do_syscall_x64 arch/x86/entry/common.c:50 [inline] do_syscall_64+0x4c/0xa0 arch/x86/entry/common.c:80 entry_SYSCALL_64_after_hwframe+0x66/0xd0 Freed by task 45: 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:365 __kasan_slab_free+0x11/0x20 mm/kasan/common.c:373 kasan_slab_free include/linux/kasan.h:193 [inline] slab_free_hook mm/slub.c:1723 [inline] slab_free_freelist_hook+0xc2/0x190 mm/slub.c:1749 slab_free mm/slub.c:3521 [inline] kmem_cache_free+0x100/0x320 mm/slub.c:3539 kernfs_put+0x310/0x480 fs/kernfs/dir.c:547 kernfs_remove_by_name_ns+0xea/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+0x105/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+0x124/0x140 drivers/base/core.c:2714 device_del+0x68e/0xe90 drivers/base/core.c:3609 netdev_unregister_kobject+0x186/0x250 net/core/net-sysfs.c:1980 unregister_netdevice_many+0x1486/0x1990 net/core/dev.c:11176 sit_exit_batch_net+0x607/0x650 net/ipv6/sit.c:1952 ops_exit_list net/core/net_namespace.c:177 [inline] cleanup_net+0x602/0xad0 net/core/net_namespace.c:599 process_one_work+0x6be/0xba0 kernel/workqueue.c:2325 worker_thread+0xa59/0x1200 kernel/workqueue.c:2472 kthread+0x411/0x500 kernel/kthread.c:337 ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:287 The buggy address belongs to the object at ffff88811ee53000 which belongs to the cache kernfs_node_cache of size 136 The buggy address is located 0 bytes inside of 136-byte region [ffff88811ee53000, ffff88811ee53088) The buggy address belongs to the page: page:ffffea00047b94c0 refcount:1 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x11ee53 flags: 0x4000000000000200(slab|zone=1) raw: 4000000000000200 0000000000000000 dead000000000122 ffff8881001c4300 raw: 0000000000000000 0000000000140014 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 0x112cc0(GFP_USER|__GFP_NOWARN|__GFP_NORETRY), pid 302, ts 29842399832, free_ts 20057772019 set_page_owner include/linux/page_owner.h:33 [inline] post_alloc_hook+0x192/0x1b0 mm/page_alloc.c:2605 prep_new_page+0x1c/0x110 mm/page_alloc.c:2611 get_page_from_freelist+0x2cc5/0x2d50 mm/page_alloc.c:4485 __alloc_pages+0x18f/0x440 mm/page_alloc.c:5781 alloc_slab_page mm/slub.c:-1 [inline] allocate_slab mm/slub.c:1932 [inline] new_slab+0xa1/0x4d0 mm/slub.c:1995 ___slab_alloc+0x381/0x810 mm/slub.c:3028 __slab_alloc+0x49/0x90 mm/slub.c:3115 slab_alloc_node mm/slub.c:3206 [inline] slab_alloc mm/slub.c:3250 [inline] kmem_cache_alloc+0x138/0x260 mm/slub.c:3255 kmem_cache_zalloc include/linux/slab.h:737 [inline] __kernfs_new_node+0xdb/0x680 fs/kernfs/dir.c:593 kernfs_new_node+0x150/0x260 fs/kernfs/dir.c:669 __kernfs_create_file+0x4e/0x270 fs/kernfs/file.c:987 sysfs_add_file_mode_ns+0x29a/0x350 fs/sysfs/file.c:317 create_files fs/sysfs/group.c:64 [inline] internal_create_group+0x489/0xcf0 fs/sysfs/group.c:149 internal_create_groups fs/sysfs/group.c:189 [inline] sysfs_create_groups+0x58/0x120 fs/sysfs/group.c:215 device_add_groups drivers/base/core.c:2501 [inline] device_add_attrs+0x8c/0x700 drivers/base/core.c:2649 device_add+0x5e3/0xed0 drivers/base/core.c:3373 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+0x542/0x550 mm/page_alloc.c:3534 free_unref_page+0xa2/0x550 mm/page_alloc.c:3616 __put_single_page mm/swap.c:98 [inline] __put_page+0xad/0xe0 mm/swap.c:129 put_page include/linux/mm.h:1295 [inline] anon_pipe_buf_release+0x183/0x200 fs/pipe.c:137 pipe_buf_release include/linux/pipe_fs_i.h:219 [inline] pipe_read+0x53d/0xfe0 fs/pipe.c:323 call_read_iter include/linux/fs.h:2198 [inline] new_sync_read fs/read_write.c:404 [inline] vfs_read+0x68b/0xbe0 fs/read_write.c:485 ksys_read+0x140/0x240 fs/read_write.c:623 __do_sys_read fs/read_write.c:633 [inline] __se_sys_read fs/read_write.c:631 [inline] __x64_sys_read+0x7b/0x90 fs/read_write.c:631 x64_sys_call+0x96d/0x9a0 arch/x86/include/generated/asm/syscalls_64.h:1 do_syscall_x64 arch/x86/entry/common.c:50 [inline] do_syscall_64+0x4c/0xa0 arch/x86/entry/common.c:80 entry_SYSCALL_64_after_hwframe+0x66/0xd0 Memory state around the buggy address: ffff88811ee52f00: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ffff88811ee52f80: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 >ffff88811ee53000: fa fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ^ ffff88811ee53080: fb fc fc fc fc fc fc fc fc fa fb fb fb fb fb fb ffff88811ee53100: fb fb fb fb fb fb fb fb fb fb fc fc fc fc fc fc ==================================================================