CVE-2026-74578: crypto: algif_skcipher - force synchronous processing on trees without ctx->state
In the Linux kernel, the following vulnerability has been resolved:
crypto: algifskcipher - force synchronous processing on trees without ctx->state
The AIO/async path in skcipherrecvmsg() passes the socket-wide ctx->iv directly into the skcipher request. After iosubmit() the socket lock is dropped and the request is processed asynchronously, so a concurrent sendmsg(ALGSETIV) 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 MSGMORE inter-chunk IV chaining is carried solely by the in-place req->iv writeback, which a snapshot redirects into per-request memory that afalgfreeresources() releases on completion, silently producing wrong output. Writing the IV back from the completion callback instead is not possible either: that would require locksock() 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/algifskcipher.c. iosubmit() now completes synchronously; AFALG async is rarely used in practice.
The -EIOCBQUEUED check in skcipherrecvmsg() 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; MSGMORE chunked CTR output bit-identical to single-shot.
Event History
Frequently Asked Questions
What is the severity of CVE-2026-74578?
CVE-2026-74578 has a risk rating of 51, indicating a medium level of severity.
How do I fix CVE-2026-74578?
To fix CVE-2026-74578, update to the latest version of the Linux kernel that addresses this vulnerability.
What systems are affected by CVE-2026-74578?
CVE-2026-74578 affects various Linux kernel versions that utilize the algif_skcipher implementation.
What are the potential consequences of CVE-2026-74578?
The potential consequences of CVE-2026-74578 include compromised cryptographic operations, which could lead to data breaches.
Is CVE-2026-74578 being actively exploited?
As of now, there are no known active exploits for CVE-2026-74578, but it is advisable to apply patches to mitigate risks.