CVE-2025-21646

afs: Fix the maximum cell name length

State
Published
Severity
7.5 High
Published
Jan 19, 2025
Updated
Aug 5, 2026
Reserved
Dec 29, 2024

Read the record on cve.org

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.

Scores

CVSSScoreVectorSource
3.17.5 HighCVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:HLinux

Weaknesses

The record names no weakness.

Affected Products

ProductVersions
LinuxLinux
  • c3e9f888263bb4df11cbd623ceced02081cb2f9f to before 9340385468d056bb700b8f28df236b81fc86a079Affected
  • c3e9f888263bb4df11cbd623ceced02081cb2f9f to before 7cb3e77e9b4e6ffa325a5559393d3283c9af3d01Affected
  • c3e9f888263bb4df11cbd623ceced02081cb2f9f to before aabe47cf5ac5e1db2ae0635f189d836f67024904Affected
  • c3e9f888263bb4df11cbd623ceced02081cb2f9f to before 7673030efe0f8ca1056d3849d61784c6caa052afAffected
  • c3e9f888263bb4df11cbd623ceced02081cb2f9f to before 7922b1f058fe24a93730511dd0ae2e1630920096Affected
  • c3e9f888263bb4df11cbd623ceced02081cb2f9f to before 8fd56ad6e7c90ac2bddb0741c6b248c8c5d56ac8Affected
LinuxLinux
  • 5.8Affected
  • before 5.8Not affected
  • 5.10.234 through 5.10.*Not affected
  • 5.15.177 through 5.15.*Not affected
  • 6.1.125 through 6.1.*Not affected
  • 6.6.72 through 6.6.*Not affected
  • 6.12.10 through 6.12.*Not affected
  • 6.13 and laterNot affected

References

Every record here comes from the CVE Program’s CVE List. © 1999–2026 The MITRE Corporation. CVE is a registered trademark of The MITRE Corporation. The records are reproduced under the CVE Program terms of use.