Skip to content

bound certificate list and entry lengths in mg_tls_recv_cert#3581

Open
alhudz wants to merge 1 commit into
cesanta:masterfrom
alhudz:cert-list-bounds
Open

bound certificate list and entry lengths in mg_tls_recv_cert#3581
alhudz wants to merge 1 commit into
cesanta:masterfrom
alhudz:cert-list-bounds

Conversation

@alhudz
Copy link
Copy Markdown

@alhudz alhudz commented Jun 1, 2026

mg_tls_recv_cert uses the wire certificate-list and per-entry lengths without bounding them against recv_len, so a crafted peer Certificate message drives the reads at cert+certsz past the rtls buffer.

@cpq
Copy link
Copy Markdown
Member

cpq commented Jun 2, 2026

@alhudz could you report this to the https://github.com/cesanta/mongoose/security/advisories please ?

@alhudz
Copy link
Copy Markdown
Author

alhudz commented Jun 2, 2026

Sure, will do. I'll file it through the advisories form with the repro details and reference this branch there. Want me to close this public PR once that's up, or leave it for you to link the fix?

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