CVE-2025-39835: xfs: do not propagate ENODATA disk errors into xattr code
In the Linux kernel, the following vulnerability has been resolved:
xfs: do not propagate ENODATA disk errors into xattr code
ENODATA (aka ENOATTR) has a very specific meaning in the xfs xattr code; namely, that the requested attribute name could not be found.
However, a medium error from disk may also return ENODATA. At best, this medium error may escape to userspace as "attribute not found" when in fact it's an IO (disk) error.
At worst, we may oops in xfsattrleafget() when we do:
error = xfsattrleafhasname(args, &bp); if (error == -ENOATTR) { xfstransbrelse(args->trans, bp); return error; }
because an ENODATA/ENOATTR error from disk leaves us with a null bp, and the xfstransbrelse will then null-deref it.
As discussed on the list, we really need to modify the lower level IO functions to trap all disk errors and ensure that we don't let unique errors like this leak up into higher xfs functions - many like this should be remapped to EIO.
However, this patch directly addresses a reported bug in the xattr code, and should be safe to backport to stable kernels. A larger-scope patch to handle more unique errors at lower levels can follow later.
(Note, prior to 07120f1abdff we did not oops, but we did return the wrong error code to userspace.)
Affected Software
Remediation
Recommended actions to resolve this vulnerability, in priority order.
- Upgrade
Upgrade
debian/linuxto a version that resolves this vulnerability.Fixed in 6.1.176-1Fixed in 6.1.190-1Fixed in 6.12.107-1Fixed in 6.12.113-1Fixed in 7.2.12-1Fixed in 7.2.13-1 - Upgrade
Upgrade to a fixed release to a version that resolves this vulnerability.
Patch 07120f1abdff
Event History
Frequently Asked Questions
What is the severity of CVE-2025-39835?
CVE-2025-39835 has been classified with medium severity due to its potential impact on xfs xattr code operations.
How do I fix CVE-2025-39835?
To fix CVE-2025-39835, ensure that you update to the patched version of the Linux kernel provided by your distribution.
What specific issue does CVE-2025-39835 address?
CVE-2025-39835 addresses the inappropriate propagation of ENODATA disk errors into the xattr code in the Linux kernel.
Which versions of the Linux kernel are affected by CVE-2025-39835?
CVE-2025-39835 affects various versions of the Linux kernel that utilize the xfs filesystem.
Is there a workaround for CVE-2025-39835?
Currently, the best approach is to apply the kernel update rather than relying on a workaround for CVE-2025-39835.