Executive brief
A logic error was identified in the Linux kernel's cryptographic interface (AF_ALG). This component allows user-space applications to access the kernel's internal cryptographic hardware and software. Due to a coding error, certain internal flags were being incorrectly processed, which could lead to unexpected behavior during data encryption or decryption operations.
Technical details
A regression was introduced in the Linux kernel crypto component (af_alg) when certain fields in 'struct af_alg_ctx' were converted from bool to 1-bit u32 bitfields. Specifically, the 'more' and 'merge' fields were assigned values greater than 1, relying on C's implicit conversion where any non-zero value becomes true. With 1-bit bitfields, the assignment performs a modulo 2 operation, causing even non-zero values to be stored as 0 (false) when 1 (true) was intended. This affects the 'af_alg_sendmsg' function and can lead to incorrect state management during concurrent or sequential write operations. The fix restores the 'bool' type to ensure correct boolean evaluation.
Affected products
- Linux Linux Kernel v6.11, v6.10.13, v6.6.54, v6.1.112, v5.15.168, v5.10.227, v5.4.284, v4.19.323
- Siemens SIMATIC S7-1500 CPU 1518-4 PN/DP MFP V3.1.5, V3.1.6
Timeline
- 2025-09-24: patched: Initial fix by Eric Biggers
- 2025-10-24: disclosed: CVE published
References
- https://git.kernel.org/stable/c/316b090c2fee964c307a634fecc7df269664b158
- https://git.kernel.org/stable/c/3a21698ace915a445bce2d0dcfc84b6d2199baf7
- https://git.kernel.org/stable/c/54506c6335690f4ef1b9f154e34f5a604c72c1ed
- https://git.kernel.org/stable/c/8703940bd30b5ad94408d28d7192db2491cd3592
- https://git.kernel.org/stable/c/d0ca0df179c4b21e2a6c4a4fb637aa8fa14575cb
- https://git.kernel.org/stable/c/d382d6daf0184490f366562469a5673f65ee2662
- https://git.kernel.org/stable/c/fbe96bd25423e61273d8831e995260b429d850b6