CVE-2026-31641: Heap buffer overflow in Linux kernel rxrpc RxGK token loading
- Vendor
- Linux
CVE-2026-31641 is a heap buffer overflow in the Linux kernel rxrpc subsystem, specifically in rxrpc_preparse_xdr_yfs_rxgk() while parsing RxGK XDR tokens. The vulnerable code reads raw key length and ticket length fields as 32-bit unsigned integers and applies round_up(x, 4) before using the rounded values for bounds validation and memory allocation. For attacker-controlled length values greater than or equal to 0xfffffffd, the rounding operation wraps to 0. As a result, validation and kzalloc-based allocation can proceed using a zero length, while subsequent memcpy operations still use the original oversized raw length of nearly 4 GiB. This mismatch creates a heap buffer overflow. The flaw is reachable through an unprivileged add_key() call. The fix rejects oversized raw key and ticket lengths before rounding, derives flexible-array allocation size from the validated raw key length using struct_size_t(), and caches parsed raw lengths to avoid later re-reading of token fields and related TOCTOU-style re-parse issues.
Impact, mitigation & remediation
What it means and what to do now: patch path, interim mitigations, and the assume-compromise checklist.
Impact
What an attacker gets, and what they’ve been doing with it.
Successful exploitation can corrupt heap memory in kernel space from an unprivileged local context. The immediate consequence is kernel memory corruption and likely system instability or denial of service, such as a crash or panic. Because the overflow occurs in kernel context and is attacker-controlled through crafted token length fields, the vulnerability may also provide a path toward privilege escalation or other arbitrary kernel-space effects, although the specific post-corruption outcomes depend on exploitability in the target environment.
Mitigation
If you can’t patch tonight, do this now.
No complete workaround is documented. Until patched, reduce exposure by restricting or disabling unprivileged access to add_key() and related keyring functionality where operationally feasible, and by limiting the ability of untrusted local users or containers to invoke kernel key management interfaces. Prioritize patching on multi-user systems and environments that permit unprivileged local code execution.
Remediation
Patch, then assume compromise.
Update to a Linux kernel release containing the rxrpc fix for CVE-2026-31641. The corrected implementation rejects raw key lengths above AFSTOKEN_GK_KEY_MAX and raw ticket lengths above AFSTOKEN_GK_TOKEN_MAX before any rounding occurs, sizes the flexible-array allocation from the validated raw key length with struct_size_t(), and caches the parsed raw lengths so later field assignments and memcpy operations do not re-read attacker-controlled token data. On Red Hat Enterprise Linux 10, apply the relevant kernel or kpatch updates that include this fix; standard kernel package updates require a reboot, while the live patch package can remediate supported running kernels without a full reboot according to platform guidance.
Exploits
No public exploits tracked yet. Mallory keeps watching.
Affected products & vendors
Products and vendors Mallory has correlated with this vulnerability. Open in Mallory to drill down to specific CPE configurations and version ranges.
References
Frequently asked questions
- Is CVE-2026-31641 exploited in the wild?
- As of Sep 25, 2026, Mallory has no reports of CVE-2026-31641 being exploited in the wild. It is not listed in CISA KEV.
- Is there a public exploit for CVE-2026-31641?
- As of Sep 25, 2026, Mallory has found no public exploit for CVE-2026-31641.
- Is there a patch for CVE-2026-31641?
- Update to a Linux kernel release containing the rxrpc fix for CVE-2026-31641. The corrected implementation rejects raw key lengths above AFSTOKEN_GK_KEY_MAX and raw ticket lengths above AFSTOKEN_GK_TOKEN_MAX before any rounding occurs, sizes the flexible-array allocation from the validated raw key length with struct_size_t(), and caches the parsed raw lengths so later field assignments and memcpy operations do not re-read attacker-controlled token data.
- What products are affected by CVE-2026-31641?
- Linux Kernel.
- How severe is CVE-2026-31641?
- CVE-2026-31641 has a CVSS v3.1 score of 7.3 (High) and an EPSS score of 0.20% (5th percentile) as of Sep 25, 2026.
Recent activity
5 sources tracked across advisories, community write-ups, and news. New activity surfaces here as Mallory finds it.