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.
Published: 2026-08-16
Score: 7.1 High
EPSS: < 1% Very Low
KEV: No
Impact: n/a
Action: n/a
AI Analysis

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.

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

Remediation

No vendor fix or workaround currently provided.

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

No advisories yet.

History

Tue, 18 Aug 2026 03:30:00 +0000

Type Values Removed Values Added
Weaknesses CWE-200

Tue, 18 Aug 2026 00:15:00 +0000

Type Values Removed Values Added
Weaknesses CWE-1204
References
Metrics threat_severity

None

threat_severity

Moderate


Mon, 17 Aug 2026 13:00:00 +0000

Type Values Removed Values Added
Weaknesses CWE-200

Mon, 17 Aug 2026 11:45:00 +0000

Type Values Removed Values Added
Weaknesses CWE-310
CWE-326

Mon, 17 Aug 2026 06:00:00 +0000

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'}


Sun, 16 Aug 2026 10:45:00 +0000

Type Values Removed Values Added
Weaknesses CWE-310
CWE-326

Sun, 16 Aug 2026 08:45:00 +0000

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

Subscriptions

Linux Linux Kernel
cve-icon MITRE

Status: PUBLISHED

Assigner: Linux

Published:

Updated: 2026-08-17T05:48:57.219Z

Reserved: 2026-08-15T05:44:03.917Z

Link: CVE-2026-74578

cve-icon Vulnrichment

No data.

cve-icon NVD

Status : Received

Published: 2026-08-16T09:16:21.653

Modified: 2026-08-17T06:19:56.270

Link: CVE-2026-74578

cve-icon Redhat

Severity : Moderate

Publid Date: 2026-08-16T00:00:00Z

Links: CVE-2026-74578 - Bugzilla

cve-icon OpenCVE Enrichment

Updated: 2026-08-18T05:15:08Z

Weaknesses
  • CWE-1204

    Generation of Weak Initialization Vector (IV)