Commit 2e39b45
committed
address copilot, fenrir, and internal review
- Copilot: privkey double-free — Fixed: added privkey = NULL after mid-function free at line 454
- Copilot: ForceZero NULL guard in OCSP — Fixed: added if (signerKeyDer != NULL && signerKeyDerSz > 0) guard
- Copilot: ForceZero on key buffers in GenChimeraCertSign — Fixed: added ForceZero on caKeyBuf, altCaKeyBuf, serverKeyBuf before XFREE
- Fenrir: pkey vs privkey — No change needed: pkey is a borrowed ref from X509_get0_pubkey, not owned by caller. Removing the free was correct.
- Fenrir: Missing ForceZero on heap key buffers — Same as Copilot #3, addressed above
- CI: switch-enum errors — Fixed: removed inner #ifdef guards on enum cases that always exist, added SM3 under #ifdef WOLFSSL_SM3, removed
WC_HASH_TYPE_MAX (duplicate value)
- CI: heap-buffer-overflow in strstr — Fixed: allocate inBufSz + 1 and null-terminate for XSTRSTR safety
- CI: heap-use-after-free — Fixed by the privkey NULL fix above1 parent e1184f1 commit 2e39b45
3 files changed
Lines changed: 13 additions & 9 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
884 | 884 | | |
885 | 885 | | |
886 | 886 | | |
887 | | - | |
| 887 | + | |
| 888 | + | |
888 | 889 | | |
889 | 890 | | |
890 | 891 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
326 | 326 | | |
327 | 327 | | |
328 | 328 | | |
329 | | - | |
| 329 | + | |
330 | 330 | | |
331 | 331 | | |
332 | 332 | | |
333 | 333 | | |
334 | 334 | | |
| 335 | + | |
335 | 336 | | |
336 | 337 | | |
337 | 338 | | |
| |||
452 | 453 | | |
453 | 454 | | |
454 | 455 | | |
| 456 | + | |
455 | 457 | | |
456 | 458 | | |
457 | 459 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
925 | 925 | | |
926 | 926 | | |
927 | 927 | | |
| 928 | + | |
| 929 | + | |
| 930 | + | |
| 931 | + | |
| 932 | + | |
| 933 | + | |
928 | 934 | | |
929 | 935 | | |
930 | 936 | | |
| |||
1312 | 1318 | | |
1313 | 1319 | | |
1314 | 1320 | | |
1315 | | - | |
1316 | 1321 | | |
1317 | | - | |
1318 | | - | |
1319 | 1322 | | |
1320 | | - | |
1321 | | - | |
1322 | 1323 | | |
1323 | | - | |
1324 | | - | |
1325 | 1324 | | |
| 1325 | + | |
| 1326 | + | |
1326 | 1327 | | |
1327 | 1328 | | |
1328 | 1329 | | |
| |||
0 commit comments