CVE-2026-138922

crypto: sa2ul - Fix HMAC key preparation

Published Nov 30, 2026 CVSS n/a EPSS n/a KEV · Not listed
Description
In the Linux kernel, the following vulnerability has been resolved:

crypto: sa2ul - Fix HMAC key preparation

sa_prepare_iopads() has multiple bugs, as discussed at
https://lore.kernel.org/linux-crypto/20260831055141.1632832-1-s-vadapalli@ti.com/T/#u

- Commit 3bf533787910 ("crypto: sha256 - Use the partial block API")
introduced a 1-byte buffer overflow in the SHA-256 case by making the
crypto_shash_export() write 1 more than sizeof(struct sha256_state).

- It never worked for HMAC keys longer than 64 bytes in the first place.

Fix both of these bugs by just using the crypto library to prepare the
key, like what the chelsio and qat drivers do. Also remove the
pointless use of an indirect call.

Analysis

AI-generated

Technical impact

The issue stems from incorrect handling of SHA‑256 and HMAC keys in the Linux kernel’s crypto subsystem. A bug in crypto_shash_export writes an extra byte beyond the end of a 64‑byte buffer, causing a 1‑byte buffer overflow, while existing code fails to support HMAC keys longer than 64 bytes. The combined effect allows a malicious actor with kernel‑level control to overwrite adjacent memory structures, potentially leading to arbitrary code execution, privilege escalation, and compromise of confidentiality, integrity, and availability.

Affected Systems

The vulnerability is present in the Linux kernel’s crypto core. All distributions shipping a kernel version before the patch that introduces commit 3bf5337 are affected. The exact affected releases are not specified, but the issue exists in kernel code that predates the commit. Administrators should confirm their kernel version and upgrade to a release that includes the fix or backport it manually. The flaw does not affect user‑land applications directly, only the kernel crypto implementation.

Risk and Exploitability

Because no CVSS or EPSS score is published and the vulnerability is not listed in the CISA KEV catalog, precise metrics are unavailable. Nevertheless, the buffer overflow in kernel space represents a high‑risk flaw that can be exploited by an attacker who can trigger the faulty crypto API. Depending on the attacker’s access, exploitation could enable code execution or privilege escalation. The lack of known exploitation instances suggests the risk may be moderate to high, but the nature of kernel memory corruption warrants prompt remediation.

Remediation

No solution or workaround provided in the CVE record.

OpenCVE Recommended Actions

  • Upgrade to a Linux kernel version that contains the fix for the SHA‑256 buffer overflow and HMAC key preparation bug (the patch is part of the mainline kernel after commit 3bf5337).
  • If an update is not immediately possible, manually apply the patch from the referenced Git commits to your kernel source tree and rebuild the kernel.
  • As a temporary measure, avoid using crypto operations that exercise the vulnerable paths—particularly SHA‑256 export to user space and HMAC with keys longer than 64 bytes—until the patch is in place.

Generated by OpenCVE AI on November 30, 2026 at 17:24 UTC.

Tracking

Sign in to view the affected projects.

Exploits

Explore public exploit intelligence with OpenCVE Pro.

Advisories

No advisories available
History
Type Values Removed Values Added
Weaknesses CWE-122
CWE-20
Type Values Removed Values Added
Description In the Linux kernel, the following vulnerability has been resolved: crypto: sa2ul - Fix HMAC key preparation sa_prepare_iopads() has multiple bugs, as discussed at https://lore.kernel.org/linux-crypto/20260831055141.1632832-1-s-vadapalli@ti.com/T/#u - Commit 3bf533787910 ("crypto: sha256 - Use the partial block API") introduced a 1-byte buffer overflow in the SHA-256 case by making the crypto_shash_export() write 1 more than sizeof(struct sha256_state). - It never worked for HMAC keys longer than 64 bytes in the first place. Fix both of these bugs by just using the crypto library to prepare the key, like what the chelsio and qat drivers do. Also remove the pointless use of an indirect call.
Title crypto: sa2ul - Fix HMAC key preparation
First Time appeared Linux
Linux linux Kernel
CPEs cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*
Vendors & Products Linux
Linux linux Kernel
References
Weaknesses
  • CWE-122

    Heap-based Buffer Overflow

  • CWE-20

    Improper Input Validation

Sources

Status
PUBLISHED
Assigner
Linux
Published
Updated
Nov 30, 2026, 1:26 PM
Reserved
Nov 30, 2026, 1:22 PM
Status
Received
Published
Nov 30, 2026, 2:17 PM
Modified
Nov 30, 2026, 2:17 PM