CVE-2026-74578

crypto: algif_skcipher - force synchronous processing on trees without ctx->state

Published Aug 16, 2026 CVSS 3.1 · 7.1 High EPSS < 1% KEV · Not listed
Description
In the Linux kernel, the following vulnerability has been resolved:

crypto: algif_skcipher - force synchronous processing on trees without ctx->state

The AIO/async path in skcipher_recvmsg() passes the socket-wide ctx->iv
directly into the skcipher request. After io_submit() the socket lock is
dropped and the request is processed asynchronously, so a concurrent
sendmsg(ALG_SET_IV) can overwrite ctx->iv and make the in-flight request
run under an attacker-controlled IV. For CTR/stream modes this is
IV/keystream reuse and lets an unprivileged user recover the plaintext of
a concurrent operation.

Snapshotting ctx->iv into per-request storage for the async path is not
sufficient. For ciphers with statesize == 0 - which includes cbc and ctr -
the MSG_MORE inter-chunk IV chaining is carried solely by the in-place
req->iv writeback, which a snapshot redirects into per-request memory that
af_alg_free_resources() releases on completion, silently producing wrong
output. Writing the IV back from the completion callback instead is not
possible either: that would require lock_sock() there, but the callback can
run in softirq/atomic context, so it must not sleep.

Make the operation synchronous instead, which removes both the IV race and
any writeback race. This is equivalent to the upstream resolution, commit
fcc77d33a34c ("net: Remove support for AIO on sockets"), which removed the
AIO socket path across net/ entirely and so produces the same end state for
this file. This patch deviates from that commit deliberately: rather than
removing AIO socket support tree-wide, which would be far too invasive for
stable, it removes only the AIO branch in crypto/algif_skcipher.c.
io_submit() now completes synchronously; AF_ALG async is rarely used in
practice.

The -EIOCBQUEUED check in skcipher_recvmsg() is now dead but harmless,
and is left alone to keep the fix minimal.

Tested on 6.6.y: attacker IV injection dropped from 2296/200000 to 0/200000
after the change; MSG_MORE chunked CTR output bit-identical to single-shot.

Analysis

AI-generated

Technical impact

A race condition in the AF_ALG socket path (CWE‑1204) allows an unprivileged user to influence the initialization vector of an in‑flight cryptographic request. By sending an ALG_SET_IV ioctl concurrently with an asynchronous skcipher operation, the attacker can overwrite the socket‑wide IV. In CTR or stream modes this leads to IV/keystream reuse, enabling the attacker to recover plaintext from concurrent encryption.

Affected Systems

Based on the description, it is inferred that all Linux kernels that expose the AF_ALG async skcipher path before the commit that removes the AIO branch from crypto/algif_skcipher.c are affected. The issue is present in kernels older than the commit included in the 6.6 kernel series and earlier releases. No specific affected version information was supplied.

Risk and Exploitability

The flaw is local and requires the attacker to use both a cryptographic request and an ALG_SET_IV ioctl on the same AF_ALG socket. The EPSS score is < 1%, indicating a very low probability of exploitation, and the vulnerability is not listed in CISA’s KEV catalog. The CVSS score of 7.1 reflects a high impact, as successful exploitation would allow plaintext disclosure for operations performed by the affected user.

Remediation

No solution or workaround provided in the CVE record.

OpenCVE Recommended Actions

  • Update the kernel to a version that includes the commit removing the AIO branch from crypto/algif_skcipher.c (e.g., Linux kernel 6.6 or newer).
  • Disable AIO support for AF_ALG sockets if the kernel provides a sysctl or module option to do so, or patch the kernel to enforce synchronous processing for these sockets.
  • Restrict the use of the ALG_SET_IV ioctl to privileged users only, for example by applying SELinux or AppArmor policies that deny the capability to issue this ioctl from unprivileged contexts.

Generated by OpenCVE AI on August 18, 2026 at 05:05 UTC.

Tracking

Sign in to view the affected projects.

Advisories

Source ID Title
Ubuntu USN Ubuntu USN USN-8876-1 Linux kernel (Azure CVM) vulnerabilities
Ubuntu USN Ubuntu USN USN-8875-1 Linux kernel vulnerabilities
Ubuntu USN Ubuntu USN USN-8877-1 Linux kernel (GCP) vulnerabilities
Ubuntu USN Ubuntu USN USN-8878-1 Linux kernel (GCP) vulnerabilities
Ubuntu USN Ubuntu USN USN-8879-1 Linux kernel (Oracle) vulnerabilities
Ubuntu USN Ubuntu USN USN-8875-2 Linux kernel (NVIDIA) vulnerabilities
Ubuntu USN Ubuntu USN USN-9029-1 Linux kernel (Raspberry Pi) vulnerabilities
History
Type Values Removed Values Added
Metrics ssvc

{'options': {'Automatable': 'no', 'Exploitation': 'none', 'Technical Impact': 'total'}, 'version': '2.0.3'}

Type Values Removed Values Added
Weaknesses CWE-200
Type Values Removed Values Added
Weaknesses CWE-200
Type Values Removed Values Added
Weaknesses CWE-310
CWE-326
Type Values Removed Values Added
Metrics cvssV3_1

{'score': 7.1, 'vector': 'CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:N'}

Type Values Removed Values Added
Weaknesses CWE-310
CWE-326
Type Values Removed Values Added
Description In the Linux kernel, the following vulnerability has been resolved: crypto: algif_skcipher - force synchronous processing on trees without ctx->state The AIO/async path in skcipher_recvmsg() passes the socket-wide ctx->iv directly into the skcipher request. After io_submit() the socket lock is dropped and the request is processed asynchronously, so a concurrent sendmsg(ALG_SET_IV) can overwrite ctx->iv and make the in-flight request run under an attacker-controlled IV. For CTR/stream modes this is IV/keystream reuse and lets an unprivileged user recover the plaintext of a concurrent operation. Snapshotting ctx->iv into per-request storage for the async path is not sufficient. For ciphers with statesize == 0 - which includes cbc and ctr - the MSG_MORE inter-chunk IV chaining is carried solely by the in-place req->iv writeback, which a snapshot redirects into per-request memory that af_alg_free_resources() releases on completion, silently producing wrong output. Writing the IV back from the completion callback instead is not possible either: that would require lock_sock() there, but the callback can run in softirq/atomic context, so it must not sleep. Make the operation synchronous instead, which removes both the IV race and any writeback race. This is equivalent to the upstream resolution, commit fcc77d33a34c ("net: Remove support for AIO on sockets"), which removed the AIO socket path across net/ entirely and so produces the same end state for this file. This patch deviates from that commit deliberately: rather than removing AIO socket support tree-wide, which would be far too invasive for stable, it removes only the AIO branch in crypto/algif_skcipher.c. io_submit() now completes synchronously; AF_ALG async is rarely used in practice. The -EIOCBQUEUED check in skcipher_recvmsg() is now dead but harmless, and is left alone to keep the fix minimal. Tested on 6.6.y: attacker IV injection dropped from 2296/200000 to 0/200000 after the change; MSG_MORE chunked CTR output bit-identical to single-shot.
Title crypto: algif_skcipher - force synchronous processing on trees without ctx->state
First Time appeared Linux
Linux linux Kernel
CPEs cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*
Vendors & Products Linux
Linux linux Kernel
References
Weaknesses
  • CWE-1204

    Generation of Weak Initialization Vector (IV)

Sources

Status
PUBLISHED
Assigner
Linux
Published
Updated
Oct 16, 2026, 7:05 PM
Reserved
Aug 15, 2026, 5:44 AM
Status
Received
Published
Aug 16, 2026, 9:16 AM
Modified
Oct 16, 2026, 8:17 PM
Severity
Moderate
Public date
Aug 16, 2026, 12:00 AM