================================================================== 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+0x435/0xd90 fs/ext4/inline.c:1515 Read of size 68 at addr ffff88810f5446d3 by task syz-executor/355 CPU: 0 PID: 355 Comm: syz-executor Not tainted 5.10.239-syzkaller #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 05/07/2025 Call Trace: __dump_stack+0x21/0x24 lib/dump_stack.c:77 dump_stack_lvl+0x169/0x1d8 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+0xe2/0x130 mm/kasan/report.c:452 check_region_inline mm/kasan/generic.c:-1 [inline] kasan_check_range+0x280/0x290 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+0x435/0xd90 fs/ext4/inline.c:1515 ext4_readdir+0x380/0x39b0 fs/ext4/dir.c:161 iterate_dir+0x260/0x570 fs/readdir.c:-1 __do_sys_getdents64 fs/readdir.c:369 [inline] __se_sys_getdents64+0xe5/0x240 fs/readdir.c:354 __x64_sys_getdents64+0x7b/0x90 fs/readdir.c:354 do_syscall_64+0x31/0x40 arch/x86/entry/common.c:46 entry_SYSCALL_64_after_hwframe+0x61/0xcb RIP: 0033:0x7fdb6e094313 Code: c1 66 0f 1f 44 00 00 48 83 c4 08 48 89 ef 5b 5d e9 62 3e f8 ff 66 90 b8 ff ff ff 7f 48 39 c2 48 0f 47 d0 b8 d9 00 00 00 0f 05 <48> 3d 00 f0 ff ff 77 05 c3 0f 1f 40 00 48 c7 c2 a8 ff ff ff f7 d8 RSP: 002b:00007ffda33f75d8 EFLAGS: 00000293 ORIG_RAX: 00000000000000d9 RAX: ffffffffffffffda RBX: 000055558bd4b520 RCX: 00007fdb6e094313 RDX: 0000000000008000 RSI: 000055558bd4b520 RDI: 0000000000000006 RBP: 000055558bd4b4f4 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000001000 R11: 0000000000000293 R12: ffffffffffffffa8 R13: 0000000000000016 R14: 000055558bd4b4f0 R15: 00007ffda33fa980 Allocated by task 358: 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_kmalloc mm/kasan/common.c:509 [inline] __kasan_kmalloc+0xda/0x110 mm/kasan/common.c:518 kasan_kmalloc include/linux/kasan.h:254 [inline] kmem_cache_alloc_trace+0x184/0x2e0 mm/slub.c:2974 kmalloc include/linux/slab.h:552 [inline] kzalloc include/linux/slab.h:664 [inline] mca_alloc net/ipv6/mcast.c:853 [inline] __ipv6_dev_mc_inc+0x39e/0x9b0 net/ipv6/mcast.c:911 ipv6_dev_mc_inc+0x1f/0x30 net/ipv6/mcast.c:935 ipv6_add_dev+0xc84/0x10a0 net/ipv6/addrconf.c:461 addrconf_notify+0x582/0xe90 net/ipv6/addrconf.c:3567 notifier_call_chain kernel/notifier.c:83 [inline] raw_notifier_call_chain+0x90/0x100 kernel/notifier.c:410 call_netdevice_notifiers_info net/core/dev.c:2054 [inline] call_netdevice_notifiers_extack net/core/dev.c:2066 [inline] call_netdevice_notifiers+0x111/0x190 net/core/dev.c:2080 register_netdevice+0x1043/0x13c0 net/core/dev.c:10087 veth_newlink+0x853/0xbb0 drivers/net/veth.c:1387 __rtnl_newlink net/core/rtnetlink.c:3482 [inline] rtnl_newlink+0x11bd/0x1640 net/core/rtnetlink.c:3530 rtnetlink_rcv_msg+0x9db/0xb90 net/core/rtnetlink.c:5610 netlink_rcv_skb+0x1e0/0x430 net/netlink/af_netlink.c:2485 rtnetlink_rcv+0x1c/0x20 net/core/rtnetlink.c:5628 netlink_unicast_kernel net/netlink/af_netlink.c:1307 [inline] netlink_unicast+0x87c/0xa40 net/netlink/af_netlink.c:1333 netlink_sendmsg+0x88d/0xb30 net/netlink/af_netlink.c:1901 sock_sendmsg_nosec net/socket.c:652 [inline] __sock_sendmsg net/socket.c:664 [inline] __sys_sendto+0x41d/0x580 net/socket.c:2006 __do_sys_sendto net/socket.c:2018 [inline] __se_sys_sendto net/socket.c:2014 [inline] __x64_sys_sendto+0xe5/0x100 net/socket.c:2014 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 ffff88810f544600 which belongs to the cache kmalloc-192 of size 192 The buggy address is located 19 bytes to the right of 192-byte region [ffff88810f544600, ffff88810f5446c0) The buggy address belongs to the page: page:ffffea00043d5100 refcount:1 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x10f544 flags: 0x4000000000000200(slab) raw: 4000000000000200 0000000000000000 0000000100000001 ffff888100043380 raw: 0000000000000000 0000000000100010 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 96, ts 5065759646, free_ts 5065738755 set_page_owner include/linux/page_owner.h:35 [inline] post_alloc_hook mm/page_alloc.c:2456 [inline] prep_new_page+0x179/0x180 mm/page_alloc.c:2462 get_page_from_freelist+0x2235/0x23d0 mm/page_alloc.c:4254 __alloc_pages_nodemask+0x268/0x5f0 mm/page_alloc.c:5357 alloc_slab_page mm/slub.c:-1 [inline] allocate_slab mm/slub.c:1808 [inline] new_slab+0x84/0x3f0 mm/slub.c:1869 new_slab_objects mm/slub.c:2627 [inline] ___slab_alloc+0x2a6/0x450 mm/slub.c:2791 __slab_alloc+0x63/0xa0 mm/slub.c:2831 slab_alloc_node mm/slub.c:2913 [inline] slab_alloc mm/slub.c:2955 [inline] kmem_cache_alloc_trace+0x1b3/0x2e0 mm/slub.c:2972 kmalloc include/linux/slab.h:552 [inline] kzalloc include/linux/slab.h:664 [inline] kernfs_fop_open+0x343/0xb30 fs/kernfs/file.c:628 do_dentry_open+0x793/0x1090 fs/open.c:819 vfs_open+0x73/0x80 fs/open.c:942 do_open fs/namei.c:3391 [inline] path_openat+0x27ad/0x3160 fs/namei.c:3509 do_filp_open+0x1b3/0x3e0 fs/namei.c:3536 do_sys_openat2+0x14c/0x6d0 fs/open.c:1217 do_sys_open fs/open.c:1233 [inline] __do_sys_openat fs/open.c:1249 [inline] __se_sys_openat fs/open.c:1244 [inline] __x64_sys_openat+0x136/0x160 fs/open.c:1244 do_syscall_64+0x31/0x40 arch/x86/entry/common.c:46 entry_SYSCALL_64_after_hwframe+0x61/0xcb 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:5416 [inline] __free_pages+0x14b/0x380 mm/page_alloc.c:5427 free_pages+0x82/0x90 mm/page_alloc.c:5438 selinux_genfs_get_sid+0x20b/0x250 security/selinux/hooks.c:1326 inode_doinit_with_dentry+0x86d/0xd70 security/selinux/hooks.c:1523 selinux_d_instantiate+0x27/0x40 security/selinux/hooks.c:6389 security_d_instantiate+0x9e/0xf0 security/security.c:1980 d_splice_alias+0x6d/0x390 fs/dcache.c:3036 kernfs_iop_lookup+0x2c5/0x310 fs/kernfs/dir.c:1178 lookup_open fs/namei.c:3226 [inline] open_last_lookups fs/namei.c:3317 [inline] path_openat+0x1127/0x3160 fs/namei.c:3506 do_filp_open+0x1b3/0x3e0 fs/namei.c:3536 do_sys_openat2+0x14c/0x6d0 fs/open.c:1217 do_sys_open fs/open.c:1233 [inline] __do_sys_openat fs/open.c:1249 [inline] __se_sys_openat fs/open.c:1244 [inline] __x64_sys_openat+0x136/0x160 fs/open.c:1244 do_syscall_64+0x31/0x40 arch/x86/entry/common.c:46 entry_SYSCALL_64_after_hwframe+0x61/0xcb Memory state around the buggy address: ffff88810f544580: 00 00 00 00 00 00 00 00 fc fc fc fc fc fc fc fc ffff88810f544600: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 >ffff88810f544680: 00 00 00 00 fc fc fc fc fc fc fc fc fc fc fc fc ^ ffff88810f544700: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ffff88810f544780: 00 00 00 00 fc fc fc fc fc fc fc fc fc fc fc fc ================================================================== EXT4-fs error (device loop1): ext4_read_inline_dir:1596: inode #12: block 7: comm syz-executor: path /0/file1/file0: bad entry in directory: rec_len % 4 != 0 - offset=24, inode=2239623941, rec_len=29527, size=148 fake=0 EXT4-fs error (device loop1): ext4_read_inline_dir:1596: inode #12: block 7: comm syz-executor: path /0/file1/file0: bad entry in directory: rec_len % 4 != 0 - offset=24, inode=2239623941, rec_len=29527, size=148 fake=0 EXT4-fs error (device loop1): empty_inline_dir:1850: inode #12: block 7: comm syz-executor: bad entry in directory: rec_len % 4 != 0 - offset=4, inode=2239623941, rec_len=29527, size=60 fake=0 EXT4-fs warning (device loop1): empty_inline_dir:1857: bad inline directory (dir #12) - inode 2239623941, rec_len 29527, name_len 58inline size 60 EXT4-fs error (device loop1): ext4_read_inline_dir:1596: inode #12: block 7: comm syz-executor: path /0/file1/file0: bad entry in directory: rec_len % 4 != 0 - offset=24, inode=2239623941, rec_len=29527, size=148 fake=0 EXT4-fs error (device loop1): ext4_read_inline_dir:1596: inode #12: block 7: comm syz-executor: path /0/file1/file0: bad entry in directory: rec_len % 4 != 0 - offset=24, inode=2239623941, rec_len=29527, size=148 fake=0 EXT4-fs error (device loop1): empty_inline_dir:1850: inode #12: block 7: comm syz-executor: bad entry in directory: rec_len % 4 != 0 - offset=4, inode=2239623941, rec_len=29527, size=60 fake=0 EXT4-fs warning (device loop1): empty_inline_dir:1857: bad inline directory (dir #12) - inode 2239623941, rec_len 29527, name_len 58inline size 60 EXT4-fs error (device loop1): ext4_read_inline_dir:1596: inode #12: block 7: comm syz-executor: path /0/file1/file0: bad entry in directory: rec_len % 4 != 0 - offset=24, inode=2239623941, rec_len=29527, size=148 fake=0 EXT4-fs error (device loop1): ext4_read_inline_dir:1596: inode #12: block 7: comm syz-executor: path /0/file1/file0: bad entry in directory: rec_len % 4 != 0 - offset=24, inode=2239623941, rec_len=29527, size=148 fake=0 EXT4-fs warning (device loop1): empty_inline_dir:1857: bad inline directory (dir #12) - inode 2239623941, rec_len 29527, name_len 58inline size 60 EXT4-fs warning (device loop1): empty_inline_dir:1857: bad inline directory (dir #12) - inode 2239623941, rec_len 29527, name_len 58inline size 60 EXT4-fs warning (device loop1): empty_inline_dir:1857: bad inline directory (dir #12) - inode 2239623941, rec_len 29527, name_len 58inline size 60 EXT4-fs warning (device loop1): empty_inline_dir:1857: bad inline directory (dir #12) - inode 2239623941, rec_len 29527, name_len 58inline size 60 EXT4-fs warning (device loop1): empty_inline_dir:1857: bad inline directory (dir #12) - inode 2239623941, rec_len 29527, name_len 58inline size 60 EXT4-fs warning (device loop1): empty_inline_dir:1857: bad inline directory (dir #12) - inode 2239623941, rec_len 29527, name_len 58inline size 60 EXT4-fs warning (device loop1): empty_inline_dir:1857: bad inline directory (dir #12) - inode 2239623941, rec_len 29527, name_len 58inline size 60 EXT4-fs warning (device loop1): empty_inline_dir:1857: bad inline directory (dir #12) - inode 2239623941, rec_len 29527, name_len 58inline size 60