================================================================== BUG: KASAN: use-after-free in ext4_xattr_delete_inode+0xc67/0xc80 fs/ext4/xattr.c:2900 Read of size 4 at addr ffff888111863000 by task syz-executor/485 CPU: 0 PID: 485 Comm: syz-executor Not tainted 5.10.234-syzkaller-1006652-g3f5f2283d684 #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 02/12/2025 Call Trace: __dump_stack lib/dump_stack.c:77 [inline] dump_stack_lvl+0x1e2/0x24b lib/dump_stack.c:118 print_address_description+0x81/0x3b0 mm/kasan/report.c:248 __kasan_report mm/kasan/report.c:435 [inline] kasan_report+0x179/0x1c0 mm/kasan/report.c:452 __asan_report_load4_noabort+0x14/0x20 mm/kasan/report_generic.c:308 ext4_xattr_delete_inode+0xc67/0xc80 fs/ext4/xattr.c:2900 ext4_evict_inode+0x1095/0x1730 fs/ext4/inode.c:300 evict+0x526/0x9c0 fs/inode.c:612 iput_final fs/inode.c:1736 [inline] iput+0x632/0x7e0 fs/inode.c:1762 d_delete_notify include/linux/fsnotify.h:267 [inline] vfs_rmdir+0x271/0x3f0 fs/namei.c:3865 do_rmdir+0x2cf/0x5c0 fs/namei.c:3912 __do_sys_unlinkat fs/namei.c:4076 [inline] __se_sys_unlinkat fs/namei.c:4070 [inline] __x64_sys_unlinkat+0xdf/0xf0 fs/namei.c:4070 do_syscall_64+0x34/0x70 entry_SYSCALL_64_after_hwframe+0x61/0xcb RIP: 0033:0x7f690d6d2167 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:00007ffe9585a398 EFLAGS: 00000207 ORIG_RAX: 0000000000000107 RAX: ffffffffffffffda RBX: 0000000000000065 RCX: 00007f690d6d2167 RDX: 0000000000000200 RSI: 00007ffe9585b540 RDI: 00000000ffffff9c RBP: 00007f690d74064a R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000100 R11: 0000000000000207 R12: 00007ffe9585b540 R13: 00007f690d74064a R14: 000000000000c624 R15: 00007ffe9585d720 Allocated by task 401: 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:430 [inline] __kasan_slab_alloc+0xb1/0xe0 mm/kasan/common.c:463 kasan_slab_alloc include/linux/kasan.h:244 [inline] slab_post_alloc_hook+0x61/0x2f0 mm/slab.h:583 slab_alloc_node mm/slub.c:2947 [inline] slab_alloc mm/slub.c:2955 [inline] kmem_cache_alloc+0x168/0x2e0 mm/slub.c:2960 kmem_cache_alloc_node include/linux/slab.h:423 [inline] __alloc_skb+0x80/0x510 net/core/skbuff.c:200 alloc_skb include/linux/skbuff.h:1126 [inline] __tcp_send_ack+0x95/0x6d0 net/ipv4/tcp_output.c:3984 tcp_send_ack+0x3b/0x60 net/ipv4/tcp_output.c:4016 tcp_cleanup_rbuf+0x278/0x590 net/ipv4/tcp.c:1592 tcp_recvmsg+0x2192/0x3590 net/ipv4/tcp.c:2361 inet_recvmsg+0x158/0x500 net/ipv4/af_inet.c:864 sock_recvmsg_nosec net/socket.c:905 [inline] sock_recvmsg net/socket.c:923 [inline] sock_read_iter+0x353/0x480 net/socket.c:996 call_read_iter include/linux/fs.h:2052 [inline] new_sync_read fs/read_write.c:415 [inline] vfs_read+0x990/0xba0 fs/read_write.c:496 ksys_read+0x199/0x2c0 fs/read_write.c:634 __do_sys_read fs/read_write.c:644 [inline] __se_sys_read fs/read_write.c:642 [inline] __x64_sys_read+0x7b/0x90 fs/read_write.c:642 do_syscall_64+0x34/0x70 entry_SYSCALL_64_after_hwframe+0x61/0xcb Freed by task 401: 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+0x121/0x160 mm/kasan/common.c:362 __kasan_slab_free+0x11/0x20 mm/kasan/common.c:370 kasan_slab_free include/linux/kasan.h:220 [inline] slab_free_hook mm/slub.c:1595 [inline] slab_free_freelist_hook+0xc0/0x190 mm/slub.c:1621 slab_free mm/slub.c:3203 [inline] kmem_cache_free+0xa9/0x1e0 mm/slub.c:3219 kfree_skbmem+0x104/0x170 __kfree_skb net/core/skbuff.c:695 [inline] consume_skb+0xb4/0x250 net/core/skbuff.c:851 __dev_kfree_skb_any+0x159/0x180 net/core/dev.c:3134 dev_consume_skb_any include/linux/netdevice.h:3911 [inline] napi_consume_skb+0x24a/0x490 net/core/skbuff.c:913 free_old_xmit_skbs+0x119/0x290 drivers/net/virtio_net.c:1468 start_xmit+0x117/0x14c0 drivers/net/virtio_net.c:1687 __netdev_start_xmit include/linux/netdevice.h:4858 [inline] netdev_start_xmit include/linux/netdevice.h:4872 [inline] xmit_one net/core/dev.c:3607 [inline] dev_hard_start_xmit+0x228/0x620 net/core/dev.c:3623 sch_direct_xmit+0x292/0x9b0 net/sched/sch_generic.c:336 qdisc_restart net/sched/sch_generic.c:401 [inline] __qdisc_run+0xa85/0x1df0 net/sched/sch_generic.c:409 qdisc_run+0x121/0x330 include/net/pkt_sched.h:127 __dev_xmit_skb net/core/dev.c:3818 [inline] __dev_queue_xmit+0xcbe/0x28a0 net/core/dev.c:4174 dev_queue_xmit+0x17/0x20 net/core/dev.c:4242 neigh_hh_output include/net/neighbour.h:501 [inline] neigh_output include/net/neighbour.h:515 [inline] ip_finish_output2+0xb1d/0xfc0 net/ipv4/ip_output.c:237 __ip_finish_output+0x409/0x740 ip_finish_output+0x34/0x1e0 net/ipv4/ip_output.c:325 NF_HOOK_COND include/linux/netfilter.h:288 [inline] ip_output+0x1d6/0x420 net/ipv4/ip_output.c:439 dst_output include/net/dst.h:437 [inline] ip_local_out net/ipv4/ip_output.c:126 [inline] __ip_queue_xmit+0x10ca/0x1bd0 net/ipv4/ip_output.c:540 ip_queue_xmit+0x4c/0x70 net/ipv4/ip_output.c:554 __tcp_transmit_skb+0x1ddd/0x3850 net/ipv4/tcp_output.c:1403 tcp_transmit_skb net/ipv4/tcp_output.c:1421 [inline] tcp_write_xmit+0x1563/0x5e10 net/ipv4/tcp_output.c:2703 __tcp_push_pending_frames+0x98/0x2f0 net/ipv4/tcp_output.c:2884 tcp_push+0x476/0x620 net/ipv4/tcp.c:741 tcp_sendmsg_locked+0x3092/0x3ae0 net/ipv4/tcp.c:1422 tcp_sendmsg+0x2f/0x50 net/ipv4/tcp.c:1452 inet_sendmsg+0xa1/0xc0 net/ipv4/af_inet.c:830 sock_sendmsg_nosec net/socket.c:652 [inline] __sock_sendmsg net/socket.c:664 [inline] sock_write_iter+0x39b/0x530 net/socket.c:1018 call_write_iter include/linux/fs.h:2058 [inline] new_sync_write fs/read_write.c:518 [inline] vfs_write+0xb4c/0xe70 fs/read_write.c:605 ksys_write+0x199/0x2c0 fs/read_write.c:658 __do_sys_write fs/read_write.c:670 [inline] __se_sys_write fs/read_write.c:667 [inline] __x64_sys_write+0x7b/0x90 fs/read_write.c:667 do_syscall_64+0x34/0x70 entry_SYSCALL_64_after_hwframe+0x61/0xcb The buggy address belongs to the object at ffff888111863000 which belongs to the cache skbuff_head_cache of size 248 The buggy address is located 0 bytes inside of 248-byte region [ffff888111863000, ffff8881118630f8) The buggy address belongs to the page: page:ffffea00044618c0 refcount:1 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x111863 flags: 0x4000000000000200(slab) raw: 4000000000000200 dead000000000100 dead000000000122 ffff888107d94780 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 0x112a20(GFP_ATOMIC|__GFP_NOWARN|__GFP_NORETRY|__GFP_HARDWALL), pid 401, ts 41959664713, free_ts 41944676955 set_page_owner include/linux/page_owner.h:35 [inline] post_alloc_hook mm/page_alloc.c:2456 [inline] prep_new_page+0x166/0x180 mm/page_alloc.c:2462 get_page_from_freelist+0x2d8c/0x2f30 mm/page_alloc.c:4254 __alloc_pages_nodemask+0x435/0xaf0 mm/page_alloc.c:5348 allocate_slab mm/slub.c:1808 [inline] new_slab+0x80/0x400 mm/slub.c:1869 new_slab_objects mm/slub.c:2627 [inline] ___slab_alloc+0x302/0x4b0 mm/slub.c:2791 __slab_alloc+0x63/0xa0 mm/slub.c:2831 slab_alloc_node mm/slub.c:2913 [inline] slab_alloc mm/slub.c:2955 [inline] kmem_cache_alloc+0x1b9/0x2e0 mm/slub.c:2960 kmem_cache_alloc_node include/linux/slab.h:423 [inline] __alloc_skb+0x80/0x510 net/core/skbuff.c:200 __napi_alloc_skb+0x15d/0x2e0 net/core/skbuff.c:522 napi_alloc_skb include/linux/skbuff.h:2952 [inline] page_to_skb+0x3d/0x900 drivers/net/virtio_net.c:412 receive_mergeable drivers/net/virtio_net.c:1019 [inline] receive_buf+0xe79/0x53d0 drivers/net/virtio_net.c:1129 virtnet_receive drivers/net/virtio_net.c:1421 [inline] virtnet_poll+0x5df/0x1240 drivers/net/virtio_net.c:1530 napi_poll net/core/dev.c:6873 [inline] net_rx_action+0x516/0x10d0 net/core/dev.c:6943 __do_softirq+0x268/0x5bb kernel/softirq.c:309 page last free stack trace: reset_page_owner include/linux/page_owner.h:28 [inline] free_pages_prepare mm/page_alloc.c:1349 [inline] free_pcp_prepare mm/page_alloc.c:1421 [inline] free_unref_page_prepare+0x2ae/0x2d0 mm/page_alloc.c:3336 free_unref_page+0x7e/0x1c0 mm/page_alloc.c:3391 __put_single_page mm/swap.c:104 [inline] __put_page+0xb1/0xe0 mm/swap.c:135 put_page include/linux/mm.h:1257 [inline] anon_pipe_buf_release+0x17c/0x210 fs/pipe.c:137 pipe_buf_release include/linux/pipe_fs_i.h:219 [inline] pipe_read+0x5a6/0x1040 fs/pipe.c:323 call_read_iter include/linux/fs.h:2052 [inline] new_sync_read fs/read_write.c:415 [inline] vfs_read+0x990/0xba0 fs/read_write.c:496 ksys_read+0x199/0x2c0 fs/read_write.c:634 __do_sys_read fs/read_write.c:644 [inline] __se_sys_read fs/read_write.c:642 [inline] __x64_sys_read+0x7b/0x90 fs/read_write.c:642 do_syscall_64+0x34/0x70 entry_SYSCALL_64_after_hwframe+0x61/0xcb Memory state around the buggy address: ffff888111862f00: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ffff888111862f80: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 >ffff888111863000: fa fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ^ ffff888111863080: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fc ffff888111863100: fc fc fc fc fc fc fc fc fa fb fb fb fb fb fb fb ==================================================================