syzbot


KASAN: slab-out-of-bounds Read in ext4_ext_correct_indexes

Status: premoderation: reported syz repro on 2026/01/28 09:19
Bug presence: origin:upstream
[Documentation on labels]
Reported-by: syzbot+1e151dd5d84ce21e78bc@syzkaller.appspotmail.com
First crash: 6d23h, last: 6d23h
Bug presence (2)
Date Name Commit Repro Result
2026/01/28 lts (merge base) e50b81c50fcb syz [report] KASAN: slab-out-of-bounds Read in ext4_ext_correct_indexes
2026/01/28 upstream (ToT) 1f97d9dcf536 syz [report] KASAN: use-after-free Read in ext4_ext_correct_indexes
Similar bugs (1)
Kernel Title Rank 🛈 Repro Cause bisect Fix bisect Count Last Reported Patched Status
upstream KASAN: slab-out-of-bounds Read in ext4_ext_correct_indexes ext4 19 C error error 4 14d 253d 0/29 upstream: reported C repro on 2025/05/26 13:47

Sample crash report:
EXT4-fs error (device loop8): mb_free_blocks:1826: group 0, inode 18: block 177:freeing already freed block (bit 11); block bitmap corrupt.
==================================================================
BUG: KASAN: slab-out-of-bounds in ext4_ext_correct_indexes+0x6c/0x540 fs/ext4/extents.c:1716
Read of size 8 at addr ffff888130c39880 by task syz.8.349/2190

CPU: 0 PID: 2190 Comm: syz.8.349 Not tainted syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 10/25/2025
Call Trace:
 <TASK>
 __dump_stack+0x21/0x24 lib/dump_stack.c:88
 dump_stack_lvl+0x110/0x170 lib/dump_stack.c:106
 print_address_description+0x71/0x200 mm/kasan/report.c:316
 print_report+0x4a/0x60 mm/kasan/report.c:420
 kasan_report+0x122/0x150 mm/kasan/report.c:524
 __asan_report_load8_noabort+0x14/0x20 mm/kasan/report_generic.c:351
 ext4_ext_correct_indexes+0x6c/0x540 fs/ext4/extents.c:1716
 ext4_ext_insert_extent+0x21b5/0x47d0 fs/ext4/extents.c:2178
 ext4_ext_map_blocks+0x1869/0x61d0 fs/ext4/extents.c:4361
 ext4_map_blocks+0x9d8/0x1b70 fs/ext4/inode.c:679
 _ext4_get_block+0x1ea/0x540 fs/ext4/inode.c:822
 ext4_get_block+0x39/0x50 fs/ext4/inode.c:839
 ext4_block_write_begin+0x594/0x1280 fs/ext4/inode.c:1124
 ext4_write_begin+0x600/0xf90 fs/ext4/ext4_jbd2.h:-1
 ext4_da_write_begin+0x3e7/0x8c0 fs/ext4/inode.c:3001
 generic_perform_write+0x32d/0x740 mm/filemap.c:3903
 ext4_buffered_write_iter+0x367/0x630 fs/ext4/file.c:285
 ext4_file_write_iter+0x191/0x1500 fs/ext4/file.c:-1
 __kernel_write_iter+0x296/0x660 fs/read_write.c:517
 dump_emit_page fs/coredump.c:886 [inline]
 dump_user_range+0x40b/0x660 fs/coredump.c:913
 elf_core_dump+0x2b52/0x3060 fs/binfmt_elf.c:2354
 do_coredump+0x15d3/0x2240 fs/coredump.c:760
 get_signal+0x11db/0x1520 kernel/signal.c:2877
 arch_do_signal_or_restart+0xd1/0x1140 arch/x86/kernel/signal.c:871
 exit_to_user_mode_loop+0x7a/0xb0 kernel/entry/common.c:174
 exit_to_user_mode_prepare+0x87/0xd0 kernel/entry/common.c:210
 irqentry_exit_to_user_mode+0x9/0x10 kernel/entry/common.c:316
 irqentry_exit+0x12/0x40 kernel/entry/common.c:419
 exc_page_fault+0x5e/0xb0 arch/x86/mm/fault.c:1525
 asm_exc_page_fault+0x27/0x30 arch/x86/include/asm/idtentry.h:608
RIP: 0033:0x7fef18f9aec1
Code: 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 83 c8 ff c3 66 2e 0f 1f
RSP: 002b:0000000000000030 EFLAGS: 00010217
RAX: 0000000000000000 RBX: 00007fef19215fa0 RCX: 00007fef18f9aeb9
RDX: 0000000000000000 RSI: 0000000000000030 RDI: 0000000000000600
RBP: 00007fef19008c1f R08: 0000000000000000 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000206 R12: 0000000000000000
R13: 00007fef19216038 R14: 00007fef19215fa0 R15: 00007ffd099fe918
 </TASK>

Allocated by task 2072:
 kasan_save_stack mm/kasan/common.c:46 [inline]
 kasan_set_track+0x4b/0x70 mm/kasan/common.c:53
 kasan_save_alloc_info+0x25/0x30 mm/kasan/generic.c:505
 ____kasan_kmalloc mm/kasan/common.c:380 [inline]
 __kasan_kmalloc+0x95/0xb0 mm/kasan/common.c:389
 kasan_kmalloc include/linux/kasan.h:212 [inline]
 kmalloc_trace+0x40/0xb0 mm/slab_common.c:1033
 kmalloc include/linux/slab.h:563 [inline]
 kzalloc include/linux/slab.h:699 [inline]
 snmp6_alloc_dev net/ipv6/addrconf.c:358 [inline]
 ipv6_add_dev+0x614/0x1230 net/ipv6/addrconf.c:408
 addrconf_notify+0x6d5/0xe40 net/ipv6/addrconf.c:3621
 notifier_call_chain kernel/notifier.c:87 [inline]
 raw_notifier_call_chain+0xa1/0x110 kernel/notifier.c:455
 call_netdevice_notifiers_info net/core/dev.c:2009 [inline]
 call_netdevice_notifiers_extack net/core/dev.c:2047 [inline]
 call_netdevice_notifiers+0x119/0x190 net/core/dev.c:2061
 register_netdevice+0x1173/0x1530 net/core/dev.c:10201
 veth_newlink+0x60f/0xc80 drivers/net/veth.c:1745
 rtnl_newlink_create net/core/rtnetlink.c:3422 [inline]
 __rtnl_newlink net/core/rtnetlink.c:3642 [inline]
 rtnl_newlink+0x1537/0x20b0 net/core/rtnetlink.c:3655
 rtnetlink_rcv_msg+0xb3b/0xe00 net/core/rtnetlink.c:6150
 netlink_rcv_skb+0x20f/0x460 net/netlink/af_netlink.c:2521
 rtnetlink_rcv+0x1c/0x20 net/core/rtnetlink.c:6168
 netlink_unicast_kernel net/netlink/af_netlink.c:1319 [inline]
 netlink_unicast+0x8ab/0xa30 net/netlink/af_netlink.c:1345
 netlink_sendmsg+0x8b9/0xbd0 net/netlink/af_netlink.c:1873
 sock_sendmsg_nosec net/socket.c:716 [inline]
 __sock_sendmsg net/socket.c:728 [inline]
 __sys_sendto+0x4ac/0x660 net/socket.c:2143
 __do_sys_sendto net/socket.c:2155 [inline]
 __se_sys_sendto net/socket.c:2151 [inline]
 __x64_sys_sendto+0xe5/0x100 net/socket.c:2151
 x64_sys_call+0x83/0x9a0 arch/x86/include/generated/asm/syscalls_64.h:45
 do_syscall_x64 arch/x86/entry/common.c:46 [inline]
 do_syscall_64+0x4c/0xa0 arch/x86/entry/common.c:76
 entry_SYSCALL_64_after_hwframe+0x68/0xd2

The buggy address belongs to the object at ffff888130c38000
 which belongs to the cache kmalloc-4k of size 4096
The buggy address is located 2176 bytes to the right of
 4096-byte region [ffff888130c38000, ffff888130c39000)

The buggy address belongs to the physical page:
page:ffffea0004c30e00 refcount:1 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x130c38
head:ffffea0004c30e00 order:3 compound_mapcount:0 compound_pincount:0
flags: 0x4000000000010200(slab|head|zone=1)
raw: 4000000000010200 0000000000000000 dead000000000001 ffff888100043380
raw: 0000000000000000 0000000000040004 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 0x1d20c0(__GFP_IO|__GFP_FS|__GFP_NOWARN|__GFP_NORETRY|__GFP_COMP|__GFP_NOMEMALLOC|__GFP_HARDWALL), pid 781, tgid 781 (syz-executor), ts 352988853871, free_ts 352419124464
 set_page_owner include/linux/page_owner.h:33 [inline]
 post_alloc_hook+0x1f5/0x210 mm/page_alloc.c:2643
 prep_new_page+0x1c/0x110 mm/page_alloc.c:2650
 get_page_from_freelist+0x2d12/0x2d80 mm/page_alloc.c:4554
 __alloc_pages+0x1d9/0x480 mm/page_alloc.c:5868
 alloc_slab_page+0x6e/0xf0 include/linux/gfp.h:-1
 allocate_slab mm/slub.c:1967 [inline]
 new_slab+0x98/0x3d0 mm/slub.c:2020
 ___slab_alloc+0x6bd/0xb20 mm/slub.c:3177
 __slab_alloc+0x5e/0xa0 mm/slub.c:3263
 slab_alloc_node mm/slub.c:3348 [inline]
 __kmem_cache_alloc_node+0x203/0x2c0 mm/slub.c:3423
 kmalloc_trace+0x29/0xb0 mm/slab_common.c:1028
 kmalloc include/linux/slab.h:563 [inline]
 kzalloc include/linux/slab.h:699 [inline]
 vlan_group_prealloc_vid net/8021q/vlan.c:70 [inline]
 register_vlan_dev+0x260/0x600 net/8021q/vlan.c:176
 vlan_newlink+0x44f/0x5a0 net/8021q/vlan_netlink.c:195
 rtnl_newlink_create net/core/rtnetlink.c:3422 [inline]
 __rtnl_newlink net/core/rtnetlink.c:3642 [inline]
 rtnl_newlink+0x1537/0x20b0 net/core/rtnetlink.c:3655
 rtnetlink_rcv_msg+0xb3b/0xe00 net/core/rtnetlink.c:6150
 netlink_rcv_skb+0x20f/0x460 net/netlink/af_netlink.c:2521
 rtnetlink_rcv+0x1c/0x20 net/core/rtnetlink.c:6168
page last free stack trace:
 reset_page_owner include/linux/page_owner.h:26 [inline]
 free_pages_prepare mm/page_alloc.c:1551 [inline]
 free_pcp_prepare mm/page_alloc.c:1625 [inline]
 free_unref_page_prepare+0x742/0x750 mm/page_alloc.c:3589
 free_unref_page+0x95/0x540 mm/page_alloc.c:3687
 free_the_page mm/page_alloc.c:836 [inline]
 __free_pages+0x67/0x100 mm/page_alloc.c:5957
 __free_slab+0xca/0x1a0 mm/slub.c:2044
 free_slab mm/slub.c:2059 [inline]
 discard_slab mm/slub.c:2065 [inline]
 __unfreeze_partials+0x160/0x190 mm/slub.c:2614
 put_cpu_partial+0xa9/0x100 mm/slub.c:2690
 __slab_free+0x1c4/0x280 mm/slub.c:3589
 do_slab_free mm/slub.c:3666 [inline]
 ___cache_free+0xbf/0xd0 mm/slub.c:3722
 qlink_free mm/kasan/quarantine.c:168 [inline]
 qlist_free_all+0xc6/0x140 mm/kasan/quarantine.c:187
 kasan_quarantine_reduce+0x14a/0x170 mm/kasan/quarantine.c:294
 __kasan_slab_alloc+0x24/0x80 mm/kasan/common.c:311
 kasan_slab_alloc include/linux/kasan.h:202 [inline]
 slab_post_alloc_hook+0x4f/0x2d0 mm/slab.h:768
 slab_alloc_node mm/slub.c:3382 [inline]
 kmem_cache_alloc_node+0x181/0x340 mm/slub.c:3429
 __alloc_skb+0xea/0x4b0 net/core/skbuff.c:508
 alloc_skb include/linux/skbuff.h:1290 [inline]
 nlmsg_new include/net/netlink.h:991 [inline]
 rtmsg_ifa+0xfa/0x1e0 net/ipv4/devinet.c:1933
 __inet_del_ifa+0x80b/0xd90 net/ipv4/devinet.c:444

Memory state around the buggy address:
 ffff888130c39780: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
 ffff888130c39800: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
>ffff888130c39880: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
                   ^
 ffff888130c39900: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
 ffff888130c39980: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
==================================================================
EXT4-fs error (device loop8): ext4_ext_correct_indexes:1721: inode #18: comm syz.8.349: ex 0000000000000000 == NULL or eh 0000000000000000 == NULL
------------[ cut here ]------------
WARNING: CPU: 1 PID: 2190 at mm/page_alloc.c:4077 next_zones_zonelist include/linux/mmzone.h:1622 [inline]
WARNING: CPU: 1 PID: 2190 at mm/page_alloc.c:4077 get_page_from_freelist+0x29ac/0x2d80 mm/page_alloc.c:4452
Modules linked in:
CPU: 1 PID: 2190 Comm: syz.8.349 Tainted: G    B              syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 10/25/2025
RIP: 0010:rmqueue mm/page_alloc.c:4077 [inline]
RIP: 0010:get_page_from_freelist+0x29ac/0x2d80 mm/page_alloc.c:4551
Code: ff 48 8b bc 24 d0 00 00 00 48 8b b4 24 40 01 00 00 e8 18 6a 4e 03 45 31 ff e9 dd fe ff ff 89 de e8 39 b8 f3 ff 48 89 c6 eb aa <0f> 0b e9 b9 da ff ff 48 89 df be 08 00 00 00 e8 f0 af 04 00 48 8b
RSP: 0018:ffffc90003ed64a0 EFLAGS: 00010202

RAX: 0000000000000000 RBX: ffffc90003ed6798 RCX: 00000000878e6701
RDX: ffffffff878e63c0 RSI: 0000000000000007 RDI: ffffffff878e6768
RBP: ffffc90003ed6710 R08: ffffffff878e69d7 R09: 1ffffffff0f1cd3a
R10: dffffc0000000000 R11: fffffbfff0f1cd3b R12: ffffc90003ed6788
R13: dffffc0000000000 R14: 1ffff920007daccc R15: 0000000000000000
FS:  00007fef19da06c0(0000) GS:ffff8881f6f00000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 00007fd4d7b45000 CR3: 0000000111ef1000 CR4: 00000000003506a0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
Call Trace:
 <TASK>
 __alloc_pages+0x1d9/0x480 mm/page_alloc.c:5868
 __alloc_pages_node include/linux/gfp.h:236 [inline]
 alloc_pages_node include/linux/gfp.h:259 [inline]
 __kmalloc_large_node+0xa1/0x1c0 mm/slab_common.c:1079
 __do_kmalloc_node mm/slab_common.c:926 [inline]
 __kmalloc+0xe0/0x1e0 mm/slab_common.c:951
 kmalloc_array include/linux/slab.h:615 [inline]
 kcalloc include/linux/slab.h:646 [inline]
 ext4_ext_remove_space+0xafe/0x40d0 fs/ext4/extents.c:2920
 ext4_ext_truncate+0x200/0x320 fs/ext4/extents.c:4470
 ext4_truncate+0x9be/0xfb0 fs/ext4/inode.c:4297
 ext4_truncate_failed_write fs/ext4/truncate.h:22 [inline]
 ext4_write_begin+0xa6a/0xf90 fs/ext4/inode.c:1289
 ext4_da_write_begin+0x3e7/0x8c0 fs/ext4/inode.c:3001
 generic_perform_write+0x32d/0x740 mm/filemap.c:3903
 ext4_buffered_write_iter+0x367/0x630 fs/ext4/file.c:285
 ext4_file_write_iter+0x191/0x1500 fs/ext4/file.c:-1
 __kernel_write_iter+0x296/0x660 fs/read_write.c:517
 dump_emit_page fs/coredump.c:886 [inline]
 dump_user_range+0x40b/0x660 fs/coredump.c:913
 elf_core_dump+0x2b52/0x3060 fs/binfmt_elf.c:2354
 do_coredump+0x15d3/0x2240 fs/coredump.c:760
 get_signal+0x11db/0x1520 kernel/signal.c:2877
 arch_do_signal_or_restart+0xd1/0x1140 arch/x86/kernel/signal.c:871
 exit_to_user_mode_loop+0x7a/0xb0 kernel/entry/common.c:174
 exit_to_user_mode_prepare+0x87/0xd0 kernel/entry/common.c:210
 irqentry_exit_to_user_mode+0x9/0x10 kernel/entry/common.c:316
 irqentry_exit+0x12/0x40 kernel/entry/common.c:419
 exc_page_fault+0x5e/0xb0 arch/x86/mm/fault.c:1525
 asm_exc_page_fault+0x27/0x30 arch/x86/include/asm/idtentry.h:608
RIP: 0033:0x7fef18f9aec1
Code: 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 83 c8 ff c3 66 2e 0f 1f
RSP: 002b:0000000000000030 EFLAGS: 00010217
RAX: 0000000000000000 RBX: 00007fef19215fa0 RCX: 00007fef18f9aeb9
RDX: 0000000000000000 RSI: 0000000000000030 RDI: 0000000000000600
RBP: 00007fef19008c1f R08: 0000000000000000 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000206 R12: 0000000000000000
R13: 00007fef19216038 R14: 00007fef19215fa0 R15: 00007ffd099fe918
 </TASK>
---[ end trace 0000000000000000 ]---
EXT4-fs error (device loop8): ext4_ext_remove_space:2930: inode #18: comm syz.8.349: pblk 0 bad header/extent: invalid magic - magic 3b7, entries 1, max 4(0), depth 7778(7778)

Crashes (1):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2026/01/28 09:18 android14-6.1 28238b5ea70e 3029c699 .config console log report syz / log [disk image] [vmlinux] [kernel image] [mounted in repro (corrupt fs)] ci2-android-6-1 KASAN: slab-out-of-bounds Read in ext4_ext_correct_indexes
* Struck through repros no longer work on HEAD.