You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
crypto: algif_aead - Revert to operating out-of-place (CVE-2026-31431)
Backport of upstream fix fafe0fa2995a0f7073c1c358d7d3145bcc9aedd8
to 6.12.49. Mostly reverts commit 72548b0 except for the
copying of the associated data.
The 2017 in-place optimization in algif_aead chained tag pages from
splice() by reference into the destination scatterlist, then set
req->src = req->dst. Combined with authencesn's scratch writes at
dst[assoclen + cryptlen], this allowed an unprivileged user to write
to read-only page cache pages (e.g. /usr/bin/su) via AF_ALG sockets,
enabling local privilege escalation.
Fix: remove the in-place enc/dec paths entirely. Pull the full TX SGL
into a per-request SGL (out-of-place), copy only the AAD to the RX
buffer, and pass the TX SGL directly as the crypto source. This
eliminates the sg_chain tag-page chaining that made the write primitive
possible.
6.12-specific: uses existing crypto_aead_copy_sgl() for the AAD copy
instead of the memcpy_sglist() added in later kernels.
Fixes: 72548b0 ("crypto: algif_aead - copy AAD from src to dst")
CVE: CVE-2026-31431
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
0 commit comments