CVE-2026-31641 Details
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.
A heap buffer overflow vulnerability has been identified in the Linux kernel's RxRPC implementation, specifically within the processing of RxGK tokens. This issue arises because the function responsible for parsing the tokens does not properly validate the raw key and ticket lengths before using them. When these lengths exceed a certain threshold, the rounding function wraps the values, leading to a situation where the memory allocation is based on an incorrect length. Consequently, approximately 4 GiB of data is copied into a buffer, creating a vulnerability that can be exploited by an unprivileged user through the add_key() function.
Users can upgrade to the latest version of the Linux kernel where this vulnerability has been fixed.
Metrics
CVSS 4.0 Severity and Vector Strings:
No CVSS 4.0 data is available for this CVE.
CVSS 3.x Severity and Vector Strings:
No data available for CVSS Version 2.0 on this CVE.
No SSVC data is available for this CVE.
References to Advisories, Solutions, and Tools
By selecting these links, you will be leaving this site. These are references gathered from the official CVE record and are not endorsed by Volerion.
| URL | Source(s) | Tag(s) |
|---|---|---|
| https://access.redhat.com/errata/RHSA-2026:27288 | redhat-SADP | |
| https://access.redhat.com/errata/RHSA-2026:55618 | redhat-SADP | |
| https://access.redhat.com/security/cve/CVE-2026-31641 | redhat-SADP | |
| https://bugzilla.redhat.com/show_bug.cgi?id=2461548 | redhat-SADP | |
| https://security.access.redhat.com/data/csaf/v2/vex/2026/cve-2026-31641.json | redhat-SADP | |
| https://git.kernel.org/stable/c/3e04596cba8a86cbff9c3f4bf0a524a3a488773c | kernel.org | Patch |
| https://git.kernel.org/stable/c/49875b360c2b83a3c226e189c502e501d83e6445 | kernel.org | Patch |
| https://git.kernel.org/stable/c/d179a868dd755b0cfcf7582e00943d702b9943b8 | kernel.org | Patch |
Weakness Enumeration
| CWE-ID | CWE Name | Source |
|---|---|---|
| CWE-125 | Out-of-bounds Read | [email protected] |
| CWE-190 | Integer Overflow or Wraparound | redhat-SADP |
Affected Products
| Product | Versions |
|---|---|
| linux linux kernel | >= 6.16.1, < 6.18.23 >= 6.19, < 6.19.13 6.16 - 7.0 rc1 7.0 rc2 7.0 rc3 7.0 rc4 7.0 rc5 7.0 rc6 7.0 rc7 |
CPE
Remediation
| |
Change History
7 change records found show changes
| Date | Action | Recorded By |
|---|---|---|
| Aug 18, 2026 | CVE Modified | redhat-SADP |
| Jul 15, 2026 | CVE Modified | redhat-SADP |
| Jun 30, 2026 | CVE Modified | redhat-SADP |
| Jun 17, 2026 | CVE Modified | kernel.org |
| Apr 27, 2026 | Initial Analysis | [email protected] |
| Apr 27, 2026 | CVE Modified | kernel.org |
| Apr 24, 2026 | New CVE Received | kernel.org |