Skip to content

Fenrir Fixes#10675

Open
kareem-wolfssl wants to merge 5 commits into
wolfSSL:masterfrom
kareem-wolfssl:f5393
Open

Fenrir Fixes#10675
kareem-wolfssl wants to merge 5 commits into
wolfSSL:masterfrom
kareem-wolfssl:f5393

Conversation

@kareem-wolfssl

Copy link
Copy Markdown
Contributor

Description

Fixes F-5393, F-4023, F-4228, F-5730, F-4285

Testing

Built in tests

Checklist

  • added tests
  • updated/added doxygen
  • updated appropriate READMEs
  • Updated manual and documentation

@kareem-wolfssl kareem-wolfssl self-assigned this Jun 12, 2026
Copilot AI review requested due to automatic review settings June 12, 2026 20:59

Copilot AI left a comment

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.

Pull request overview

Note

Copilot was unable to run its full agentic suite in this review.

This PR applies a set of security/correctness fixes across cryptographic routines and URL/buffer handling to address multiple Fenrir issues (F-5393, F-4023, F-4228, F-5730, F-4285).

Changes:

  • Zeroizes sensitive temporary crypto state / output buffers on error paths (ChaCha20-Poly1305 AEAD context, AES-GCM plaintext on failure).
  • Tightens URL parsing validation (IPv6 literal termination, port length/range checks).
  • Fixes size/copy handling in WOLFSSL_BUF_MEM_* growth/resize to avoid truncation and over-reads.

Reviewed changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated 1 comment.

File Description
wolfcrypt/src/chacha20_poly1305.c Zeroize AEAD working state before freeing temporary buffer.
wolfcrypt/src/aes.c Zero plaintext output on AES-GCM decrypt failure.
src/wolfio.c Reject malformed bracketed IPv6 literals and malformed/out-of-range ports.
src/ssl.c Prevent size_t→int truncation and fix potential over-read in buffer growth under WOLFSSL_NO_REALLOC.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment on lines +78 to 79
ForceZero(aead, sizeof(ChaChaPoly_Aead));
WC_FREE_VAR_EX(aead, NULL, DYNAMIC_TYPE_TMP_BUFFER);
@github-actions

Copy link
Copy Markdown

MemBrowse Memory Report

gcc-arm-cortex-m3

  • FLASH: .text +24 B (+0.0%, 121,417 B / 262,144 B, total: 46% used)

gcc-arm-cortex-m4-baremetal

  • FLASH: .text +64 B (+0.1%, 66,123 B / 262,144 B, total: 25% used)

gcc-arm-cortex-m4-crypto-only

  • FLASH: .text +64 B (+0.0%, 173,742 B / 262,144 B, total: 66% used)

gcc-arm-cortex-m4-openssl-compat

  • FLASH: .text +64 B (+0.0%, 767,604 B / 1,048,576 B, total: 73% used)

gcc-arm-cortex-m4-pq

  • FLASH: .text +64 B (+0.0%, 277,944 B / 1,048,576 B, total: 27% used)

gcc-arm-cortex-m4-rsa-only

  • FLASH: .text +64 B (+0.0%, 323,544 B / 1,048,576 B, total: 31% used)

gcc-arm-cortex-m4-tls12

  • FLASH: .text +64 B (+0.1%, 122,189 B / 262,144 B, total: 47% used)

gcc-arm-cortex-m4-tls13

  • FLASH: .text +64 B (+0.0%, 234,754 B / 262,144 B, total: 90% used)

gcc-arm-cortex-m7-pq

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.

2 participants