Skip to content

xtest: regression 4005: test aes-gcm overflow on A64#817

Merged
jenswikl merged 1 commit into
OP-TEE:masterfrom
MingyenHung:overflow-of-aes-gcm-on-A64
Jun 16, 2026
Merged

xtest: regression 4005: test aes-gcm overflow on A64#817
jenswikl merged 1 commit into
OP-TEE:masterfrom
MingyenHung:overflow-of-aes-gcm-on-A64

Conversation

@MingyenHung

@MingyenHung MingyenHung commented Jun 4, 2026

Copy link
Copy Markdown
Contributor

Set the input size of the new test case to 17 bytes (1 byte + 1 block). This forces internal_aes_gcm_update_payload_blocks() to bypass update_payload_2block() and fall back to decrypt_pl() instead, to properly trigger and verify the overflow boundary condition.

This test case helps to reproduce the counter overflow issue caused by ce_aes_gcm_ctr_encrypt() on ARM64.
Note that for the ARM32 case, the same issue can already be reproduced simply by running xtest -t regression 4005.

Comment thread host/xtest/aes_gcm_counter_overflow_test_decrypt.h Outdated
@MingyenHung MingyenHung force-pushed the overflow-of-aes-gcm-on-A64 branch from 1ce5172 to f461414 Compare June 5, 2026 04:20
@jforissier

Copy link
Copy Markdown
Contributor

Reviewed-by: Jerome Forissier <jerome.forissier@arm.com>

Set the input size of the new test case to 17 bytes (1 byte + 1 block).
This forces internal_aes_gcm_update_payload_blocks() to bypass
update_payload_2block() and fall back to decrypt_pl() instead, to
properly trigger and verify the overflow boundary condition.

Signed-off-by: Mingyen Hung <mingyen.hung@amlogic.com>
Reviewed-by: Jerome Forissier <jerome.forissier@arm.com>
@MingyenHung MingyenHung force-pushed the overflow-of-aes-gcm-on-A64 branch from f461414 to 316b7bc Compare June 8, 2026 03:30
@MingyenHung

Copy link
Copy Markdown
Contributor Author

Reviewed-by: Jerome Forissier <jerome.forissier@arm.com>

@MingyenHung MingyenHung reopened this Jun 10, 2026
@jenswikl jenswikl merged commit df9d587 into OP-TEE:master Jun 16, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants