RFR: 8371864: GaloisCounterMode.implGCMCrypt0 AVX512/AVX2 intrinsics stubs cause AES-GCM encryption failure for certain payload sizes

Jiangli Zhou jiangli at openjdk.org
Mon Nov 17 22:57:07 UTC 2025


Please review the fix in StubGenerator::aesgcm_avx512 and StubGenerator::aesgcm_avx2 to handle some edge cases with input sizes that are not multiple of the block size. 

Thanks to Thomas Holenstein and Lukas Zobernig for analyzing the issue and providing the test case!

-------------

Commit messages:
 - Fix Whitespace errors
 - Add TestAesGcmIntrinsic.java. The test is authored by tholenst at google.com and zlukas at google.com.
 - JDK-8371864: GaloisCounterMode.implGCMCrypt0 AVX512/AVX2 intrinsics stubs cause AES-GCM encryption failure for certain payload sizes

Changes: https://git.openjdk.org/jdk/pull/28363/files
  Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=28363&range=00
  Issue: https://bugs.openjdk.org/browse/JDK-8371864
  Stats: 119 lines in 2 files changed: 118 ins; 0 del; 1 mod
  Patch: https://git.openjdk.org/jdk/pull/28363.diff
  Fetch: git fetch https://git.openjdk.org/jdk.git pull/28363/head:pull/28363

PR: https://git.openjdk.org/jdk/pull/28363


More information about the security-dev mailing list