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

High 7.5 Published Updated

A flaw in the Linux kernel AFS filesystem allows a local attacker to trigger a kernel warning and potential denial of service by using a cell name exceeding the procfs filename limit.

Exploited in the wild
Not known
Login needed
Not needed
Attackable
Over the internet
Victim action needed
Not needed
Fix
Available

What is CVE-2025-21646?

CVE-2025-21646 is a high-severity denial of service vulnerability in Linux kernel, published on 19 Jan 2025. An attacker can exploit it over the internet without logging in, with no action from the victim.

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

Which versions are affected by CVE-2025-21646?

It affects 1 product.

Products include Linux kernel.

How do I fix CVE-2025-21646?

Apply the vendor's patch.

Upgrade, then put limits on request size, rate and nesting depth so one client cannot exhaust the service. More about Denial of service.

Is CVE-2025-21646 being exploited?

There is no known exploitation of CVE-2025-21646 in the wild and no public exploit code.

All Linux kernel vulnerabilities

Sources

Also known as BELL-CVE-2025-21646, DEBIAN-CVE-2025-21646, GHSA-qwq3-wccv-85hw, UBUNTU-CVE-2025-21646.

Is CVE-2025-21646 in your software?

Upload an SBOM and sbomify checks it against every vulnerability here, every day.

Check your SBOMs for free