Skip to content

fix(kubernetes): panic on empty ListenHosts#7857

Merged
yongtang merged 1 commit into
coredns:masterfrom
thevilledev:fix/oss-fuzz-482318524
Feb 16, 2026
Merged

fix(kubernetes): panic on empty ListenHosts#7857
yongtang merged 1 commit into
coredns:masterfrom
thevilledev:fix/oss-fuzz-482318524

Conversation

@thevilledev

Copy link
Copy Markdown
Collaborator

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

The boundIPs function checked ListenHosts with a nil comparison, which missed the case of a non-nil empty slice. Accessing index 0 on that slice caused a panic found by OSS-Fuzz. Use len() instead, matching the guard already used in the loop and trace plugins.

2. Which issues (if any) are related?

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

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

None.

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

No.

The boundIPs function checked ListenHosts with a nil
comparison, which missed the case of a non-nil empty
slice. Accessing index 0 on that slice caused a panic
found by OSS-Fuzz. Use len() instead, matching the
guard already used in the loop and trace plugins.

Signed-off-by: Ville Vesilehto <ville@vesilehto.fi>
@yongtang yongtang merged commit 23774ed into coredns:master Feb 16, 2026
11 checks passed
yongtang pushed a commit to yongtang/coredns that referenced this pull request Mar 18, 2026
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