CVE-2025-21646
kernel: afs: Fix the maximum cell name length
Severity
ModerateRed Hat Product Security
CVSS 3.1
Review impact separately from score.
Published · January 19, 2025
Updated · October 30, 2026
Description
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.
Statement
This vulnerability is evaluated as Moderate severity because exploitation requires local authenticated access to configure or mount the in-kernel AFS filesystem, and the impact is confined to a kernel warning and potential denial of service without exposing sensitive data or enabling arbitrary code execution. In default Red Hat Enterprise Linux installations, the kafs filesystem is neither loaded nor actively mounted, limiting the exposure to systems where AFS networking has been explicitly configured. Consequently, standard deployments that do not use in-kernel AFS remain unimpacted during normal operations.
CVSS score applicability
The CVSS score(s) listed for this vulnerability do not reflect the associated product's status, and are included for informational purposes to better understand the severity of this vulnerability.
Mitigation
No mitigation is specified in collected source.
CVSS / CWE
CVSS 3.1 · 5.5CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H
CWE-20 · Improper Input Validation