================================================================== BUG: KASAN: use-after-free in ext4_xattr_delete_inode+0xba6/0xbb0 fs/ext4/xattr.c:2913 Read of size 4 at addr ffff888115f8f000 by task syz-executor/437 CPU: 0 PID: 437 Comm: syz-executor Not tainted 6.1.141-syzkaller-1169943-g7011769d221c #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 05/07/2025 Call Trace: __dump_stack+0x21/0x24 lib/dump_stack.c:88 dump_stack_lvl+0xee/0x150 lib/dump_stack.c:106 print_address_description+0x71/0x210 mm/kasan/report.c:316 print_report+0x4a/0x60 mm/kasan/report.c:427 kasan_report+0x122/0x150 mm/kasan/report.c:531 __asan_report_load4_noabort+0x14/0x20 mm/kasan/report_generic.c:350 ext4_xattr_delete_inode+0xba6/0xbb0 fs/ext4/xattr.c:2913 ext4_evict_inode+0xe58/0x1460 fs/ext4/inode.c:296 evict+0x493/0x890 fs/inode.c:705 iput_final fs/inode.c:1834 [inline] iput+0x620/0x670 fs/inode.c:1860 d_delete_notify include/linux/fsnotify.h:292 [inline] vfs_rmdir+0x3bf/0x500 fs/namei.c:4203 do_rmdir+0x259/0x6a0 fs/namei.c:4251 __do_sys_unlinkat fs/namei.c:4431 [inline] __se_sys_unlinkat fs/namei.c:4425 [inline] __x64_sys_unlinkat+0xc7/0xf0 fs/namei.c:4425 x64_sys_call+0x79f/0x9a0 arch/x86/include/generated/asm/syscalls_64.h:264 do_syscall_x64 arch/x86/entry/common.c:51 [inline] do_syscall_64+0x4c/0xa0 arch/x86/entry/common.c:81 entry_SYSCALL_64_after_hwframe+0x68/0xd2 RIP: 0033:0x7f001bd79457 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:00007ffd9bb28348 EFLAGS: 00000207 ORIG_RAX: 0000000000000107 RAX: ffffffffffffffda RBX: 0000000000000065 RCX: 00007f001bd79457 RDX: 0000000000000200 RSI: 00007ffd9bb294f0 RDI: 00000000ffffff9c RBP: 00007f001bde77dc R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000100 R11: 0000000000000207 R12: 00007ffd9bb294f0 R13: 00007f001bde77dc R14: 000000000000d265 R15: 00007ffd9bb2b6a0 Allocated by task 392: kasan_save_stack mm/kasan/common.c:45 [inline] kasan_set_track+0x4b/0x70 mm/kasan/common.c:52 kasan_save_alloc_info+0x25/0x30 mm/kasan/generic.c:505 ____kasan_kmalloc mm/kasan/common.c:379 [inline] __kasan_kmalloc+0x95/0xb0 mm/kasan/common.c:388 kasan_kmalloc include/linux/kasan.h:212 [inline] kmalloc_trace+0x40/0xb0 mm/slab_common.c:1033 kmalloc include/linux/slab.h:563 [inline] kzalloc include/linux/slab.h:699 [inline] ref_tracker_alloc+0x139/0x430 lib/ref_tracker.c:85 __netdev_tracker_alloc include/linux/netdevice.h:4084 [inline] netdev_hold include/linux/netdevice.h:4113 [inline] rx_queue_add_kobject net/core/net-sysfs.c:1054 [inline] net_rx_queue_update_kobjects+0x164/0x4d0 net/core/net-sysfs.c:1108 register_queue_kobjects net/core/net-sysfs.c:1768 [inline] netdev_register_kobject+0x229/0x320 net/core/net-sysfs.c:2013 register_netdevice+0xe3d/0x14a0 net/core/dev.c:10156 veth_newlink+0x592/0xbe0 drivers/net/veth.c:1744 rtnl_newlink_create net/core/rtnetlink.c:3422 [inline] __rtnl_newlink net/core/rtnetlink.c:3642 [inline] rtnl_newlink+0x14b9/0x2030 net/core/rtnetlink.c:3655 rtnetlink_rcv_msg+0x9f4/0xcf0 net/core/rtnetlink.c:6153 netlink_rcv_skb+0x1f2/0x440 net/netlink/af_netlink.c:2503 rtnetlink_rcv+0x1c/0x20 net/core/rtnetlink.c:6171 netlink_unicast_kernel net/netlink/af_netlink.c:1312 [inline] netlink_unicast+0x8b1/0xa30 net/netlink/af_netlink.c:1338 netlink_sendmsg+0x8aa/0xbc0 net/netlink/af_netlink.c:1860 sock_sendmsg_nosec net/socket.c:716 [inline] __sock_sendmsg net/socket.c:728 [inline] __sys_sendto+0x464/0x5e0 net/socket.c:2143 __do_sys_sendto net/socket.c:2155 [inline] __se_sys_sendto net/socket.c:2151 [inline] __x64_sys_sendto+0xe5/0x100 net/socket.c:2151 x64_sys_call+0x83/0x9a0 arch/x86/include/generated/asm/syscalls_64.h:45 do_syscall_x64 arch/x86/entry/common.c:51 [inline] do_syscall_64+0x4c/0xa0 arch/x86/entry/common.c:81 entry_SYSCALL_64_after_hwframe+0x68/0xd2 Freed by task 318: kasan_save_stack mm/kasan/common.c:45 [inline] kasan_set_track+0x4b/0x70 mm/kasan/common.c:52 kasan_save_free_info+0x31/0x50 mm/kasan/generic.c:516 ____kasan_slab_free+0x132/0x180 mm/kasan/common.c:241 __kasan_slab_free+0x11/0x20 mm/kasan/common.c:249 kasan_slab_free include/linux/kasan.h:178 [inline] slab_free_hook mm/slub.c:1745 [inline] slab_free_freelist_hook+0xc2/0x190 mm/slub.c:1771 slab_free mm/slub.c:3686 [inline] __kmem_cache_free+0xb7/0x1b0 mm/slub.c:3702 kfree+0x6f/0xf0 mm/slab_common.c:990 ref_tracker_dir_exit+0x191/0x4c0 lib/ref_tracker.c:27 free_netdev+0x27d/0x490 net/core/dev.c:10807 netdev_run_todo+0xaa4/0xc00 net/core/dev.c:10464 rtnl_unlock+0xe/0x10 net/core/rtnetlink.c:147 default_device_exit_batch+0x9be/0xa50 net/core/dev.c:11453 ops_exit_list net/core/net_namespace.c:177 [inline] cleanup_net+0x62d/0xb00 net/core/net_namespace.c:604 process_one_work+0x71f/0xc40 kernel/workqueue.c:2299 worker_thread+0xa29/0x11f0 kernel/workqueue.c:2446 kthread+0x281/0x320 kernel/kthread.c:386 ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:295 The buggy address belongs to the object at ffff888115f8f000 which belongs to the cache kmalloc-32 of size 32 The buggy address is located 0 bytes inside of 32-byte region [ffff888115f8f000, ffff888115f8f020) The buggy address belongs to the physical page: page:ffffea000457e3c0 refcount:1 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x115f8f flags: 0x4000000000000200(slab|zone=1) raw: 4000000000000200 ffffea000457db80 dead000000000003 ffff888100042600 raw: 0000000000000000 0000000000400040 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 0x12cc0(GFP_KERNEL|__GFP_NOWARN|__GFP_NORETRY), pid 106, tgid 106 (udevd), ts 6961582511, free_ts 6960559241 set_page_owner include/linux/page_owner.h:33 [inline] post_alloc_hook+0x1f5/0x210 mm/page_alloc.c:2637 prep_new_page+0x1c/0x110 mm/page_alloc.c:2644 get_page_from_freelist+0x2c7b/0x2cf0 mm/page_alloc.c:4539 __alloc_pages+0x19e/0x3a0 mm/page_alloc.c:5850 alloc_slab_page+0x6e/0xf0 include/linux/gfp.h:-1 allocate_slab mm/slub.c:1962 [inline] new_slab+0x98/0x3d0 mm/slub.c:2015 ___slab_alloc+0x6f6/0xb50 mm/slub.c:3203 __slab_alloc+0x5e/0xa0 mm/slub.c:3302 slab_alloc_node mm/slub.c:3387 [inline] __kmem_cache_alloc_node+0x203/0x2c0 mm/slub.c:3462 __do_kmalloc_node mm/slab_common.c:937 [inline] __kmalloc+0xa1/0x1e0 mm/slab_common.c:951 kmalloc include/linux/slab.h:568 [inline] shmem_initxattrs+0xcd/0x1e0 mm/shmem.c:3303 security_inode_init_security+0x28c/0x3a0 security/security.c:1133 shmem_mknod+0xbb/0x1d0 mm/shmem.c:2955 shmem_create+0x2c/0x40 mm/shmem.c:3014 lookup_open fs/namei.c:3481 [inline] open_last_lookups fs/namei.c:3549 [inline] path_openat+0x11e3/0x2f50 fs/namei.c:3779 do_filp_open+0x1c1/0x3c0 fs/namei.c:3809 page last free stack trace: reset_page_owner include/linux/page_owner.h:26 [inline] free_pages_prepare mm/page_alloc.c:1545 [inline] free_pcp_prepare mm/page_alloc.c:1619 [inline] free_unref_page_prepare+0x742/0x750 mm/page_alloc.c:3581 free_unref_page+0x8f/0x530 mm/page_alloc.c:3677 free_the_page mm/page_alloc.c:830 [inline] __free_pages+0x67/0x100 mm/page_alloc.c:5939 free_pages+0x82/0x90 mm/page_alloc.c:5950 selinux_genfs_get_sid+0x20b/0x250 security/selinux/hooks.c:1303 inode_doinit_with_dentry+0x86e/0xd70 security/selinux/hooks.c:1498 selinux_d_instantiate+0x27/0x40 security/selinux/hooks.c:6390 security_d_instantiate+0xb3/0x110 security/security.c:2096 d_splice_alias+0x6d/0x390 fs/dcache.c:3153 kernfs_iop_lookup+0x2c2/0x310 fs/kernfs/dir.c:1204 __lookup_slow+0x2c7/0x3f0 fs/namei.c:1689 lookup_slow+0x57/0x70 fs/namei.c:1706 walk_component+0x2f4/0x420 fs/namei.c:1997 lookup_last fs/namei.c:2454 [inline] path_lookupat+0x180/0x490 fs/namei.c:2478 filename_lookup+0x1f0/0x500 fs/namei.c:2507 vfs_statx+0x10b/0x660 fs/stat.c:229 Memory state around the buggy address: ffff888115f8ef00: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ffff888115f8ef80: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 >ffff888115f8f000: fa fb fb fb fc fc fc fc fa fb fb fb fc fc fc fc ^ ffff888115f8f080: fa fb fb fb fc fc fc fc 00 00 01 fc fc fc fc fc ffff888115f8f100: fa fb fb fb fc fc fc fc fa fb fb fb fc fc fc fc ================================================================== EXT4-fs (loop0): unmounting filesystem. EXT4-fs (loop0): unmounting filesystem. EXT4-fs (loop0): unmounting filesystem. EXT4-fs (loop0): unmounting filesystem. EXT4-fs (loop0): unmounting filesystem. EXT4-fs (loop0): unmounting filesystem. EXT4-fs (loop0): unmounting filesystem. EXT4-fs (loop0): unmounting filesystem. EXT4-fs (loop0): unmounting filesystem. EXT4-fs (loop0): unmounting filesystem. EXT4-fs (loop0): unmounting filesystem. EXT4-fs (loop0): unmounting filesystem. EXT4-fs (loop0): unmounting filesystem. EXT4-fs (loop0): unmounting filesystem. EXT4-fs (loop0): unmounting filesystem. EXT4-fs (loop0): unmounting filesystem. EXT4-fs (loop0): unmounting filesystem. EXT4-fs (loop0): unmounting filesystem. EXT4-fs (loop0): unmounting filesystem. EXT4-fs (loop0): unmounting filesystem. EXT4-fs (loop0): unmounting filesystem. EXT4-fs (loop0): unmounting filesystem. EXT4-fs (loop0): unmounting filesystem. EXT4-fs (loop0): unmounting filesystem. EXT4-fs (loop0): unmounting filesystem. EXT4-fs (loop0): unmounting filesystem. EXT4-fs (loop0): unmounting filesystem. EXT4-fs (loop0): unmounting filesystem. EXT4-fs (loop0): unmounting filesystem. EXT4-fs (loop0): unmounting filesystem.