================================================================== BUG: KASAN: use-after-free in ext4_xattr_delete_inode+0xb47/0xb50 fs/ext4/xattr.c:2917 Read of size 4 at addr ffff8881e9a03000 by task syz-executor/557 CPU: 0 PID: 557 Comm: syz-executor Not tainted 5.4.290-syzkaller-05054-g986c38813dff #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 02/12/2025 Call Trace: __dump_stack+0x1e/0x20 lib/dump_stack.c:77 dump_stack+0x15b/0x1b8 lib/dump_stack.c:118 print_address_description+0x8d/0x4c0 mm/kasan/report.c:384 __kasan_report+0xef/0x120 mm/kasan/report.c:516 kasan_report+0x30/0x60 mm/kasan/common.c:653 __asan_report_load4_noabort+0x14/0x20 mm/kasan/generic_report.c:131 ext4_xattr_delete_inode+0xb47/0xb50 fs/ext4/xattr.c:2917 ext4_evict_inode+0x11c0/0x1a30 fs/ext4/inode.c:318 evict+0x465/0x880 fs/inode.c:610 iput_final fs/inode.c:1652 [inline] iput+0x67d/0x810 fs/inode.c:1678 d_delete_notify include/linux/fsnotify.h:230 [inline] vfs_rmdir+0x2b7/0x3e0 fs/namei.c:4040 do_rmdir+0x23c/0x480 fs/namei.c:4088 __do_sys_unlinkat fs/namei.c:4252 [inline] __se_sys_unlinkat fs/namei.c:4246 [inline] __x64_sys_unlinkat+0xb6/0xe0 fs/namei.c:4246 do_syscall_64+0xcf/0x170 arch/x86/entry/common.c:290 entry_SYSCALL_64_after_hwframe+0x5c/0xc1 RIP: 0033:0x7fea09ecd217 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:00007ffcd5b950a8 EFLAGS: 00000207 ORIG_RAX: 0000000000000107 RAX: ffffffffffffffda RBX: 0000000000000065 RCX: 00007fea09ecd217 RDX: 0000000000000200 RSI: 00007ffcd5b96250 RDI: 00000000ffffff9c RBP: 00007fea09f3b64a R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000100 R11: 0000000000000207 R12: 00007ffcd5b96250 R13: 00007fea09f3b64a R14: 000000000000f277 R15: 00007ffcd5b98430 Allocated by task 557: save_stack mm/kasan/common.c:70 [inline] set_track mm/kasan/common.c:78 [inline] __kasan_kmalloc+0x162/0x200 mm/kasan/common.c:529 kasan_slab_alloc+0x12/0x20 mm/kasan/common.c:537 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+0xe2/0x270 mm/slub.c:2842 kmem_cache_alloc_node include/linux/slab.h:427 [inline] __alloc_skb+0x9e/0x500 net/core/skbuff.c:198 alloc_skb include/linux/skbuff.h:1080 [inline] nlmsg_new include/net/netlink.h:888 [inline] inet6_rt_notify+0x287/0x470 net/ipv6/route.c:5988 fib6_add_rt2node net/ipv6/ip6_fib.c:1187 [inline] fib6_add+0x21a3/0x3ad0 net/ipv6/ip6_fib.c:1416 __ip6_ins_rt net/ipv6/route.c:1322 [inline] ip6_route_add+0x89/0x130 net/ipv6/route.c:3766 addrconf_add_mroute net/ipv6/addrconf.c:2507 [inline] addrconf_add_dev+0x333/0x440 net/ipv6/addrconf.c:2525 addrconf_dev_config+0x16c/0x330 net/ipv6/addrconf.c:3416 addrconf_notify+0x9fe/0xeb0 net/ipv6/addrconf.c:3660 notifier_call_chain kernel/notifier.c:98 [inline] __raw_notifier_call_chain kernel/notifier.c:399 [inline] raw_notifier_call_chain+0xa0/0x120 kernel/notifier.c:406 call_netdevice_notifiers_info net/core/dev.c:1670 [inline] call_netdevice_notifiers_extack net/core/dev.c:1682 [inline] call_netdevice_notifiers net/core/dev.c:1696 [inline] __dev_notify_flags+0x1e2/0x3d0 net/core/dev.c:-1 dev_change_flags+0xe8/0x1a0 net/core/dev.c:8034 do_setlink+0xb98/0x39e0 net/core/rtnetlink.c:2542 __rtnl_newlink net/core/rtnetlink.c:3188 [inline] rtnl_newlink+0x1136/0x15f0 net/core/rtnetlink.c:3314 rtnetlink_rcv_msg+0xa23/0xbe0 net/core/rtnetlink.c:5290 netlink_rcv_skb+0x1e6/0x430 net/netlink/af_netlink.c:2467 rtnetlink_rcv+0x1c/0x20 net/core/rtnetlink.c:5308 netlink_unicast_kernel net/netlink/af_netlink.c:1306 [inline] netlink_unicast+0x88b/0xa40 net/netlink/af_netlink.c:1332 netlink_sendmsg+0x88d/0xb30 net/netlink/af_netlink.c:1900 sock_sendmsg_nosec net/socket.c:638 [inline] __sock_sendmsg net/socket.c:650 [inline] __sys_sendto+0x414/0x570 net/socket.c:1961 __do_sys_sendto net/socket.c:1973 [inline] __se_sys_sendto net/socket.c:1969 [inline] __x64_sys_sendto+0xe5/0x100 net/socket.c:1969 do_syscall_64+0xcf/0x170 arch/x86/entry/common.c:290 entry_SYSCALL_64_after_hwframe+0x5c/0xc1 Freed by task 557: 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+0x1c3/0x280 mm/kasan/common.c:487 kasan_slab_free+0xe/0x10 mm/kasan/common.c:496 slab_free_hook mm/slub.c:1455 [inline] slab_free_freelist_hook+0xb7/0x180 mm/slub.c:1494 slab_free mm/slub.c:3080 [inline] kmem_cache_free+0x10c/0x2c0 mm/slub.c:3096 kfree_skbmem+0x10c/0x180 net/core/skbuff.c:654 __kfree_skb net/core/skbuff.c:690 [inline] consume_skb+0xb5/0x240 net/core/skbuff.c:849 netlink_broadcast_filtered+0x1198/0x1290 net/netlink/af_netlink.c:1516 netlink_broadcast net/netlink/af_netlink.c:1538 [inline] nlmsg_multicast include/net/netlink.h:968 [inline] nlmsg_notify+0xed/0x1b0 net/netlink/af_netlink.c:2510 rtnl_notify+0x9a/0xc0 net/core/rtnetlink.c:737 inet6_rt_notify+0x365/0x470 net/ipv6/route.c:6000 fib6_add_rt2node net/ipv6/ip6_fib.c:1187 [inline] fib6_add+0x21a3/0x3ad0 net/ipv6/ip6_fib.c:1416 __ip6_ins_rt net/ipv6/route.c:1322 [inline] ip6_route_add+0x89/0x130 net/ipv6/route.c:3766 addrconf_add_mroute net/ipv6/addrconf.c:2507 [inline] addrconf_add_dev+0x333/0x440 net/ipv6/addrconf.c:2525 addrconf_dev_config+0x16c/0x330 net/ipv6/addrconf.c:3416 addrconf_notify+0x9fe/0xeb0 net/ipv6/addrconf.c:3660 notifier_call_chain kernel/notifier.c:98 [inline] __raw_notifier_call_chain kernel/notifier.c:399 [inline] raw_notifier_call_chain+0xa0/0x120 kernel/notifier.c:406 call_netdevice_notifiers_info net/core/dev.c:1670 [inline] call_netdevice_notifiers_extack net/core/dev.c:1682 [inline] call_netdevice_notifiers net/core/dev.c:1696 [inline] __dev_notify_flags+0x1e2/0x3d0 net/core/dev.c:-1 dev_change_flags+0xe8/0x1a0 net/core/dev.c:8034 do_setlink+0xb98/0x39e0 net/core/rtnetlink.c:2542 __rtnl_newlink net/core/rtnetlink.c:3188 [inline] rtnl_newlink+0x1136/0x15f0 net/core/rtnetlink.c:3314 rtnetlink_rcv_msg+0xa23/0xbe0 net/core/rtnetlink.c:5290 netlink_rcv_skb+0x1e6/0x430 net/netlink/af_netlink.c:2467 rtnetlink_rcv+0x1c/0x20 net/core/rtnetlink.c:5308 netlink_unicast_kernel net/netlink/af_netlink.c:1306 [inline] netlink_unicast+0x88b/0xa40 net/netlink/af_netlink.c:1332 netlink_sendmsg+0x88d/0xb30 net/netlink/af_netlink.c:1900 sock_sendmsg_nosec net/socket.c:638 [inline] __sock_sendmsg net/socket.c:650 [inline] __sys_sendto+0x414/0x570 net/socket.c:1961 __do_sys_sendto net/socket.c:1973 [inline] __se_sys_sendto net/socket.c:1969 [inline] __x64_sys_sendto+0xe5/0x100 net/socket.c:1969 do_syscall_64+0xcf/0x170 arch/x86/entry/common.c:290 entry_SYSCALL_64_after_hwframe+0x5c/0xc1 The buggy address belongs to the object at ffff8881e9a03000 which belongs to the cache skbuff_head_cache of size 240 The buggy address is located 0 bytes inside of 240-byte region [ffff8881e9a03000, ffff8881e9a030f0) The buggy address belongs to the page: page:ffffea0007a680c0 refcount:1 mapcount:0 mapping:ffff8881f1ccc000 index:0x0 flags: 0x8000000000000200(slab) raw: 8000000000000200 dead000000000100 dead000000000122 ffff8881f1ccc000 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) set_page_owner include/linux/page_owner.h:31 [inline] post_alloc_hook mm/page_alloc.c:2165 [inline] prep_new_page+0x35e/0x370 mm/page_alloc.c:2171 get_page_from_freelist+0x1296/0x1310 mm/page_alloc.c:3794 __alloc_pages_nodemask+0x202/0x4b0 mm/page_alloc.c:4893 alloc_slab_page+0x3c/0x3b0 mm/slub.c:343 allocate_slab mm/slub.c:1683 [inline] new_slab+0x93/0x420 mm/slub.c:1749 new_slab_objects mm/slub.c:2505 [inline] ___slab_alloc+0x29e/0x420 mm/slub.c:2667 __slab_alloc+0x63/0xa0 mm/slub.c:2707 slab_alloc_node mm/slub.c:2792 [inline] slab_alloc mm/slub.c:2837 [inline] kmem_cache_alloc+0x12c/0x270 mm/slub.c:2842 kmem_cache_alloc_node include/linux/slab.h:427 [inline] __alloc_skb+0x9e/0x500 net/core/skbuff.c:198 alloc_skb include/linux/skbuff.h:1080 [inline] nlmsg_new include/net/netlink.h:888 [inline] rtmsg_ifinfo_build_skb+0x7c/0x180 net/core/rtnetlink.c:3528 rtmsg_ifinfo_event net/core/rtnetlink.c:3564 [inline] rtmsg_ifinfo+0x7a/0x130 net/core/rtnetlink.c:3573 __dev_notify_flags+0xdb/0x3d0 net/core/dev.c:7992 dev_change_flags+0xe8/0x1a0 net/core/dev.c:8034 do_setlink+0xb98/0x39e0 net/core/rtnetlink.c:2542 __rtnl_newlink net/core/rtnetlink.c:3188 [inline] rtnl_newlink+0x1136/0x15f0 net/core/rtnetlink.c:3314 rtnetlink_rcv_msg+0xa23/0xbe0 net/core/rtnetlink.c:5290 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+0x2a9/0x3a0 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+0xaa/0x110 mm/page_alloc.c:4961 __free_slab+0x218/0x2d0 mm/slub.c:1774 rcu_free_slab+0x14/0x20 mm/slub.c:1781 __rcu_reclaim kernel/rcu/rcu.h:222 [inline] rcu_do_batch+0x446/0x980 kernel/rcu/tree.c:2167 rcu_core+0x4bd/0xbd0 kernel/rcu/tree.c:2387 rcu_core_si+0x9/0x10 kernel/rcu/tree.c:2396 __do_softirq+0x236/0x660 kernel/softirq.c:292 run_ksoftirqd+0x23/0x30 kernel/softirq.c:603 smpboot_thread_fn+0x474/0x850 kernel/smpboot.c:165 kthread+0x31e/0x3a0 kernel/kthread.c:288 ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:354 Memory state around the buggy address: ffff8881e9a02f00: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ffff8881e9a02f80: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 >ffff8881e9a03000: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ^ ffff8881e9a03080: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fc fc ffff8881e9a03100: fc fc fc fc fc fc fc fc fb fb fb fb fb fb fb fb ================================================================== EXT4-fs error (device loop0): ext4_xattr_inode_iget:402: comm syz-executor: inode #1: comm syz-executor: iget: illegal inode # EXT4-fs error (device loop0): ext4_xattr_inode_iget:407: comm syz-executor: error while reading EA inode 1 err=-117