-
Notifications
You must be signed in to change notification settings - Fork 18k
encoding/asn1: only accept minimally encoded base 128 integers #38281
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
encoding/asn1: only accept minimally encoded base 128 integers #38281
Conversation
Reject base 128 encoded integers that aren't using minimal encoding, specifically if the leading octet of an encoded integer is 0x80. This only affects parsing of tags and OIDs, both of which expect this encoding (see X.690 8.1.2.4.2 and 8.19.2). Fixes golang#36881 Change-Id: I969cf48ac1fba7e56bac334672806a0784d3e123
Change-Id: Ifd030ea56ebbdc2c7680c95eaf2941ba3645e4ec
c27be6c
to
fefc03d
Compare
This PR (HEAD: fefc03d) has been imported to Gerrit for code review. Please visit https://go-review.googlesource.com/c/go/+/227320 to see it. Tip: You can toggle comments from me using the |
Message from Emmanuel Odeke: Patch Set 2: Run-TryBot+1 Thank you for this change Roland! We are only 1 day away from the Go1.15 code freeze, Please don’t reply on this GitHub thread. Visit golang.org/cl/227320. |
Message from Gobot Gobot: Patch Set 2: TryBots beginning. Status page: https://farmer.golang.org/try?commit=ffbd48b9 Please don’t reply on this GitHub thread. Visit golang.org/cl/227320. |
Message from Gobot Gobot: Patch Set 2: TryBot-Result+1 TryBots are happy. Please don’t reply on this GitHub thread. Visit golang.org/cl/227320. |
Message from Roland Shoemaker: Patch Set 2:
No worries, there is no real rush to get this in, so feel free to prioritize other more important things. Please don’t reply on this GitHub thread. Visit golang.org/cl/227320. |
Message from Filippo Valsorda: Patch Set 3: Code-Review+2 Please don’t reply on this GitHub thread. Visit golang.org/cl/227320. |
Message from Emmanuel Odeke: Patch Set 3: Run-TryBot+1 Thanks for the review, Filippo! Please don’t reply on this GitHub thread. Visit golang.org/cl/227320. |
Message from Gobot Gobot: Patch Set 3: TryBots beginning. Status page: https://farmer.golang.org/try?commit=c2b959dc Please don’t reply on this GitHub thread. Visit golang.org/cl/227320. |
Reject base 128 encoded integers that aren't using minimal encoding, specifically if the leading octet of an encoded integer is 0x80. This only affects parsing of tags and OIDs, both of which expect this encoding (see X.690 8.1.2.4.2 and 8.19.2). Fixes #36881 Change-Id: I969cf48ac1fba7e56bac334672806a0784d3e123 GitHub-Last-Rev: fefc03d GitHub-Pull-Request: #38281 Reviewed-on: https://go-review.googlesource.com/c/go/+/227320 Reviewed-by: Filippo Valsorda <[email protected]> Run-TryBot: Emmanuel Odeke <[email protected]> TryBot-Result: Gobot Gobot <[email protected]>
This PR is being closed because golang.org/cl/227320 has been merged. |
Reject base 128 encoded integers that aren't using minimal encoding,
specifically if the leading octet of an encoded integer is 0x80. This
only affects parsing of tags and OIDs, both of which expect this
encoding (see X.690 8.1.2.4.2 and 8.19.2).
Fixes #36881