================================================================== BUG: KASAN: use-after-free in ext4_xattr_delete_inode+0xcd0/0xce0 fs/ext4/xattr.c:2911 Read of size 4 at addr ffff888114145000 by task syz-executor/482 CPU: 0 PID: 482 Comm: syz-executor Not tainted 5.15.178-syzkaller-1079147-g7d1f9b5c2ff5 #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 02/12/2025 Call Trace: __dump_stack lib/dump_stack.c:88 [inline] dump_stack_lvl+0x151/0x1c0 lib/dump_stack.c:106 print_address_description+0x87/0x3b0 mm/kasan/report.c:248 __kasan_report mm/kasan/report.c:427 [inline] kasan_report+0x179/0x1c0 mm/kasan/report.c:444 __asan_report_load4_noabort+0x14/0x20 mm/kasan/report_generic.c:308 ext4_xattr_delete_inode+0xcd0/0xce0 fs/ext4/xattr.c:2911 ext4_evict_inode+0xea1/0x14e0 fs/ext4/inode.c:300 evict+0x529/0x930 fs/inode.c:622 iput_final fs/inode.c:1744 [inline] iput+0x63b/0x7e0 fs/inode.c:1770 d_delete_notify include/linux/fsnotify.h:278 [inline] vfs_rmdir+0x359/0x470 fs/namei.c:4162 do_rmdir+0x3ab/0x630 fs/namei.c:4210 __do_sys_unlinkat fs/namei.c:4390 [inline] __se_sys_unlinkat fs/namei.c:4384 [inline] __x64_sys_unlinkat+0xdf/0xf0 fs/namei.c:4384 x64_sys_call+0x6e9/0x9a0 arch/x86/include/generated/asm/syscalls_64.h:264 do_syscall_x64 arch/x86/entry/common.c:50 [inline] do_syscall_64+0x3b/0xb0 arch/x86/entry/common.c:80 entry_SYSCALL_64_after_hwframe+0x66/0xd0 RIP: 0033:0x7f403dd7a6c7 Code: 73 01 c3 48 c7 c1 b0 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 b0 ff ff ff f7 d8 64 89 01 48 RSP: 002b:00007ffefd14e0f8 EFLAGS: 00000207 ORIG_RAX: 0000000000000107 RAX: ffffffffffffffda RBX: 0000000000000065 RCX: 00007f403dd7a6c7 RDX: 0000000000000200 RSI: 00007ffefd14f2a0 RDI: 00000000ffffff9c RBP: 00007f403ddc6336 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000100 R11: 0000000000000207 R12: 00007ffefd14f2a0 R13: 00007f403ddc6336 R14: 000000000000c05d R15: 0000000000000007 Allocated by task 466: 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+0xb1/0xe0 mm/kasan/common.c:466 kasan_slab_alloc include/linux/kasan.h:217 [inline] slab_post_alloc_hook+0x53/0x2c0 mm/slab.h:550 slab_alloc_node mm/slub.c:3240 [inline] slab_alloc mm/slub.c:3250 [inline] kmem_cache_alloc+0xf5/0x250 mm/slub.c:3255 kmem_cache_alloc_node include/linux/slab.h:474 [inline] __alloc_skb+0xbe/0x550 net/core/skbuff.c:416 alloc_skb include/linux/skbuff.h:1183 [inline] alloc_uevent_skb+0x80/0x230 lib/kobject_uevent.c:290 uevent_net_broadcast_tagged lib/kobject_uevent.c:351 [inline] kobject_uevent_net_broadcast+0x188/0x590 lib/kobject_uevent.c:412 kobject_uevent_env+0x525/0x700 lib/kobject_uevent.c:608 kobject_uevent+0x1f/0x30 lib/kobject_uevent.c:657 device_add+0xa6e/0xf10 drivers/base/core.c:3403 netdev_register_kobject+0x177/0x320 net/core/net-sysfs.c:2014 register_netdevice+0xde9/0x1390 net/core/dev.c:10373 __ip_tunnel_create+0x2b0/0x370 net/ipv4/ip_tunnel.c:267 ip_tunnel_init_net+0x28d/0x750 net/ipv4/ip_tunnel.c:1084 vti_init_net+0x2f/0x140 net/ipv4/ip_vti.c:504 ops_init+0x1cd/0x4a0 net/core/net_namespace.c:138 setup_net+0x34b/0xb50 net/core/net_namespace.c:332 copy_net_ns+0x35f/0x5b0 net/core/net_namespace.c:476 create_new_namespaces+0x416/0x670 kernel/nsproxy.c:110 unshare_nsproxy_namespaces+0x126/0x180 kernel/nsproxy.c:226 ksys_unshare+0x545/0x980 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+0x728/0x9a0 arch/x86/include/generated/asm/syscalls_64.h:273 do_syscall_x64 arch/x86/entry/common.c:50 [inline] do_syscall_64+0x3b/0xb0 arch/x86/entry/common.c:80 entry_SYSCALL_64_after_hwframe+0x66/0xd0 Freed by task 466: kasan_save_stack mm/kasan/common.c:38 [inline] kasan_set_track+0x4b/0x70 mm/kasan/common.c:45 kasan_set_free_info+0x23/0x40 mm/kasan/generic.c:370 ____kasan_slab_free+0x126/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+0xbd/0x190 mm/slub.c:1749 slab_free mm/slub.c:3521 [inline] kmem_cache_free+0x115/0x330 mm/slub.c:3539 kfree_skbmem+0x104/0x170 __kfree_skb net/core/skbuff.c:758 [inline] consume_skb+0xb4/0x250 net/core/skbuff.c:930 netlink_broadcast_filtered+0x10f4/0x1220 net/netlink/af_netlink.c:1525 netlink_broadcast+0x3a/0x50 net/netlink/af_netlink.c:1547 uevent_net_broadcast_tagged lib/kobject_uevent.c:372 [inline] kobject_uevent_net_broadcast+0x4f0/0x590 lib/kobject_uevent.c:412 kobject_uevent_env+0x525/0x700 lib/kobject_uevent.c:608 kobject_uevent+0x1f/0x30 lib/kobject_uevent.c:657 device_add+0xa6e/0xf10 drivers/base/core.c:3403 netdev_register_kobject+0x177/0x320 net/core/net-sysfs.c:2014 register_netdevice+0xde9/0x1390 net/core/dev.c:10373 __ip_tunnel_create+0x2b0/0x370 net/ipv4/ip_tunnel.c:267 ip_tunnel_init_net+0x28d/0x750 net/ipv4/ip_tunnel.c:1084 vti_init_net+0x2f/0x140 net/ipv4/ip_vti.c:504 ops_init+0x1cd/0x4a0 net/core/net_namespace.c:138 setup_net+0x34b/0xb50 net/core/net_namespace.c:332 copy_net_ns+0x35f/0x5b0 net/core/net_namespace.c:476 create_new_namespaces+0x416/0x670 kernel/nsproxy.c:110 unshare_nsproxy_namespaces+0x126/0x180 kernel/nsproxy.c:226 ksys_unshare+0x545/0x980 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+0x728/0x9a0 arch/x86/include/generated/asm/syscalls_64.h:273 do_syscall_x64 arch/x86/entry/common.c:50 [inline] do_syscall_64+0x3b/0xb0 arch/x86/entry/common.c:80 entry_SYSCALL_64_after_hwframe+0x66/0xd0 The buggy address belongs to the object at ffff888114145000 which belongs to the cache skbuff_head_cache of size 248 The buggy address is located 0 bytes inside of 248-byte region [ffff888114145000, ffff8881141450f8) The buggy address belongs to the page: page:ffffea0004505140 refcount:1 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x114145 flags: 0x4000000000000200(slab|zone=1) raw: 4000000000000200 0000000000000000 0000000100000001 ffff8881081aa780 raw: 0000000000000000 00000000000c000c 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, ts 5885299654, free_ts 0 set_page_owner include/linux/page_owner.h:33 [inline] post_alloc_hook+0x1a3/0x1b0 mm/page_alloc.c:2605 prep_new_page+0x1b/0x110 mm/page_alloc.c:2611 get_page_from_freelist+0x3550/0x35d0 mm/page_alloc.c:4485 __alloc_pages+0x27e/0x8f0 mm/page_alloc.c:5780 allocate_slab mm/slub.c:1932 [inline] new_slab+0x9a/0x4e0 mm/slub.c:1995 ___slab_alloc+0x39e/0x830 mm/slub.c:3028 __slab_alloc+0x4a/0x90 mm/slub.c:3115 slab_alloc_node mm/slub.c:3206 [inline] slab_alloc mm/slub.c:3250 [inline] kmem_cache_alloc+0x139/0x250 mm/slub.c:3255 kmem_cache_alloc_node include/linux/slab.h:474 [inline] __alloc_skb+0xbe/0x550 net/core/skbuff.c:416 alloc_skb include/linux/skbuff.h:1183 [inline] netlink_alloc_large_skb net/netlink/af_netlink.c:1187 [inline] netlink_sendmsg+0x797/0xd20 net/netlink/af_netlink.c:1884 sock_sendmsg_nosec net/socket.c:704 [inline] __sock_sendmsg net/socket.c:716 [inline] ____sys_sendmsg+0x59e/0x8f0 net/socket.c:2436 ___sys_sendmsg+0x252/0x2e0 net/socket.c:2490 __sys_sendmsg net/socket.c:2519 [inline] __do_sys_sendmsg net/socket.c:2528 [inline] __se_sys_sendmsg+0x19a/0x260 net/socket.c:2526 __x64_sys_sendmsg+0x7b/0x90 net/socket.c:2526 x64_sys_call+0x16a/0x9a0 arch/x86/include/generated/asm/syscalls_64.h:47 do_syscall_x64 arch/x86/entry/common.c:50 [inline] do_syscall_64+0x3b/0xb0 arch/x86/entry/common.c:80 page_owner free stack trace missing Memory state around the buggy address: ffff888114144f00: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ffff888114144f80: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 >ffff888114145000: fa fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ^ ffff888114145080: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fc ffff888114145100: fc fc fc fc fc fc fc fc fa fb fb fb fb fb fb fb ==================================================================