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

fix: input validation for RRSIG.Verify() #1618

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

developStorm
Copy link

Maybe not a perfect fix, but this attempts to resolve #1617.

Also introduces tests to ensure compliance with RFC 4035.

dnssec.go Outdated
if !strings.EqualFold(rr.SignerName, k.Hdr.Name) {

signerName := CanonicalName(rr.SignerName)
if !strings.EqualFold(signerName, k.Hdr.Name) {
Copy link
Owner

Choose a reason for hiding this comment

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

i dont think equalFold is correct for use in DNS....

Copy link
Author

@developStorm developStorm Nov 22, 2024

Choose a reason for hiding this comment

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

Hi, thanks for reviewing! This function use is identical to what's being used in master now:

dns/dnssec.go

Line 373 in b77d1ed

if !strings.EqualFold(rr.SignerName, k.Hdr.Name) {

What's the correct version you would suggest? Would == do? I can make the patch.

Copy link
Contributor

Choose a reason for hiding this comment

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

@developStorm
equal should be what you want.

Copy link
Author

@developStorm developStorm Dec 2, 2024

Choose a reason for hiding this comment

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

@monoidic Thanks! 7b480dc replaces all occurrences of EqualFold with equal.

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.

DNSSEC RRSIG Verify Function Fails to Enforce RFC4035 Constraints
3 participants