================================================================== BUG: KASAN: use-after-free in ext4_xattr_delete_inode+0xc1f/0xc30 fs/ext4/xattr.c:2911 Read of size 4 at addr ffff8881e8df4000 by task syz-executor.2/1055 CPU: 0 PID: 1055 Comm: syz-executor.2 Not tainted 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:0x7fd810827687 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:00007ffd73ec9758 EFLAGS: 00000207 ORIG_RAX: 0000000000000107 RAX: ffffffffffffffda RBX: 0000000000000065 RCX: 00007fd810827687 RDX: 0000000000000200 RSI: 00007ffd73eca900 RDI: 00000000ffffff9c RBP: 00007fd810884636 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000100 R11: 0000000000000207 R12: 00007ffd73eca900 R13: 00007fd810884636 R14: 000000000000b15b R15: 0000000000000007 The buggy address belongs to the page: page:ffffea0007a37d00 refcount:0 mapcount:-128 mapping:0000000000000000 index:0x0 flags: 0x8000000000000000() raw: 8000000000000000 ffffea0007a7fa88 ffffea00079f7c08 0000000000000000 raw: 0000000000000000 0000000000000000 00000000ffffff7f 0000000000000000 page dumped because: kasan: bad access detected page_owner tracks the page as freed page last allocated via order 0, migratetype Unmovable, gfp_mask 0x112a20(GFP_ATOMIC|__GFP_NOWARN|__GFP_NORETRY|__GFP_HARDWALL) 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 __build_skb+0x25/0x2c0 net/core/skbuff.c:311 netlink_alloc_large_skb net/netlink/af_netlink.c:1202 [inline] netlink_sendmsg+0x646/0xcf0 net/netlink/af_netlink.c:1890 sock_sendmsg_nosec net/socket.c:638 [inline] __sock_sendmsg net/socket.c:650 [inline] sock_sendmsg net/socket.c:673 [inline] kernel_sendmsg+0x205/0x2e0 net/socket.c:697 sock_no_sendpage+0x144/0x1b0 net/core/sock.c:2794 kernel_sendpage net/socket.c:3782 [inline] sock_sendpage+0xd1/0x120 net/socket.c:955 pipe_to_sendpage+0x242/0x310 fs/splice.c:449 splice_from_pipe_feed fs/splice.c:500 [inline] __splice_from_pipe+0x2a0/0x830 fs/splice.c:624 splice_from_pipe fs/splice.c:659 [inline] generic_splice_sendpage+0x195/0x220 fs/splice.c:829 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 mm/page_alloc.c:3134 [inline] free_the_page mm/page_alloc.c:4953 [inline] __free_pages+0xaf/0x140 mm/page_alloc.c:4961 __free_slab+0x221/0x2e0 mm/slub.c:1774 __slab_free+0x34b/0x360 mm/slub.c:3012 qlist_free_all+0x43/0xb0 mm/kasan/quarantine.c:167 quarantine_reduce+0x1d9/0x210 mm/kasan/quarantine.c:260 __kasan_kmalloc+0x41/0x210 mm/kasan/common.c:507 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 sock_alloc_inode+0x17/0xb0 net/socket.c:239 alloc_inode fs/inode.c:231 [inline] new_inode_pseudo+0x60/0x210 fs/inode.c:927 sock_alloc net/socket.c:559 [inline] __sock_create+0x124/0x7a0 net/socket.c:1391 sock_create net/socket.c:1478 [inline] __sys_socket+0x132/0x370 net/socket.c:1520 __do_sys_socket net/socket.c:1529 [inline] __se_sys_socket net/socket.c:1527 [inline] __x64_sys_socket+0x76/0x80 net/socket.c:1527 do_syscall_64+0xca/0x1c0 arch/x86/entry/common.c:290 entry_SYSCALL_64_after_hwframe+0x5c/0xc1 Memory state around the buggy address: ffff8881e8df3f00: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ffff8881e8df3f80: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 >ffff8881e8df4000: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ^ ffff8881e8df4080: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ffff8881e8df4100: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ==================================================================