================================================================== BUG: KASAN: use-after-free in ext4_xattr_delete_inode+0xcd0/0xce0 fs/ext4/xattr.c:2910 Read of size 4 at addr ffff88811a751000 by task syz-executor256/300 CPU: 1 PID: 300 Comm: syz-executor256 Not tainted 5.15.167-syzkaller-02003-g5e4635681cf1 #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 09/13/2024 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:2910 ext4_evict_inode+0xea1/0x14e0 fs/ext4/inode.c:300 evict+0x529/0x930 fs/inode.c:622 iput_final fs/inode.c:1740 [inline] iput+0x63b/0x7e0 fs/inode.c:1766 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_rmdir fs/namei.c:4229 [inline] __se_sys_rmdir fs/namei.c:4227 [inline] __x64_sys_rmdir+0x49/0x50 fs/namei.c:4227 x64_sys_call+0x274/0x9a0 arch/x86/include/generated/asm/syscalls_64.h:85 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:0x7fa72bd6bdc7 Code: 73 01 c3 48 c7 c1 b8 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 54 00 00 00 0f 05 <48> 3d 01 f0 ff ff 73 01 c3 48 c7 c1 b8 ff ff ff f7 d8 64 89 01 48 RSP: 002b:00007ffeb3aaad58 EFLAGS: 00000207 ORIG_RAX: 0000000000000054 RAX: ffffffffffffffda RBX: 0000000000000000 RCX: 00007fa72bd6bdc7 RDX: 0000000000008890 RSI: 0000000000000000 RDI: 00007ffeb3aabf00 RBP: 0000000000000065 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000100 R11: 0000000000000207 R12: 00007ffeb3aabf00 R13: 0000555589a0e740 R14: 431bde82d7b634db R15: 00007ffeb3aae080 Allocated by task 286: 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:3248 [inline] kmem_cache_alloc+0xf5/0x200 mm/slub.c:3253 skb_clone+0x1d1/0x360 net/core/skbuff.c:1547 dev_queue_xmit_nit+0x25b/0xa40 net/core/dev.c:2317 xmit_one net/core/dev.c:3619 [inline] dev_hard_start_xmit+0x149/0x620 net/core/dev.c:3640 sch_direct_xmit+0x298/0x9b0 net/sched/sch_generic.c:342 __dev_xmit_skb net/core/dev.c:3851 [inline] __dev_queue_xmit+0x161e/0x2e70 net/core/dev.c:4220 dev_queue_xmit+0x17/0x20 net/core/dev.c:4288 neigh_hh_output include/net/neighbour.h:501 [inline] neigh_output include/net/neighbour.h:515 [inline] ip_finish_output2+0xb9f/0xf60 net/ipv4/ip_output.c:228 __ip_finish_output+0x162/0x360 ip_finish_output+0x31/0x210 net/ipv4/ip_output.c:316 NF_HOOK_COND include/linux/netfilter.h:294 [inline] ip_output+0x1d6/0x420 net/ipv4/ip_output.c:430 dst_output include/net/dst.h:444 [inline] ip_local_out net/ipv4/ip_output.c:126 [inline] __ip_queue_xmit+0x1105/0x1c20 net/ipv4/ip_output.c:532 ip_queue_xmit+0x4c/0x70 net/ipv4/ip_output.c:546 __tcp_transmit_skb+0x1e84/0x3920 net/ipv4/tcp_output.c:1402 __tcp_send_ack+0x303/0x710 net/ipv4/tcp_output.c:4009 tcp_send_ack+0x3b/0x60 net/ipv4/tcp_output.c:4015 tcp_cleanup_rbuf+0x278/0x590 net/ipv4/tcp.c:1597 tcp_recvmsg_locked+0x2279/0x2890 net/ipv4/tcp.c:2533 tcp_recvmsg+0x24e/0x7f0 net/ipv4/tcp.c:2563 inet_recvmsg+0x158/0x500 net/ipv4/af_inet.c:863 sock_recvmsg_nosec net/socket.c:966 [inline] sock_recvmsg net/socket.c:984 [inline] sock_read_iter+0x353/0x480 net/socket.c:1057 call_read_iter include/linux/fs.h:2198 [inline] new_sync_read fs/read_write.c:404 [inline] vfs_read+0xa81/0xd40 fs/read_write.c:485 ksys_read+0x199/0x2c0 fs/read_write.c:623 __do_sys_read fs/read_write.c:633 [inline] __se_sys_read fs/read_write.c:631 [inline] __x64_sys_read+0x7b/0x90 fs/read_write.c:631 x64_sys_call+0x28/0x9a0 arch/x86/include/generated/asm/syscalls_64.h:1 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 286: 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:3519 [inline] kmem_cache_free+0x116/0x2e0 mm/slub.c:3535 kfree_skbmem+0x104/0x170 __kfree_skb net/core/skbuff.c:758 [inline] consume_skb+0xb4/0x250 net/core/skbuff.c:930 packet_rcv+0x160/0x1150 net/packet/af_packet.c:2257 dev_queue_xmit_nit+0x9a4/0xa40 net/core/dev.c:2349 xmit_one net/core/dev.c:3619 [inline] dev_hard_start_xmit+0x149/0x620 net/core/dev.c:3640 sch_direct_xmit+0x298/0x9b0 net/sched/sch_generic.c:342 __dev_xmit_skb net/core/dev.c:3851 [inline] __dev_queue_xmit+0x161e/0x2e70 net/core/dev.c:4220 dev_queue_xmit+0x17/0x20 net/core/dev.c:4288 neigh_hh_output include/net/neighbour.h:501 [inline] neigh_output include/net/neighbour.h:515 [inline] ip_finish_output2+0xb9f/0xf60 net/ipv4/ip_output.c:228 __ip_finish_output+0x162/0x360 ip_finish_output+0x31/0x210 net/ipv4/ip_output.c:316 NF_HOOK_COND include/linux/netfilter.h:294 [inline] ip_output+0x1d6/0x420 net/ipv4/ip_output.c:430 dst_output include/net/dst.h:444 [inline] ip_local_out net/ipv4/ip_output.c:126 [inline] __ip_queue_xmit+0x1105/0x1c20 net/ipv4/ip_output.c:532 ip_queue_xmit+0x4c/0x70 net/ipv4/ip_output.c:546 __tcp_transmit_skb+0x1e84/0x3920 net/ipv4/tcp_output.c:1402 __tcp_send_ack+0x303/0x710 net/ipv4/tcp_output.c:4009 tcp_send_ack+0x3b/0x60 net/ipv4/tcp_output.c:4015 tcp_cleanup_rbuf+0x278/0x590 net/ipv4/tcp.c:1597 tcp_recvmsg_locked+0x2279/0x2890 net/ipv4/tcp.c:2533 tcp_recvmsg+0x24e/0x7f0 net/ipv4/tcp.c:2563 inet_recvmsg+0x158/0x500 net/ipv4/af_inet.c:863 sock_recvmsg_nosec net/socket.c:966 [inline] sock_recvmsg net/socket.c:984 [inline] sock_read_iter+0x353/0x480 net/socket.c:1057 call_read_iter include/linux/fs.h:2198 [inline] new_sync_read fs/read_write.c:404 [inline] vfs_read+0xa81/0xd40 fs/read_write.c:485 ksys_read+0x199/0x2c0 fs/read_write.c:623 __do_sys_read fs/read_write.c:633 [inline] __se_sys_read fs/read_write.c:631 [inline] __x64_sys_read+0x7b/0x90 fs/read_write.c:631 x64_sys_call+0x28/0x9a0 arch/x86/include/generated/asm/syscalls_64.h:1 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 ffff88811a751000 which belongs to the cache skbuff_head_cache of size 248 The buggy address is located 0 bytes inside of 248-byte region [ffff88811a751000, ffff88811a7510f8) The buggy address belongs to the page: page:ffffea000469d440 refcount:1 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x11a751 flags: 0x4000000000000200(slab|zone=1) raw: 4000000000000200 0000000000000000 dead000000000122 ffff8881081b2c00 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 0x12a20(GFP_ATOMIC|__GFP_NOWARN|__GFP_NORETRY), pid 286, ts 21823116050, free_ts 19295869171 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:5779 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:3248 [inline] kmem_cache_alloc+0x134/0x200 mm/slub.c:3253 skb_clone+0x1d1/0x360 net/core/skbuff.c:1547 dev_queue_xmit_nit+0x25b/0xa40 net/core/dev.c:2317 xmit_one net/core/dev.c:3619 [inline] dev_hard_start_xmit+0x149/0x620 net/core/dev.c:3640 sch_direct_xmit+0x298/0x9b0 net/sched/sch_generic.c:342 __dev_xmit_skb net/core/dev.c:3851 [inline] __dev_queue_xmit+0x161e/0x2e70 net/core/dev.c:4220 dev_queue_xmit+0x17/0x20 net/core/dev.c:4288 neigh_hh_output include/net/neighbour.h:501 [inline] neigh_output include/net/neighbour.h:515 [inline] ip_finish_output2+0xb9f/0xf60 net/ipv4/ip_output.c:228 __ip_finish_output+0x162/0x360 page last free stack trace: reset_page_owner include/linux/page_owner.h:26 [inline] free_pages_prepare mm/page_alloc.c:1472 [inline] free_pcp_prepare mm/page_alloc.c:1544 [inline] free_unref_page_prepare+0x7c8/0x7d0 mm/page_alloc.c:3534 free_unref_page+0xe8/0x750 mm/page_alloc.c:3616 free_the_page mm/page_alloc.c:805 [inline] free_compound_page+0x78/0xa0 mm/page_alloc.c:828 destroy_compound_page include/linux/mm.h:989 [inline] __put_compound_page+0x73/0xb0 mm/swap.c:111 __put_page+0xbf/0xe0 mm/swap.c:127 put_page include/linux/mm.h:1295 [inline] __skb_frag_unref include/linux/skbuff.h:3252 [inline] skb_release_data+0x405/0xa80 net/core/skbuff.c:673 skb_release_all net/core/skbuff.c:743 [inline] __kfree_skb+0x50/0x70 net/core/skbuff.c:757 sk_eat_skb include/net/sock.h:2732 [inline] tcp_recvmsg_locked+0x17fd/0x2890 net/ipv4/tcp.c:2517 tcp_recvmsg+0x24e/0x7f0 net/ipv4/tcp.c:2563 inet_recvmsg+0x158/0x500 net/ipv4/af_inet.c:863 sock_recvmsg_nosec net/socket.c:966 [inline] sock_recvmsg net/socket.c:984 [inline] sock_read_iter+0x353/0x480 net/socket.c:1057 call_read_iter include/linux/fs.h:2198 [inline] new_sync_read fs/read_write.c:404 [inline] vfs_read+0xa81/0xd40 fs/read_write.c:485 ksys_read+0x199/0x2c0 fs/read_write.c:623 __do_sys_read fs/read_write.c:633 [inline] __se_sys_read fs/read_write.c:631 [inline] __x64_sys_read+0x7b/0x90 fs/read_write.c:631 x64_sys_call+0x28/0x9a0 arch/x86/include/generated/asm/syscalls_64.h:1 do_syscall_x64 arch/x86/entry/common.c:50 [inline] do_syscall_64+0x3b/0xb0 arch/x86/entry/common.c:80 Memory state around the buggy address: ffff88811a750f00: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ffff88811a750f80: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 >ffff88811a751000: fa fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ^ ffff88811a751080: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fc ffff88811a751100: fc fc fc fc fc fc fc fc fa fb fb fb fb fb fb fb ==================================================================