3
4
Fork
You've already forked validns
5

fix: count each RRSIG once when DNSKEY key tags collide #117

Merged
jelu merged 1 commit from tobez/validns:fix-issue-78-signature-count into main 2026年05月13日 10:06:03 +02:00
Collaborator
Copy link

The signatures verified value printed by -s was inflated whenever a
zone published two DNSKEYs sharing the same key tag. rrsig_validate
queues a verification attempt per candidate key, and every attempt
incremented the counter — so an RRSIG covered by a two-way key-tag
collision was counted twice.

The fix moves the increment out of the per-attempt path (both the
threaded worker and the inline single-threaded branch) and into
verify_all_keys, where it now ticks exactly once per RRSIG processed.
The user's xn--leagaviika-52b.no zone (8 RRSIGs, two DNSKEYs sharing
key tag 729) is added as a regression fixture.

Fixes #78

The `signatures verified` value printed by `-s` was inflated whenever a zone published two DNSKEYs sharing the same key tag. `rrsig_validate` queues a verification attempt per candidate key, and every attempt incremented the counter — so an RRSIG covered by a two-way key-tag collision was counted twice. The fix moves the increment out of the per-attempt path (both the threaded worker and the inline single-threaded branch) and into `verify_all_keys`, where it now ticks exactly once per RRSIG processed. The user's xn--leagaviika-52b.no zone (8 RRSIGs, two DNSKEYs sharing key tag 729) is added as a regression fixture. Fixes #78
fix: count each RRSIG once when DNSKEY key tags collide
All checks were successful
builds.sr.ht/freebsd Job completed
builds.sr.ht/openbsd Job completed
test / ubuntu (pull_request) Successful in 44s
test / debian (pull_request) Successful in 44s
test / scan-build (pull_request) Successful in 1m8s
test / centos (pull_request) Successful in 1m11s
065986d371
Owner
Copy link

#build

#build
Sign in to join this conversation.
No reviewers
Milestone
Clear milestone
No items
No milestone
Projects
Clear projects
No items
No project
Assignees
Clear assignees
No assignees
2 participants
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
DNS-OARC/validns!117
Reference in a new issue
DNS-OARC/validns
No description provided.
Delete branch "tobez/validns:fix-issue-78-signature-count"

Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?