CVE-2025-21646: afs: Fix the maximum cell name length
In the Linux kernel, the following vulnerability has been resolved:
afs: Fix the maximum cell name length
The kafs filesystem limits the maximum length of a cell to 256 bytes, but a problem occurs if someone actually does that: kafs tries to create a directory under /proc/net/afs/ with the name of the cell, but that fails with a warning:
WARNING: CPU: 0 PID: 9 at fs/proc/generic.c:405
because procfs limits the maximum filename length to 255.
However, the DNS limits the maximum lookup length and, by extension, the maximum cell name, to 255 less two (length count and trailing NUL).
Fix this by limiting the maximum acceptable cellname length to 253. This also allows us to be sure we can create the "/afs/.<cell>/" mountpoint too.
Further, split the YFS VL record cell name maximum to be the 256 allowed by the protocol and ignore the record retrieved by YFSVL.GetCellName if it exceeds 253.
Other sources
In the Linux kernel, the following vulnerability has been resolved:
afs: Fix the maximum cell name length
The kafs filesystem limits the maximum length of a cell to 256 bytes, but a problem occurs if someone actually does that: kafs tries to create a directory under /proc/net/afs/ with the name of the cell, but that fails with a warning:
WARNING: CPU: 0 PID: 9 at fs/proc/generic.c:405
because procfs limits the maximum filename length to 255.
However, the DNS limits the maximum lookup length and, by extension, the maximum cell name, to 255 less two (length count and trailing NUL).
Fix this by limiting the maximum acceptable cellname length to 253. This also allows us to be sure we can create the "/afs/.<cell>/" mountpoint too.
Further, split the YFS VL record cell name maximum to be the 256 allowed by the protocol and ignore the record retrieved by YFSVL.GetCellName if it exceeds 253.
— NVD
This CVE was automatically created from a reference found in an email or other text. If you are reading this, then this CVE entry is probably erroneous, since this text should be replaced by the official CVE description automatically.
— Launchpad
Affected Software
Remediation
Recommended actions to resolve this vulnerability, in priority order.
- Upgrade
Upgrade
debian/linuxto a version that resolves this vulnerability.Fixed in 5.10.234-1Fixed in 6.1.129-1Fixed in 6.1.135-1Fixed in 6.12.27-1 - Upgrade
Upgrade
debian/linux-6.1to a version that resolves this vulnerability.Fixed in 6.1.129-1~deb11u1 - Configuration
Limit the maximum acceptable AFS cell name length to 253 (to avoid procfs filename limit issues).
kafs filesystem (cell name handling) maximum acceptable cellname length = 253 - Configuration
Set the YFS VL record cell name maximum to the 256 allowed by the protocol; when reading via YFSVL.GetCellName, ignore the retrieved record if the cell name exceeds 253.
kafs filesystem (YFS VL record parsing) YFS VL record cell name maximum = 256 (protocol limit) - Compensating control
Ensure any created /proc/net/afs/ directory entries use cell names that do not exceed the procfs maximum filename length of 255 (255 less two for length count and trailing NUL), which implies enforcing the 253 byte limit for cell names.
Event History
Frequently Asked Questions
What is the severity of CVE-2025-21646?
The severity of CVE-2025-21646 is classified as moderate due to potential denial-of-service impacts.
How do I fix CVE-2025-21646?
To fix CVE-2025-21646, you should update to the latest version of the Linux kernel where the vulnerability has been patched.
What systems are affected by CVE-2025-21646?
CVE-2025-21646 affects all versions of the Linux kernel that utilize the kafs filesystem.
What are the potential impacts of CVE-2025-21646?
The potential impacts of CVE-2025-21646 include system instability and denial of service when exceeding the maximum cell name length.
When was CVE-2025-21646 reported?
CVE-2025-21646 was reported in early 2025, highlighting an issue with the kafs filesystem in the Linux kernel.