Skip to content

fix(dnssec): avoid caching empty signing results#7996

Merged
yongtang merged 1 commit into
coredns:masterfrom
thevilledev:fix/dnssec-empty-sigs-cache
Apr 1, 2026
Merged

fix(dnssec): avoid caching empty signing results#7996
yongtang merged 1 commit into
coredns:masterfrom
thevilledev:fix/dnssec-empty-sigs-cache

Conversation

@thevilledev

Copy link
Copy Markdown
Collaborator

1. Why is this pull request needed and what does it do?

Don't cache the result of sign() when no signatures were produced. This can happen when d.keys is empty (misconfiguration) or when splitkeys mode filters out all applicable keys. Previously, nil sigs were cached and never evicted by periodicClean, polluting the cache with useless entries and inflating cache hit metrics.

2. Which issues (if any) are related?

Fixes #7992

3. Which documentation changes (if any) need to be made?

None.

4. Does this introduce a backward incompatible change or deprecation?

No.

Don't cache the result of sign() when no signatures were produced.
This can happen when d.keys is empty (misconfiguration) or when
splitkeys mode filters out all applicable keys. Previously, nil
sigs were cached and never evicted by periodicClean, polluting
the cache with useless entries and inflating cache hit metrics.

Signed-off-by: Ville Vesilehto <ville@vesilehto.fi>
@thevilledev thevilledev marked this pull request as ready for review April 1, 2026 19:02
@thevilledev thevilledev requested review from Isolus and miekg as code owners April 1, 2026 19:02
@yongtang yongtang merged commit 510977c into coredns:master Apr 1, 2026
13 checks passed
Filippo125 pushed a commit to Filippo125/coredns that referenced this pull request Apr 10, 2026
Signed-off-by: Filippo <filippo.ferrazini@gmail.com>
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.

plugin/dnssec: potential caching of empty sigs slice

2 participants