Skip to content

observer: Fix possible panic in TLSProbe check#8836

Open
beautifulentropy wants to merge 1 commit into
mainfrom
observer-fix-possible-panic
Open

observer: Fix possible panic in TLSProbe check#8836
beautifulentropy wants to merge 1 commit into
mainfrom
observer-fix-possible-panic

Conversation

@beautifulentropy

Copy link
Copy Markdown
Member

Fixes #8822

@beautifulentropy beautifulentropy marked this pull request as ready for review July 1, 2026 20:30
@beautifulentropy beautifulentropy requested a review from a team as a code owner July 1, 2026 20:30
Comment on lines 212 to +213
root := peers[len(peers)-1].Issuer
err = p.checkRoot(root.Organization[0], root.CommonName)
err = p.checkRoot(root)

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The root variable is only used in one place now; inline it into p.checkRoot(peers[len(peers)-1].Issuer).

if (p.rootCN == "" && p.rootOrg == "") || (rootOrg == p.rootOrg && rootCN == p.rootCN) {
func (p TLSProbe) checkRoot(root pkix.Name) error {
var rootOrg string
if len(root.Organization) > 0 {

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'd say if len(root.Organization) != 1 { return errors.New("...") }, and then proceed with root.Organization[0] after that.

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.

boulder-observer TLS prober doesn't check length of root cert's Organization field

3 participants