syzbot


KASAN: use-after-free Read in ext4_find_extent

Status: upstream: reported C repro on 2022/12/26 07:59
Subsystems: ext4
[Documentation on labels]
Reported-by: syzbot+212b805f83aa4e82c10a@syzkaller.appspotmail.com
First crash: 939d, last: 12d
Cause bisection: failed (error log, bisect log)
  
Fix bisection the fix commit could be any of (bisect log):
  003c389455eb Merge 5.10.160 into android12-5.10-lts
  bf760358eac3 Merge branch 'android12-5.10' into android12-5.10-lts
  
Similar bugs (11)
Kernel Title Repro Cause bisect Fix bisect Count Last Reported Patched Status
android-54 KASAN: use-after-free Read in ext4_find_extent C 2 39d 137d 0/2 upstream: reported C repro on 2025/02/13 21:05
android-6-1 KASAN: use-after-free Read in ext4_find_extent missing-backport C error done 3 246d 743d 0/2 auto-obsoleted due to no activity on 2025/02/04 04:57
linux-5.15 KASAN: use-after-free Read in ext4_find_extent origin:lts-only C inconclusive 7 37d 712d 0/3 upstream: reported C repro on 2023/07/19 14:49
upstream KASAN: use-after-free Read in ext4_find_extent ext4 2 1349d 1410d 0/29 auto-closed as invalid on 2022/02/17 05:19
android-6-1 KASAN: use-after-free Read in ext4_find_extent (2) origin:lts C 2 6h23m 30d 0/2 upstream: reported C repro on 2025/05/31 08:45
linux-6.1 KASAN: use-after-free Read in ext4_find_extent origin:upstream missing-backport C done 42 6d17h 651d 0/3 upstream: reported C repro on 2023/09/19 00:11
android-5-15 KASAN: use-after-free Read in ext4_find_extent ext4 origin:lts C error 14 10d 917d 0/2 upstream: reported C repro on 2022/12/26 07:59
upstream KASAN: use-after-free Read in ext4_find_extent (2) ext4 C error 2 788d 912d 22/29 fixed on 2023/06/08 14:41
upstream KASAN: use-after-free Read in ext4_find_extent (4) ext4 C done 64 3d00h 182d 0/29 upstream: reported C repro on 2024/12/30 20:06
upstream KASAN: use-after-free Read in ext4_find_extent (3) prio:low ext4 C error done 31 552d 734d 25/29 fixed on 2024/01/30 23:26
android-54 KASAN: slab-out-of-bounds Read in ext4_find_extent ext4 C 1 732d 917d 0/2 auto-obsoleted due to no activity on 2023/10/08 03:20
Last patch testing requests (10)
Created Duration User Patch Repo Result
2025/06/19 01:39 6m retest repro android13-5.10-lts report log
2025/06/19 01:39 5m retest repro android13-5.10-lts report log
2025/06/19 01:39 8m retest repro android13-5.10-lts report log
2025/06/19 01:39 6m retest repro android13-5.10-lts report log
2025/06/19 01:39 7m retest repro android13-5.10-lts report log
2025/05/17 22:04 6m retest repro android13-5.10-lts report log
2025/05/17 22:04 6m retest repro android13-5.10-lts report log
2025/05/17 22:04 6m retest repro android13-5.10-lts report log
2025/05/17 22:04 1h10m retest repro android13-5.10-lts report log
2025/05/17 22:04 6m retest repro android13-5.10-lts report log

Sample crash report:
==================================================================
BUG: KASAN: use-after-free in ext4_ext_binsearch fs/ext4/extents.c:826 [inline]
BUG: KASAN: use-after-free in ext4_find_extent+0xbeb/0xe20 fs/ext4/extents.c:945
Read of size 4 at addr ffff88811f9bf018 by task kworker/u4:2/49

CPU: 1 PID: 49 Comm: kworker/u4:2 Not tainted 5.10.237-syzkaller-00010-gcf6ed0f1511d #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 05/07/2025
Workqueue: writeback wb_workfn (flush-7:0)

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+0x1de/0x5d40 fs/ext4/extents.c:4159
 ext4_map_blocks+0x978/0x1bc0 fs/ext4/inode.c:674
 mpage_map_one_extent fs/ext4/inode.c:2452 [inline]
 mpage_map_and_submit_extent fs/ext4/inode.c:2505 [inline]
 ext4_writepages+0x11d5/0x2e00 fs/ext4/inode.c:2873
 do_writepages+0x12a/0x270 mm/page-writeback.c:2380
 __writeback_single_inode+0xd5/0xa20 fs/fs-writeback.c:1470
 writeback_sb_inodes+0x860/0x1400 fs/fs-writeback.c:1733
 wb_writeback+0x3e3/0xb90 fs/fs-writeback.c:1908
 wb_do_writeback fs/fs-writeback.c:2053 [inline]
 wb_workfn+0x38f/0xe20 fs/fs-writeback.c:2094
 process_one_work+0x6e1/0xba0 kernel/workqueue.c:2301
 worker_thread+0xa6a/0x13b0 kernel/workqueue.c:2447
 kthread+0x346/0x3d0 kernel/kthread.c:313
 ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:298

Allocated by task 235:
 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_slab_alloc+0xbd/0xf0 mm/kasan/common.c:463
 kasan_slab_alloc include/linux/kasan.h:244 [inline]
 slab_post_alloc_hook+0x5d/0x2f0 mm/slab.h:583
 slab_alloc_node mm/slub.c:2947 [inline]
 slab_alloc mm/slub.c:2955 [inline]
 kmem_cache_alloc+0x165/0x2e0 mm/slub.c:2960
 getname_flags+0xb9/0x500 fs/namei.c:141
 getname+0x19/0x20 fs/namei.c:212
 __do_sys_execve fs/exec.c:2100 [inline]
 __se_sys_execve fs/exec.c:2095 [inline]
 __x64_sys_execve+0x78/0xb0 fs/exec.c:2095
 do_syscall_64+0x31/0x40 arch/x86/entry/common.c:46
 entry_SYSCALL_64_after_hwframe+0x61/0xcb

Freed by task 235:
 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:1595 [inline]
 slab_free_freelist_hook+0xc5/0x190 mm/slub.c:1621
 slab_free mm/slub.c:3203 [inline]
 kmem_cache_free+0x100/0x2d0 mm/slub.c:3219
 putname+0xfe/0x150 fs/namei.c:262
 do_execveat_common+0x92b/0xaa0 fs/exec.c:1959
 do_execve fs/exec.c:2024 [inline]
 __do_sys_execve fs/exec.c:2100 [inline]
 __se_sys_execve fs/exec.c:2095 [inline]
 __x64_sys_execve+0x92/0xb0 fs/exec.c:2095
 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 ffff88811f9be600
 which belongs to the cache names_cache of size 4096
The buggy address is located 2584 bytes inside of
 4096-byte region [ffff88811f9be600, ffff88811f9bf600)
The buggy address belongs to the page:
page:ffffea00047e6e00 refcount:1 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x11f9b8
head:ffffea00047e6e00 order:3 compound_mapcount:0 compound_pincount:0
flags: 0x4000000000010200(slab|head)
raw: 4000000000010200 dead000000000100 dead000000000122 ffff88810018a180
raw: 0000000000000000 0000000000070007 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 0xd20c0(__GFP_IO|__GFP_FS|__GFP_NOWARN|__GFP_NORETRY|__GFP_COMP|__GFP_NOMEMALLOC), pid 235, ts 19199351964, free_ts 19082087226
 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:5349
 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+0x1af/0x2e0 mm/slub.c:2960
 getname_flags+0xb9/0x500 fs/namei.c:141
 getname+0x19/0x20 fs/namei.c:212
 __do_sys_execve fs/exec.c:2100 [inline]
 __se_sys_execve fs/exec.c:2095 [inline]
 __x64_sys_execve+0x78/0xb0 fs/exec.c:2095
 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_pages_ok+0x7fc/0x820 mm/page_alloc.c:1629
 free_compound_page+0x73/0x90 mm/page_alloc.c:710
 destroy_compound_page include/linux/mm.h:959 [inline]
 __put_compound_page+0x77/0xb0 mm/swap.c:117
 __put_page+0xbd/0xe0 mm/swap.c:133
 put_page include/linux/mm.h:1257 [inline]
 __skb_frag_unref include/linux/skbuff.h:3101 [inline]
 skb_release_data+0x21f/0x670 net/core/skbuff.c:620
 skb_release_all net/core/skbuff.c:680 [inline]
 __kfree_skb+0x50/0x70 net/core/skbuff.c:694
 sk_eat_skb include/net/sock.h:2653 [inline]
 tcp_recvmsg+0x1515/0x2e10 net/ipv4/tcp.c:2345
 inet_recvmsg+0x134/0x470 net/ipv4/af_inet.c:864
 sock_recvmsg_nosec net/socket.c:905 [inline]
 sock_recvmsg net/socket.c:923 [inline]
 sock_read_iter+0x2a2/0x340 net/socket.c:996
 call_read_iter include/linux/fs.h:2052 [inline]
 new_sync_read fs/read_write.c:415 [inline]
 vfs_read+0x874/0xa10 fs/read_write.c:496
 ksys_read+0x140/0x240 fs/read_write.c:634
 __do_sys_read fs/read_write.c:644 [inline]
 __se_sys_read fs/read_write.c:642 [inline]
 __x64_sys_read+0x7b/0x90 fs/read_write.c:642
 do_syscall_64+0x31/0x40 arch/x86/entry/common.c:46
 entry_SYSCALL_64_after_hwframe+0x61/0xcb

Memory state around the buggy address:
 ffff88811f9bef00: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
 ffff88811f9bef80: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
>ffff88811f9bf000: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
                            ^
 ffff88811f9bf080: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
 ffff88811f9bf100: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
==================================================================
EXT4-fs error (device loop0): ext4_ext_split:1073: inode #15: comm kworker/u4:2: p_ext > EXT_MAX_EXTENT!
EXT4-fs (loop0): Delayed block allocation failed for inode 15 at logical offset 84 with max blocks 2 with error 117
EXT4-fs (loop0): This should not happen!! Data will be lost

EXT4-fs error (device loop0): ext4_ext_split:1073: inode #15: comm kworker/u4:2: p_ext > EXT_MAX_EXTENT!
EXT4-fs (loop0): Delayed block allocation failed for inode 15 at logical offset 84 with max blocks 2 with error 117
EXT4-fs (loop0): This should not happen!! Data will be lost

EXT4-fs error (device loop0): ext4_map_blocks:740: inode #15: block 87638807674971: comm kworker/u4:2: lblock 84 mapped to illegal pblock 87638807674971 (length 2)
EXT4-fs (loop0): Delayed block allocation failed for inode 15 at logical offset 84 with max blocks 2 with error 117
EXT4-fs (loop0): This should not happen!! Data will be lost

EXT4-fs error (device loop0): ext4_map_blocks:740: inode #15: block 1013612267859: comm kworker/u4:2: lblock 84 mapped to illegal pblock 1013612267859 (length 2)
EXT4-fs (loop0): Delayed block allocation failed for inode 15 at logical offset 84 with max blocks 2 with error 117
EXT4-fs (loop0): This should not happen!! Data will be lost

EXT4-fs error (device loop0): ext4_map_blocks:740: inode #15: block 22913650493653: comm kworker/u4:2: lblock 84 mapped to illegal pblock 22913650493653 (length 2)
EXT4-fs (loop0): Delayed block allocation failed for inode 15 at logical offset 84 with max blocks 2 with error 117
EXT4-fs (loop0): This should not happen!! Data will be lost


Crashes (36):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2025/06/04 13:09 android13-5.10-lts cf6ed0f1511d e565f08d .config strace log report syz / log C [disk image] [vmlinux] [kernel image] [mounted in repro (corrupt fs)] ci2-android-5-10 KASAN: use-after-free Read in ext4_find_extent
2025/05/28 19:07 android13-5.10-lts cf6ed0f1511d 3d2f584d .config strace log report syz / log C [disk image] [vmlinux] [kernel image] [mounted in repro (corrupt fs)] ci2-android-5-10 KASAN: use-after-free Read in ext4_find_extent
2025/04/18 21:12 android13-5.10-lts ba8b8b193394 2a20f901 .config strace log report syz / log C [disk image] [vmlinux] [kernel image] [mounted in repro (corrupt fs)] ci2-android-5-10 KASAN: use-after-free Read in ext4_find_extent
2025/02/10 01:47 android13-5.10-lts 6686f2996d23 ef44b750 .config strace log report syz / log C [disk image] [vmlinux] [kernel image] [mounted in repro (corrupt fs)] ci2-android-5-10 KASAN: use-after-free Read in ext4_find_extent
2023/04/01 05:47 android12-5.10-lts 416c4356f372 f325deb0 .config strace log report syz C [disk image] [vmlinux] [kernel image] [mounted in repro] ci2-android-5-10 KASAN: use-after-free Read in ext4_find_extent
2023/03/19 01:42 android12-5.10-lts 416c4356f372 7939252e .config console log report syz C [disk image] [vmlinux] [kernel image] [mounted in repro] ci2-android-5-10 KASAN: use-after-free Read in ext4_find_extent
2025/03/15 07:32 android13-5.10-lts fc9aa81462ee e2826670 .config console log report syz / log [disk image] [vmlinux] [kernel image] [mounted in repro (clean fs)] ci2-android-5-10 KASAN: use-after-free Read in ext4_find_extent
2022/12/21 09:05 android12-5.10-lts 003c389455eb d3e76707 .config strace log report syz [disk image] [vmlinux] [kernel image] [mounted in repro] ci2-android-5-10 KASAN: use-after-free Read in ext4_find_extent
2022/12/12 16:05 android12-5.10-lts f3226d86f8ce 67be1ae7 .config strace log report syz [disk image] [vmlinux] [kernel image] [mounted in repro] ci2-android-5-10 KASAN: use-after-free Read in ext4_find_extent
2022/12/04 17:23 android12-5.10-lts 25af5a11f1da e080de16 .config strace log report syz [disk image] [vmlinux] [kernel image] [mounted in repro] ci2-android-5-10 KASAN: use-after-free Read in ext4_find_extent
2022/12/26 07:48 android12-5.10-lts 003c389455eb 9da18ae8 .config strace log report syz C [disk image] [vmlinux] [kernel image] [mounted in repro] ci2-android-5-10 KASAN: use-after-free Read in ext4_find_extent
2025/05/03 01:25 android13-5.10-lts ab07aeb2c93d b0714e37 .config console log report info [disk image] [vmlinux] [kernel image] ci2-android-5-10 KASAN: use-after-free Read in ext4_find_extent
2025/05/03 01:25 android13-5.10-lts ab07aeb2c93d b0714e37 .config console log report info [disk image] [vmlinux] [kernel image] ci2-android-5-10 KASAN: use-after-free Read in ext4_find_extent
2025/05/03 01:25 android13-5.10-lts ab07aeb2c93d b0714e37 .config console log report info [disk image] [vmlinux] [kernel image] ci2-android-5-10 KASAN: use-after-free Read in ext4_find_extent
2025/04/28 05:45 android13-5.10-lts ba8b8b193394 c6b4fb39 .config console log report info [disk image] [vmlinux] [kernel image] ci2-android-5-10 KASAN: use-after-free Read in ext4_find_extent
2025/03/25 20:48 android13-5.10-lts 094fc3778d6b 875573af .config console log report info [disk image] [vmlinux] [kernel image] ci2-android-5-10 KASAN: use-after-free Read in ext4_find_extent
2025/02/10 01:03 android13-5.10-lts 6686f2996d23 ef44b750 .config console log report info [disk image] [vmlinux] [kernel image] ci2-android-5-10 KASAN: use-after-free Read in ext4_find_extent
2024/11/23 21:22 android13-5.10-lts b14940b90491 68da6d95 .config console log report info [disk image] [vmlinux] [kernel image] ci2-android-5-10 KASAN: use-after-free Read in ext4_find_extent
2024/10/08 01:40 android13-5.10-lts e5e5644ea27f d7906eff .config console log report info [disk image] [vmlinux] [kernel image] ci2-android-5-10 KASAN: use-after-free Read in ext4_find_extent
2024/10/05 09:57 android13-5.10-lts e5e5644ea27f d7906eff .config console log report info [disk image] [vmlinux] [kernel image] ci2-android-5-10 KASAN: use-after-free Read in ext4_find_extent
2024/09/02 16:32 android13-5.10-lts 1c5354a314ea 1eda0d14 .config console log report info [disk image] [vmlinux] [kernel image] ci2-android-5-10 KASAN: use-after-free Read in ext4_find_extent
2023/09/10 01:17 android13-5.10-lts a27512601c2d 6654cf89 .config console log report info [disk image] [vmlinux] [kernel image] ci2-android-5-10 KASAN: use-after-free Read in ext4_find_extent
2023/09/09 20:25 android13-5.10-lts a27512601c2d 6654cf89 .config console log report info [disk image] [vmlinux] [kernel image] ci2-android-5-10 KASAN: use-after-free Read in ext4_find_extent
2023/06/12 10:23 android13-5.10-lts 43c801dc3325 49519f06 .config console log report info [disk image] [vmlinux] [kernel image] ci2-android-5-10 KASAN: use-after-free Read in ext4_find_extent
2023/05/22 05:46 android13-5.10-lts 43c801dc3325 4bce1a3e .config console log report info [disk image] [vmlinux] [kernel image] ci2-android-5-10 KASAN: use-after-free Read in ext4_find_extent
2023/04/26 09:25 android12-5.10-lts 416c4356f372 65320f8e .config console log report info [disk image] [vmlinux] [kernel image] ci2-android-5-10 KASAN: use-after-free Read in ext4_find_extent
2023/04/06 18:08 android12-5.10-lts 416c4356f372 08707520 .config console log report info [disk image] [vmlinux] [kernel image] ci2-android-5-10 KASAN: use-after-free Read in ext4_find_extent
2023/04/04 06:55 android12-5.10-lts 416c4356f372 41147e3e .config console log report info [disk image] [vmlinux] [kernel image] ci2-android-5-10 KASAN: use-after-free Read in ext4_find_extent
2023/03/28 08:43 android12-5.10-lts 416c4356f372 47f3aaf1 .config console log report info [disk image] [vmlinux] [kernel image] ci2-android-5-10 KASAN: use-after-free Read in ext4_find_extent
2023/03/27 18:47 android12-5.10-lts 416c4356f372 f8f96aa9 .config console log report info [disk image] [vmlinux] [kernel image] ci2-android-5-10 KASAN: use-after-free Read in ext4_find_extent
2023/03/16 12:53 android12-5.10-lts 416c4356f372 18b58603 .config console log report info [disk image] [vmlinux] [kernel image] ci2-android-5-10 KASAN: use-after-free Read in ext4_find_extent
2023/03/14 03:54 android12-5.10-lts 416c4356f372 026e2200 .config console log report info [disk image] [vmlinux] [kernel image] ci2-android-5-10 KASAN: use-after-free Read in ext4_find_extent
2023/03/11 04:18 android12-5.10-lts 416c4356f372 5205ef30 .config console log report info [disk image] [vmlinux] [kernel image] ci2-android-5-10 KASAN: use-after-free Read in ext4_find_extent
2023/02/24 17:51 android12-5.10-lts 416c4356f372 ee50e71c .config console log report info [disk image] [vmlinux] [kernel image] ci2-android-5-10 KASAN: use-after-free Read in ext4_find_extent
2022/12/14 02:10 android12-5.10-lts 202ee063496e f6511626 .config console log report info [disk image] [vmlinux] [kernel image] ci2-android-5-10 KASAN: use-after-free Read in ext4_find_extent
2023/03/03 01:51 android12-5.10-lts 416c4356f372 f8902b57 .config console log report info [disk image] [vmlinux] [kernel image] ci2-android-5-10 KASAN: slab-out-of-bounds Read in ext4_find_extent
* Struck through repros no longer work on HEAD.