CVE-2025-21679

btrfs: add the missing error handling inside get_canonical_dev_path

MEDIUM
5.5
CVSS Score
Published: January 31, 2025 at 11:25 AM UTC
Updated: June 17, 2026 at 08:44 AM UTC
1 product affected across 1 vendorLinux Kernel

Using Linux by Linux?

Get instant alerts when new vulnerabilities affect Linux - before attackers find them.

Real-time alertsTrack your software stackFree plan available
Severity
MEDIUM5.5
Exploit prediction
EPSS 0.2%

Description

In the Linux kernel, the following vulnerability has been resolved: btrfs: add the missing error handling inside get_canonical_dev_path Inside function get_canonical_dev_path(), we call d_path() to get the final device path. But d_path() can return error, and in that case the next strscpy() call will trigger an invalid memory access. Add back the missing error handling for d_path().

Affected

Our own answer: ranges merged, affected separated from platform-only, with confidence and review flags.

6.12.5 ≤ v < 6.12.115d261f60b5c82ba1e4b5555252e1c90c43d960156.12.56.13 rc16.13 rc26.13 rc36.13 rc46.13 rc56.13 rc66.13 rc77e06de7c83a746e58d4701e013182af133395188
Vendor states this is fixed in d0fb5741932b831eded49bfaaf33353e96200d6d (fixed)
Vendor states this is fixed in fe4de594f7a2e9bc49407de60fbd20809fad4192 (fixed)
Affected range stops below 6.12.11, so it looks safe — our inference, not a vendor statement

Remediation

No guide yet

No remediation guidance has been written for this CVE yet. What the record does show:

References (2)

Patch
Source: 416baaa9-dc9f-4396-8d5f-8c081fb06d67
https://git.kernel.org/stable/c/d0fb5741932b831eded49bfaaf33353e96200d6d
Patch
Source: 416baaa9-dc9f-4396-8d5f-8c081fb06d67
https://git.kernel.org/stable/c/fe4de594f7a2e9bc49407de60fbd20809fad4192

CVSS

Attack Vector
LOCAL
Complexity
LOW
Privileges
LOW
User Interaction
NONE
Scope
UNCHANGED
Confidentiality
NONE
Integrity
NONE
Availability
HIGH
Vector?

Quick Info

StatusANALYZED
CWE
NVD-CWE-noinfo

Get alerted

Stop reading CVE feeds looking for your own stack

Track the products you run and VulnTracker tells you when a new CVE affects them — with what is known about fixing it, and nothing about the rest.

Free plan, no card