# CVE-2025-38333: f2fs: fix to bail out in get_new_segment()

- Severity: High 7.8 (CVSS:3.1, scored by Linux) `CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H`
- Known to be exploited: not in CISA's catalogue, which lists only what CISA has confirmed
- Likelihood of exploitation in the next 30 days (EPSS): 0.19%, higher than 8% of CVEs (2026-12-01)
- Published: 2025-07-10T08:15:05.768Z
- Modified: 2026-08-05T12:01:11.722Z
- Assigned by: Linux

## Description

In the Linux kernel, the following vulnerability has been resolved:

f2fs: fix to bail out in get_new_segment()

------------[ cut here ]------------
WARNING: CPU: 3 PID: 579 at fs/f2fs/segment.c:2832 new_curseg+0x5e8/0x6dc
pc : new_curseg+0x5e8/0x6dc
Call trace:
 new_curseg+0x5e8/0x6dc
 f2fs_allocate_data_block+0xa54/0xe28
 do_write_page+0x6c/0x194
 f2fs_do_write_node_page+0x38/0x78
 __write_node_page+0x248/0x6d4
 f2fs_sync_node_pages+0x524/0x72c
 f2fs_write_checkpoint+0x4bc/0x9b0
 __checkpoint_and_complete_reqs+0x80/0x244
 issue_checkpoint_thread+0x8c/0xec
 kthread+0x114/0x1bc
 ret_from_fork+0x10/0x20

get_new_segment() detects inconsistent status in between free_segmap
and free_secmap, let's record such error into super block, and bail
out get_new_segment() instead of continue using the segment.

(As written by CVE List.)

## Affected

- Linux Linux: from 98e4da8ca301e062d79ae168c67e56f3c3de3ce4 before f0023d7a2a86999c8e1300e911d92f995a5310a8; from 98e4da8ca301e062d79ae168c67e56f3c3de3ce4 before ca860f507a61c7c3d4dde47b830a5c0d555cf83c; from 98e4da8ca301e062d79ae168c67e56f3c3de3ce4 before bb5eb8a5b222fa5092f60d5555867a05ebc3bdf2; 3.8 (not affected: before 3.8; from 6.12.35 up to 6.12.*; from 6.15.4 up to 6.15.*; from 6.16 up to *)
- linux linux_kernel: from 3.8 before 6.12.35; from 6.13 before 6.15.4

## Every score

- Linux: CVSS:3.1 7.8 High `CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H`
- NVD: CVSS:3.1 5.5 Medium `CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H`

## References

- <https://git.kernel.org/stable/c/f0023d7a2a86999c8e1300e911d92f995a5310a8> (patch)
- <https://git.kernel.org/stable/c/ca860f507a61c7c3d4dde47b830a5c0d555cf83c> (patch)
- <https://git.kernel.org/stable/c/bb5eb8a5b222fa5092f60d5555867a05ebc3bdf2> (patch)

## Sources

- CVE List: [CVE-2025-38333](https://www.cve.org/CVERecord?id=CVE-2025-38333), CVE Terms of Use, modified 2026-08-05
- NVD: [CVE-2025-38333](https://nvd.nist.gov/vuln/detail/CVE-2025-38333), Public domain, modified 2026-07-30

---

Page: https://cve.day/CVE-2025-38333 · Whole record: https://cve.day/CVE-2025-38333.json · Rebuilt by cve.day 2026-11-25T22:59:01.080Z
