CVE-2026-139706

crypto: rsassa-pkcs1 - reject undersized keys when signing

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: rsassa-pkcs1 - reject undersized keys when signing

rsassa_pkcs1_sign() subtracts 11 from the unsigned key size before
checking that the key is large enough for PKCS#1 v1.5 padding:

if (slen + hash_prefix->size > ctx->key_size - 11)
return -EOVERFLOW;

If the RSA modulus is shorter than 11 bytes, the subtraction wraps.
With a one-byte key and hash=none, the padding memset() writes past
the output buffer.

KASAN reports:

BUG: KASAN: slab-out-of-bounds in rsassa_pkcs1_sign+0x1ad/0x3b0
Write of size 4294967294 at addr ...
The buggy address is located 0 bytes to the right of
allocated 1-byte region [...]

Reject keys shorter than the minimum encoded message size.

Analysis

AI-generated

Technical impact

The rsassa_pkcs1_sign function in the Linux kernel subtracts 11 from the RSA key size before verifying that the key is large enough for PKCS#1 v1.5 padding. If an RSA modulus shorter than 11 bytes is provided, the subtraction underflows and wraps, causing the subsequent padding code to write beyond the allocated output buffer. This out-of-bounds write is reported by KASAN as a slab-out-of-bounds error and corrupts kernel memory, potentially allowing code injection or control‑flow hijacking. The bug is triggered only when an undersized key is explicitly passed to the kernel crypto API during a signing operation.

Affected Systems

Affected systems are any Linux kernel implementations that include the rsassa_pkcs1_sign helper. The vulnerability is not limited to a specific release; any kernel build that compiles the rsassa_pkcs1 path is potentially susceptible until the patch is applied. This includes distributions such as Ubuntu, CentOS, Debian, Fedora, and others across all supported architectures.

Risk and Exploitability

The CVE has no EPSS score and is not listed in the CISA KEV catalog. A CVSS score is not provided in the source data, so the severity must be inferred from the flaw's nature. Because the bug can corrupt kernel memory, the risk is high; an attacker who can control the signing input may trigger a buffer overflow that could lead to privilege escalation or a kernel crash. The likely attack vector involves an application that performs RSA signing through the kernel crypto API with a deliberately undersized key. No public exploitation evidence is available, but the potential impact warrants immediate attention.

Remediation

No solution or workaround provided in the CVE record.

OpenCVE Recommended Actions

  • Apply the latest kernel update that contains the rsassa_pkcs1_sign fix, which validates RSA key sizes before performing subtraction
  • Ensure that all code paths using the kernel crypto API enforce RSA keys of at least 1024 bits (or the safe minimum) before invoking signing functions
  • Monitor kernel logs for KASAN or out-of-bounds messages; if such a warning appears, isolate the host and reboot until a patch is applied

Generated by OpenCVE AI on December 1, 2026 at 02:06 UTC.

Tracking

Sign in to view the affected projects.

Advisories

No advisories available
History
Type Values Removed Values Added
Weaknesses CWE-119
CWE-190
Type Values Removed Values Added
Description In the Linux kernel, the following vulnerability has been resolved: crypto: rsassa-pkcs1 - reject undersized keys when signing rsassa_pkcs1_sign() subtracts 11 from the unsigned key size before checking that the key is large enough for PKCS#1 v1.5 padding: if (slen + hash_prefix->size > ctx->key_size - 11) return -EOVERFLOW; If the RSA modulus is shorter than 11 bytes, the subtraction wraps. With a one-byte key and hash=none, the padding memset() writes past the output buffer. KASAN reports: BUG: KASAN: slab-out-of-bounds in rsassa_pkcs1_sign+0x1ad/0x3b0 Write of size 4294967294 at addr ... The buggy address is located 0 bytes to the right of allocated 1-byte region [...] Reject keys shorter than the minimum encoded message size.
Title crypto: rsassa-pkcs1 - reject undersized keys when signing
First Time appeared Linux
Linux linux Kernel
CPEs cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*
Vendors & Products Linux
Linux linux Kernel
References
Weaknesses
  • CWE-119

    Improper Restriction of Operations within the Bounds of a Memory Buffer

  • CWE-190

    Integer Overflow or Wraparound

Sources

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