Skip to content

Add Overflow check to DecodeAltNames input buffer access#5892

Merged
dgarske merged 2 commits intowolfSSL:masterfrom
tatowicz:decodealtnames-fuzz-fix
Dec 15, 2022
Merged

Add Overflow check to DecodeAltNames input buffer access#5892
dgarske merged 2 commits intowolfSSL:masterfrom
tatowicz:decodealtnames-fuzz-fix

Conversation

@tatowicz
Copy link
Copy Markdown
Contributor

Description

Add checks for issue found by OSS fuzz.

Fixes zd# #15333

Testing

Tested with provided reproduction code on ZD ticket #15333

Checklist

  • added tests
  • updated/added doxygen
  • updated appropriate READMEs
  • Updated manual and documentation

@tatowicz tatowicz requested a review from dgarske December 14, 2022 18:19
@tatowicz tatowicz self-assigned this Dec 14, 2022
Copy link
Copy Markdown
Member

@dgarske dgarske left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

8 bit, trailing spaces or tabs:
./wolfcrypt/src/asn.c:17367:        /* Verify idx can't overflow input buffer */
weird control chars, hard tabs, CRs, trailing whitespace:
./wolfcrypt/src/asn.c:17367:        /* Verify idx can't overflow input buffer */
warning, overlong lines added:
/wolfcrypt/src/asn.c:17414         else if (current_byte == (ASN_CONTEXT_SPECIFIC | ASN_CONSTRUCTED | ASN_DIR_TYPE)) {
/wolfcrypt/src/asn.c:17608         else if (current_byte == (ASN_CONTEXT_SPECIFIC | ASN_CONSTRUCTED | ASN_OTHER_TYPE))
    check-source-text fail_AB
exiting with status 1```

@dgarske dgarske merged commit d468139 into wolfSSL:master Dec 15, 2022
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.

2 participants