-
Notifications
You must be signed in to change notification settings - Fork 918
20260112 Coverity: update macros and add length checks #9646
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
base: master
Are you sure you want to change the base?
Conversation
|
retest this please jenkins: PRB-generic-config-parser: was not stable -> Found unhandled org.jenkinsci.plugins.workflow.support.steps.AgentOfflineException exception: |
switch WC_ALLOC_VAR_EX with XMEMSET to WC_CALLOC_VAR_EX fix XMEMSET call for WC_CALLOC_VAR_EX
f212690 to
8b275a6
Compare
|
retest this please Jenkins. PRB-generic-config-parser was unstable: Found unhandled org.jenkinsci.plugins.workflow.support.steps.AgentOfflineException exception |
wolfcrypt/test/test.c
Outdated
| iTable = (byte*)XMALLOC(iTableLen, HEAP_HINT, DYNAMIC_TYPE_TMP_BUFFER); | ||
| if (iTable == NULL) | ||
| return WC_TEST_RET_ENC_ERRNO; | ||
| if (iTable == NULL){ |
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.
Formatting, space after bracket, before brace.
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.
Fixed.
wolfssl/internal.h
Outdated
| MAX_REQUEST_SZ = 256, /* Maximum cert req len (no auth yet */ | ||
| SESSION_FLUSH_COUNT = 256, /* Flush session cache unless user turns off */ | ||
| TLS_MAX_PAD_SZ = 255, /* Max padding in TLS */ | ||
| MAX_EXT_LEN = 63535, /* Max extension data length */ |
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.
Where did this value come from?
An explanation in the comment would be good!
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.
Added RFC and section (RFC 8446, Sec. 4.2) to comment.
15b50a4 to
b89ec81
Compare
add length check to tls extensions
Description
Update
WC_CALLOC_VAR_EX, now calls XMEMSET properly. Usessizeof(VAR_TYPE)(CID 556176-556182: Uninitialized scalar variable)
Add length checks for TLS extensions
supported_versionsandKeySharebased on RFC 8446 and 9147(CID 487950/487948: Untrusted loop bound)
Add cleanup for
tableandiTablevariables insakke_kat_derive_test()once set byXMALLOC().CID 420937: Resource leak
Testing
./configure --enable-all && make check./configure --enable-all --enable-sakke && make checkChecklist