Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix possible memory overrun in tests #7865

Merged
merged 2 commits into from
Aug 13, 2024

Conversation

bandi13
Copy link
Contributor

@bandi13 bandi13 commented Aug 13, 2024

Found by one of our other tests:

In file included from wolfcrypt/test/test.c:43:
wolfcrypt/test/test.c: In function ‘certext_test’:
./wolfssl/wolfcrypt/types.h:722:39: error: ‘__builtin_memcmp_eq’ specified bound 32 exceeds source size 21 [-Werror=stringop-overread]
  722 |             #define XMEMCMP(s1,s2,n)  memcmp((s1),(s2),(n))
      |                                       ^~~~~~~~~~~~~~~~~~~~~
wolfcrypt/test/test.c:18504:9: note: in expansion of macro ‘XMEMCMP’
18504 |     if (XMEMCMP(skid_rsa, cert.extSubjKeyId, sizeof(cert.extSubjKeyId)))
      |         ^~~~~~~
wolfcrypt/test/test.c:18456:10: note: source object declared here
18456 |     byte skid_rsa[]   = "\x33\xD8\x45\x66\xD7\x68\x87\x18\x7E\x54"
      |          ^~~~~~~~

@bandi13 bandi13 force-pushed the fixMemOverrunInTest branch from b08541a to f8c968d Compare August 13, 2024 17:57
@bandi13
Copy link
Contributor Author

bandi13 commented Aug 13, 2024

retest this please. Issue in generic-config-parser: --enable-ed448 --enable-opensslextra unable to get a cert.

@douzzer douzzer merged commit 7dbf2a0 into wolfSSL:master Aug 13, 2024
125 checks passed
@bandi13 bandi13 deleted the fixMemOverrunInTest branch August 19, 2024 17:06
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