================================================================== BUG: KASAN: use-after-free in ext4_xattr_delete_inode+0xb47/0xb50 fs/ext4/xattr.c:2917 Read of size 4 at addr ffff8881ecb07000 by task syz-executor/557 CPU: 1 PID: 557 Comm: syz-executor Not tainted 5.4.290-syzkaller-05054-g986c38813dff #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 02/12/2025 Call Trace: __dump_stack+0x1e/0x20 lib/dump_stack.c:77 dump_stack+0x15b/0x1b8 lib/dump_stack.c:118 print_address_description+0x8d/0x4c0 mm/kasan/report.c:384 __kasan_report+0xef/0x120 mm/kasan/report.c:516 kasan_report+0x30/0x60 mm/kasan/common.c:653 __asan_report_load4_noabort+0x14/0x20 mm/kasan/generic_report.c:131 ext4_xattr_delete_inode+0xb47/0xb50 fs/ext4/xattr.c:2917 ext4_evict_inode+0x11c0/0x1a30 fs/ext4/inode.c:318 evict+0x465/0x880 fs/inode.c:610 iput_final fs/inode.c:1652 [inline] iput+0x67d/0x810 fs/inode.c:1678 d_delete_notify include/linux/fsnotify.h:230 [inline] vfs_rmdir+0x2b7/0x3e0 fs/namei.c:4040 do_rmdir+0x23c/0x480 fs/namei.c:4088 __do_sys_unlinkat fs/namei.c:4252 [inline] __se_sys_unlinkat fs/namei.c:4246 [inline] __x64_sys_unlinkat+0xb6/0xe0 fs/namei.c:4246 do_syscall_64+0xcf/0x170 arch/x86/entry/common.c:290 entry_SYSCALL_64_after_hwframe+0x5c/0xc1 RIP: 0033:0x7f0d25507217 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:00007ffc848020c8 EFLAGS: 00000207 ORIG_RAX: 0000000000000107 RAX: ffffffffffffffda RBX: 0000000000000065 RCX: 00007f0d25507217 RDX: 0000000000000200 RSI: 00007ffc84803270 RDI: 00000000ffffff9c RBP: 00007f0d2557564a R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000100 R11: 0000000000000207 R12: 00007ffc84803270 R13: 00007f0d2557564a R14: 000000000000c862 R15: 00007ffc84805450 Allocated by task 413: save_stack mm/kasan/common.c:70 [inline] set_track mm/kasan/common.c:78 [inline] __kasan_kmalloc+0x162/0x200 mm/kasan/common.c:529 kasan_slab_alloc+0x12/0x20 mm/kasan/common.c:537 slab_post_alloc_hook mm/slab.h:584 [inline] slab_alloc_node mm/slub.c:2829 [inline] slab_alloc mm/slub.c:2837 [inline] kmem_cache_alloc+0xe2/0x270 mm/slub.c:2842 kmem_cache_alloc_node include/linux/slab.h:427 [inline] __alloc_skb+0x9e/0x500 net/core/skbuff.c:198 alloc_skb include/linux/skbuff.h:1080 [inline] alloc_uevent_skb+0x85/0x240 lib/kobject_uevent.c:290 uevent_net_broadcast_tagged lib/kobject_uevent.c:351 [inline] kobject_uevent_net_broadcast+0x1a6/0x5a0 lib/kobject_uevent.c:412 kobject_uevent_env+0x52a/0x6e0 lib/kobject_uevent.c:608 kobject_uevent+0x1d/0x30 lib/kobject_uevent.c:657 rx_queue_add_kobject net/core/net-sysfs.c:988 [inline] net_rx_queue_update_kobjects+0x1ec/0x420 net/core/net-sysfs.c:1010 register_queue_kobjects net/core/net-sysfs.c:1632 [inline] netdev_register_kobject+0x229/0x320 net/core/net-sysfs.c:1858 register_netdevice+0xbd4/0x12a0 net/core/dev.c:9209 register_netdev+0x3e/0x50 net/core/dev.c:9338 ip6gre_init_net+0x242/0x310 net/ipv6/ip6_gre.c:1614 ops_init+0x1ba/0x4a0 net/core/net_namespace.c:141 setup_net+0x20c/0x9b0 net/core/net_namespace.c:348 copy_net_ns+0x314/0x520 net/core/net_namespace.c:489 create_new_namespaces+0x49c/0x590 kernel/nsproxy.c:103 unshare_nsproxy_namespaces+0x120/0x170 kernel/nsproxy.c:202 ksys_unshare+0x4a4/0x7d0 kernel/fork.c:2908 __do_sys_unshare kernel/fork.c:2976 [inline] __se_sys_unshare kernel/fork.c:2974 [inline] __x64_sys_unshare+0x38/0x40 kernel/fork.c:2974 do_syscall_64+0xcf/0x170 arch/x86/entry/common.c:290 entry_SYSCALL_64_after_hwframe+0x5c/0xc1 Freed by task 413: save_stack mm/kasan/common.c:70 [inline] set_track mm/kasan/common.c:78 [inline] kasan_set_free_info mm/kasan/common.c:345 [inline] __kasan_slab_free+0x1c3/0x280 mm/kasan/common.c:487 kasan_slab_free+0xe/0x10 mm/kasan/common.c:496 slab_free_hook mm/slub.c:1455 [inline] slab_free_freelist_hook+0xb7/0x180 mm/slub.c:1494 slab_free mm/slub.c:3080 [inline] kmem_cache_free+0x10c/0x2c0 mm/slub.c:3096 kfree_skbmem+0x10c/0x180 net/core/skbuff.c:654 __kfree_skb net/core/skbuff.c:690 [inline] consume_skb+0xb5/0x240 net/core/skbuff.c:849 netlink_broadcast_filtered+0x1198/0x1290 net/netlink/af_netlink.c:1516 netlink_broadcast+0x3a/0x50 net/netlink/af_netlink.c:1538 uevent_net_broadcast_tagged lib/kobject_uevent.c:372 [inline] kobject_uevent_net_broadcast+0x503/0x5a0 lib/kobject_uevent.c:412 kobject_uevent_env+0x52a/0x6e0 lib/kobject_uevent.c:608 kobject_uevent+0x1d/0x30 lib/kobject_uevent.c:657 rx_queue_add_kobject net/core/net-sysfs.c:988 [inline] net_rx_queue_update_kobjects+0x1ec/0x420 net/core/net-sysfs.c:1010 register_queue_kobjects net/core/net-sysfs.c:1632 [inline] netdev_register_kobject+0x229/0x320 net/core/net-sysfs.c:1858 register_netdevice+0xbd4/0x12a0 net/core/dev.c:9209 register_netdev+0x3e/0x50 net/core/dev.c:9338 ip6gre_init_net+0x242/0x310 net/ipv6/ip6_gre.c:1614 ops_init+0x1ba/0x4a0 net/core/net_namespace.c:141 setup_net+0x20c/0x9b0 net/core/net_namespace.c:348 copy_net_ns+0x314/0x520 net/core/net_namespace.c:489 create_new_namespaces+0x49c/0x590 kernel/nsproxy.c:103 unshare_nsproxy_namespaces+0x120/0x170 kernel/nsproxy.c:202 ksys_unshare+0x4a4/0x7d0 kernel/fork.c:2908 __do_sys_unshare kernel/fork.c:2976 [inline] __se_sys_unshare kernel/fork.c:2974 [inline] __x64_sys_unshare+0x38/0x40 kernel/fork.c:2974 do_syscall_64+0xcf/0x170 arch/x86/entry/common.c:290 entry_SYSCALL_64_after_hwframe+0x5c/0xc1 The buggy address belongs to the object at ffff8881ecb07000 which belongs to the cache skbuff_head_cache of size 240 The buggy address is located 0 bytes inside of 240-byte region [ffff8881ecb07000, ffff8881ecb070f0) The buggy address belongs to the page: page:ffffea0007b2c1c0 refcount:1 mapcount:0 mapping:ffff8881f1cccc80 index:0x0 flags: 0x8000000000000200(slab) raw: 8000000000000200 ffffea0007b2c2c0 0000000600000006 ffff8881f1cccc80 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) set_page_owner include/linux/page_owner.h:31 [inline] post_alloc_hook mm/page_alloc.c:2165 [inline] prep_new_page+0x35e/0x370 mm/page_alloc.c:2171 get_page_from_freelist+0x1296/0x1310 mm/page_alloc.c:3794 __alloc_pages_nodemask+0x202/0x4b0 mm/page_alloc.c:4893 alloc_slab_page+0x3c/0x3b0 mm/slub.c:343 allocate_slab mm/slub.c:1683 [inline] new_slab+0x93/0x420 mm/slub.c:1749 new_slab_objects mm/slub.c:2505 [inline] ___slab_alloc+0x29e/0x420 mm/slub.c:2667 __slab_alloc+0x63/0xa0 mm/slub.c:2707 slab_alloc_node mm/slub.c:2792 [inline] slab_alloc mm/slub.c:2837 [inline] kmem_cache_alloc+0x12c/0x270 mm/slub.c:2842 kmem_cache_alloc_node include/linux/slab.h:427 [inline] __alloc_skb+0x9e/0x500 net/core/skbuff.c:198 alloc_skb include/linux/skbuff.h:1080 [inline] alloc_skb_with_frags+0xa2/0x560 net/core/skbuff.c:5881 sock_alloc_send_pskb+0x81c/0x930 net/core/sock.c:2276 unix_dgram_sendmsg+0x5f4/0x1800 net/unix/af_unix.c:1698 sock_sendmsg_nosec net/socket.c:638 [inline] __sock_sendmsg net/socket.c:650 [inline] __sys_sendto+0x414/0x570 net/socket.c:1961 __do_sys_sendto net/socket.c:1973 [inline] __se_sys_sendto net/socket.c:1969 [inline] __x64_sys_sendto+0xe5/0x100 net/socket.c:1969 do_syscall_64+0xcf/0x170 arch/x86/entry/common.c:290 entry_SYSCALL_64_after_hwframe+0x5c/0xc1 page last free stack trace: reset_page_owner include/linux/page_owner.h:24 [inline] free_pages_prepare mm/page_alloc.c:1176 [inline] free_pcp_prepare mm/page_alloc.c:1233 [inline] free_unref_page_prepare+0x2a9/0x3a0 mm/page_alloc.c:3085 free_unref_page_list+0x110/0x4c0 mm/page_alloc.c:3154 release_pages+0xa62/0xaa0 mm/swap.c:842 free_pages_and_swap_cache+0x86/0xa0 mm/swap_state.c:297 tlb_batch_pages_flush mm/mmu_gather.c:49 [inline] tlb_flush_mmu_free mm/mmu_gather.c:189 [inline] tlb_flush_mmu mm/mmu_gather.c:196 [inline] tlb_finish_mmu+0x175/0x300 mm/mmu_gather.c:277 exit_mmap+0x2db/0x520 mm/mmap.c:3193 __mmput+0x92/0x2e0 kernel/fork.c:1101 mmput+0x47/0x60 kernel/fork.c:1122 exit_mm kernel/exit.c:538 [inline] do_exit+0x99f/0x2660 kernel/exit.c:848 do_group_exit+0x13e/0x300 kernel/exit.c:984 __do_sys_exit_group kernel/exit.c:995 [inline] __se_sys_exit_group kernel/exit.c:993 [inline] __x64_sys_exit_group+0x3f/0x40 kernel/exit.c:993 do_syscall_64+0xcf/0x170 arch/x86/entry/common.c:290 entry_SYSCALL_64_after_hwframe+0x5c/0xc1 Memory state around the buggy address: ffff8881ecb06f00: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ffff8881ecb06f80: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 >ffff8881ecb07000: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ^ ffff8881ecb07080: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fc fc ffff8881ecb07100: fc fc fc fc fc fc fc fc fb fb fb fb fb fb fb fb ==================================================================