| From bippy-5f407fcff5a0 Mon Sep 17 00:00:00 2001 |
| From: Greg Kroah-Hartman <gregkh@linuxfoundation.org> |
| To: <linux-cve-announce@vger.kernel.org> |
| Reply-to: <cve@kernel.org>, <linux-kernel@vger.kernel.org> |
| Subject: CVE-2025-21646: afs: Fix the maximum cell name length |
| |
| 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. |
| |
| The Linux kernel CVE team has assigned CVE-2025-21646 to this issue. |
| |
| |
| Affected and fixed versions |
| =========================== |
| |
| Issue introduced in 5.8 with commit c3e9f888263bb4df11cbd623ceced02081cb2f9f and fixed in 5.10.234 with commit 9340385468d056bb700b8f28df236b81fc86a079 |
| Issue introduced in 5.8 with commit c3e9f888263bb4df11cbd623ceced02081cb2f9f and fixed in 5.15.177 with commit 7cb3e77e9b4e6ffa325a5559393d3283c9af3d01 |
| Issue introduced in 5.8 with commit c3e9f888263bb4df11cbd623ceced02081cb2f9f and fixed in 6.1.125 with commit aabe47cf5ac5e1db2ae0635f189d836f67024904 |
| Issue introduced in 5.8 with commit c3e9f888263bb4df11cbd623ceced02081cb2f9f and fixed in 6.6.72 with commit 7673030efe0f8ca1056d3849d61784c6caa052af |
| Issue introduced in 5.8 with commit c3e9f888263bb4df11cbd623ceced02081cb2f9f and fixed in 6.12.10 with commit 7922b1f058fe24a93730511dd0ae2e1630920096 |
| Issue introduced in 5.8 with commit c3e9f888263bb4df11cbd623ceced02081cb2f9f and fixed in 6.13 with commit 8fd56ad6e7c90ac2bddb0741c6b248c8c5d56ac8 |
| |
| Please see https://www.kernel.org for a full list of currently supported |
| kernel versions by the kernel community. |
| |
| Unaffected versions might change over time as fixes are backported to |
| older supported kernel versions. The official CVE entry at |
| https://cve.org/CVERecord/?id=CVE-2025-21646 |
| will be updated if fixes are backported, please check that for the most |
| up to date information about this issue. |
| |
| |
| Affected files |
| ============== |
| |
| The file(s) affected by this issue are: |
| fs/afs/afs.h |
| fs/afs/afs_vl.h |
| fs/afs/vl_alias.c |
| fs/afs/vlclient.c |
| |
| |
| Mitigation |
| ========== |
| |
| The Linux kernel CVE team recommends that you update to the latest |
| stable kernel version for this, and many other bugfixes. Individual |
| changes are never tested alone, but rather are part of a larger kernel |
| release. Cherry-picking individual commits is not recommended or |
| supported by the Linux kernel community at all. If however, updating to |
| the latest release is impossible, the individual changes to resolve this |
| issue can be found at these commits: |
| https://git.kernel.org/stable/c/9340385468d056bb700b8f28df236b81fc86a079 |
| https://git.kernel.org/stable/c/7cb3e77e9b4e6ffa325a5559393d3283c9af3d01 |
| https://git.kernel.org/stable/c/aabe47cf5ac5e1db2ae0635f189d836f67024904 |
| https://git.kernel.org/stable/c/7673030efe0f8ca1056d3849d61784c6caa052af |
| https://git.kernel.org/stable/c/7922b1f058fe24a93730511dd0ae2e1630920096 |
| https://git.kernel.org/stable/c/8fd56ad6e7c90ac2bddb0741c6b248c8c5d56ac8 |