================================================================== BUG: KASAN: use-after-free in ext4_xattr_delete_inode+0xc1f/0xc30 fs/ext4/xattr.c:2911 Read of size 4 at addr ffff8881ef1a0000 by task syz-executor.4/373 CPU: 0 PID: 373 Comm: syz-executor.4 Tainted: G W 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:0x7f876768d687 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:00007ffd9352c1e8 EFLAGS: 00000207 ORIG_RAX: 0000000000000107 RAX: ffffffffffffffda RBX: 0000000000000065 RCX: 00007f876768d687 RDX: 0000000000000200 RSI: 00007ffd9352d390 RDI: 00000000ffffff9c RBP: 00007f87676ea636 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000100 R11: 0000000000000207 R12: 00007ffd9352d390 R13: 00007f87676ea636 R14: 000000000000c599 R15: 0000000000000007 Allocated by task 1355: save_stack mm/kasan/common.c:70 [inline] set_track mm/kasan/common.c:78 [inline] __kasan_kmalloc+0x171/0x210 mm/kasan/common.c:529 kmalloc include/linux/slab.h:561 [inline] kzalloc include/linux/slab.h:690 [inline] fib6_info_alloc+0x2c/0xd0 net/ipv6/ip6_fib.c:154 ip6_route_info_create+0x459/0x1420 net/ipv6/route.c:3663 ip6_route_add+0x22/0x120 net/ipv6/route.c:3759 addrconf_add_mroute net/ipv6/addrconf.c:2505 [inline] addrconf_add_dev+0x41f/0x610 net/ipv6/addrconf.c:2523 inet6_addr_add+0x1b0/0x920 net/ipv6/addrconf.c:2973 inet6_rtm_newaddr+0x8e3/0x2750 net/ipv6/addrconf.c:4892 rtnetlink_rcv_msg+0x983/0xc70 net/core/rtnetlink.c:5290 netlink_rcv_skb+0x1d5/0x420 net/netlink/af_netlink.c:2481 netlink_unicast_kernel net/netlink/af_netlink.c:1321 [inline] netlink_unicast+0x936/0xb20 net/netlink/af_netlink.c:1347 netlink_sendmsg+0xa18/0xcf0 net/netlink/af_netlink.c:1915 sock_sendmsg_nosec net/socket.c:638 [inline] __sock_sendmsg net/socket.c:650 [inline] __sys_sendto+0x4f3/0x6c0 net/socket.c:1961 __do_sys_sendto net/socket.c:1973 [inline] __se_sys_sendto net/socket.c:1969 [inline] __x64_sys_sendto+0xda/0xf0 net/socket.c:1969 do_syscall_64+0xca/0x1c0 arch/x86/entry/common.c:290 entry_SYSCALL_64_after_hwframe+0x5c/0xc1 Freed by task 10: 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+0x1b5/0x270 mm/kasan/common.c:487 slab_free_hook mm/slub.c:1455 [inline] slab_free_freelist_hook mm/slub.c:1494 [inline] slab_free mm/slub.c:3080 [inline] kfree+0x123/0x370 mm/slub.c:4071 __rcu_reclaim kernel/rcu/rcu.h:222 [inline] rcu_do_batch+0x492/0xa00 kernel/rcu/tree.c:2167 rcu_core+0x4c8/0xcb0 kernel/rcu/tree.c:2387 __do_softirq+0x23b/0x6b7 kernel/softirq.c:292 The buggy address belongs to the object at ffff8881ef1a0000 which belongs to the cache kmalloc-512 of size 512 The buggy address is located 0 bytes inside of 512-byte region [ffff8881ef1a0000, ffff8881ef1a0200) The buggy address belongs to the page: page:ffffea0007bc6800 refcount:1 mapcount:0 mapping:ffff8881f5c02500 index:0x0 compound_mapcount: 0 flags: 0x8000000000010200(slab|head) raw: 8000000000010200 dead000000000100 dead000000000122 ffff8881f5c02500 raw: 0000000000000000 0000000000100010 00000001ffffffff 0000000000000000 page dumped because: kasan: bad access detected page_owner tracks the page as allocated page last allocated via order 2, migratetype Unmovable, gfp_mask 0x1d20c0(__GFP_IO|__GFP_FS|__GFP_NOWARN|__GFP_NORETRY|__GFP_COMP|__GFP_NOMEMALLOC|__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] __kmalloc+0x19b/0x2e0 mm/slub.c:3909 kmalloc include/linux/slab.h:561 [inline] kzalloc include/linux/slab.h:690 [inline] fib6_info_alloc+0x2c/0xd0 net/ipv6/ip6_fib.c:154 ip6_route_info_create+0x459/0x1420 net/ipv6/route.c:3663 addrconf_f6i_alloc+0x215/0x4c0 net/ipv6/route.c:4447 ipv6_add_addr+0x44e/0xd40 net/ipv6/addrconf.c:1114 addrconf_add_linklocal+0x318/0x9e0 net/ipv6/addrconf.c:3245 addrconf_addr_gen+0x572/0xd00 net/ipv6/addrconf.c:3376 addrconf_notify+0x9d2/0xe50 net/ipv6/addrconf.c:3658 notifier_call_chain kernel/notifier.c:98 [inline] __raw_notifier_call_chain kernel/notifier.c:399 [inline] raw_notifier_call_chain+0x95/0x110 kernel/notifier.c:406 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_pages_ok+0x847/0x950 mm/page_alloc.c:1438 free_the_page mm/page_alloc.c:4955 [inline] __free_pages+0x91/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 getname_flags+0xb8/0x4e0 fs/namei.c:141 do_sys_open+0x357/0x810 fs/open.c:1117 do_syscall_64+0xca/0x1c0 arch/x86/entry/common.c:290 entry_SYSCALL_64_after_hwframe+0x5c/0xc1 Memory state around the buggy address: ffff8881ef19ff00: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ffff8881ef19ff80: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 >ffff8881ef1a0000: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ^ ffff8881ef1a0080: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ffff8881ef1a0100: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ==================================================================