Skip to content

plugin/grpc: enforce DNS message size limits#7490

Merged
thevilledev merged 1 commit into
coredns:masterfrom
thevilledev:fix/grpc-msg-size
Sep 12, 2025
Merged

plugin/grpc: enforce DNS message size limits#7490
thevilledev merged 1 commit into
coredns:masterfrom
thevilledev:fix/grpc-msg-size

Conversation

@thevilledev

Copy link
Copy Markdown
Collaborator

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

Add DNS wire size validation for requests/replies in the gRPC plugin. Limit gRPC recv/send via default call options, accounting necessary framing/protobuf overhead. An error is returned for oversized messages. Adds a unit test that rejects an oversized request/reply.

2. Which issues (if any) are related?

None found.

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

None required. This aligns behaviour with the DNS spec and doesn’t change user-facing configuration.

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

No.

Add DNS wire size validation for requests/replies. Limit gRPC
recv/send via default call options, accounting necessary
framing/protobuf overhead. An error is returned for oversized
messages. Add test.

Signed-off-by: Ville Vesilehto <ville@vesilehto.fi>
@codecov

codecov Bot commented Aug 30, 2025

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 95.45455% with 1 line in your changes missing coverage. Please review.
✅ Project coverage is 60.14%. Comparing base (93c57b6) to head (242ee40).
⚠️ Report is 1632 commits behind head on master.

Files with missing lines Patch % Lines
plugin/grpc/proxy.go 95.45% 0 Missing and 1 partial ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master    #7490      +/-   ##
==========================================
+ Coverage   55.70%   60.14%   +4.44%     
==========================================
  Files         224      274      +50     
  Lines       10016    18164    +8148     
==========================================
+ Hits         5579    10925    +5346     
- Misses       3978     6603    +2625     
- Partials      459      636     +177     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@chrisohaver chrisohaver left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Thanks!

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.

2 participants