# CVE-2026-31641: rxrpc: Fix RxGK token loading to check bounds

> Archived entry. Full-text search covers entries since 2026-11-10; exact IDs work for all years.

- **Severity:** HIGH 7.8
- **CVSS:** 7.8 (v3.1, CNA) `CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H`
- **CVSS metrics:** Attack vector: Local; Attack complexity: Low; Privileges required: Low; User interaction: None; Scope: Unchanged; Confidentiality impact: High; Integrity impact: High; Availability impact: High
- **Exploited in the wild:** Not in CISA KEV
- **Public exploit / PoC:** None known
- **Remote exploitation:** Not remotely exploitable (local or adjacent access needed)
- **EPSS:** 0.20% (percentile 5, 2026-11-28)
- **CWE:** CWE-125, CWE-190
- **Published:** 2026-04-24T14:44:56.204Z
- **Modified:** 2026-11-11T23:10:00.263Z

## Who should check

- Anyone running Linux \>= 0ca100ff4df64f5d0f6c1dd5080c3e096786bea6, \< 3e04596cba8a86cbff9c3f4bf0a524a3a488773c; \>= 0ca100ff4df64f5d0f6c1dd5080c3e096786bea6, \< 49875b360c2b83a3c226e189c502e501d83e6445; \>= 0ca100ff4df64f5d0f6c1dd5080c3e096786bea6, \< d179a868dd755b0cfcf7582e00943d702b9943b8
- Anyone running Linux 6.16

## Description

In the Linux kernel, the following vulnerability has been resolved:

rxrpc: Fix RxGK token loading to check bounds

rxrpc\_preparse\_xdr\_yfs\_rxgk() reads the raw key length and ticket length
from the XDR token as u32 values and passes each through round\_up(x, 4)
before using the rounded value for validation and allocation.  When the raw
length is \>= 0xfffffffd, round\_up() wraps to 0, so the bounds check and
kzalloc both use 0 while the subsequent memcpy still copies the original
~4 GiB value, producing a heap buffer overflow reachable from an
unprivileged add\_key() call.

Fix this by:

 (1) Rejecting raw key lengths above AFSTOKEN\_GK\_KEY\_MAX and raw ticket
     lengths above AFSTOKEN\_GK\_TOKEN\_MAX before rounding, consistent with
     the caps that the RxKAD path already enforces via AFSTOKEN\_RK\_TIX\_MAX.

 (2) Sizing the flexible-array allocation from the validated raw key
     length via struct\_size\_t() instead of the rounded value.

 (3) Caching the raw lengths so that the later field assignments and
     memcpy calls do not re-read from the token, eliminating a class of
     TOCTOU re-parse.

The control path (valid token with lengths within bounds) is unaffected.

## Affected and fixed versions

- Linux: \>= 0ca100ff4df64f5d0f6c1dd5080c3e096786bea6, \< 3e04596cba8a86cbff9c3f4bf0a524a3a488773c; \>= 0ca100ff4df64f5d0f6c1dd5080c3e096786bea6, \< 49875b360c2b83a3c226e189c502e501d83e6445; \>= 0ca100ff4df64f5d0f6c1dd5080c3e096786bea6, \< d179a868dd755b0cfcf7582e00943d702b9943b8 (cvelist)
- Linux: 6.16 (cvelist)

## Mitigation

- No fix listed yet: follow the vendor advisory.

## Check your systems with an agent

Paste this into a coding agent:

```text
Check whether anything I run is affected by CVE-2026-31641. Work read-only: do not install, upgrade, delete or change anything.

Details: https://flawdb.com/CVE-2026-31641.md
Affected: Linux >= 0ca100ff4df64f5d0f6c1dd5080c3e096786bea6, < 3e04596cba8a86cbff9c3f4bf0a524a3a488773c; >= 0ca100ff4df64f5d0f6c1dd5080c3e096786bea6, < 49875b360c2b83a3c226e189c502e501d83e6445; >= 0ca100ff4df64f5d0f6c1dd5080c3e096786bea6, < d179a868dd755b0cfcf7582e00943d702b9943b8; Linux 6.16
Fixed in: Linux 3e04596cba8a86cbff9c3f4bf0a524a3a488773c, Linux 49875b360c2b83a3c226e189c502e501d83e6445

Steps:
1. Search this machine and project for Linux: dependency manifests and lockfiles, installed packages, container images and running services.
2. For each match, note the installed version and whether it is inside the affected range.
3. Report a table: location, installed version, affected (yes / no / unsure), evidence. If affected, say which fixed version or mitigation from the details link applies, but don't apply it.
```

## FAQ

### Is CVE-2026-31641 being exploited?

There is no confirmed exploitation: CVE-2026-31641 is not in the CISA Known Exploited Vulnerabilities catalog. No public exploit code is known. EPSS estimates a 0.20% chance of exploitation in the next 30 days (as of 2026-11-28).

### How serious is CVE-2026-31641?

High: CVSS 7.8 (v3.1, scored by CNA). Not remotely exploitable (local or adjacent access needed).

### Which versions are affected by CVE-2026-31641?

Linux \>= 0ca100ff4df64f5d0f6c1dd5080c3e096786bea6, \< 3e04596cba8a86cbff9c3f4bf0a524a3a488773c; \>= 0ca100ff4df64f5d0f6c1dd5080c3e096786bea6, \< 49875b360c2b83a3c226e189c502e501d83e6445; \>= 0ca100ff4df64f5d0f6c1dd5080c3e096786bea6, \< d179a868dd755b0cfcf7582e00943d702b9943b8; Linux 6.16.

### Is there a fix for CVE-2026-31641?

Yes. Fixed in Linux 3e04596cba8a86cbff9c3f4bf0a524a3a488773c, Linux 49875b360c2b83a3c226e189c502e501d83e6445. No fix listed yet: follow the vendor advisory.

### How do I check if I'm affected by CVE-2026-31641?

Find where you use the affected software (dependency lockfiles, installed packages, container images, servers) and compare the installed version with the affected range above. The agent prompt on this page does this read-only.

## References

- vendor: <https://access.redhat.com/errata/RHSA-2026:27288>
- vendor: <https://access.redhat.com/errata/RHSA-2026:55618>
- patch: <https://git.kernel.org/stable/c/3e04596cba8a86cbff9c3f4bf0a524a3a488773c>
- patch: <https://git.kernel.org/stable/c/49875b360c2b83a3c226e189c502e501d83e6445>
- patch: <https://git.kernel.org/stable/c/d179a868dd755b0cfcf7582e00943d702b9943b8>
- other: <https://access.redhat.com/security/cve/CVE-2026-31641>
- other: <https://bugzilla.redhat.com/show_bug.cgi?id=2461548>
- other: <https://security.access.redhat.com/data/csaf/v2/vex/2026/cve-2026-31641.json>

## Attribution

- CVE Program: CVE® is a registered trademark of The MITRE Corporation. CVE records © 1999–2026 The MITRE Corporation. <https://www.cve.org/Legal/TermsOfUse>
- NVD: This product uses data from the NVD API but is not endorsed or certified by the NVD. <https://nvd.nist.gov/vuln/detail/CVE-2026-31641>

HTML: <https://flawdb.com/CVE-2026-31641> · JSON: <https://flawdb.com/api/v1/entries/CVE-2026-31641>
