Skip to content

fix(server): do not cache an ECS query's SERVFAIL under the global failure key (F55) - #86

Merged
ersinkoc merged 1 commit into
mainfrom
audit/server-F55
Nov 4, 2026
Merged

ersinkoc merged 1 commit into
mainfrom
audit/server-F55

Conversation

@ersinkoc

@ersinkoc ersinkoc commented Nov 4, 2026

Copy link
Copy Markdown
Collaborator

An upstream SERVFAIL for a query carrying ECS was stored in the global RFC 9520 failure cache, so clients without ECS received that SERVFAIL for the cache period. The resolver already skips this when ECS is outbound; the handler did not.

Fix: skip StoreFailure when outboundECS != nil on both the error and SERVFAIL result paths.

Regression test: TestHandle_ECS_ServfailNotCachedGlobally. Proof failed on unmodified code; verifier passed 3x with -race.

…ilure key

A SERVFAIL learned while a client-subnet option was in flight is not portable
to other clients (resolver.go already skips failure caching under ECS), but
Handle wrote it to the global key, so unscoped clients got the cached
SERVFAIL for the failure TTL.
@ersinkoc
ersinkoc merged commit c3e18f2 into main Nov 4, 2026
6 checks passed
@ersinkoc
ersinkoc deleted the audit/server-F55 branch November 4, 2026 12:57
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.

1 participant