x509asn1: make encodeOID stop on too long input#20871
Conversation
|
@aisle-analyzer augment review |
🔒 Aisle Security Analysis✅ We scanned this PR and did not find any security vulnerabilities. Aisle supplements but does not replace security review. Analyzed PR: #20871 at commit Last updated on: 2026-03-09T19:31:41Z |
🤖 Augment PR SummarySummary: Tightens X.509 ASN.1 parsing to avoid overruns/underflows on malformed inputs. 🤖 Was this summary useful? React with 👍 or 👎 |
Plus two other minor fixups. Reported-by: John Rodriguez Closes #20871
47a512d to
5962ed2
Compare
There was a problem hiding this comment.
Pull request overview
This PR hardens X.509 ASN.1 parsing and certificate info extraction by improving bounds/error handling in OID parsing and public key parsing, plus a small cleanup around dynbuf lifetime.
Changes:
- Prevent out-of-bounds reads in
encodeOID()when encountering a truncated base-128 OID component. - Ensure temporary dynbuf used for symbolic OID lookup is always freed.
- Add additional guardrails in X.509 parsing (issuer extraction) and ECC public key handling for undersized inputs.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
You can also share your feedback on Copilot code review. Take the survey.
Plus two other minor fixups. Reported-by: John Rodriguez Closes #20871
5962ed2 to
dba183e
Compare
Plus two other minor fixups. Reported-by: John Rodriguez Closes #20871
dba183e to
f8f85b4
Compare
Plus two other minor fixups.
Reported-by: John Rodriguez