Skip to content

Add some missing PKCS7 length checks and bound DTLS 1.3 ACK list.#10833

Merged
dgarske merged 3 commits into
wolfSSL:masterfrom
kareem-wolfssl:zd22079
Jul 7, 2026
Merged

Add some missing PKCS7 length checks and bound DTLS 1.3 ACK list.#10833
dgarske merged 3 commits into
wolfSSL:masterfrom
kareem-wolfssl:zd22079

Conversation

@kareem-wolfssl

Copy link
Copy Markdown
Contributor

Description

Fixes zd#22079

Testing

Built in tests

Checklist

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

…dData.

Reported by: Jorge Milla (Pig-Tail) <jorge@jmilla.es>
…pedData.

Reported by: Jorge Milla (Pig-Tail) <jorge@jmilla.es>
Reported by: Jorge Milla (Pig-Tail) <jorge@jmilla.es>
@kareem-wolfssl kareem-wolfssl self-assigned this Jul 1, 2026
Copilot AI review requested due to automatic review settings July 1, 2026 22:04

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

This PR tightens input-bound validation in PKCS7 decoding paths and prevents unbounded growth of the DTLS 1.3 ACK handoff queue when using write-dup mode, reducing the risk of out-of-bounds reads and memory growth under repeated scheduled-work cycles.

Changes:

  • Add missing bounds checks before copying the EnvelopedData IV and AuthEnvelopedData authTag in non-streaming PKCS7 decode paths.
  • Add a guard to cap the aggregate size of the DTLS 1.3 write-dup ACK transfer queue by dropping additional batches once the queue is at the limit.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 3 comments.

File Description
wolfcrypt/src/pkcs7.c Adds buffer-length validation before copying IV/authTag bytes during PKCS7 decode to avoid out-of-bounds reads.
src/dtls13.c Bounds growth of the write-dup ACK list by conditionally splicing/dropping batches during scheduled work.

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

Comment thread wolfcrypt/src/pkcs7.c
Comment thread wolfcrypt/src/pkcs7.c
Comment thread src/dtls13.c
@Frauschi

Frauschi commented Jul 2, 2026

Copy link
Copy Markdown
Contributor

Jenkins retest this please

@dgarske dgarske self-requested a review July 7, 2026 00:21
@dgarske dgarske merged commit 675d5df into wolfSSL:master Jul 7, 2026
305 checks passed
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.

5 participants