================================================================== BUG: KASAN: use-after-free in ext4_xattr_delete_inode+0xc9a/0xca0 fs/ext4/xattr.c:2907 Read of size 4 at addr ffff888120c9e000 by task syz-executor/460 CPU: 0 PID: 460 Comm: syz-executor Not tainted syzkaller #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 09/16/2026 Call Trace: __dump_stack+0x21/0x30 lib/dump_stack.c:88 dump_stack_lvl+0x110/0x170 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+0x10f/0x150 mm/kasan/report.c:444 __asan_report_load4_noabort+0x14/0x20 mm/kasan/report_generic.c:308 ext4_xattr_delete_inode+0xc9a/0xca0 fs/ext4/xattr.c:2907 ext4_evict_inode+0xe0a/0x1420 fs/ext4/inode.c:302 evict+0x4b6/0x8b0 fs/inode.c:650 iput_final fs/inode.c:1779 [inline] iput+0x651/0x7e0 fs/inode.c:1805 d_delete_notify include/linux/fsnotify.h:278 [inline] vfs_rmdir+0x329/0x450 fs/namei.c:4170 do_rmdir+0x261/0x6b0 fs/namei.c:4218 __do_sys_unlinkat fs/namei.c:4398 [inline] __se_sys_unlinkat fs/namei.c:4392 [inline] __x64_sys_unlinkat+0xc7/0xf0 fs/namei.c:4392 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:0x7f925f10d547 Code: 77 01 c3 48 c7 c2 e8 ff ff ff f7 d8 64 89 02 b8 ff ff ff ff c3 66 2e 0f 1f 84 00 00 00 00 00 0f 1f 40 00 b8 07 01 00 00 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:00007ffdb369d8d8 EFLAGS: 00000207 ORIG_RAX: 0000000000000107 RAX: ffffffffffffffda RBX: 0000000000000065 RCX: 00007f925f10d547 RDX: 0000000000000200 RSI: 00007ffdb369ea80 RDI: 00000000ffffff9c RBP: 00007f925f190a12 R08: 0000000000008660 R09: 00000000ffffffff R10: 0000000000000100 R11: 0000000000000207 R12: 00007ffdb369ea80 R13: 00007f925f190a12 R14: 0000000000009cbc R15: 00007ffdb36a0c30 Allocated by task 417: 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+0xb7/0xe0 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:3245 [inline] slab_alloc mm/slub.c:3255 [inline] kmem_cache_alloc+0xf7/0x260 mm/slub.c:3260 kmem_cache_zalloc include/linux/slab.h:740 [inline] __kernfs_new_node+0xe1/0x670 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:321 create_files fs/sysfs/group.c:64 [inline] internal_create_group+0x492/0xd00 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+0x89/0x710 drivers/base/core.c:2649 device_add+0x5a2/0xe90 drivers/base/core.c:3373 netdev_register_kobject+0x18e/0x330 net/core/net-sysfs.c:2014 register_netdevice+0xeaa/0x1490 net/core/dev.c:10431 register_netdev+0x3e/0x50 net/core/dev.c:10555 ip6_tnl_init_net+0x300/0x3c0 net/ipv6/ip6_tunnel.c:2255 ops_init+0x2c0/0x470 net/core/net_namespace.c:138 setup_net+0x331/0xa30 net/core/net_namespace.c:332 copy_net_ns+0x355/0x5c0 net/core/net_namespace.c:476 create_new_namespaces+0x3a8/0x660 kernel/nsproxy.c:110 unshare_nsproxy_namespaces+0x120/0x170 kernel/nsproxy.c:226 ksys_unshare+0x4d7/0x810 kernel/fork.c:3249 __do_sys_unshare kernel/fork.c:3326 [inline] __se_sys_unshare kernel/fork.c:3324 [inline] __x64_sys_unshare+0x38/0x40 kernel/fork.c:3324 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:1728 [inline] slab_free_freelist_hook+0xc2/0x190 mm/slub.c:1754 slab_free mm/slub.c:3526 [inline] kmem_cache_free+0x100/0x320 mm/slub.c:3544 kernfs_put+0x315/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+0x108/0x290 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+0x626/0xe20 drivers/base/core.c:3609 netdev_unregister_kobject+0x17b/0x260 net/core/net-sysfs.c:1980 unregister_netdevice_many+0x14e4/0x1a00 net/core/dev.c:11203 ip6_tnl_exit_batch_net+0x3eb/0x440 net/ipv6/ip6_tunnel.c:2278 ops_exit_list net/core/net_namespace.c:177 [inline] cleanup_net+0x605/0xae0 net/core/net_namespace.c:599 process_one_work+0x6c8/0xbb0 kernel/workqueue.c:2328 worker_thread+0xaa0/0x1250 kernel/workqueue.c:2475 kthread+0x3f5/0x4f0 kernel/kthread.c:337 ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:287 The buggy address belongs to the object at ffff888120c9e000 which belongs to the cache kernfs_node_cache of size 136 The buggy address is located 0 bytes inside of 136-byte region [ffff888120c9e000, ffff888120c9e088) The buggy address belongs to the page: page:ffffea0004832780 refcount:1 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x120c9e flags: 0x4000000000000200(slab|zone=1) raw: 4000000000000200 0000000000000000 dead000000000122 ffff8881001c4180 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 417, ts 38726674047, free_ts 38697859236 set_page_owner include/linux/page_owner.h:33 [inline] post_alloc_hook+0x192/0x1b0 mm/page_alloc.c:2607 prep_new_page+0x1c/0x110 mm/page_alloc.c:2613 get_page_from_freelist+0x2c3a/0x2cd0 mm/page_alloc.c:4487 __alloc_pages+0x1a2/0x460 mm/page_alloc.c:5824 alloc_slab_page mm/slub.c:-1 [inline] allocate_slab mm/slub.c:1937 [inline] new_slab+0xa0/0x4d0 mm/slub.c:2000 ___slab_alloc+0x3ac/0x840 mm/slub.c:3033 __slab_alloc+0x49/0x90 mm/slub.c:3120 slab_alloc_node mm/slub.c:3211 [inline] slab_alloc mm/slub.c:3255 [inline] kmem_cache_alloc+0x138/0x260 mm/slub.c:3260 kmem_cache_zalloc include/linux/slab.h:740 [inline] __kernfs_new_node+0xe1/0x670 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:321 create_files fs/sysfs/group.c:64 [inline] internal_create_group+0x492/0xd00 fs/sysfs/group.c:149 sysfs_create_group+0x1f/0x30 fs/sysfs/group.c:175 netdev_queue_add_kobject net/core/net-sysfs.c:1672 [inline] netdev_queue_update_kobjects+0x1b0/0x3e0 net/core/net-sysfs.c:1711 register_queue_kobjects net/core/net-sysfs.c:1772 [inline] netdev_register_kobject+0x281/0x330 net/core/net-sysfs.c:2018 page last free stack trace: reset_page_owner include/linux/page_owner.h:26 [inline] free_pages_prepare mm/page_alloc.c:1474 [inline] free_pcp_prepare mm/page_alloc.c:1546 [inline] free_unref_page_prepare+0x5fa/0x600 mm/page_alloc.c:3536 free_unref_page_list+0x138/0x9e0 mm/page_alloc.c:3673 release_pages+0x1264/0x12c0 mm/swap.c:1015 free_pages_and_swap_cache+0x86/0xa0 mm/swap_state.c:320 tlb_batch_pages_flush mm/mmu_gather.c:49 [inline] tlb_flush_mmu_free mm/mmu_gather.c:240 [inline] tlb_flush_mmu mm/mmu_gather.c:247 [inline] tlb_finish_mmu+0x17e/0x310 mm/mmu_gather.c:338 exit_mmap+0x43b/0x8b0 mm/mmap.c:3248 __mmput+0x92/0x300 kernel/fork.c:1191 mmput+0x50/0x150 kernel/fork.c:1214 exit_mm kernel/exit.c:561 [inline] do_exit+0xacc/0x29a0 kernel/exit.c:883 do_group_exit+0x149/0x310 kernel/exit.c:1010 get_signal+0x64f/0x1430 kernel/signal.c:2920 arch_do_signal_or_restart+0xe2/0x1100 arch/x86/kernel/signal.c:867 handle_signal_work kernel/entry/common.c:157 [inline] exit_to_user_mode_loop+0xa7/0xe0 kernel/entry/common.c:181 exit_to_user_mode_prepare+0x87/0xd0 kernel/entry/common.c:217 __syscall_exit_to_user_mode_work kernel/entry/common.c:299 [inline] syscall_exit_to_user_mode+0x1a/0x30 kernel/entry/common.c:310 do_syscall_64+0x58/0xa0 arch/x86/entry/common.c:86 Memory state around the buggy address: ffff888120c9df00: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ffff888120c9df80: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 >ffff888120c9e000: fa fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ^ ffff888120c9e080: fb fc fc fc fc fc fc fc fc fa fb fb fb fb fb fb ffff888120c9e100: fb fb fb fb fb fb fb fb fb fb fc fc fc fc fc fc ==================================================================