================================================================== BUG: KASAN: use-after-free in ext4_read_inline_data fs/ext4/inline.c:210 [inline] BUG: KASAN: use-after-free in ext4_read_inline_dir+0x448/0xdb0 fs/ext4/inline.c:1551 Read of size 68 at addr ffff88811b54c6d3 by task syz-executor/460 CPU: 1 PID: 460 Comm: syz-executor Not tainted syzkaller #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 02/12/2026 Call Trace: __dump_stack+0x21/0x30 lib/dump_stack.c:88 dump_stack_lvl+0x110/0x170 lib/dump_stack.c:106 print_address_description+0x7f/0x2c0 mm/kasan/report.c:248 __kasan_report mm/kasan/report.c:427 [inline] kasan_report+0xf1/0x140 mm/kasan/report.c:444 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:210 [inline] ext4_read_inline_dir+0x448/0xdb0 fs/ext4/inline.c:1551 ext4_readdir+0x3a2/0x3b20 fs/ext4/dir.c:161 iterate_dir+0x260/0x600 fs/readdir.c:-1 __do_sys_getdents64 fs/readdir.c:369 [inline] __se_sys_getdents64+0xf2/0x250 fs/readdir.c:354 __x64_sys_getdents64+0x7b/0x90 fs/readdir.c:354 x64_sys_call+0x592/0x9a0 arch/x86/include/generated/asm/syscalls_64.h:218 do_syscall_x64 arch/x86/entry/common.c:50 [inline] do_syscall_64+0x4c/0xa0 arch/x86/entry/common.c:80 entry_SYSCALL_64_after_hwframe+0x66/0xd0 RIP: 0033:0x7f5adf5f68b3 Code: c7 c0 e8 ff ff ff 64 c7 00 16 00 00 00 31 c0 eb 9e e8 81 9b fd ff 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 e8 ff ff ff f7 d8 RSP: 002b:00007fff4175ca08 EFLAGS: 00000293 ORIG_RAX: 00000000000000d9 RAX: ffffffffffffffda RBX: 000055558d285950 RCX: 00007f5adf5f68b3 RDX: 0000000000008000 RSI: 000055558d285980 RDI: 0000000000000006 RBP: 000055558d285980 R08: 00007f5adf806cc0 R09: 0000000000000001 R10: 0000000000000000 R11: 0000000000000293 R12: 000055558d285954 R13: ffffffffffffffe8 R14: 0000000000000016 R15: 00007fff4175fda0 Allocated by task 477: 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:433 [inline] __kasan_slab_alloc+0xbd/0xf0 mm/kasan/common.c:466 kasan_slab_alloc include/linux/kasan.h:217 [inline] slab_post_alloc_hook+0x4f/0x2b0 mm/slab.h:550 slab_alloc_node mm/slub.c:3245 [inline] slab_alloc mm/slub.c:3255 [inline] kmem_cache_alloc+0xf7/0x260 mm/slub.c:3260 kmem_cache_alloc_node include/linux/slab.h:492 [inline] __alloc_skb+0xe0/0x740 net/core/skbuff.c:416 alloc_skb include/linux/skbuff.h:1183 [inline] nlmsg_new include/net/netlink.h:953 [inline] inet6_rt_notify+0x293/0x480 net/ipv6/route.c:6173 fib6_add_rt2node net/ipv6/ip6_fib.c:1255 [inline] fib6_add+0x2296/0x3d70 net/ipv6/ip6_fib.c:1484 __ip6_ins_rt net/ipv6/route.c:1308 [inline] ip6_route_add+0x89/0x130 net/ipv6/route.c:3884 addrconf_prefix_route net/ipv6/addrconf.c:2468 [inline] addrconf_add_linklocal+0x3cd/0x660 net/ipv6/addrconf.c:3264 addrconf_addr_gen+0x53f/0x6a0 net/ipv6/addrconf.c:3393 addrconf_init_auto_addrs+0x836/0xba0 net/ipv6/addrconf.c:-1 addrconf_notify+0x95d/0xde0 net/ipv6/addrconf.c:3686 notifier_call_chain kernel/notifier.c:83 [inline] raw_notifier_call_chain+0x90/0x100 kernel/notifier.c:391 call_netdevice_notifiers_info net/core/dev.c:2070 [inline] netdev_state_change+0x175/0x230 net/core/dev.c:1461 linkwatch_do_dev+0x115/0x160 net/core/link_watch.c:167 __linkwatch_run_queue+0x4b1/0x7c0 net/core/link_watch.c:213 linkwatch_event+0x4c/0x60 net/core/link_watch.c:252 process_one_work+0x6be/0xba0 kernel/workqueue.c:2325 worker_thread+0xa59/0x1200 kernel/workqueue.c:2472 kthread+0x411/0x500 kernel/kthread.c:337 ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:287 Freed by task 477: kasan_save_stack mm/kasan/common.c:38 [inline] kasan_set_track+0x4a/0x70 mm/kasan/common.c:45 kasan_set_free_info+0x23/0x40 mm/kasan/generic.c:370 ____kasan_slab_free+0x125/0x160 mm/kasan/common.c:365 __kasan_slab_free+0x11/0x20 mm/kasan/common.c:373 kasan_slab_free include/linux/kasan.h:193 [inline] slab_free_hook mm/slub.c:1728 [inline] slab_free_freelist_hook+0xc2/0x190 mm/slub.c:1754 slab_free mm/slub.c:3526 [inline] kmem_cache_free+0x100/0x320 mm/slub.c:3544 kfree_skbmem+0x10c/0x180 net/core/skbuff.c:-1 __kfree_skb net/core/skbuff.c:758 [inline] consume_skb+0xb3/0x1f0 net/core/skbuff.c:930 netlink_broadcast_filtered+0x113a/0x1230 net/netlink/af_netlink.c:1538 netlink_broadcast net/netlink/af_netlink.c:1560 [inline] nlmsg_multicast include/net/netlink.h:1033 [inline] nlmsg_notify+0xed/0x1b0 net/netlink/af_netlink.c:2554 rtnl_notify+0x9a/0xc0 net/core/rtnetlink.c:759 inet6_rt_notify+0x371/0x480 net/ipv6/route.c:6185 fib6_add_rt2node net/ipv6/ip6_fib.c:1255 [inline] fib6_add+0x2296/0x3d70 net/ipv6/ip6_fib.c:1484 __ip6_ins_rt net/ipv6/route.c:1308 [inline] ip6_route_add+0x89/0x130 net/ipv6/route.c:3884 addrconf_prefix_route net/ipv6/addrconf.c:2468 [inline] addrconf_add_linklocal+0x3cd/0x660 net/ipv6/addrconf.c:3264 addrconf_addr_gen+0x53f/0x6a0 net/ipv6/addrconf.c:3393 addrconf_init_auto_addrs+0x836/0xba0 net/ipv6/addrconf.c:-1 addrconf_notify+0x95d/0xde0 net/ipv6/addrconf.c:3686 notifier_call_chain kernel/notifier.c:83 [inline] raw_notifier_call_chain+0x90/0x100 kernel/notifier.c:391 call_netdevice_notifiers_info net/core/dev.c:2070 [inline] netdev_state_change+0x175/0x230 net/core/dev.c:1461 linkwatch_do_dev+0x115/0x160 net/core/link_watch.c:167 __linkwatch_run_queue+0x4b1/0x7c0 net/core/link_watch.c:213 linkwatch_event+0x4c/0x60 net/core/link_watch.c:252 process_one_work+0x6be/0xba0 kernel/workqueue.c:2325 worker_thread+0xa59/0x1200 kernel/workqueue.c:2472 kthread+0x411/0x500 kernel/kthread.c:337 ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:287 The buggy address belongs to the object at ffff88811b54c640 which belongs to the cache skbuff_head_cache of size 248 The buggy address is located 147 bytes inside of 248-byte region [ffff88811b54c640, ffff88811b54c738) The buggy address belongs to the page: page:ffffea00046d5300 refcount:1 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x11b54c flags: 0x4000000000000200(slab|zone=1) raw: 4000000000000200 0000000000000000 0000000100000001 ffff8881081aaf00 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 0x12cc0(GFP_KERNEL|__GFP_NOWARN|__GFP_NORETRY), pid 139, ts 8404480092, free_ts 8399184929 set_page_owner include/linux/page_owner.h:33 [inline] post_alloc_hook+0x192/0x1b0 mm/page_alloc.c:2605 prep_new_page+0x1c/0x110 mm/page_alloc.c:2611 get_page_from_freelist+0x2d3a/0x2dc0 mm/page_alloc.c:4485 __alloc_pages+0x1a2/0x460 mm/page_alloc.c:5808 alloc_slab_page mm/slub.c:-1 [inline] allocate_slab mm/slub.c:1937 [inline] new_slab+0xa1/0x4d0 mm/slub.c:2000 ___slab_alloc+0x381/0x810 mm/slub.c:3033 __slab_alloc+0x49/0x90 mm/slub.c:3120 slab_alloc_node mm/slub.c:3211 [inline] slab_alloc mm/slub.c:3255 [inline] kmem_cache_alloc+0x138/0x260 mm/slub.c:3260 kmem_cache_alloc_node include/linux/slab.h:492 [inline] __alloc_skb+0xe0/0x740 net/core/skbuff.c:416 alloc_skb include/linux/skbuff.h:1183 [inline] alloc_skb_with_frags+0xa8/0x620 net/core/skbuff.c:6194 sock_alloc_send_pskb+0x87f/0x9a0 net/core/sock.c:2542 unix_dgram_sendmsg+0x5f7/0x1890 net/unix/af_unix.c:1816 unix_seqpacket_sendmsg+0x118/0x1e0 net/unix/af_unix.c:2277 sock_sendmsg_nosec net/socket.c:704 [inline] __sock_sendmsg net/socket.c:716 [inline] sock_write_iter+0x2a6/0x3a0 net/socket.c:1079 do_iter_readv_writev+0x478/0x5f0 fs/read_write.c:-1 do_iter_write+0x1fa/0x7b0 fs/read_write.c:855 page last free stack trace: reset_page_owner include/linux/page_owner.h:26 [inline] free_pages_prepare mm/page_alloc.c:1472 [inline] free_pcp_prepare mm/page_alloc.c:1544 [inline] free_unref_page_prepare+0x542/0x550 mm/page_alloc.c:3534 free_unref_page_list+0x13a/0x9d0 mm/page_alloc.c:3671 release_pages+0x1006/0x1060 mm/swap.c:1015 free_pages_and_swap_cache+0x86/0xa0 mm/swap_state.c:320 tlb_batch_pages_flush mm/mmu_gather.c:49 [inline] tlb_flush_mmu_free mm/mmu_gather.c:240 [inline] tlb_flush_mmu mm/mmu_gather.c:247 [inline] tlb_finish_mmu+0x17e/0x310 mm/mmu_gather.c:338 exit_mmap+0x43b/0x8b0 mm/mmap.c:3248 __mmput+0x93/0x320 kernel/fork.c:1180 mmput+0x50/0x150 kernel/fork.c:1203 exit_mm kernel/exit.c:554 [inline] do_exit+0x9f2/0x27e0 kernel/exit.c:876 do_group_exit+0x141/0x310 kernel/exit.c:1003 __do_sys_exit_group kernel/exit.c:1014 [inline] __se_sys_exit_group kernel/exit.c:1012 [inline] __x64_sys_exit_group+0x3f/0x40 kernel/exit.c:1012 x64_sys_call+0x832/0x9a0 arch/x86/include/generated/asm/syscalls_64.h:232 do_syscall_x64 arch/x86/entry/common.c:50 [inline] do_syscall_64+0x4c/0xa0 arch/x86/entry/common.c:80 entry_SYSCALL_64_after_hwframe+0x66/0xd0 Memory state around the buggy address: ffff88811b54c580: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fc ffff88811b54c600: fc fc fc fc fc fc fc fc fa fb fb fb fb fb fb fb >ffff88811b54c680: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ^ ffff88811b54c700: fb fb fb fb fb fb fb fc fc fc fc fc fc fc fc fc ffff88811b54c780: fa fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ================================================================== EXT4-fs error (device loop3): ext4_read_inline_dir:1632: 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 loop3): ext4_read_inline_dir:1632: 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 loop3): empty_inline_dir:1887: 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 loop3): empty_inline_dir:1894: bad inline directory (dir #12) - inode 2239623941, rec_len 29527, name_len 58inline size 60 EXT4-fs error (device loop3): ext4_read_inline_dir:1632: 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 loop3): ext4_read_inline_dir:1632: 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 loop3): empty_inline_dir:1887: 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 loop3): empty_inline_dir:1894: bad inline directory (dir #12) - inode 2239623941, rec_len 29527, name_len 58inline size 60 EXT4-fs error (device loop3): ext4_read_inline_dir:1632: 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 loop3): ext4_read_inline_dir:1632: 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 loop3): empty_inline_dir:1894: bad inline directory (dir #12) - inode 2239623941, rec_len 29527, name_len 58inline size 60 EXT4-fs warning (device loop3): empty_inline_dir:1894: bad inline directory (dir #12) - inode 2239623941, rec_len 29527, name_len 58inline size 60 EXT4-fs warning (device loop3): empty_inline_dir:1894: bad inline directory (dir #12) - inode 2239623941, rec_len 29527, name_len 58inline size 60 EXT4-fs warning (device loop3): empty_inline_dir:1894: bad inline directory (dir #12) - inode 2239623941, rec_len 29527, name_len 58inline size 60 EXT4-fs warning (device loop3): empty_inline_dir:1894: bad inline directory (dir #12) - inode 2239623941, rec_len 29527, name_len 58inline size 60 EXT4-fs warning (device loop3): empty_inline_dir:1894: bad inline directory (dir #12) - inode 2239623941, rec_len 29527, name_len 58inline size 60 EXT4-fs warning (device loop3): empty_inline_dir:1894: bad inline directory (dir #12) - inode 2239623941, rec_len 29527, name_len 58inline size 60 EXT4-fs warning (device loop3): empty_inline_dir:1894: bad inline directory (dir #12) - inode 2239623941, rec_len 29527, name_len 58inline size 60