Skip to content
FlawDB
Sign in
Archived entry. Full-text search covers entries since 2026-11-10; exact IDs work for all years.

CVE-2025-38059

MEDIUM 5.5EPSS 13%

btrfs: avoid NULL pointer dereference if no valid csum tree

Mitigation

  • No fix listed yet: follow the vendor advisory.

Who should check

  • Anyone running Linux >= 74ef00185eb864252156022ff129b01549504175, < 2db25048a61c0909459b074af04e06ab8a8b939e; >= 74ef00185eb864252156022ff129b01549504175, < 50d0de59f66cbe6d597481e099bf1c70fd07e0a9; >= 74ef00185eb864252156022ff129b01549504175, < 6e9770de024964b1017f99ee94f71967bd6edaeb; >= 74ef00185eb864252156022ff129b01549504175, < d35bed14b0bc95c6845863a3744ecd10b888c830; >= 74ef00185eb864252156022ff129b01549504175, < f95d186255b319c48a365d47b69bd997fecb674e
  • Anyone running Linux 5.9

Vulnerability facts

Affected
Linux >= 74ef00185eb864252156022ff129b01549504175, < 2db25048a61c0909459b074af04e06ab8a8b939e; >= 74ef00185eb864252156022ff129b01549504175, < 50d0de59f66cbe6d597481e099bf1c70fd07e0a9; >= 74ef00185eb864252156022ff129b01549504175, < 6e9770de024964b1017f99ee94f71967bd6edaeb; >= 74ef00185eb864252156022ff129b01549504175, < d35bed14b0bc95c6845863a3744ecd10b888c830; >= 74ef00185eb864252156022ff129b01549504175, < f95d186255b319c48a365d47b69bd997fecb674e; Linux 5.9
Fixed in
Linux 2db25048a61c0909459b074af04e06ab8a8b939e, Linux 50d0de59f66cbe6d597481e099bf1c70fd07e0a9, Linux 6e9770de024964b1017f99ee94f71967bd6edaeb
Exploited in the wild
Not in CISA KEV
Public exploit / PoC
None known
Remote exploitation
Not remotely exploitable (local or adjacent access needed)
CVSS
5.5 (v3.1, NVD)CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:HOpen in CVSS calculator
Show all 8 CVSS metrics
  • Attack vector: Local
  • Attack complexity: Low
  • Privileges required: Low
  • User interaction: None
  • Scope: Unchanged
  • Confidentiality impact: None
  • Integrity impact: None
  • Availability impact: High
EPSS
0.28% chance of exploitation in 30 days (percentile 13, 2026-11-26)
CWE
CWE-476
Published
Modified

Description

In the Linux kernel, the following vulnerability has been resolved: btrfs: avoid NULL pointer dereference if no valid csum tree [BUG] When trying read-only scrub on a btrfs with rescue=idatacsums mount option, it will crash with the following call trace: BUG: kernel NULL pointer dereference, address: 0000000000000208 #PF: supervisor read access in kernel mode #PF: error_code(0x0000) - not-present page CPU: 1 UID: 0 PID: 835 Comm: btrfs Tainted: G O 6.15.0-rc3-custom+ #236 PREEMPT(full) Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS unknown 02/02/2022 RIP: 0010:btrfs_lookup_csums_bitmap+0x49/0x480 [btrfs] Call Trace: <TASK> scrub_find_fill_first_stripe+0x35b/0x3d0 [btrfs] scrub_simple_mirror+0x175/0x290 [btrfs] scrub_stripe+0x5f7/0x6f0 [btrfs] scrub_chunk+0x9a/0x150 [btrfs] scrub_enumerate_chunks+0x333/0x660 [btrfs] btrfs_scrub_dev+0x23e/0x600 [btrfs] btrfs_ioctl+0x1dcf/0x2f80 [btrfs] __x64_sys_ioctl+0x97/0xc0 do_syscall_64+0x4f/0x120 entry_SYSCALL_64_after_hwframe+0x76/0x7e [CAUSE] Mount option "rescue=idatacsums" will completely skip loading the csum tree, so that any data read will not find any data csum thus we will ignore data checksum verification. Normally call sites utilizing csum tree will check the fs state flag NO_DATA_CSUMS bit, but unfortunately scrub does not check that bit at all. This results in scrub to call btrfs_search_slot() on a NULL pointer and triggered above crash. [FIX] Check both extent and csum tree root before doing any tree search.

Affected and fixed versions

Package / productAffectedFixedSource
Linux>= 74ef00185eb864252156022ff129b01549504175, < 2db25048a61c0909459b074af04e06ab8a8b939e; >= 74ef00185eb864252156022ff129b01549504175, < 50d0de59f66cbe6d597481e099bf1c70fd07e0a9; >= 74ef00185eb864252156022ff129b01549504175, < 6e9770de024964b1017f99ee94f71967bd6edaeb; >= 74ef00185eb864252156022ff129b01549504175, < d35bed14b0bc95c6845863a3744ecd10b888c830; >= 74ef00185eb864252156022ff129b01549504175, < f95d186255b319c48a365d47b69bd997fecb674e—cvelist
Linux5.9—cvelist

Check your systems with an agent

Paste this into Claude Code, Cursor or another coding agent. It only reads; it changes nothing.

Check whether anything I run is affected by CVE-2025-38059. Work read-only: do not install, upgrade, delete or change anything.

Details: https://flawdb.com/CVE-2025-38059.md
Affected: Linux >= 74ef00185eb864252156022ff129b01549504175, < 2db25048a61c0909459b074af04e06ab8a8b939e; >= 74ef00185eb864252156022ff129b01549504175, < 50d0de59f66cbe6d597481e099bf1c70fd07e0a9; >= 74ef00185eb864252156022ff129b01549504175, < 6e9770de024964b1017f99ee94f71967bd6edaeb; >= 74ef00185eb864252156022…
Fixed in: Linux 2db25048a61c0909459b074af04e06ab8a8b939e, Linux 50d0de59f66cbe6d597481e099bf1c70fd07e0a9, Linux 6e9770de024964b1017f99ee94f71967bd6edaeb

Steps:
1. Search this machine and project for Linux: dependency manifests and lockfiles, installed packages, container images and running services.
2. For each match, note the installed version and whether it is inside the affected range.
3. Report a table: location, installed version, affected (yes / no / unsure), evidence. If affected, say which fixed version or mitigation from the details link applies, but don't apply it.

References

FAQ

Is CVE-2025-38059 being exploited?

There is no confirmed exploitation: CVE-2025-38059 is not in the CISA Known Exploited Vulnerabilities catalog. No public exploit code is known. EPSS estimates a 0.28% chance of exploitation in the next 30 days (as of 2026-11-26).

How serious is CVE-2025-38059?

Medium: CVSS 5.5 (v3.1, scored by NVD). Not remotely exploitable (local or adjacent access needed).

Which versions are affected by CVE-2025-38059?

Linux >= 74ef00185eb864252156022ff129b01549504175, < 2db25048a61c0909459b074af04e06ab8a8b939e; >= 74ef00185eb864252156022ff129b01549504175, < 50d0de59f66cbe6d597481e099bf1c70fd07e0a9; >= 74ef00185eb864252156022ff129b01549504175, < 6e9770de024964b1017f99ee94f71967bd6edaeb; >= 74ef00185eb864252156022ff129b01549504175, < d35bed14b0bc95c6845863a3744ecd10b888c830; >= 74ef00185eb864252156022ff129b01549504175, < f95d186255b319c48a365d47b69bd997fecb674e; Linux 5.9.

Is there a fix for CVE-2025-38059?

Yes. Fixed in Linux 2db25048a61c0909459b074af04e06ab8a8b939e, Linux 50d0de59f66cbe6d597481e099bf1c70fd07e0a9, Linux 6e9770de024964b1017f99ee94f71967bd6edaeb. No fix listed yet: follow the vendor advisory.

How do I check if I'm affected by CVE-2025-38059?

Find where you use the affected software (dependency lockfiles, installed packages, container images, servers) and compare the installed version with the affected range above. The agent prompt on this page does this read-only.

Sponsors