Bugfix hunt - #932
Open
robstradling wants to merge 12 commits into
Open
Conversation
len(m) was read outside the mutex while other goroutines wrote to the map under mu.Lock(), which is a concurrent map read/write.
The retry limit was hardcoded to 10, so the caller-supplied value was silently ignored.
Using %v broke the error chain, so PartialOrFullResource never saw os.ErrNotExist and the partial-to-full bundle fallback never fired.
len(rest) was tested first, so a malformed checkpoint could be reported as trailing data rather than the actual parse error.
The unit was tested first, so a parse failure could be reported as a bogus unit error.
The ExtKeyUsageAny short-circuit ran before the empty-chain check, so an unverifiable chain could be reported as success.
The value recorded and the bucket boundaries are both in seconds, but the metric was labelled ms.
pem.Decode returns no error, so the check tested the already-nil err from the preceding ReadFile and a non-PEM key file panicked on block.Bytes.
A short response from the source log made bits[1]/bits[2] panic with an index out of range.
A short response from the source log made bits[1]/bits[2] panic with an index out of range.
A fingerprint list whose length was not a multiple of 32 made the fpRaw[:32] slice panic on data fetched from a remote log.
The bounds check was against rest, but the three bytes were read from data, so any Uint24 field at a non-zero offset decoded the wrong bytes.
robstradling
requested review from
mhutchinson
and removed request for
a team
September 2, 2026 15:38
mhutchinson
requested review from
roger2hk
and removed request for
mhutchinson
September 2, 2026 15:46
roger2hk
approved these changes
Sep 2, 2026
Contributor
There was a problem hiding this comment.
Thanks @robstradling for the fix. The bug in internal/types/tls/tls.go can also be found in ct-go repo.
https://github.com/google/certificate-transparency-go/blob/master/tls/tls.go#L339
Author
I've opened a PR to fix that: google/certificate-transparency-go#1822 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
I asked Claude to "Hunt for any obvious bugs, and suggest fixes."