================================================================== BUG: KASAN: use-after-free in ext4_xattr_delete_inode+0xcd0/0xce0 fs/ext4/xattr.c:2905 Read of size 4 at addr ffff8881161d7000 by task syz-executor/472 CPU: 0 PID: 472 Comm: syz-executor Not tainted 6.1.99-syzkaller-1151476-ga43e7c2c12af #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 08/06/2024 Call Trace: __dump_stack lib/dump_stack.c:88 [inline] dump_stack_lvl+0x151/0x1b7 lib/dump_stack.c:106 print_address_description mm/kasan/report.c:316 [inline] print_report+0x158/0x4e0 mm/kasan/report.c:427 kasan_report+0x13c/0x170 mm/kasan/report.c:531 __asan_report_load4_noabort+0x14/0x20 mm/kasan/report_generic.c:350 ext4_xattr_delete_inode+0xcd0/0xce0 fs/ext4/xattr.c:2905 ext4_evict_inode+0xef9/0x1550 fs/ext4/inode.c:296 evict+0x2a3/0x630 fs/inode.c:666 iput_final fs/inode.c:1791 [inline] iput+0x616/0x690 fs/inode.c:1817 d_delete_notify include/linux/fsnotify.h:292 [inline] vfs_rmdir+0x3c2/0x500 fs/namei.c:4205 do_rmdir+0x3ab/0x630 fs/namei.c:4253 __do_sys_unlinkat fs/namei.c:4433 [inline] __se_sys_unlinkat fs/namei.c:4427 [inline] __x64_sys_unlinkat+0xdf/0xf0 fs/namei.c:4427 x64_sys_call+0x6e9/0x9a0 arch/x86/include/generated/asm/syscalls_64.h:264 do_syscall_x64 arch/x86/entry/common.c:51 [inline] do_syscall_64+0x3b/0xb0 arch/x86/entry/common.c:81 entry_SYSCALL_64_after_hwframe+0x68/0xd2 RIP: 0033:0x7f47dfb79457 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:00007ffc8e245988 EFLAGS: 00000207 ORIG_RAX: 0000000000000107 RAX: ffffffffffffffda RBX: 0000000000000065 RCX: 00007f47dfb79457 RDX: 0000000000000200 RSI: 00007ffc8e246b30 RDI: 00000000ffffff9c RBP: 00007f47dfbe77b4 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000100 R11: 0000000000000207 R12: 00007ffc8e246b30 R13: 00007f47dfbe77b4 R14: 000000000000d32e R15: 00007ffc8e248ce0 Allocated by task 447: kasan_save_stack mm/kasan/common.c:45 [inline] kasan_set_track+0x4b/0x70 mm/kasan/common.c:52 kasan_save_alloc_info+0x1f/0x30 mm/kasan/generic.c:505 __kasan_slab_alloc+0x6c/0x80 mm/kasan/common.c:333 kasan_slab_alloc include/linux/kasan.h:202 [inline] slab_post_alloc_hook+0x53/0x2c0 mm/slab.h:768 slab_alloc_node mm/slub.c:3421 [inline] kmem_cache_alloc_node+0x18a/0x2d0 mm/slub.c:3466 __alloc_skb+0xcc/0x2d0 net/core/skbuff.c:505 alloc_skb include/linux/skbuff.h:1290 [inline] alloc_uevent_skb+0x80/0x230 lib/kobject_uevent.c:290 uevent_net_broadcast_tagged lib/kobject_uevent.c:351 [inline] kobject_uevent_net_broadcast+0x188/0x590 lib/kobject_uevent.c:412 kobject_uevent_env+0x53c/0x720 lib/kobject_uevent.c:593 kobject_uevent+0x1f/0x30 lib/kobject_uevent.c:642 netdev_queue_add_kobject net/core/net-sysfs.c:1671 [inline] netdev_queue_update_kobjects+0x235/0x4a0 net/core/net-sysfs.c:1712 register_queue_kobjects net/core/net-sysfs.c:1773 [inline] netdev_register_kobject+0x270/0x320 net/core/net-sysfs.c:2013 register_netdevice+0xe43/0x1490 net/core/dev.c:10107 veth_newlink+0x5db/0xc70 drivers/net/veth.c:1744 rtnl_newlink_create net/core/rtnetlink.c:3390 [inline] __rtnl_newlink net/core/rtnetlink.c:3610 [inline] rtnl_newlink+0x14c6/0x2030 net/core/rtnetlink.c:3623 rtnetlink_rcv_msg+0x9a5/0xca0 net/core/rtnetlink.c:6121 netlink_rcv_skb+0x1cd/0x410 net/netlink/af_netlink.c:2518 rtnetlink_rcv+0x1c/0x20 net/core/rtnetlink.c:6139 netlink_unicast_kernel net/netlink/af_netlink.c:1327 [inline] netlink_unicast+0x906/0xab0 net/netlink/af_netlink.c:1353 netlink_sendmsg+0xa15/0xd30 net/netlink/af_netlink.c:1875 sock_sendmsg_nosec net/socket.c:716 [inline] __sock_sendmsg net/socket.c:728 [inline] __sys_sendto+0x480/0x600 net/socket.c:2138 __do_sys_sendto net/socket.c:2150 [inline] __se_sys_sendto net/socket.c:2146 [inline] __x64_sys_sendto+0xe5/0x100 net/socket.c:2146 x64_sys_call+0x15c/0x9a0 arch/x86/include/generated/asm/syscalls_64.h:45 do_syscall_x64 arch/x86/entry/common.c:51 [inline] do_syscall_64+0x3b/0xb0 arch/x86/entry/common.c:81 entry_SYSCALL_64_after_hwframe+0x68/0xd2 Freed by task 447: kasan_save_stack mm/kasan/common.c:45 [inline] kasan_set_track+0x4b/0x70 mm/kasan/common.c:52 kasan_save_free_info+0x2b/0x40 mm/kasan/generic.c:516 ____kasan_slab_free+0x131/0x180 mm/kasan/common.c:241 __kasan_slab_free+0x11/0x20 mm/kasan/common.c:249 kasan_slab_free include/linux/kasan.h:178 [inline] slab_free_hook mm/slub.c:1745 [inline] slab_free_freelist_hook mm/slub.c:1771 [inline] slab_free mm/slub.c:3684 [inline] kmem_cache_free+0x291/0x510 mm/slub.c:3706 kfree_skbmem+0x104/0x170 __kfree_skb net/core/skbuff.c:871 [inline] consume_skb+0xb4/0x250 net/core/skbuff.c:1035 netlink_broadcast+0x103c/0x1160 net/netlink/af_netlink.c:1524 uevent_net_broadcast_tagged lib/kobject_uevent.c:372 [inline] kobject_uevent_net_broadcast+0x4f0/0x590 lib/kobject_uevent.c:412 kobject_uevent_env+0x53c/0x720 lib/kobject_uevent.c:593 kobject_uevent+0x1f/0x30 lib/kobject_uevent.c:642 netdev_queue_add_kobject net/core/net-sysfs.c:1671 [inline] netdev_queue_update_kobjects+0x235/0x4a0 net/core/net-sysfs.c:1712 register_queue_kobjects net/core/net-sysfs.c:1773 [inline] netdev_register_kobject+0x270/0x320 net/core/net-sysfs.c:2013 register_netdevice+0xe43/0x1490 net/core/dev.c:10107 veth_newlink+0x5db/0xc70 drivers/net/veth.c:1744 rtnl_newlink_create net/core/rtnetlink.c:3390 [inline] __rtnl_newlink net/core/rtnetlink.c:3610 [inline] rtnl_newlink+0x14c6/0x2030 net/core/rtnetlink.c:3623 rtnetlink_rcv_msg+0x9a5/0xca0 net/core/rtnetlink.c:6121 netlink_rcv_skb+0x1cd/0x410 net/netlink/af_netlink.c:2518 rtnetlink_rcv+0x1c/0x20 net/core/rtnetlink.c:6139 netlink_unicast_kernel net/netlink/af_netlink.c:1327 [inline] netlink_unicast+0x906/0xab0 net/netlink/af_netlink.c:1353 netlink_sendmsg+0xa15/0xd30 net/netlink/af_netlink.c:1875 sock_sendmsg_nosec net/socket.c:716 [inline] __sock_sendmsg net/socket.c:728 [inline] __sys_sendto+0x480/0x600 net/socket.c:2138 __do_sys_sendto net/socket.c:2150 [inline] __se_sys_sendto net/socket.c:2146 [inline] __x64_sys_sendto+0xe5/0x100 net/socket.c:2146 x64_sys_call+0x15c/0x9a0 arch/x86/include/generated/asm/syscalls_64.h:45 do_syscall_x64 arch/x86/entry/common.c:51 [inline] do_syscall_64+0x3b/0xb0 arch/x86/entry/common.c:81 entry_SYSCALL_64_after_hwframe+0x68/0xd2 The buggy address belongs to the object at ffff8881161d7000 which belongs to the cache skbuff_head_cache of size 256 The buggy address is located 0 bytes inside of 256-byte region [ffff8881161d7000, ffff8881161d7100) The buggy address belongs to the physical page: page:ffffea00045875c0 refcount:1 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x1161d7 flags: 0x4000000000000200(slab|zone=1) raw: 4000000000000200 ffffea000455e9c0 dead000000000004 ffff8881002b8600 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), pid 116, tgid 116 (udevd), ts 4288353589, free_ts 0 set_page_owner include/linux/page_owner.h:33 [inline] post_alloc_hook+0x213/0x220 mm/page_alloc.c:2590 prep_new_page+0x1b/0x110 mm/page_alloc.c:2597 get_page_from_freelist+0x27ea/0x2870 mm/page_alloc.c:4425 __alloc_pages+0x3a1/0x780 mm/page_alloc.c:5714 alloc_slab_page+0x6c/0xf0 allocate_slab mm/slub.c:1962 [inline] new_slab+0x90/0x3e0 mm/slub.c:2015 ___slab_alloc+0x6f9/0xb80 mm/slub.c:3203 __slab_alloc+0x5d/0xa0 mm/slub.c:3302 slab_alloc_node mm/slub.c:3387 [inline] kmem_cache_alloc_node+0x1c9/0x2d0 mm/slub.c:3466 __alloc_skb+0xcc/0x2d0 net/core/skbuff.c:505 alloc_skb include/linux/skbuff.h:1290 [inline] netlink_alloc_large_skb net/netlink/af_netlink.c:1199 [inline] netlink_sendmsg+0x7a6/0xd30 net/netlink/af_netlink.c:1850 sock_sendmsg_nosec net/socket.c:716 [inline] __sock_sendmsg net/socket.c:728 [inline] ____sys_sendmsg+0x5d3/0x9a0 net/socket.c:2504 ___sys_sendmsg net/socket.c:2558 [inline] __sys_sendmsg+0x2a9/0x390 net/socket.c:2587 __do_sys_sendmsg net/socket.c:2596 [inline] __se_sys_sendmsg net/socket.c:2594 [inline] __x64_sys_sendmsg+0x7f/0x90 net/socket.c:2594 x64_sys_call+0x16a/0x9a0 arch/x86/include/generated/asm/syscalls_64.h:47 do_syscall_x64 arch/x86/entry/common.c:51 [inline] do_syscall_64+0x3b/0xb0 arch/x86/entry/common.c:81 page_owner free stack trace missing Memory state around the buggy address: ffff8881161d6f00: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ffff8881161d6f80: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 >ffff8881161d7000: fa fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ^ ffff8881161d7080: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ffff8881161d7100: fc fc fc fc fc fc fc fc fa fb fb fb fb fb fb fb ================================================================== EXT4-fs (loop0): unmounting filesystem. EXT4-fs (loop0): unmounting filesystem. EXT4-fs (loop0): unmounting filesystem. EXT4-fs (loop0): unmounting filesystem. EXT4-fs (loop0): unmounting filesystem. EXT4-fs (loop0): unmounting filesystem. EXT4-fs (loop0): unmounting filesystem. EXT4-fs (loop0): unmounting filesystem. EXT4-fs (loop0): unmounting filesystem. EXT4-fs (loop0): unmounting filesystem. EXT4-fs (loop0): unmounting filesystem. EXT4-fs (loop0): unmounting filesystem. EXT4-fs (loop0): unmounting filesystem. EXT4-fs (loop0): unmounting filesystem. EXT4-fs (loop0): unmounting filesystem. EXT4-fs (loop0): unmounting filesystem. EXT4-fs (loop0): unmounting filesystem. EXT4-fs (loop0): unmounting filesystem. EXT4-fs (loop0): unmounting filesystem. EXT4-fs (loop0): unmounting filesystem. EXT4-fs (loop0): unmounting filesystem. EXT4-fs (loop0): unmounting filesystem. EXT4-fs (loop0): unmounting filesystem. EXT4-fs (loop0): unmounting filesystem. EXT4-fs (loop0): unmounting filesystem. EXT4-fs (loop0): unmounting filesystem. EXT4-fs (loop0): unmounting filesystem. EXT4-fs (loop0): unmounting filesystem. EXT4-fs (loop0): unmounting filesystem. EXT4-fs (loop0): unmounting filesystem. EXT4-fs (loop0): unmounting filesystem. EXT4-fs error (device loop0): ext4_xattr_inode_iget:404: comm syz-executor: inode #1: comm syz-executor: iget: illegal inode # EXT4-fs error (device loop0): ext4_xattr_inode_iget:409: comm syz-executor: error while reading EA inode 1 err=-117 EXT4-fs error (device loop0): ext4_xattr_inode_iget:404: comm syz-executor: inode #1: comm syz-executor: iget: illegal inode # EXT4-fs error (device loop0): ext4_xattr_inode_iget:409: comm syz-executor: error while reading EA inode 1 err=-117