================================================================== BUG: KASAN: out-of-bounds in ext4_xattr_set_entry+0xcb3/0x1f10 fs/ext4/xattr.c:1781 Read of size 18446744073709551572 at addr ffff88807e3bf050 by task syz.2.1009/10714 CPU: 1 UID: 0 PID: 10714 Comm: syz.2.1009 Not tainted 6.11.0-syzkaller-02574-ga430d95c5efa #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 08/06/2024 Call Trace: __dump_stack lib/dump_stack.c:93 [inline] dump_stack_lvl+0x116/0x1f0 lib/dump_stack.c:119 print_address_description mm/kasan/report.c:377 [inline] print_report+0xc3/0x620 mm/kasan/report.c:488 kasan_report+0xd9/0x110 mm/kasan/report.c:601 check_region_inline mm/kasan/generic.c:183 [inline] kasan_check_range+0xef/0x1a0 mm/kasan/generic.c:189 __asan_memmove+0x23/0x60 mm/kasan/shadow.c:94 ext4_xattr_set_entry+0xcb3/0x1f10 fs/ext4/xattr.c:1781 ext4_xattr_block_set+0xea7/0x3170 fs/ext4/xattr.c:2028 ext4_xattr_move_to_block fs/ext4/xattr.c:2669 [inline] ext4_xattr_make_inode_space fs/ext4/xattr.c:2744 [inline] ext4_expand_extra_isize_ea+0x1484/0x1ae0 fs/ext4/xattr.c:2836 __ext4_expand_extra_isize+0x346/0x480 fs/ext4/inode.c:5858 ext4_try_to_expand_extra_isize fs/ext4/inode.c:5901 [inline] __ext4_mark_inode_dirty+0x55a/0x890 fs/ext4/inode.c:5979 __ext4_unlink+0x630/0xcb0 fs/ext4/namei.c:3289 ext4_unlink+0x422/0x610 fs/ext4/namei.c:3318 vfs_unlink+0x2fe/0x9b0 fs/namei.c:4469 do_unlinkat+0x570/0x760 fs/namei.c:4533 __do_sys_unlink fs/namei.c:4581 [inline] __se_sys_unlink fs/namei.c:4579 [inline] __x64_sys_unlink+0xc5/0x110 fs/namei.c:4579 do_syscall_x64 arch/x86/entry/common.c:52 [inline] do_syscall_64+0xcd/0x250 arch/x86/entry/common.c:83 entry_SYSCALL_64_after_hwframe+0x77/0x7f RIP: 0033:0x7f171717def9 Code: ff ff c3 66 2e 0f 1f 84 00 00 00 00 00 0f 1f 40 00 48 89 f8 48 89 f7 48 89 d6 48 89 ca 4d 89 c2 4d 89 c8 4c 8b 4c 24 08 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:00007f1717ecf038 EFLAGS: 00000246 ORIG_RAX: 0000000000000057 RAX: ffffffffffffffda RBX: 00007f1717336130 RCX: 00007f171717def9 RDX: 0000000000000000 RSI: 0000000000000000 RDI: 0000000020000180 RBP: 00007f17171f0b76 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000 R13: 0000000000000000 R14: 00007f1717336130 R15: 00007ffd23e15178 Allocated by task 10714: kasan_save_stack+0x33/0x60 mm/kasan/common.c:47 kasan_save_track+0x14/0x30 mm/kasan/common.c:68 poison_kmalloc_redzone mm/kasan/common.c:370 [inline] __kasan_kmalloc+0xaa/0xb0 mm/kasan/common.c:387 kasan_kmalloc include/linux/kasan.h:211 [inline] __do_kmalloc_node mm/slub.c:4159 [inline] __kmalloc_node_track_caller_noprof+0x20f/0x430 mm/slub.c:4178 kmemdup_noprof+0x29/0x60 mm/util.c:133 kmemdup_noprof include/linux/fortify-string.h:753 [inline] ext4_xattr_block_set+0x88d/0x3170 fs/ext4/xattr.c:1976 ext4_xattr_move_to_block fs/ext4/xattr.c:2669 [inline] ext4_xattr_make_inode_space fs/ext4/xattr.c:2744 [inline] ext4_expand_extra_isize_ea+0x1484/0x1ae0 fs/ext4/xattr.c:2836 __ext4_expand_extra_isize+0x346/0x480 fs/ext4/inode.c:5858 ext4_try_to_expand_extra_isize fs/ext4/inode.c:5901 [inline] __ext4_mark_inode_dirty+0x55a/0x890 fs/ext4/inode.c:5979 __ext4_unlink+0x630/0xcb0 fs/ext4/namei.c:3289 ext4_unlink+0x422/0x610 fs/ext4/namei.c:3318 vfs_unlink+0x2fe/0x9b0 fs/namei.c:4469 do_unlinkat+0x570/0x760 fs/namei.c:4533 __do_sys_unlink fs/namei.c:4581 [inline] __se_sys_unlink fs/namei.c:4579 [inline] __x64_sys_unlink+0xc5/0x110 fs/namei.c:4579 do_syscall_x64 arch/x86/entry/common.c:52 [inline] do_syscall_64+0xcd/0x250 arch/x86/entry/common.c:83 entry_SYSCALL_64_after_hwframe+0x77/0x7f The buggy address belongs to the object at ffff88807e3bf000 which belongs to the cache kmalloc-1k of size 1024 The buggy address is located 80 bytes inside of 1024-byte region [ffff88807e3bf000, ffff88807e3bf400) The buggy address belongs to the physical page: page: refcount:1 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x7e3b8 head: order:3 mapcount:0 entire_mapcount:0 nr_pages_mapped:0 pincount:0 anon flags: 0xfff00000000040(head|node=0|zone=1|lastcpupid=0x7ff) page_type: 0xfdffffff(slab) raw: 00fff00000000040 ffff88801ac41dc0 0000000000000000 dead000000000001 raw: 0000000000000000 0000000080100010 00000001fdffffff 0000000000000000 head: 00fff00000000040 ffff88801ac41dc0 0000000000000000 dead000000000001 head: 0000000000000000 0000000080100010 00000001fdffffff 0000000000000000 head: 00fff00000000003 ffffea0001f8ee01 ffffffffffffffff 0000000000000000 head: 0000000000000008 0000000000000000 00000000ffffffff 0000000000000000 page dumped because: kasan: bad access detected page_owner tracks the page as allocated page last allocated via order 3, migratetype Unmovable, gfp_mask 0xd2820(GFP_ATOMIC|__GFP_NOWARN|__GFP_NORETRY|__GFP_COMP|__GFP_NOMEMALLOC), pid 2509, tgid 2509 (kworker/u8:9), ts 118198765100, free_ts 118188499462 set_page_owner include/linux/page_owner.h:32 [inline] post_alloc_hook+0x2d1/0x350 mm/page_alloc.c:1500 prep_new_page mm/page_alloc.c:1508 [inline] get_page_from_freelist+0x1351/0x2e50 mm/page_alloc.c:3446 __alloc_pages_noprof+0x22b/0x2460 mm/page_alloc.c:4702 __alloc_pages_node_noprof include/linux/gfp.h:269 [inline] alloc_pages_node_noprof include/linux/gfp.h:296 [inline] alloc_slab_page+0x4e/0xf0 mm/slub.c:2319 allocate_slab mm/slub.c:2482 [inline] new_slab+0x84/0x260 mm/slub.c:2535 ___slab_alloc+0xdac/0x1870 mm/slub.c:3721 __slab_alloc.constprop.0+0x56/0xb0 mm/slub.c:3811 __slab_alloc_node mm/slub.c:3864 [inline] slab_alloc_node mm/slub.c:4026 [inline] __do_kmalloc_node mm/slub.c:4158 [inline] __kmalloc_node_track_caller_noprof+0x355/0x430 mm/slub.c:4178 kmalloc_reserve+0xef/0x2c0 net/core/skbuff.c:609 __alloc_skb+0x164/0x380 net/core/skbuff.c:678 alloc_skb include/linux/skbuff.h:1322 [inline] nlmsg_new include/net/netlink.h:1015 [inline] inet6_rt_notify+0xf0/0x2c0 net/ipv6/route.c:6180 fib6_add_rt2node net/ipv6/ip6_fib.c:1266 [inline] fib6_add+0x2524/0x4b50 net/ipv6/ip6_fib.c:1495 __ip6_ins_rt net/ipv6/route.c:1314 [inline] ip6_route_add+0x8d/0x1c0 net/ipv6/route.c:3857 addrconf_add_mroute+0x1de/0x350 net/ipv6/addrconf.c:2550 addrconf_add_dev+0x14e/0x1c0 net/ipv6/addrconf.c:2568 addrconf_dev_config net/ipv6/addrconf.c:3484 [inline] addrconf_init_auto_addrs+0x380/0x820 net/ipv6/addrconf.c:3572 page last free pid 5239 tgid 5239 stack trace: reset_page_owner include/linux/page_owner.h:25 [inline] free_pages_prepare mm/page_alloc.c:1101 [inline] free_unref_page+0x64a/0xe40 mm/page_alloc.c:2619 __put_partials+0x14c/0x170 mm/slub.c:3049 qlink_free mm/kasan/quarantine.c:163 [inline] qlist_free_all+0x4e/0x140 mm/kasan/quarantine.c:179 kasan_quarantine_reduce+0x192/0x1e0 mm/kasan/quarantine.c:286 __kasan_slab_alloc+0x69/0x90 mm/kasan/common.c:322 kasan_slab_alloc include/linux/kasan.h:201 [inline] slab_post_alloc_hook mm/slub.c:3989 [inline] slab_alloc_node mm/slub.c:4038 [inline] __kmalloc_cache_noprof+0x11e/0x300 mm/slub.c:4185 kmalloc_noprof include/linux/slab.h:690 [inline] kzalloc_noprof include/linux/slab.h:816 [inline] inet_alloc_ifa+0x43/0x190 net/ipv4/devinet.c:223 rtm_to_ifaddr.constprop.0+0x20a/0xc10 net/ipv4/devinet.c:878 inet_rtm_newaddr+0x125/0xae0 net/ipv4/devinet.c:963 rtnetlink_rcv_msg+0x3ca/0xea0 net/core/rtnetlink.c:6646 netlink_rcv_skb+0x16e/0x440 net/netlink/af_netlink.c:2550 netlink_unicast_kernel net/netlink/af_netlink.c:1331 [inline] netlink_unicast+0x53f/0x7f0 net/netlink/af_netlink.c:1357 netlink_sendmsg+0x8b8/0xd70 net/netlink/af_netlink.c:1901 sock_sendmsg_nosec net/socket.c:730 [inline] __sock_sendmsg net/socket.c:745 [inline] __sys_sendto+0x47c/0x4d0 net/socket.c:2210 __do_sys_sendto net/socket.c:2222 [inline] __se_sys_sendto net/socket.c:2218 [inline] __x64_sys_sendto+0xe0/0x1c0 net/socket.c:2218 do_syscall_x64 arch/x86/entry/common.c:52 [inline] do_syscall_64+0xcd/0x250 arch/x86/entry/common.c:83 Memory state around the buggy address: ffff88807e3bef00: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ffff88807e3bef80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc >ffff88807e3bf000: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ^ ffff88807e3bf080: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ffff88807e3bf100: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ==================================================================