syzbot


kernel BUG in __update_extent_tree_range

Status: upstream: reported on 2025/10/08 03:12
Subsystems: f2fs
[Documentation on labels]
Reported-by: syzbot+24124df3170c3638b35f@syzkaller.appspotmail.com
Fix commit: f2fs: fix to avoid updating zero-sized extent in extent cache
Patched on: [ci-upstream-linux-next-kasan-gce-root ci-upstream-rust-kasan-gce], missing on: [ci-qemu-gce-upstream-auto ci-qemu-native-arm64-kvm ci-qemu-upstream ci-qemu-upstream-386 ci-qemu2-arm32 ci-qemu2-arm64 ci-qemu2-arm64-compat ci-qemu2-arm64-mte ci-qemu2-riscv64 ci-snapshot-upstream-root ci-upstream-bpf-kasan-gce ci-upstream-bpf-next-kasan-gce ci-upstream-gce-arm64 ci-upstream-gce-leak ci-upstream-kasan-badwrites-root ci-upstream-kasan-gce ci-upstream-kasan-gce-386 ci-upstream-kasan-gce-root ci-upstream-kasan-gce-selinux-root ci-upstream-kasan-gce-smack-root ci-upstream-kmsan-gce-386-root ci-upstream-kmsan-gce-root ci-upstream-net-kasan-gce ci-upstream-net-this-kasan-gce ci2-upstream-fs ci2-upstream-kcsan-gce ci2-upstream-usb]
First crash: 42d, last: 22h59m
Discussions (4)
Title Replies (including bot) Last reply
[PATCH v2] f2fs: fix to avoid updating zero-sized extent in extent cache 2 (2) 2025/11/11 22:50
[syzbot] Monthly f2fs report (Nov 2025) 0 (1) 2025/11/03 13:10
[PATCH] f2fs: fix to avoid updating zero-sized extent in extent cache 1 (1) 2025/10/09 08:52
[syzbot] [f2fs?] kernel BUG in __update_extent_tree_range 0 (1) 2025/10/08 03:12

Sample crash report:
loop0: detected capacity change from 0 to 131072
F2FS-fs (loop0): f2fs_recover_fsync_data: recovery fsync data, check_only: 0
F2FS-fs (loop0): Mounted with checkpoint version = 1b41e955
mac80211_hwsim: wmediumd released netlink socket, switching to perfect channel medium
mac80211_hwsim: wmediumd released netlink socket, switching to perfect channel medium
mac80211_hwsim: wmediumd released netlink socket, switching to perfect channel medium
netlink: 4 bytes leftover after parsing attributes in process `syz.0.0'.
F2FS-fs (loop0): access invalid blkaddr:16711680
CPU: 0 UID: 0 PID: 5322 Comm: syz.0.0 Not tainted syzkaller #0 PREEMPT(full) 
Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2~bpo12+1 04/01/2014
Call Trace:
 <TASK>
 dump_stack_lvl+0x189/0x250 lib/dump_stack.c:120
 __f2fs_is_valid_blkaddr+0xe52/0x14f0 fs/f2fs/checkpoint.c:213
 f2fs_do_zero_range fs/f2fs/file.c:1647 [inline]
 f2fs_zero_range+0xef0/0x1580 fs/f2fs/file.c:1737
 f2fs_fallocate+0x583/0x990 fs/f2fs/file.c:2030
 vfs_fallocate+0x669/0x7e0 fs/open.c:342
 ioctl_preallocate fs/ioctl.c:289 [inline]
 file_ioctl+0x611/0x780 fs/ioctl.c:-1
 do_vfs_ioctl+0xb33/0x1430 fs/ioctl.c:576
 __do_sys_ioctl fs/ioctl.c:595 [inline]
 __se_sys_ioctl+0x82/0x170 fs/ioctl.c:583
 do_syscall_x64 arch/x86/entry/syscall_64.c:63 [inline]
 do_syscall_64+0xfa/0xfa0 arch/x86/entry/syscall_64.c:94
 entry_SYSCALL_64_after_hwframe+0x77/0x7f
RIP: 0033:0x7f7d9e78f6c9
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:00007f7d9f5f3038 EFLAGS: 00000246 ORIG_RAX: 0000000000000010
RAX: ffffffffffffffda RBX: 00007f7d9e9e5fa0 RCX: 00007f7d9e78f6c9
RDX: 0000200000000040 RSI: 0000000040305839 RDI: 000000000000000a
RBP: 00007f7d9e811f91 R08: 0000000000000000 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000
R13: 00007f7d9e9e6038 R14: 00007f7d9e9e5fa0 R15: 00007ffced296768
 </TASK>
F2FS-fs (loop0): __update_extent_tree_range: extent len is zero, type: 0, extent [0, 0, 0], age [0, 0]
------------[ cut here ]------------
kernel BUG at fs/f2fs/extent_cache.c:678!
Oops: invalid opcode: 0000 [#1] SMP KASAN NOPTI
CPU: 0 UID: 0 PID: 5322 Comm: syz.0.0 Not tainted syzkaller #0 PREEMPT(full) 
Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2~bpo12+1 04/01/2014
RIP: 0010:__update_extent_tree_range+0x13bc/0x1500 fs/f2fs/extent_cache.c:678
Code: 48 c7 c2 60 7a b3 8b 48 c7 c1 45 f5 8b 8d 44 8b 44 24 0c 4c 8b 4c 24 30 41 ff 37 41 56 6a 00 53 e8 39 09 ef ff 48 83 c4 20 90 <0f> 0b f3 0f 1e fa 65 44 8b 3d 8a c9 50 0e bf 07 00 00 00 44 89 fe
RSP: 0018:ffffc9000d3d74c0 EFLAGS: 00010286
RAX: d1e837f896764c00 RBX: 0000000000000000 RCX: d1e837f896764c00
RDX: ffffc9000e412000 RSI: 000000000001413a RDI: 000000000001413b
RBP: ffffc9000d3d7690 R08: ffffc9000d3d7087 R09: 1ffff92001a7ae10
R10: dffffc0000000000 R11: fffff52001a7ae11 R12: 1ffff92001a7aebc
R13: ffff888042e79ae8 R14: 0000000000000000 R15: ffffc9000d3d76b8
FS:  00007f7d9f5f36c0(0000) GS:ffff88808d730000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 00007f7d9f5d1fc8 CR3: 0000000042260000 CR4: 0000000000352ef0
Call Trace:
 <TASK>
 f2fs_update_read_extent_cache_range+0x192/0x3e0 fs/f2fs/extent_cache.c:1085
 f2fs_do_zero_range fs/f2fs/file.c:1657 [inline]
 f2fs_zero_range+0x10c1/0x1580 fs/f2fs/file.c:1737
 f2fs_fallocate+0x583/0x990 fs/f2fs/file.c:2030
 vfs_fallocate+0x669/0x7e0 fs/open.c:342
 ioctl_preallocate fs/ioctl.c:289 [inline]
 file_ioctl+0x611/0x780 fs/ioctl.c:-1
 do_vfs_ioctl+0xb33/0x1430 fs/ioctl.c:576
 __do_sys_ioctl fs/ioctl.c:595 [inline]
 __se_sys_ioctl+0x82/0x170 fs/ioctl.c:583
 do_syscall_x64 arch/x86/entry/syscall_64.c:63 [inline]
 do_syscall_64+0xfa/0xfa0 arch/x86/entry/syscall_64.c:94
 entry_SYSCALL_64_after_hwframe+0x77/0x7f
RIP: 0033:0x7f7d9e78f6c9
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:00007f7d9f5f3038 EFLAGS: 00000246 ORIG_RAX: 0000000000000010
RAX: ffffffffffffffda RBX: 00007f7d9e9e5fa0 RCX: 00007f7d9e78f6c9
RDX: 0000200000000040 RSI: 0000000040305839 RDI: 000000000000000a
RBP: 00007f7d9e811f91 R08: 0000000000000000 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000
R13: 00007f7d9e9e6038 R14: 00007f7d9e9e5fa0 R15: 00007ffced296768
 </TASK>
Modules linked in:
---[ end trace 0000000000000000 ]---
RIP: 0010:__update_extent_tree_range+0x13bc/0x1500 fs/f2fs/extent_cache.c:678
Code: 48 c7 c2 60 7a b3 8b 48 c7 c1 45 f5 8b 8d 44 8b 44 24 0c 4c 8b 4c 24 30 41 ff 37 41 56 6a 00 53 e8 39 09 ef ff 48 83 c4 20 90 <0f> 0b f3 0f 1e fa 65 44 8b 3d 8a c9 50 0e bf 07 00 00 00 44 89 fe
RSP: 0018:ffffc9000d3d74c0 EFLAGS: 00010286
RAX: d1e837f896764c00 RBX: 0000000000000000 RCX: d1e837f896764c00
RDX: ffffc9000e412000 RSI: 000000000001413a RDI: 000000000001413b
RBP: ffffc9000d3d7690 R08: ffffc9000d3d7087 R09: 1ffff92001a7ae10
R10: dffffc0000000000 R11: fffff52001a7ae11 R12: 1ffff92001a7aebc
R13: ffff888042e79ae8 R14: 0000000000000000 R15: ffffc9000d3d76b8
FS:  00007f7d9f5f36c0(0000) GS:ffff88808d730000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 00007f7d9f56ffc8 CR3: 0000000042260000 CR4: 0000000000352ef0

Crashes (13):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2025/11/14 07:47 upstream 2ccec5944606 07e030de .config console log report [disk image (non-bootable)] [vmlinux] [kernel image] ci-snapshot-upstream-root kernel BUG in __update_extent_tree_range
2025/11/06 06:32 upstream dc77806cf3b4 a6c9c731 .config console log report [disk image (non-bootable)] [vmlinux] [kernel image] ci-snapshot-upstream-root kernel BUG in __update_extent_tree_range
2025/11/05 07:49 upstream c9cfc122f037 a6c9c731 .config console log report [disk image (non-bootable)] [vmlinux] [kernel image] ci-snapshot-upstream-root kernel BUG in __update_extent_tree_range
2025/10/23 12:29 upstream 43e9ad0c55a3 c0460fcd .config console log report [disk image (non-bootable)] [vmlinux] [kernel image] ci-snapshot-upstream-root kernel BUG in __update_extent_tree_range
2025/10/20 04:37 upstream d9043c79ba68 1c8c8cd8 .config console log report [disk image (non-bootable)] [vmlinux] [kernel image] ci-snapshot-upstream-root kernel BUG in __update_extent_tree_range
2025/10/20 02:41 upstream d9043c79ba68 1c8c8cd8 .config console log report [disk image (non-bootable)] [vmlinux] [kernel image] ci-snapshot-upstream-root kernel BUG in __update_extent_tree_range
2025/10/10 17:33 upstream 5472d60c129f ff1712fe .config console log report [disk image (non-bootable)] [vmlinux] [kernel image] ci-snapshot-upstream-root kernel BUG in __update_extent_tree_range
2025/10/09 17:24 upstream ec714e371f22 7e2882b3 .config console log report [disk image (non-bootable)] [vmlinux] [kernel image] ci-snapshot-upstream-root kernel BUG in __update_extent_tree_range
2025/10/08 14:32 upstream 0d97f2067c16 7e2882b3 .config console log report [disk image (non-bootable)] [vmlinux] [kernel image] ci-snapshot-upstream-root kernel BUG in __update_extent_tree_range
2025/10/04 04:21 upstream 2ccb4d203fe4 49379ee0 .config console log report [disk image (non-bootable)] [vmlinux] [kernel image] ci-snapshot-upstream-root kernel BUG in __update_extent_tree_range
2025/10/04 04:21 upstream 2ccb4d203fe4 49379ee0 .config console log report [disk image (non-bootable)] [vmlinux] [kernel image] ci-snapshot-upstream-root kernel BUG in __update_extent_tree_range
2025/10/04 04:19 upstream 2ccb4d203fe4 49379ee0 .config console log report [disk image (non-bootable)] [vmlinux] [kernel image] ci-snapshot-upstream-root kernel BUG in __update_extent_tree_range
2025/10/04 03:10 upstream 2ccb4d203fe4 49379ee0 .config console log report [disk image (non-bootable)] [vmlinux] [kernel image] ci-snapshot-upstream-root kernel BUG in __update_extent_tree_range
* Struck through repros no longer work on HEAD.