-
Notifications
You must be signed in to change notification settings - Fork 837
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 applying non-zero offset 1 to null pointer ASAN error #7644
Conversation
Can one of the admins verify this patch? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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 [email protected] 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 [email protected] 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