CVE-2025-21646 (GCVE-0-2025-21646)

Vulnerability from cvelistv5 – Published: 2025-01-19 10:18 – Updated: 2026-08-05 11:53
VLAI
Title
afs: Fix the maximum cell name length
Summary
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.
Assigner
Linux CNA
Impacted products
Vendor Product Version
Linux Linux Affected: c3e9f888263bb4df11cbd623ceced02081cb2f9f , < 9340385468d056bb700b8f28df236b81fc86a079 (git)
Affected: c3e9f888263bb4df11cbd623ceced02081cb2f9f , < 7cb3e77e9b4e6ffa325a5559393d3283c9af3d01 (git)
Affected: c3e9f888263bb4df11cbd623ceced02081cb2f9f , < aabe47cf5ac5e1db2ae0635f189d836f67024904 (git)
Affected: c3e9f888263bb4df11cbd623ceced02081cb2f9f , < 7673030efe0f8ca1056d3849d61784c6caa052af (git)
Affected: c3e9f888263bb4df11cbd623ceced02081cb2f9f , < 7922b1f058fe24a93730511dd0ae2e1630920096 (git)
Affected: c3e9f888263bb4df11cbd623ceced02081cb2f9f , < 8fd56ad6e7c90ac2bddb0741c6b248c8c5d56ac8 (git)
Create a notification for this product.
Linux Linux Affected: 5.8
Unaffected: 0 , < 5.8 (semver)
Unaffected: 5.10.234 , ≤ 5.10.* (semver)
Unaffected: 5.15.177 , ≤ 5.15.* (semver)
Unaffected: 6.1.125 , ≤ 6.1.* (semver)
Unaffected: 6.6.72 , ≤ 6.6.* (semver)
Unaffected: 6.12.10 , ≤ 6.12.* (semver)
Unaffected: 6.13 , ≤ * (original_commit_for_fix)
Create a notification for this product.
Show details on NVD website

{
  "containers": {
    "adp": [
      {
        "providerMetadata": {
          "dateUpdated": "2025-11-03T20:58:26.381Z",
          "orgId": "af854a3a-2127-422b-91ae-364da2661108",
          "shortName": "CVE"
        },
        "references": [
          {
            "url": "https://lists.debian.org/debian-lts-announce/2025/03/msg00001.html"
          },
          {
            "url": "https://lists.debian.org/debian-lts-announce/2025/03/msg00002.html"
          }
        ],
        "title": "CVE Program Container"
      }
    ],
    "cna": {
      "affected": [
        {
          "defaultStatus": "unaffected",
          "product": "Linux",
          "programFiles": [
            "fs/afs/afs.h",
            "fs/afs/afs_vl.h",
            "fs/afs/vl_alias.c",
            "fs/afs/vlclient.c"
          ],
          "repo": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git",
          "vendor": "Linux",
          "versions": [
            {
              "lessThan": "9340385468d056bb700b8f28df236b81fc86a079",
              "status": "affected",
              "version": "c3e9f888263bb4df11cbd623ceced02081cb2f9f",
              "versionType": "git"
            },
            {
              "lessThan": "7cb3e77e9b4e6ffa325a5559393d3283c9af3d01",
              "status": "affected",
              "version": "c3e9f888263bb4df11cbd623ceced02081cb2f9f",
              "versionType": "git"
            },
            {
              "lessThan": "aabe47cf5ac5e1db2ae0635f189d836f67024904",
              "status": "affected",
              "version": "c3e9f888263bb4df11cbd623ceced02081cb2f9f",
              "versionType": "git"
            },
            {
              "lessThan": "7673030efe0f8ca1056d3849d61784c6caa052af",
              "status": "affected",
              "version": "c3e9f888263bb4df11cbd623ceced02081cb2f9f",
              "versionType": "git"
            },
            {
              "lessThan": "7922b1f058fe24a93730511dd0ae2e1630920096",
              "status": "affected",
              "version": "c3e9f888263bb4df11cbd623ceced02081cb2f9f",
              "versionType": "git"
            },
            {
              "lessThan": "8fd56ad6e7c90ac2bddb0741c6b248c8c5d56ac8",
              "status": "affected",
              "version": "c3e9f888263bb4df11cbd623ceced02081cb2f9f",
              "versionType": "git"
            }
          ]
        },
        {
          "defaultStatus": "affected",
          "product": "Linux",
          "programFiles": [
            "fs/afs/afs.h",
            "fs/afs/afs_vl.h",
            "fs/afs/vl_alias.c",
            "fs/afs/vlclient.c"
          ],
          "repo": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git",
          "vendor": "Linux",
          "versions": [
            {
              "status": "affected",
              "version": "5.8"
            },
            {
              "lessThan": "5.8",
              "status": "unaffected",
              "version": "0",
              "versionType": "semver"
            },
            {
              "lessThanOrEqual": "5.10.*",
              "status": "unaffected",
              "version": "5.10.234",
              "versionType": "semver"
            },
            {
              "lessThanOrEqual": "5.15.*",
              "status": "unaffected",
              "version": "5.15.177",
              "versionType": "semver"
            },
            {
              "lessThanOrEqual": "6.1.*",
              "status": "unaffected",
              "version": "6.1.125",
              "versionType": "semver"
            },
            {
              "lessThanOrEqual": "6.6.*",
              "status": "unaffected",
              "version": "6.6.72",
              "versionType": "semver"
            },
            {
              "lessThanOrEqual": "6.12.*",
              "status": "unaffected",
              "version": "6.12.10",
              "versionType": "semver"
            },
            {
              "lessThanOrEqual": "*",
              "status": "unaffected",
              "version": "6.13",
              "versionType": "original_commit_for_fix"
            }
          ]
        }
      ],
      "cpeApplicability": [
        {
          "nodes": [
            {
              "cpeMatch": [
                {
                  "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
                  "versionEndExcluding": "5.10.234",
                  "versionStartIncluding": "5.8",
                  "vulnerable": true
                },
                {
                  "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
                  "versionEndExcluding": "5.15.177",
                  "versionStartIncluding": "5.8",
                  "vulnerable": true
                },
                {
                  "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
                  "versionEndExcluding": "6.1.125",
                  "versionStartIncluding": "5.8",
                  "vulnerable": true
                },
                {
                  "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
                  "versionEndExcluding": "6.6.72",
                  "versionStartIncluding": "5.8",
                  "vulnerable": true
                },
                {
                  "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
                  "versionEndExcluding": "6.12.10",
                  "versionStartIncluding": "5.8",
                  "vulnerable": true
                },
                {
                  "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
                  "versionEndExcluding": "6.13",
                  "versionStartIncluding": "5.8",
                  "vulnerable": true
                }
              ],
              "negate": false,
              "operator": "OR"
            }
          ]
        }
      ],
      "descriptions": [
        {
          "lang": "en",
          "value": "In the Linux kernel, the following vulnerability has been resolved:\n\nafs: Fix the maximum cell name length\n\nThe kafs filesystem limits the maximum length of a cell to 256 bytes, but a\nproblem occurs if someone actually does that: kafs tries to create a\ndirectory under /proc/net/afs/ with the name of the cell, but that fails\nwith a warning:\n\n        WARNING: CPU: 0 PID: 9 at fs/proc/generic.c:405\n\nbecause procfs limits the maximum filename length to 255.\n\nHowever, the DNS limits the maximum lookup length and, by extension, the\nmaximum cell name, to 255 less two (length count and trailing NUL).\n\nFix this by limiting the maximum acceptable cellname length to 253.  This\nalso allows us to be sure we can create the \"/afs/.\u003ccell\u003e/\" mountpoint too.\n\nFurther, split the YFS VL record cell name maximum to be the 256 allowed by\nthe protocol and ignore the record retrieved by YFSVL.GetCellName if it\nexceeds 253."
        }
      ],
      "metrics": [
        {
          "cvssV3_1": {
            "baseScore": 7.5,
            "baseSeverity": "HIGH",
            "vectorString": "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H",
            "version": "3.1"
          },
          "scenarios": [
            {
              "lang": "en",
              "value": "AV:N - The over-length cell name originates in a YFSVL.GetCellName reply processed by afs_deliver_yfsvl_get_cell_name() from a remote AFS/YFS Volume Location server over rxrpc/UDP port 7003, and is passed to afs_lookup_cell() by yfs_check_canonical_cell_name(); a 256-byte name is in fact only reachable this way, since local path components are capped at NAME_MAX (255).\nAC:L - A malicious, compromised, or DNS/UDP-spoofed VL server simply returns a 256-byte cell name in its GetCellName reply, which the pre-fix code accepts unconditionally \u2014 deterministic, no race and no memory-layout dependency.\nPR:N - The VL server response is consumed using the anonymous rxnull key with no authentication of the peer, so the attacker needs no credentials or account on the target host; the local automount path that initiates the RPC is likewise available to any unprivileged user with /afs access.\nUI:N - kAFS contacts its cells\u0027 VL servers autonomously \u2014 at mount, on automount traversal, and again whenever a GC\u0027d cell record is recreated with AFS_CELL_FL_CHECK_ALIAS set \u2014 so a compromised VL server for a cell the client already uses is queried during normal operation without any targeted victim action.\nS:U - The fault and its consequences stay entirely within the kernel of the AFS client; no VM, IOMMU, or sandbox boundary is crossed.\nC:N - The defect is purely a length-limit mismatch between AFS_MAXCELLNAME and the procfs name limit; no out-of-bounds read, use-after-free, or uninitialized data is exposed, and all associated buffers (keyname[261], kmalloc(AFS_MAXCELLNAME+1)) exactly accommodate a 256-byte name.\nI:N - There is no out-of-bounds write, type confusion, or attacker-controlled write primitive; the proc directory creation is cleanly rejected and cell activation fails with -ENOMEM, leaving no corrupted state.\nA:H - The path reaches WARN(1, \"name len %u\\n\") in proc_register(), producing a kernel warning splat that is an immediate panic on the many hardened, cloud, Android, and CI kernels booted with panic_on_warn=1, and it is repeatable on every cell lookup rather than a WARN_ONCE."
            }
          ]
        }
      ],
      "providerMetadata": {
        "dateUpdated": "2026-08-05T11:53:20.429Z",
        "orgId": "416baaa9-dc9f-4396-8d5f-8c081fb06d67",
        "shortName": "Linux"
      },
      "references": [
        {
          "url": "https://git.kernel.org/stable/c/9340385468d056bb700b8f28df236b81fc86a079"
        },
        {
          "url": "https://git.kernel.org/stable/c/7cb3e77e9b4e6ffa325a5559393d3283c9af3d01"
        },
        {
          "url": "https://git.kernel.org/stable/c/aabe47cf5ac5e1db2ae0635f189d836f67024904"
        },
        {
          "url": "https://git.kernel.org/stable/c/7673030efe0f8ca1056d3849d61784c6caa052af"
        },
        {
          "url": "https://git.kernel.org/stable/c/7922b1f058fe24a93730511dd0ae2e1630920096"
        },
        {
          "url": "https://git.kernel.org/stable/c/8fd56ad6e7c90ac2bddb0741c6b248c8c5d56ac8"
        }
      ],
      "title": "afs: Fix the maximum cell name length",
      "x_generator": {
        "engine": "bippy-1.2.0"
      }
    }
  },
  "cveMetadata": {
    "assignerOrgId": "416baaa9-dc9f-4396-8d5f-8c081fb06d67",
    "assignerShortName": "Linux",
    "cveId": "CVE-2025-21646",
    "datePublished": "2025-01-19T10:18:02.776Z",
    "dateReserved": "2024-12-29T08:45:45.728Z",
    "dateUpdated": "2026-08-05T11:53:20.429Z",
    "state": "PUBLISHED"
  },
  "dataType": "CVE_RECORD",
  "dataVersion": "5.2",
  "vulnerability-lookup:meta": {
    "epss": {
      "cve": "CVE-2025-21646",
      "date": "2026-11-19",
      "epss": "0.0045",
      "percentile": "0.39806"
    },
    "redhat_vex": {
      "aggregate_severity": "Moderate",
      "current_release_date": "2026-11-09T17:34:55+00:00",
      "cve": "CVE-2025-21646",
      "id": "CVE-2025-21646",
      "initial_release_date": "2025-01-19T00:00:00+00:00",
      "product_status:fixed": "305",
      "product_status:known_not_affected": "91",
      "source": "Red Hat CSAF VEX",
      "status": "final",
      "title": "kernel: afs: Fix the maximum cell name length",
      "url": "https://security.access.redhat.com/data/csaf/v2/vex/2025/cve-2025-21646.json",
      "version": "3"
    }
  }
}



Log in or create an account to share your comment.




Tags
Taxonomy of the tags.


Loading…

Loading…

Loading…

Drag nodes to arrange them. Double-click a related vulnerability to open it, or a source to visit its link. The Physics button on the left tunes the layout and the simulation; the legend at the bottom left hides or shows nodes by kind and by sighting type.

Forecast uses a logistic model when the trend is rising, or an exponential decay model when the trend is falling. Fitted via linearized least squares.

Sightings

Author Source Type Date Other

Nomenclature

  • Seen: The vulnerability was mentioned, discussed, or observed by the user.
  • Confirmed: The vulnerability has been validated from an analyst's perspective.
  • Published Proof of Concept: A public proof of concept is available for this vulnerability.
  • Exploited: The vulnerability was observed as exploited by the user who reported the sighting.
  • Patched: The vulnerability was observed as successfully patched by the user who reported the sighting.
  • Not exploited: The vulnerability was not observed as exploited by the user who reported the sighting.
  • Not confirmed: The user expressed doubt about the validity of the vulnerability.
  • Not patched: The vulnerability was not observed as successfully patched by the user who reported the sighting.
Vulnerability timeline

Sightings and recorded dates, grouped by day · UTC

JSON
How durations are calculated

Following the VTEM framework (Black Hat USA 2015), time to patch starts when the vendor or a coordinator was informed, total time to patch at discovery, and disclosure to patch at public disclosure; vendor response time runs from the report to its acknowledgement. Time to exploit and time unpatched start at the earliest discovery or report, falling back to public disclosure. Unpatched time ends at the first recorded patch, or the calculation time when no patch is recorded. Exploitation to patch shows the interval between those two events; a published proof of concept is a public exploit, not exploitation.

Each result shows its source dates. A negative interval means the end event came first; when date-only inputs leave the order open, the result says so. Date-only inputs are approximate. The earliest evidence wins: KEV report dates and sightings are labelled as such. Records describing another vulnerability are listed but never calculated from, and a PoC alone does not establish exploitation. Missing patch evidence does not prove that no patch exists. Filters below change the event list only.

Events included in the timeline

Loading timeline…


    Loading…

    Loading…

    Loading…

    Related by attack behaviour

    Vulnerabilities whose description is nearest to this one in the vector space of the CIRCL/vulnerability-attack-technique-biencoder model. This is a similarity search over the bi-encoder space (plain cosine), not a classification, and it has no measured accuracy.