[openssl/openssl] 182856: Fix VAES CBC round-key stack cleanup

"'Mounir IDRASSI' via openssl-commits" <[email protected]>
Newsgroups gmane.comp.encryption.openssl.cvs
Message-ID <openssl/openssl/push/refs/heads/master/[email protected]>
  Branch: refs/heads/master
  Home:   https://github.com/openssl/openssl
  Commit: 18285605f351214c0c051ba6464d1477e7e453b7
      https://github.com/openssl/openssl/commit/18285605f351214c0c051ba6464d1477e7e453b7
  Author: Mounir IDRASSI <[email protected]>
  Date:   2026-08-27 (Thu, 27 Aug 2026)

  Changed paths:
    M crypto/aes/aes_cbc_vaes_intrinsic.c
    A crypto/aes/asm/aes-cbc-vaes-x86_64.pl
    M crypto/aes/build.info

  Log Message:
  -----------
  Fix VAES CBC round-key stack cleanup

The VAES CBC decryptor uses volatile stores to clear its source-level
round-key array. With GCC 13.3 at -O3, scalar replacement separates
that object from the stack slots holding broadcast round keys. The
stores remain, but the actual key spills survive return.

Route cleanup through a dedicated perlasm helper. Passing rk across
this opaque assembly boundary forces optimized callers to materialize
the consumed key array. The helper erases exactly 11, 13, or 15
64-byte entries and scrubs caller-clobbered vector and general-purpose
register state within the System V and Win64 ABI constraints. Gate
VAES-CBC eligibility on assembler support and include the helper in
regular and FIPS builds.

This is a pragmatic boundary rather than a guarantee against every
compiler-created spill or abnormal exit. In particular, the Win64 ABI
requires the low 128 bits of XMM6-XMM15 to remain intact until the
caller restores them. A complete guarantee would require moving the
decryptor behind an assembly or custom-ABI boundary.

Fixes #32254

Assisted-by: Codex:gpt-5.6-sol
Reviewed-by: Shane Lontis <[email protected]>
Reviewed-by: Tomas Mraz <[email protected]>
Merge-date: Thu Aug 27 14:00:40 2026
Merged-from: https://github.com/openssl/openssl/pull/32257



To unsubscribe from these emails, change your notification settings at https://github.com/openssl/openssl/settings/notifications

-- 
You received this message because you are subscribed to the Google Groups "openssl-commits" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [email protected].
To view this discussion visit https://groups.google.com/a/openssl.org/d/msgid/openssl-commits/openssl/openssl/push/refs/heads/master/dde995-182856%40github.com.
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.