Skip to content

Fenrir fixes#32

Open
JeremiahM37 wants to merge 12 commits intowolfSSL:masterfrom
JeremiahM37:fenrir-fixes-round3
Open

Fenrir fixes#32
JeremiahM37 wants to merge 12 commits intowolfSSL:masterfrom
JeremiahM37:fenrir-fixes-round3

Conversation

@JeremiahM37
Copy link
Copy Markdown
Contributor

Fixes F-1414, F-1415, F-1416, F-1417, F-1418, F-1419, F-1410, F-1411, F-1420, F-1421, F-1422, F-1412, F-1413, F-1780

  • Fix unused variable compile error in DTLS server example
  • Separate PBKDF2 output buffer from password input in AES example
  • Pass Aes struct by pointer and use aligned allocator in AES example
  • Free ECC key and RNG resources in ECC sign/verify example
  • Add empty slice guards to curve25519 make_pub/make_priv
  • Validate key, IV, nonce sizes in XChaCha20Poly1305 encrypt/decrypt
  • Replace C.malloc pointer indirection with Go-allocated variable in ASN1 functions
  • Add missing ECC preamble stubs for !HAVE_ECC builds
  • Nil-sanitize outPlain in ChaCha20Poly1305 Decrypt
  • Add NO_SHA256 preamble stubs for streaming SHA-256 API
  • Quote shell variable expansions in generateOptions.sh

@JeremiahM37 JeremiahM37 force-pushed the fenrir-fixes-round3 branch from e3c3ed4 to 074e9cb Compare April 3, 2026 17:37
@JeremiahM37 JeremiahM37 force-pushed the fenrir-fixes-round3 branch 5 times, most recently from e1c893f to b89e8ef Compare April 22, 2026 17:41
Copy link
Copy Markdown

@wolfSSL-Fenrir-bot wolfSSL-Fenrir-bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fenrir Automated Review — PR #32

Scan targets checked: go-wolfssl-bugs, go-wolfssl-src

Findings: 2
2 finding(s) posted as inline comments (see file-level comments below)

This review was generated automatically by Fenrir. Findings are non-blocking.

Comment thread x509.go
Comment thread ssl.go
@JeremiahM37 JeremiahM37 force-pushed the fenrir-fixes-round3 branch 3 times, most recently from 77b0163 to a29dc26 Compare April 22, 2026 18:34
Comment thread chacha_poly.go
Comment thread chacha_poly.go
Comment thread misc.go
const BAD_FUNC_ARG = int(C.BAD_FUNC_ARG)

func ConstantCompare(a, b []byte, length int) int {
if length < 0 || length > len(a) || length > len(b) { return 0 }
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This check should stay because it's not passed to wc

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed

@JeremiahM37 JeremiahM37 force-pushed the fenrir-fixes-round3 branch 3 times, most recently from ad240b6 to 88ea47b Compare April 24, 2026 17:41
@JeremiahM37 JeremiahM37 assigned JeremiahM37 and unassigned lealem47 Apr 24, 2026
@JeremiahM37 JeremiahM37 force-pushed the fenrir-fixes-round3 branch from 88ea47b to 6f647a2 Compare April 24, 2026 18:07
@JeremiahM37
Copy link
Copy Markdown
Contributor Author

JeremiahM37 commented Apr 24, 2026

After looking over it again and testing, I restored the Go-boundary length checks wc can't see (slice-len vs passed-size, digest-output size, pre-cgo slicing) and left the semantic ones (key/IV/block-alignment) delegated to wc (wolfssljni follows this same approach). Without these we'd get real crashes / silent overflows, and the earlier bugs I hit were all semantic — which is the riskier category anyway.

@JeremiahM37 JeremiahM37 force-pushed the fenrir-fixes-round3 branch 4 times, most recently from 1df93cd to 60e046b Compare April 24, 2026 18:44
@JeremiahM37 JeremiahM37 assigned lealem47 and unassigned JeremiahM37 Apr 24, 2026
@JeremiahM37 JeremiahM37 force-pushed the fenrir-fixes-round3 branch from 60e046b to 73e818c Compare April 30, 2026 14:34
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