# CVE-2025-21646: afs: Fix the maximum cell name length

- Severity: High 7.5 (CVSS:3.1, scored by Linux) `CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H`
- Known to be exploited: not in CISA's catalogue, which lists only what CISA has confirmed
- Likelihood of exploitation in the next 30 days (EPSS): 0.45%, higher than 40% of CVEs (2026-12-01)
- Published: 2025-01-19T10:18:02.776Z
- Modified: 2026-08-05T11:53:20.429Z
- Assigned by: Linux

## 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.

(As written by CVE List.)

## Affected

- Linux Linux: from c3e9f888263bb4df11cbd623ceced02081cb2f9f before 9340385468d056bb700b8f28df236b81fc86a079; from c3e9f888263bb4df11cbd623ceced02081cb2f9f before 7cb3e77e9b4e6ffa325a5559393d3283c9af3d01; from c3e9f888263bb4df11cbd623ceced02081cb2f9f before aabe47cf5ac5e1db2ae0635f189d836f67024904; from c3e9f888263bb4df11cbd623ceced02081cb2f9f before 7673030efe0f8ca1056d3849d61784c6caa052af; from c3e9f888263bb4df11cbd623ceced02081cb2f9f before 7922b1f058fe24a93730511dd0ae2e1630920096; from c3e9f888263bb4df11cbd623ceced02081cb2f9f before 8fd56ad6e7c90ac2bddb0741c6b248c8c5d56ac8; 5.8 (not affected: before 5.8; from 5.10.234 up to 5.10.*; from 5.15.177 up to 5.15.*; from 6.1.125 up to 6.1.*; from 6.6.72 up to 6.6.*; from 6.12.10 up to 6.12.*; from 6.13 up to *)
- linux linux_kernel: from 5.8 before 5.10.234; from 5.11 before 5.15.177; from 5.16 before 6.1.125; from 6.2 before 6.6.72; from 6.7 before 6.12.10; 6.13

## Every score

- Linux: CVSS:3.1 7.5 High `CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H`
- NVD: CVSS:3.1 5.5 Medium `CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H`

## References

- <https://git.kernel.org/stable/c/9340385468d056bb700b8f28df236b81fc86a079> (patch)
- <https://git.kernel.org/stable/c/7cb3e77e9b4e6ffa325a5559393d3283c9af3d01> (patch)
- <https://git.kernel.org/stable/c/aabe47cf5ac5e1db2ae0635f189d836f67024904> (patch)
- <https://git.kernel.org/stable/c/7673030efe0f8ca1056d3849d61784c6caa052af> (patch)
- <https://git.kernel.org/stable/c/7922b1f058fe24a93730511dd0ae2e1630920096> (patch)
- <https://git.kernel.org/stable/c/8fd56ad6e7c90ac2bddb0741c6b248c8c5d56ac8> (patch)
- <https://lists.debian.org/debian-lts-announce/2025/03/msg00001.html>
- <https://lists.debian.org/debian-lts-announce/2025/03/msg00002.html>

## Sources

- CVE List: [CVE-2025-21646](https://www.cve.org/CVERecord?id=CVE-2025-21646), CVE Terms of Use, modified 2026-08-05
- NVD: [CVE-2025-21646](https://nvd.nist.gov/vuln/detail/CVE-2025-21646), Public domain, modified 2026-07-30

---

Page: https://cve.day/CVE-2025-21646 · Whole record: https://cve.day/CVE-2025-21646.json · Rebuilt by cve.day 2026-11-25T22:58:53.434Z
