================================================================== 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_inlinedir_to_tree+0x555/0x1160 fs/ext4/inline.c:1399 Read of size 68 at addr ffff8881eb092ec9 by task syz-executor.0/415 CPU: 1 PID: 415 Comm: syz-executor.0 Not tainted 5.4.290-syzkaller-05053-g41adfeb3d639 #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 02/12/2025 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 check_memory_region_inline mm/kasan/generic.c:141 [inline] check_memory_region+0x272/0x280 mm/kasan/generic.c:191 memcpy+0x25/0x50 mm/kasan/common.c:123 ext4_read_inline_data fs/ext4/inline.c:209 [inline] ext4_inlinedir_to_tree+0x555/0x1160 fs/ext4/inline.c:1399 ext4_htree_fill_tree+0x5b2/0x1770 fs/ext4/namei.c:1175 ext4_dx_readdir fs/ext4/dir.c:599 [inline] ext4_readdir+0x2c1d/0x3610 fs/ext4/dir.c:142 iterate_dir+0x266/0x4e0 fs/readdir.c:64 ksys_getdents64+0x21b/0x4c0 fs/readdir.c:374 __do_sys_getdents64 fs/readdir.c:395 [inline] __se_sys_getdents64 fs/readdir.c:392 [inline] __x64_sys_getdents64+0x76/0x80 fs/readdir.c:392 do_syscall_64+0xca/0x1c0 arch/x86/entry/common.c:290 entry_SYSCALL_64_after_hwframe+0x5c/0xc1 RIP: 0033:0x7f48a540b363 Code: c1 66 0f 1f 44 00 00 48 83 c4 08 48 89 ef 5b 5d e9 62 8b fa 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 b0 ff ff ff f7 d8 RSP: 002b:00007ffde09618d8 EFLAGS: 00000293 ORIG_RAX: 00000000000000d9 RAX: ffffffffffffffda RBX: 000055557d706890 RCX: 00007f48a540b363 RDX: 0000000000008000 RSI: 000055557d706890 RDI: 0000000000000006 RBP: 000055557d706864 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000001000 R11: 0000000000000293 R12: ffffffffffffffb0 R13: 0000000000000016 R14: 000055557d706860 R15: 0000000000000008 Allocated by task 9: 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 slab_post_alloc_hook mm/slab.h:584 [inline] slab_alloc_node mm/slub.c:2829 [inline] slab_alloc mm/slub.c:2837 [inline] __kmalloc_track_caller+0x100/0x2b0 mm/slub.c:4449 __kmalloc_reserve net/core/skbuff.c:142 [inline] __alloc_skb+0xb4/0x4d0 net/core/skbuff.c:210 alloc_skb include/linux/skbuff.h:1080 [inline] alloc_skb_with_frags+0x92/0x550 net/core/skbuff.c:5881 sock_alloc_send_pskb+0x831/0x950 net/core/sock.c:2276 mld_newpack+0x1b2/0x990 net/ipv6/mcast.c:1607 add_grhead net/ipv6/mcast.c:1710 [inline] add_grec+0xec5/0x12f0 net/ipv6/mcast.c:1841 mld_send_cr net/ipv6/mcast.c:1967 [inline] mld_ifc_timer_expire+0x73d/0xc10 net/ipv6/mcast.c:2474 call_timer_fn+0x36/0x390 kernel/time/timer.c:1448 expire_timers kernel/time/timer.c:1493 [inline] __run_timers+0x879/0xbe0 kernel/time/timer.c:1817 run_timer_softirq+0x63/0xf0 kernel/time/timer.c:1830 __do_softirq+0x23b/0x6b7 kernel/softirq.c:292 Freed by task 9: 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 skb_release_all net/core/skbuff.c:675 [inline] __kfree_skb net/core/skbuff.c:689 [inline] kfree_skb+0xb8/0x3c0 net/core/skbuff.c:708 ip6_mc_input+0x236/0x2a0 net/ipv6/ip6_input.c:550 NF_HOOK include/linux/netfilter.h:303 [inline] ipv6_rcv+0xee/0x280 net/ipv6/ip6_input.c:278 __netif_receive_skb_one_core net/core/dev.c:4991 [inline] __netif_receive_skb+0x1c6/0x530 net/core/dev.c:5105 process_backlog+0x34f/0x680 net/core/dev.c:5940 napi_poll net/core/dev.c:6386 [inline] net_rx_action+0x53f/0x1160 net/core/dev.c:6454 __do_softirq+0x23b/0x6b7 kernel/softirq.c:292 The buggy address belongs to the object at ffff8881eb092000 which belongs to the cache kmalloc-2k of size 2048 The buggy address is located 1737 bytes to the right of 2048-byte region [ffff8881eb092000, ffff8881eb092800) The buggy address belongs to the page: page:ffffea0007ac2400 refcount:1 mapcount:0 mapping:ffff8881f5c0c000 index:0x0 compound_mapcount: 0 flags: 0x8000000000010200(slab|head) raw: 8000000000010200 dead000000000100 dead000000000122 ffff8881f5c0c000 raw: 0000000000000000 0000000000080008 00000001ffffffff 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 0x1d28c0(GFP_NOWAIT|__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_track_caller+0x16d/0x2b0 mm/slub.c:4449 __kmalloc_reserve net/core/skbuff.c:142 [inline] pskb_expand_head+0x10c/0x10b0 net/core/skbuff.c:1653 netlink_trim+0x198/0x230 net/netlink/af_netlink.c:1288 netlink_broadcast_filtered+0x62/0x1280 net/netlink/af_netlink.c:1493 netlink_broadcast net/netlink/af_netlink.c:1538 [inline] nlmsg_multicast include/net/netlink.h:968 [inline] nlmsg_notify+0xf7/0x1b0 net/netlink/af_netlink.c:2510 netdev_state_change+0x15a/0x1e0 net/core/dev.c:1275 linkwatch_do_dev+0xfc/0x130 net/core/link_watch.c:159 __linkwatch_run_queue+0x4cc/0x7f0 net/core/link_watch.c:205 linkwatch_event+0x48/0x50 net/core/link_watch.c:244 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 free_slab mm/slub.c:1789 [inline] discard_slab mm/slub.c:1795 [inline] unfreeze_partials+0x14e/0x180 mm/slub.c:2288 put_cpu_partial+0x44/0x180 mm/slub.c:2324 __slab_free+0x297/0x360 mm/slub.c:2971 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_trace+0xdc/0x260 mm/slub.c:2854 kmalloc include/linux/slab.h:556 [inline] syslog_print+0x56/0x3e0 kernel/printk/printk.c:1386 do_syslog+0x8f1/0x930 kernel/printk/printk.c:1559 __do_sys_syslog kernel/printk/printk.c:1650 [inline] __se_sys_syslog kernel/printk/printk.c:1648 [inline] __x64_sys_syslog+0x78/0x90 kernel/printk/printk.c:1648 do_syscall_64+0xca/0x1c0 arch/x86/entry/common.c:290 entry_SYSCALL_64_after_hwframe+0x5c/0xc1 Memory state around the buggy address: ffff8881eb092d80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ffff8881eb092e00: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc >ffff8881eb092e80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ^ ffff8881eb092f00: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ffff8881eb092f80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ================================================================== EXT4-fs error (device loop0): ext4_inlinedir_to_tree:1437: inode #12: block 7: comm syz-executor.0: path /root/syzkaller-testdir3790668539/syzkaller.kpTneB/0/file0/file0: bad entry in directory: directory entry overrun - offset=34816, inode=2538880996, rec_len=34812, size=128 fake=0 EXT4-fs error (device loop0): empty_inline_dir:1847: inode #12: block 7: comm syz-executor.0: bad entry in directory: directory entry overrun - offset=4, inode=2538880996, rec_len=34812, size=60 fake=0 EXT4-fs warning (device loop0): empty_inline_dir:1854: bad inline directory (dir #12) - inode 2538880996, rec_len 34812, name_len 234inline size 60 EXT4-fs error (device loop0): __ext4_iget:5217: inode #16: block 786432: comm syz-executor.0: invalid block EXT4-fs error (device loop0): __ext4_iget:5217: inode #16: block 786432: comm syz-executor.0: invalid block