================================================================== BUG: KASAN: slab-out-of-bounds in ext4_ext_binsearch fs/ext4/extents.c:826 [inline] BUG: KASAN: slab-out-of-bounds in ext4_find_extent+0xbeb/0xe20 fs/ext4/extents.c:945 Read of size 4 at addr ffff888128846e18 by task syz.1.7/326 CPU: 1 PID: 326 Comm: syz.1.7 Not tainted syzkaller #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 10/02/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 __asan_report_load4_noabort+0x14/0x20 mm/kasan/report_generic.c:308 ext4_ext_binsearch fs/ext4/extents.c:826 [inline] ext4_find_extent+0xbeb/0xe20 fs/ext4/extents.c:945 ext4_ext_map_blocks+0x1dc/0x5d80 fs/ext4/extents.c:4160 ext4_map_blocks+0x978/0x1bc0 fs/ext4/inode.c:674 _ext4_get_block+0x1bb/0x4b0 fs/ext4/inode.c:817 ext4_get_block_unwritten+0x2a/0x40 fs/ext4/inode.c:848 ext4_block_write_begin+0x567/0x1330 fs/ext4/inode.c:1101 ext4_write_begin+0x651/0x15a0 fs/ext4/ext4_jbd2.h:-1 ext4_da_write_begin+0x455/0xe80 fs/ext4/inode.c:3033 generic_perform_write+0x2be/0x510 mm/filemap.c:3509 ext4_buffered_write_iter+0x4b8/0x640 fs/ext4/file.c:271 ext4_file_write_iter+0x536/0x1980 fs/ext4/file.c:-1 call_write_iter include/linux/fs.h:2066 [inline] new_sync_write fs/read_write.c:518 [inline] vfs_write+0x725/0xd60 fs/read_write.c:605 ksys_pwrite64 fs/read_write.c:712 [inline] __do_sys_pwrite64 fs/read_write.c:722 [inline] __se_sys_pwrite64 fs/read_write.c:719 [inline] __x64_sys_pwrite64+0x191/0x220 fs/read_write.c:719 do_syscall_64+0x31/0x40 arch/x86/entry/common.c:46 entry_SYSCALL_64_after_hwframe+0x61/0xcb RIP: 0033:0x7f2cbe831749 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:00007f2cbd299038 EFLAGS: 00000246 ORIG_RAX: 0000000000000012 RAX: ffffffffffffffda RBX: 00007f2cbea87fa0 RCX: 00007f2cbe831749 RDX: 00000000200000c1 RSI: 00002000000000c0 RDI: 0000000000000004 RBP: 00007f2cbe8b5f91 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000009000 R11: 0000000000000246 R12: 0000000000000000 R13: 00007f2cbea88038 R14: 00007f2cbea87fa0 R15: 00007ffe333ea178 Allocated by task 0: (stack is not available) Freed by task 20: 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:362 __kasan_slab_free+0x11/0x20 mm/kasan/common.c:370 kasan_slab_free include/linux/kasan.h:220 [inline] slab_free_hook mm/slub.c:1600 [inline] slab_free_freelist_hook+0xc5/0x190 mm/slub.c:1626 slab_free mm/slub.c:3208 [inline] kfree+0xc0/0x270 mm/slub.c:4196 skb_free_head net/core/skbuff.c:606 [inline] skb_release_data+0x532/0x670 net/core/skbuff.c:626 skb_release_all net/core/skbuff.c:680 [inline] __kfree_skb net/core/skbuff.c:694 [inline] kfree_skb+0xb9/0x2f0 net/core/skbuff.c:713 ip6_mc_input+0x235/0x2a0 net/ipv6/ip6_input.c:574 dst_input include/net/dst.h:461 [inline] ip6_rcv_finish+0x18c/0x360 net/ipv6/ip6_input.c:80 NF_HOOK include/linux/netfilter.h:299 [inline] ipv6_rcv+0xec/0x210 net/ipv6/ip6_input.c:301 __netif_receive_skb_one_core net/core/dev.c:5402 [inline] __netif_receive_skb+0xc8/0x280 net/core/dev.c:5516 process_backlog+0x368/0x600 net/core/dev.c:6423 napi_poll net/core/dev.c:6874 [inline] net_rx_action+0x432/0xdd0 net/core/dev.c:6944 __do_softirq+0x255/0x563 kernel/softirq.c:309 The buggy address belongs to the object at ffff888128846000 which belongs to the cache kmalloc-2k of size 2048 The buggy address is located 1560 bytes to the right of 2048-byte region [ffff888128846000, ffff888128846800) The buggy address belongs to the page: page:ffffea0004a21000 refcount:1 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x128840 head:ffffea0004a21000 order:3 compound_mapcount:0 compound_pincount:0 flags: 0x4000000000010200(slab|head) raw: 4000000000010200 dead000000000100 dead000000000122 ffff888100042d80 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 0x1d2a20(GFP_ATOMIC|__GFP_NOWARN|__GFP_NORETRY|__GFP_COMP|__GFP_NOMEMALLOC|__GFP_HARDWALL), pid 20, ts 23248390622, free_ts 22792029520 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:5370 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+0x2a6/0x450 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] __kmalloc_track_caller+0x1ef/0x320 mm/slub.c:4541 __kmalloc_reserve net/core/skbuff.c:144 [inline] __alloc_skb+0xdc/0x520 net/core/skbuff.c:212 alloc_skb include/linux/skbuff.h:1126 [inline] alloc_skb_with_frags+0xa2/0x560 net/core/skbuff.c:5993 sock_alloc_send_pskb+0x853/0x980 net/core/sock.c:2393 sock_alloc_send_skb+0x32/0x40 net/core/sock.c:2410 mld_newpack+0x193/0x9a0 net/ipv6/mcast.c:1604 add_grhead+0x5e/0x290 net/ipv6/mcast.c:1707 add_grec+0xd43/0x1100 net/ipv6/mcast.c:1838 mld_send_initial_cr+0x1f1/0x2b0 net/ipv6/mcast.c:2088 ipv6_mc_dad_complete+0x76/0x3c0 net/ipv6/mcast.c:2100 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_pages_ok+0x7fc/0x820 mm/page_alloc.c:1629 free_the_page mm/page_alloc.c:5431 [inline] __free_pages+0xdd/0x380 mm/page_alloc.c:5440 kfree+0x1e7/0x270 mm/slub.c:4193 kvfree+0x35/0x40 mm/util.c:647 btf_add_type kernel/bpf/btf.c:1421 [inline] btf_check_all_metas+0x438/0x820 kernel/bpf/btf.c:3814 btf_parse_vmlinux+0x444/0xae0 kernel/bpf/btf.c:4388 bpf_get_btf_vmlinux kernel/bpf/verifier.c:12565 [inline] bpf_check+0x5d5/0xd680 kernel/bpf/verifier.c:12604 bpf_prog_load+0xf5a/0x1420 kernel/bpf/syscall.c:2234 __do_sys_bpf kernel/bpf/syscall.c:4435 [inline] __se_sys_bpf+0x442/0x680 kernel/bpf/syscall.c:4391 __x64_sys_bpf+0x7b/0x90 kernel/bpf/syscall.c:4391 do_syscall_64+0x31/0x40 arch/x86/entry/common.c:46 entry_SYSCALL_64_after_hwframe+0x61/0xcb Memory state around the buggy address: ffff888128846d00: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ffff888128846d80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc >ffff888128846e00: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ^ ffff888128846e80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ffff888128846f00: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ================================================================== EXT4-fs error (device loop1): ext4_ext_split:1073: inode #15: comm syz.1.7: p_ext > EXT_MAX_EXTENT! EXT4-fs (loop1): pa ffff88811bc0a0a8: logic 128, phys. 385, len 8 EXT4-fs error (device loop1): ext4_mb_release_inode_pa:4359: group 0, free 5, pa_free 4