CVE-2025-21679
btrfs: add the missing error handling inside get_canonical_dev_path
Check your servers for CVE-2025-21679
The Vulnpocalypse collector sends the package list of each Linux server and of its container images once a day. Vulnpocalypse shows every server where CVE-2025-21679 affects the running kernel, with the command that installs the fix. The free plan covers one server and one domain and does not need a credit card.
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().
Exploitation
EPSS 0.17%: the probability of exploitation activity in the next 30 days, from the EPSS model of FIRST. The score is higher than 7.21% of all scored CVEs. Scores of 1 Dec 2026.
Affected products
As the CNA lists them.
| Product | Versions |
|---|---|
| Linux |
affected from 5d261f60b5c82ba1e4b5555252e1c90c43d96015, before d0fb5741932b831eded49bfaaf33353e96200d6d affected from 7e06de7c83a746e58d4701e013182af133395188, before fe4de594f7a2e9bc49407de60fbd20809fad4192
Other versions: unaffected
|
| Linux |
affected from 6.12.5, before 6.12.11
Other versions: unaffected
|
Is my server affected?
This CVE is in the Linux kernel. Compare the running kernel with the fixed kernel version of your distribution, and reboot after a kernel update:
uname -r
# Debian, Ubuntu: does the changelog of the running kernel name the CVE?
zgrep -l CVE-2025-21679 /usr/share/doc/linux-image-$(uname -r)/changelog.Debian.gz
# RHEL, Rocky, Alma
rpm -q --changelog kernel | grep CVE-2025-21679
With Trivy, on the host and for a container image. When a package is affected, it prints the installed and the fixed version:
trivy rootfs --scanners vuln / | grep CVE-2025-21679
trivy image --scanners vuln IMAGE | grep CVE-2025-21679
Vulnpocalypse makes this comparison every day for the package lists of your servers and container images, including language packages (npm, PyPI, Go, Maven and others), and sends the command that installs the fix. Start free with one server and one domain or read how to install the collector.
References
Other references
- https://git.kernel.org/stable/c/d0fb5741932b831eded49bfaaf33353e96200d6d git.kernel.org
- https://git.kernel.org/stable/c/fe4de594f7a2e9bc49407de60fbd20809fad4192 git.kernel.org
Source: the record CVE-2025-21679 of the CVE List (CVE Program), CVE Terms of Use; EPSS of FIRST. The text of the record is shown as published. Data sources and licences.
Vulnpocalypse