EXT4-fs error (device loop4): xattr_find_entry:297: inode #12: comm syz.4.306: corrupted xattr entries ================================================================== BUG: KASAN: slab-out-of-bounds in ext4_read_inline_data fs/ext4/inline.c:209 [inline] BUG: KASAN: slab-out-of-bounds in ext4_read_inline_dir+0x414/0xd00 fs/ext4/inline.c:1541 Read of size 68 at addr ffff888126c5a719 by task syz.4.306/1469 CPU: 1 PID: 1469 Comm: syz.4.306 Tainted: G W syzkaller #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 05/09/2026 Call Trace: __dump_stack+0x21/0x24 lib/dump_stack.c:77 dump_stack_lvl+0x1a7/0x208 lib/dump_stack.c:118 print_address_description+0x7f/0x2c0 mm/kasan/report.c:248 __kasan_report mm/kasan/report.c:435 [inline] kasan_report+0x100/0x140 mm/kasan/report.c:452 check_region_inline mm/kasan/generic.c:-1 [inline] kasan_check_range+0x249/0x2a0 mm/kasan/generic.c:189 memcpy+0x2d/0x70 mm/kasan/shadow.c:65 ext4_read_inline_data fs/ext4/inline.c:209 [inline] ext4_read_inline_dir+0x414/0xd00 fs/ext4/inline.c:1541 ext4_readdir+0x3a0/0x3a80 fs/ext4/dir.c:161 iterate_dir+0x25c/0x560 fs/readdir.c:-1 __do_sys_getdents fs/readdir.c:286 [inline] __se_sys_getdents+0xf2/0x250 fs/readdir.c:271 __x64_sys_getdents+0x7b/0x90 fs/readdir.c:271 do_syscall_64+0x31/0x40 arch/x86/entry/common.c:46 entry_SYSCALL_64_after_hwframe+0x61/0xcb RIP: 0033:0x7fe08ae91e59 Code: ff c3 66 2e 0f 1f 84 00 00 00 00 00 0f 1f 44 00 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 e8 ff ff ff f7 d8 64 89 01 48 RSP: 002b:00007fe0898eb028 EFLAGS: 00000246 ORIG_RAX: 000000000000004e RAX: ffffffffffffffda RBX: 00007fe08b119fa0 RCX: 00007fe08ae91e59 RDX: 00000000000000b8 RSI: 0000200000001fc0 RDI: 0000000000000008 RBP: 00007fe08af27e6f R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000 R13: 00007fe08b11a038 R14: 00007fe08b119fa0 R15: 00007ffd6f4b9a58 Allocated by task 283: 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+0xb7/0xe0 mm/kasan/common.c:463 kasan_slab_alloc include/linux/kasan.h:244 [inline] slab_post_alloc_hook+0x5d/0x2f0 mm/slab.h:580 slab_alloc_node mm/slub.c:2952 [inline] slab_alloc mm/slub.c:2960 [inline] kmem_cache_alloc+0x15a/0x2d0 mm/slub.c:2965 kmem_cache_zalloc include/linux/slab.h:657 [inline] __kernfs_new_node+0xe1/0x670 fs/kernfs/dir.c:662 kernfs_new_node+0x150/0x260 fs/kernfs/dir.c:739 __kernfs_create_file+0x4e/0x270 fs/kernfs/file.c:987 sysfs_add_file_mode_ns+0x29a/0x350 fs/sysfs/file.c:306 create_files fs/sysfs/group.c:64 [inline] internal_create_group+0x492/0xd00 fs/sysfs/group.c:149 internal_create_groups fs/sysfs/group.c:189 [inline] sysfs_create_groups+0x58/0x120 fs/sysfs/group.c:215 device_add_groups drivers/base/core.c:2364 [inline] device_add_attrs+0x8c/0x430 drivers/base/core.c:2512 device_add+0x4f5/0xc00 drivers/base/core.c:3224 netdev_register_kobject+0x18e/0x330 net/core/net-sysfs.c:1997 register_netdevice+0xdae/0x13a0 net/core/dev.c:10067 veth_newlink+0x696/0xb60 drivers/net/veth.c:1360 __rtnl_newlink net/core/rtnetlink.c:3486 [inline] rtnl_newlink+0x1307/0x1830 net/core/rtnetlink.c:3534 rtnetlink_rcv_msg+0x9e9/0xca0 net/core/rtnetlink.c:5614 netlink_rcv_skb+0x1e9/0x430 net/netlink/af_netlink.c:2508 rtnetlink_rcv+0x1c/0x20 net/core/rtnetlink.c:5632 netlink_unicast_kernel net/netlink/af_netlink.c:1314 [inline] netlink_unicast+0x86c/0xa30 net/netlink/af_netlink.c:1340 netlink_sendmsg+0x949/0xb70 net/netlink/af_netlink.c:1919 sock_sendmsg_nosec net/socket.c:652 [inline] __sock_sendmsg net/socket.c:664 [inline] __sys_sendto+0x467/0x620 net/socket.c:2007 __do_sys_sendto net/socket.c:2019 [inline] __se_sys_sendto net/socket.c:2015 [inline] __x64_sys_sendto+0xe5/0x100 net/socket.c:2015 do_syscall_64+0x31/0x40 arch/x86/entry/common.c:46 entry_SYSCALL_64_after_hwframe+0x61/0xcb The buggy address belongs to the object at ffff888126c5a680 which belongs to the cache kernfs_node_cache of size 144 The buggy address is located 9 bytes to the right of 144-byte region [ffff888126c5a680, ffff888126c5a710) The buggy address belongs to the page: page:ffffea00049b1680 refcount:1 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x126c5a flags: 0x4000000000000200(slab) raw: 4000000000000200 dead000000000100 dead000000000122 ffff88810018a600 raw: 0000000000000000 0000000000130013 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 283, ts 19643356027, free_ts 19643313249 set_page_owner include/linux/page_owner.h:35 [inline] post_alloc_hook mm/page_alloc.c:2456 [inline] prep_new_page+0x176/0x190 mm/page_alloc.c:2462 get_page_from_freelist+0x225f/0x23f0 mm/page_alloc.c:4254 __alloc_pages_nodemask+0x29a/0x640 mm/page_alloc.c:5384 alloc_slab_page mm/slub.c:-1 [inline] allocate_slab mm/slub.c:1813 [inline] new_slab+0x84/0x3f0 mm/slub.c:1874 new_slab_objects mm/slub.c:2632 [inline] ___slab_alloc+0x2f8/0x4c0 mm/slub.c:2796 __slab_alloc+0x63/0xa0 mm/slub.c:2836 slab_alloc_node mm/slub.c:2918 [inline] slab_alloc mm/slub.c:2960 [inline] kmem_cache_alloc+0x1a4/0x2d0 mm/slub.c:2965 kmem_cache_zalloc include/linux/slab.h:657 [inline] __kernfs_new_node+0xe1/0x670 fs/kernfs/dir.c:662 kernfs_new_node+0x150/0x260 fs/kernfs/dir.c:739 __kernfs_create_file+0x4e/0x270 fs/kernfs/file.c:987 sysfs_add_file_mode_ns+0x29a/0x350 fs/sysfs/file.c:306 create_files fs/sysfs/group.c:64 [inline] internal_create_group+0x492/0xd00 fs/sysfs/group.c:149 internal_create_groups fs/sysfs/group.c:189 [inline] sysfs_create_groups+0x58/0x120 fs/sysfs/group.c:215 device_add_groups drivers/base/core.c:2364 [inline] device_add_attrs+0x8c/0x430 drivers/base/core.c:2512 device_add+0x4f5/0xc00 drivers/base/core.c:3224 netdev_register_kobject+0x18e/0x330 net/core/net-sysfs.c:1997 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+0x2b7/0x2d0 mm/page_alloc.c:3336 free_unref_page mm/page_alloc.c:3391 [inline] free_the_page mm/page_alloc.c:5443 [inline] __free_pages+0x146/0x390 mm/page_alloc.c:5454 free_pages+0x82/0x90 mm/page_alloc.c:5465 __dev_alloc_name net/core/dev.c:1227 [inline] dev_alloc_name_ns+0x801/0x880 net/core/dev.c:1249 dev_get_valid_name+0x1e8/0x370 net/core/dev.c:1284 register_netdevice+0x1c0/0x13a0 net/core/dev.c:9986 veth_newlink+0x696/0xb60 drivers/net/veth.c:1360 __rtnl_newlink net/core/rtnetlink.c:3486 [inline] rtnl_newlink+0x1307/0x1830 net/core/rtnetlink.c:3534 rtnetlink_rcv_msg+0x9e9/0xca0 net/core/rtnetlink.c:5614 netlink_rcv_skb+0x1e9/0x430 net/netlink/af_netlink.c:2508 rtnetlink_rcv+0x1c/0x20 net/core/rtnetlink.c:5632 netlink_unicast_kernel net/netlink/af_netlink.c:1314 [inline] netlink_unicast+0x86c/0xa30 net/netlink/af_netlink.c:1340 netlink_sendmsg+0x949/0xb70 net/netlink/af_netlink.c:1919 sock_sendmsg_nosec net/socket.c:652 [inline] __sock_sendmsg net/socket.c:664 [inline] __sys_sendto+0x467/0x620 net/socket.c:2007 __do_sys_sendto net/socket.c:2019 [inline] __se_sys_sendto net/socket.c:2015 [inline] __x64_sys_sendto+0xe5/0x100 net/socket.c:2015 do_syscall_64+0x31/0x40 arch/x86/entry/common.c:46 Memory state around the buggy address: ffff888126c5a600: 00 00 00 00 00 00 00 00 fc fc fc fc fc fc fc fc ffff888126c5a680: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 >ffff888126c5a700: 00 00 fc fc fc fc fc fc fc fc 00 00 00 00 00 00 ^ ffff888126c5a780: 00 00 00 00 00 00 00 00 00 00 00 00 fc fc fc fc ffff888126c5a800: fc fc fc fc 00 00 00 00 00 00 00 00 00 00 00 00 ================================================================== EXT4-fs error (device loop4): ext4_read_inline_dir:1622: inode #12: block 7: comm syz.4.306: path /53/file0/file0: bad entry in directory: rec_len % 4 != 0 - offset=24, inode=1221132332, rec_len=35241, size=148 fake=0