================================================================== BUG: KASAN: use-after-free in ext4_xattr_delete_inode+0xc1f/0xc30 fs/ext4/xattr.c:2911 Read of size 4 at addr ffff8881ed4ab000 by task syz-executor.0/1087 CPU: 0 PID: 1087 Comm: syz-executor.0 Tainted: G W 5.4.274-syzkaller-00002-g6f97bd951d82 #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 04/02/2024 Call Trace: __dump_stack lib/dump_stack.c:77 [inline] dump_stack+0x1d8/0x241 lib/dump_stack.c:118 print_address_description+0x8c/0x600 mm/kasan/report.c:384 __kasan_report+0xf3/0x120 mm/kasan/report.c:516 kasan_report+0x30/0x60 mm/kasan/common.c:653 ext4_xattr_delete_inode+0xc1f/0xc30 fs/ext4/xattr.c:2911 ext4_evict_inode+0x1378/0x1ac0 fs/ext4/inode.c:318 evict+0x29b/0x6a0 fs/inode.c:575 d_delete_notify include/linux/fsnotify.h:224 [inline] vfs_rmdir+0x24b/0x3c0 fs/namei.c:4040 do_rmdir+0x2c1/0x580 fs/namei.c:4088 do_syscall_64+0xca/0x1c0 arch/x86/entry/common.c:290 entry_SYSCALL_64_after_hwframe+0x5c/0xc1 RIP: 0033:0x7fbbf205f687 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:00007fff87748db8 EFLAGS: 00000207 ORIG_RAX: 0000000000000107 RAX: ffffffffffffffda RBX: 0000000000000065 RCX: 00007fbbf205f687 RDX: 0000000000000200 RSI: 00007fff87749f60 RDI: 00000000ffffff9c RBP: 00007fbbf20bc636 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000100 R11: 0000000000000207 R12: 00007fff87749f60 R13: 00007fbbf20bc636 R14: 000000000000fb37 R15: 0000000000000009 Allocated by task 905: save_stack mm/kasan/common.c:70 [inline] set_track mm/kasan/common.c:78 [inline] __kasan_kmalloc+0x171/0x210 mm/kasan/common.c:529 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+0xd9/0x250 mm/slub.c:2842 skb_clone+0x1c0/0x360 net/core/skbuff.c:1467 ip6_finish_output2+0x316/0x18e0 net/ipv6/ip6_output.c:102 NF_HOOK_COND include/linux/netfilter.h:292 [inline] ip6_output+0x1b3/0x430 net/ipv6/ip6_output.c:248 dst_output include/net/dst.h:438 [inline] ip6_local_out+0x1ff/0x490 net/ipv6/output_core.c:161 ip6_send_skb+0x7f/0x160 net/ipv6/ip6_output.c:1885 udp_v6_send_skb+0xa3d/0x1440 net/ipv6/udp.c:1190 udpv6_sendmsg+0x2268/0x3150 net/ipv6/udp.c:1490 sock_sendmsg_nosec net/socket.c:638 [inline] __sock_sendmsg net/socket.c:650 [inline] ____sys_sendmsg+0x5ac/0x8f0 net/socket.c:2306 ___sys_sendmsg net/socket.c:2360 [inline] __sys_sendmmsg+0x3c3/0x700 net/socket.c:2463 __do_sys_sendmmsg net/socket.c:2492 [inline] __se_sys_sendmmsg net/socket.c:2489 [inline] __x64_sys_sendmmsg+0x9c/0xb0 net/socket.c:2489 do_syscall_64+0xca/0x1c0 arch/x86/entry/common.c:290 entry_SYSCALL_64_after_hwframe+0x5c/0xc1 Freed by task 905: 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+0x1b5/0x270 mm/kasan/common.c:487 slab_free_hook mm/slub.c:1455 [inline] slab_free_freelist_hook mm/slub.c:1494 [inline] slab_free mm/slub.c:3080 [inline] kmem_cache_free+0x10b/0x2c0 mm/slub.c:3096 __udp6_lib_mcast_deliver+0xae4/0xb80 net/ipv6/udp.c:822 __udp6_lib_rcv+0x60a/0xcd0 net/ipv6/udp.c:922 ip6_protocol_deliver_rcu+0xa91/0x13c0 net/ipv6/ip6_input.c:403 ip6_input_finish net/ipv6/ip6_input.c:444 [inline] NF_HOOK include/linux/netfilter.h:303 [inline] ip6_input+0xdc/0x270 net/ipv6/ip6_input.c:453 ip6_mc_input+0x20e/0x2a0 net/ipv6/ip6_input.c:547 NF_HOOK include/linux/netfilter.h:303 [inline] ipv6_rcv+0xee/0x280 net/ipv6/ip6_input.c:278 __netif_receive_skb_one_core net/core/dev.c:4972 [inline] __netif_receive_skb+0x1c6/0x530 net/core/dev.c:5086 process_backlog+0x34f/0x680 net/core/dev.c:5921 napi_poll net/core/dev.c:6367 [inline] net_rx_action+0x53f/0x1160 net/core/dev.c:6435 __do_softirq+0x23b/0x6b7 kernel/softirq.c:292 The buggy address belongs to the object at ffff8881ed4ab000 which belongs to the cache skbuff_head_cache of size 240 The buggy address is located 0 bytes inside of 240-byte region [ffff8881ed4ab000, ffff8881ed4ab0f0) The buggy address belongs to the page: page:ffffea0007b52ac0 refcount:1 mapcount:0 mapping:ffff8881f1ccd900 index:0x0 flags: 0x8000000000000200(slab) raw: 8000000000000200 dead000000000100 dead000000000122 ffff8881f1ccd900 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 0x112cc0(GFP_USER|__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+0x18f/0x370 mm/page_alloc.c:2171 get_page_from_freelist+0x2d13/0x2d90 mm/page_alloc.c:3794 __alloc_pages_nodemask+0x393/0x840 mm/page_alloc.c:4893 alloc_slab_page+0x39/0x3c0 mm/slub.c:343 allocate_slab mm/slub.c:1683 [inline] new_slab+0x97/0x440 mm/slub.c:1749 new_slab_objects mm/slub.c:2505 [inline] ___slab_alloc+0x2fe/0x490 mm/slub.c:2667 __slab_alloc+0x62/0xa0 mm/slub.c:2707 slab_alloc_node mm/slub.c:2792 [inline] slab_alloc mm/slub.c:2837 [inline] kmem_cache_alloc+0x109/0x250 mm/slub.c:2842 kmem_cache_alloc_node include/linux/slab.h:427 [inline] __alloc_skb+0x7a/0x4d0 net/core/skbuff.c:198 alloc_skb include/linux/skbuff.h:1080 [inline] alloc_skb_with_frags+0x92/0x550 net/core/skbuff.c:5828 sock_alloc_send_pskb+0x831/0x950 net/core/sock.c:2276 __ip6_append_data+0x2862/0x3e50 net/ipv6/ip6_output.c:1597 ip6_make_skb+0x442/0x7c0 net/ipv6/ip6_output.c:1964 udpv6_sendmsg+0x2236/0x3150 net/ipv6/udp.c:1484 sock_sendmsg_nosec net/socket.c:638 [inline] __sock_sendmsg net/socket.c:650 [inline] ____sys_sendmsg+0x5ac/0x8f0 net/socket.c:2306 ___sys_sendmsg net/socket.c:2360 [inline] __sys_sendmmsg+0x3c3/0x700 net/socket.c:2463 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+0x297/0x380 mm/page_alloc.c:3085 free_unref_page_list+0x10a/0x590 mm/page_alloc.c:3154 release_pages+0xad8/0xb20 mm/swap.c:842 pagevec_lru_move_fn+0x1cb/0x250 mm/swap.c:215 __pagevec_lru_add mm/swap.c:966 [inline] lru_add_drain_cpu+0x105/0x600 mm/swap.c:594 lru_add_drain mm/swap.c:689 [inline] __pagevec_release+0x6e/0x150 mm/swap.c:859 pagevec_release include/linux/pagevec.h:88 [inline] write_cache_pages+0xbd4/0xe60 mm/page-writeback.c:2277 generic_writepages+0xf8/0x160 mm/page-writeback.c:2329 do_writepages+0x12b/0x270 mm/page-writeback.c:2344 __filemap_fdatawrite_range+0x33c/0x3f0 mm/filemap.c:421 __sync_filesystem fs/sync.c:40 [inline] sync_filesystem+0x131/0x200 fs/sync.c:64 generic_shutdown_super+0x6b/0x2a0 fs/super.c:448 kill_block_super+0x7a/0xe0 fs/super.c:1453 deactivate_locked_super+0xa8/0x110 fs/super.c:335 deactivate_super+0x1e2/0x2a0 fs/super.c:366 cleanup_mnt+0x44e/0x500 fs/namespace.c:1102 Memory state around the buggy address: ffff8881ed4aaf00: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ffff8881ed4aaf80: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 >ffff8881ed4ab000: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb