Fix applying non-zero offset 1 to null pointer ASAN error - #7644
Conversation
|
Can one of the admins verify this patch? |
dgarske
left a comment
There was a problem hiding this comment.
Can you tell us more about your project and use-case? I don't see you setup as an approved contributor. If you are planning additional PR's we can consider getting you added. Just send an email to support at wolfssl dot com referencing this PR to get that process started.
e20c4ed to
f7f9b7f
Compare
|
Hi @alexsn , We cannot accept any PR's without a signed contributor agreement. If you'd like to get setup please email support@wolfssl.com and reference this PR. This change seems to break our API unit test: Please review and fix. Thanks, |
|
Hey @dgarske, I've fixed the crash (could do while (1) as there are a bunch of continue statements in the loop that was crashing. I've updated the while condition to bump next if it's non null |
|
In addition I've emailed support@wolfssl.com as requested. |
When swapping openssl for wolfssl I encountered the following crash when compiling with ASAN enabled: wolfssl/src/ssl.c:11892:16: runtime error: applying non-zero offset 1 to null pointer SUMMARY: UndefinedBehaviorSanitizer: undefined-behavior wolfssl/src/ssl.c:11892:16 in wolfssl/src/internal.c:26632:16: runtime error: applying non-zero offset 1 to null pointer SUMMARY: UndefinedBehaviorSanitizer: undefined-behavior wolfssl/src/internal.c:26632:16 in
|
Closing in favor of #7698 |
Description
When swapping openssl for wolfssl I encountered the following crash when compiling with ASAN enabled:
wolfssl/src/ssl.c:11892:16: runtime error: applying non-zero offset 1 to null pointer
SUMMARY: UndefinedBehaviorSanitizer: undefined-behavior wolfssl/src/ssl.c:11892:16 in
wolfssl/src/internal.c:26632:16: runtime error: applying non-zero offset 1 to null pointer
SUMMARY: UndefinedBehaviorSanitizer: undefined-behavior wolfssl/src/internal.c:26632:16 in
The fix is to break the loop when next pointer is NULL.
ZD 18175