Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

LibCrypto: Make a better ASN.1 parser #5344

Merged
merged 3 commits into from
Feb 14, 2021

Conversation

alimpfard
Copy link
Member

@alimpfard alimpfard commented Feb 14, 2021

A modern, good-looking parser (that actually works)!
Should very likely fix #5317 and most other ASN.1/DER parser related bugs.

Hopefully sometime soon, I'll replace the hacky X509 certificate parser in LibTLS with this parser too.

Update: does fix #5317.

It's annoying to calculate it when it's already a member function.
@alimpfard alimpfard force-pushed the asn1-parser branch 3 times, most recently from 7808c50 to fbcca42 Compare February 14, 2021 11:43
And use it to parse RSA keys.
As a bonus, this one shouldn't be reading out of bounds or messing with
the stack (as much) anymore.
This was copying a bunch of bigints for no reason.
@awesomekling awesomekling merged commit 48fbf6a into SerenityOS:master Feb 14, 2021
@alimpfard alimpfard deleted the asn1-parser branch December 23, 2021 08:50
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.

LibCrypto: Read buffer overflow in Crypto::der_decode_sequence
2 participants