Fixes for integer truncation - #153
Open
ifranzki wants to merge 2 commits into
Open
Conversation
…ereference Function check_cmac_parms() allows message to be NULL, if message_length is zero. The callers of check_cmac_parms() supply a unsigned long message length to check_cmac_parms() which truncates the length to an unsigned int. If an unsigned long message length truncates to 0 as unsigned int (for example 0x100000000UL) then a NULL message is accepted, although the subsequent code operate on the non-zero unsigned long message length and thus attempt to dereference the NULL message. While at it fix a similar integer truncation with check_aes_parms(). There it does not have any bad consequences, but it is still worth to fix. Reported by: Aisle Research Signed-off-by: Ingo Franzki <ifranzki@linux.ibm.com>
…, not long The caller of s390_ccm() passes an unsigned int mac length and nonce_length to s390_ccm(). Furthermore s390_ccm() passes them to s390_ccm_authenticate() which uses an unsigned int. This mismatch does not produce a problem, because the value of mac_length and nonce_length can anyway not be larger than unsigned int, because the outer most caller has it as unsigned int. Signed-off-by: Ingo Franzki <ifranzki@linux.ibm.com>
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.
No description provided.