Fix #518, return SA transition failures - #528
Open
sylvesterkaczmarek wants to merge 1 commit into
Open
Conversation
Return explicit failures from SA START, REKEY, and EXPIRE when the target SA is in the wrong state or the requested SPI is outside the SA table instead of silently reporting success. Use CRYPTO_LIB_ERROR for invalid transition state, matching existing SA management behavior, and CRYPTO_LIB_ERR_SPI_INDEX_OOB for an invalid SPI. Also guard the REKEY debug-only EKID access so an out-of-range SPI cannot be dereferenced when PDU debugging is enabled. Add focused regression coverage for invalid-state and out-of-range START, REKEY, and EXPIRE operations, and update the PDU dispatch test to expect the newly surfaced START failure. Validation: CryptoLib extended-procedure build and full EP test suite pass in the project container; git diff --check passes. AI assistance: ChatGPT was used for repository inspection, implementation assistance, regression-test construction, CI diagnostics, and diff review.
sylvesterkaczmarek
marked this pull request as ready for review
August 15, 2026 20:12
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Return explicit failures from SA START, REKEY, and EXPIRE when the target SA is in the wrong state or the requested SPI is outside the SA table instead of silently reporting success.
Use CRYPTO_LIB_ERROR for invalid transition state, matching existing SA management behavior, and CRYPTO_LIB_ERR_SPI_INDEX_OOB for an invalid SPI. Also guard the REKEY debug-only EKID access so an out-of-range SPI cannot be dereferenced when PDU debugging is enabled.
Add focused regression coverage for invalid-state and out-of-range START, REKEY, and EXPIRE operations, and update the PDU dispatch test to expect the newly surfaced START failure.
Validation: CryptoLib extended-procedure build and full EP test suite pass in the project container; git diff --check passes.
All Submissions:
New Feature Submissions:
Changes to Core Features:
How do you test these changes?