Skip to content

Use constant-time compare for chunk-server auth header#328

Merged
folbricht merged 1 commit intomasterfrom
fix-chunk-server-auth-timing
Apr 18, 2026
Merged

Use constant-time compare for chunk-server auth header#328
folbricht merged 1 commit intomasterfrom
fix-chunk-server-auth-timing

Conversation

@folbricht
Copy link
Copy Markdown
Owner

Summary

  • The chunk-server's Authorization header check in httphandler.go used a plain != comparison, which leaks information about the configured token through timing.
  • Switch to crypto/subtle.ConstantTimeCompare to match the check on the index-server handler (Enforce Authorization header on index-server #327).

The chunk-server's Authorization header check used a plain string
comparison, which leaks information about the configured token through
timing. Switch to crypto/subtle.ConstantTimeCompare to match the
hardened check on the index-server handler.
@folbricht folbricht marked this pull request as ready for review April 18, 2026 15:32
@folbricht folbricht merged commit 1393f0d into master Apr 18, 2026
6 checks passed
@folbricht folbricht deleted the fix-chunk-server-auth-timing branch April 18, 2026 15:35
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