CVE-2025-23130
NoneCVSS
—
EPSS
0.2%
Published
Apr 16, 2025
CISA due date
—
Cloudanix analysis
A timing problem in the Linux file system can make the whole computer crash when multiple programs try to reserve space in certain files at once.
- Exploitation
- Local Privilege
- Attacker needs
- Local User
- Complexity
- Moderate
- Impact
- Denial Of Service
- Component
- OS kernel
- Class
- Race Condition
- Remediation
- Patch
- Effort
- Medium
- Patch risk
- Low
What it actually does
Race condition in f2fs pinfile fallocation allows concurrent allocations to exhaust free sections, triggering a kernel BUG/panic in get_new_segment/new_curseg when reclaim fails.
Why it matters to the business
Local users on f2fs-based systems can trigger kernel panics causing denial of service, system crashes, and operational downtime; low exploitability but high impact on affected Linux deployments.
How an attack unfolds
A local attacker issues concurrent fallocate syscalls targeting pinned files on f2fs to deplete free sections; the missing pin_sem coverage around f2fs_gc allows the allocator to reach get_new_segment without sufficient space, hitting the BUG.
How to fix it
Apply the kernel fix that widens pin_sem to cover f2fs_gc and improves error handling in get_new_segment/new_curseg; upgrade affected packages to the listed fixed versions such as ruby 3.1.2-142.module+el8.8.0+22637+76cde83a and related gems on RHEL 8.8 EUS.
How to confirm the fix worked
Confirm kernel version contains the f2fs segment.c changes; verify no BUG at fs/f2fs/segment.c:2746 under concurrent pinfile fallocate workloads; check package versions match the provided fixed module streams.
Typical attack path
- Obtain local unprivileged access on an f2fs filesystem
- Issue concurrent f2fs_fallocate calls on pinfiles
- Exhaust free sections before GC reclaims space
- Trigger kernel BUG at segment.c:2746 resulting in panic
How to detect it
Search kernel logs for BUG at fs/f2fs/segment.c:2746 or new_curseg calls; look for f2fs_allocate_pinning_section and f2fs_fallocate sequences under high concurrency; no remote indicators expected.
What your security team should do
- Prioritize patching f2fs systems to the fixed kernel versions
- Restrict unprivileged local access on f2fs volumes until patched
- Monitor for kernel oops/panics referencing f2fs/segment.c
- Test fallocate-heavy workloads after upgrade
The record
In the Linux kernel, the following vulnerability has been resolved: f2fs: fix to avoid panic once fallocation fails for pinfile syzbot reports a f2fs bug as below: ------------[ cut here ]------------ kernel BUG at fs/f2fs/segment.c:2746! CPU: 0 UID: 0 PID: 5323 Comm: syz.0.0 Not tainted 6.13.0-rc2-syzkaller-00018-g7cb1b4663150 #0 RIP: 0010:get_new_segment fs/f2fs/segment.c:2746 [inline] RIP: 0010:new_curseg+0x1f52/0x1f70 fs/f2fs/segment.c:2876 Call Trace: <TASK> __allocate_new_segment+0x1ce/0x940 fs/f2fs/segment.c:3210 f2fs_allocate_new_section fs/f2fs/segment.c:3224 [inline] f2fs_allocate_pinning_section+0xfa/0x4e0 fs/f2fs/segment.c:3238 f2fs_expand_inode_data+0x696/0xca0 fs/f2fs/file.c:1830 f2fs_fallocate+0x537/0xa10 fs/f2fs/file.c:1940 vfs_fallocate+0x569/0x6e0 fs/open.c:327 do_vfs_ioctl+0x258c/0x2e40 fs/ioctl.c:885 __do_sys_ioctl fs/ioctl.c:904 [inline] __se_sys_ioctl+0x80/0x170 fs/ioctl.c:892 do_syscall_x64 arch/x86/entry/common.c:52 [inline] do_syscall_64+0xf3/0x230 arch/x86/entry/common.c:83 entry_SYSCALL_64_after_hwframe+0x77/0x7f Concurrent pinfile allocation may run out of free section, result in panic in get_new_segment(), let's expand pin_sem lock coverage to include f2fs_gc(), so that we can make sure to reclaim enough free space for following allocation. In addition, do below changes to enhance error path handling: - call f2fs_bug_on() only in non-pinfile allocation path in get_new_segment(). - call reset_curseg_fields() to reset all fields of curseg in new_curseg()
Affected packages
| Ecosystem | Package | Introduced | Fixed |
|---|---|---|---|
| Chainguard | hyperv-daemons-6.12 | 0 | 6.12.58-r0 |
| Chainguard | linux-aws-6.12 | 0 | 6.12.58-r0 |
| Chainguard | linux-aws-6.12-boot-installed | 0 | 6.12.58-r0 |
| Chainguard | linux-aws-6.12-fips-boot-installed | 0 | 6.12.58-r0 |
| Chainguard | linux-aws-6.12-headers | 0 | 6.12.58-r0 |
| Chainguard | linux-aws-6.12-modules | 0 | 6.12.58-r0 |
| Chainguard | linux-azure-6.12 | 0 | 6.12.58-r0 |
| Chainguard | linux-azure-6.12-boot-installed | 0 | 6.12.58-r0 |
| Chainguard | linux-azure-6.12-fips-boot-installed | 0 | 6.12.58-r0 |
| Chainguard | linux-azure-6.12-headers | 0 | 6.12.58-r0 |
| Chainguard | linux-azure-6.12-modules | 0 | 6.12.58-r0 |
| Chainguard | linux-gcp-6.12 | 0 | 6.12.58-r0 |
| Chainguard | linux-gcp-6.12-boot-installed | 0 | 6.12.58-r0 |
| Chainguard | linux-gcp-6.12-fips-boot-installed | 0 | 6.12.58-r0 |
| Chainguard | linux-gcp-6.12-headers | 0 | 6.12.58-r0 |
| Chainguard | linux-gcp-6.12-modules | 0 | 6.12.58-r0 |
| Debian:11 | linux | 0 | No fix |
| Debian:12 | linux | 0 | No fix |
| Debian:13 | linux | 0 | No fix |
| Debian:14 | linux | 0 | 6.16.3-1 |
| Linux | Kernel | 5.5.0 | 6.12.57 |
| Linux | Kernel | 5.5.0 | 6.14.2 |
Related vulnerabilities
- CVE-2025-39910 In the Linux kernel, the following vulnerability has been resolved: mm/vmalloc, mm/kasan… Also affects hyperv-daemons-6.12
- CVE-2025-39925 can: j1939: implement NETDEV_UNREGISTER notification handler Also affects hyperv-daemons-6.12
- CVE-2025-39905 net: phylink: add lock for serializing concurrent pl->phydev writes with resolver Also affects hyperv-daemons-6.12
- CVE-2025-39862 In the Linux kernel, the following vulnerability has been resolved: wifi: mt76: mt7915… Also affects hyperv-daemons-6.12
- CVE-2025-39859 In the Linux kernel, the following vulnerability has been resolved: ptp: ocp: fix… Also affects hyperv-daemons-6.12
- CVE-2025-39834 In the Linux kernel, the following vulnerability has been resolved: net/mlx5: HWS, Fix… Also affects hyperv-daemons-6.12
- CVE-2025-39830 In the Linux kernel, the following vulnerability has been resolved: net/mlx5: HWS, Fix… Also affects hyperv-daemons-6.12
- CVE-2025-39833 In the Linux kernel, the following vulnerability has been resolved: mISDN: hfcpci: Fix… Also affects hyperv-daemons-6.12