Skip to content

fix(multisocket): cap num sockets to prevent OOM#7615

Merged
johnbelamaric merged 1 commit into
coredns:masterfrom
thevilledev:fix/multisocket-num-sockets
Oct 14, 2025
Merged

fix(multisocket): cap num sockets to prevent OOM#7615
johnbelamaric merged 1 commit into
coredns:masterfrom
thevilledev:fix/multisocket-num-sockets

Conversation

@thevilledev

Copy link
Copy Markdown
Collaborator

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

Add hard maximum to number of sockets in the multisocket plugin. Unbounded value could cause CoreDNS to attempt creating an excessive number of listeners, leading to OOM at startup. Capping at 1024 mitigates misconfiguration while accomodating large environments. Add tests.

2. Which issues (if any) are related?

Fixes OSS-Fuzz finding #451334054 (not publicly accessible).

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

Added hard limit to documentation.

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

Sets a sane maximum value for pathological input. Open to other views here.

Add hard maximum to number of sockets in the multisocket plugin.
Unbounded value could cause CoreDNS to attempt creating an excessive
number of listeners, leading to OOM at startup. Capping at 1024
mitigates misconfiguration while accomodating large environments.
Add tests.

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

codecov Bot commented Oct 13, 2025

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 62.60%. Comparing base (93c57b6) to head (f7a4686).
⚠️ Report is 1694 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #7615      +/-   ##
==========================================
+ Coverage   55.70%   62.60%   +6.90%     
==========================================
  Files         224      278      +54     
  Lines       10016    18573    +8557     
==========================================
+ Hits         5579    11627    +6048     
- Misses       3978     6259    +2281     
- Partials      459      687     +228     

☔ 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.

@johnbelamaric johnbelamaric merged commit f085ed0 into coredns:master Oct 14, 2025
13 checks passed
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