DEV Community

OnaEiuspkz
OnaEiuspkz

Posted on

CoreDNS AXFR must reject empty transfer batches

CoreDNS AXFR must reject empty transfer batches

CoreDNS 1.9.4 before 1.14.5 can panic when a k8s_external zone transfer produces an empty record batch. CVE-2026-62994 is specific, but the bug is a useful example of a lower-level parser trusting an invariant that another plugin failed to maintain.

The vulnerable sequence requires k8s_external headless-service zone transfers. Kubernetes contains a headless service endpoint with no declared ports. One plugin creates a port value of -1, another skips the service, and the external transfer plugin sends an empty []dns.RR batch. The transfer plugin then indexes records[0] without checking for an empty slice.

A network DNS client allowed to request AXFR can trigger the panic. The published CVSS score is low because the deployment conditions raise attack complexity, but the result is a process crash in a critical service.

Upgrade CoreDNS to 1.14.5 or later. Review DNS zone-transfer policy separately. AXFR should be available only to known secondary servers or trusted automation, not to arbitrary clients on the network. Use transport controls and a source allowlist where the deployment supports them.

Test the upgrade with the actual k8s_external configuration and a headless service that has no declared ports. A normal DNS query test will not exercise the bug. If AXFR is not needed, disable zone transfers and remove the exposure rather than relying only on the patch.

Monitor CoreDNS process exits, panic logs and AXFR requests from unexpected sources. Correlate a restart with a zone-transfer request and recent Kubernetes endpoint changes. That evidence can distinguish an attempted exploit from an unrelated deployment failure.

Add a defensive check in custom plugins that call transfer code. An empty record set should produce a clear response or a controlled refusal. Indexing the first element without validating the slice is a local bug waiting for an upstream edge case.

References

Top comments (0)