CVE-2026-43492: lib/crypto: mpi: Fix integer underflow in mpi_read_raw_from_sgl()
In the Linux kernel, the following vulnerability has been resolved:
lib/crypto: mpi: Fix integer underflow in mpireadrawfromsgl()
Yiming reports an integer underflow in mpireadrawfromsgl() when subtracting "lzeros" from the unsigned "nbytes".
For this to happen, the scatterlist "sgl" needs to occupy more bytes than the "nbytes" parameter and the first "nbytes + 1" bytes of the scatterlist must be zero. Under these conditions, the while loop iterating over the scatterlist will count more zeroes than "nbytes", subtract the number of zeroes from "nbytes" and cause the underflow.
When commit 2d4d1eea540b ("lib/mpi: Add mpi sgl helpers") originally introduced the bug, it couldn't be triggered because all callers of mpireadrawfromsgl() passed a scatterlist whose length was equal to "nbytes".
However since commit 63ba4d67594a ("KEYS: asymmetric: Use new crypto interface without scatterlists"), the underflow can now actually be triggered. When invoking a KEYCTLPKEYENCRYPT system call with a larger "outlen" than "inlen" and filling the "in" buffer with zeroes, cryptoakciphersyncprep() will create an all-zero scatterlist used for both the "src" and "dst" member of struct akcipherrequest and thereby fulfil the conditions to trigger the bug:
syskeyctl() keyctlpkeyeds() asymmetrickeyedsop() softwarekeyedsop() cryptoakciphersyncencrypt() cryptoakciphersyncprep() cryptoakcipherencrypt() rsaenc() mpireadrawfromsgl()
To the user this will be visible as a DoS as the kernel spins forever, causing soft lockup splats as a side effect.
Fix it.
Affected Software
Remediation
Recommended actions to resolve this vulnerability, in priority order.
- Upgrade
Upgrade to a fixed release to a version that resolves this vulnerability.
Fixed in 6.6.141.1-1 - Upgrade
Upgrade to a fixed release to a version that resolves this vulnerability.
Patch lib/crypto: mpi: Fix integer underflow in mpi_read_raw_from_sgl() - Compensating control
Mitigate potential soft lockup/DoS by limiting or avoiding invocation of the KEYCTL_PKEY_ENCRYPT system call / asymmetric_key_eds_op() on systems vulnerable to the mpi_read_raw_from_sgl() integer underflow until the fix is applied.
Event History
Frequently Asked Questions
What is the severity of CVE-2026-43492?
CVE-2026-43492 is considered to be a medium severity vulnerability due to its potential impact on system integrity.
How do I fix CVE-2026-43492?
To fix CVE-2026-43492, you should update to the latest patched version of the Linux kernel that addresses this integer underflow issue.
What systems are affected by CVE-2026-43492?
CVE-2026-43492 affects the Linux kernel, specifically components that utilize the mpi_read_raw_from_sgl() functionality.
What happens if I do not address CVE-2026-43492?
Ignoring CVE-2026-43492 may lead to security vulnerabilities that could be exploited, potentially compromising system security.
Who reported CVE-2026-43492?
CVE-2026-43492 was reported by a contributor named Yiming, highlighting an integer underflow issue in the Linux kernel.