Executive brief
The nscd service, which handles DNS name resolution caching on Linux systems, can crash when a malicious DNS server returns an unusually large response. This causes temporary slowdowns in DNS lookups across the system. While the risk is limited to systems using untrusted DNS servers and the service runs in isolation, a sophisticated attacker could potentially corrupt the DNS cache before causing a crash.
Technical details
The vulnerability is a stack overflow in the nscd service (in glibc 2.3.4 and later) caused by unbounded alloca() calls in aicache.c and hstcache.c. When a DNS server returns a response larger than expected, the dynamic memory allocation via alloca() can overflow the thread's stack. The attack requires nscd to be enabled, the system to use an untrusted DNS server, and the DNS server to be capable of generating sufficiently large responses; this is difficult to trigger in practice with standard DNS servers like BIND 9. Successful exploitation results in a crash of the nscd daemon, degrading DNS resolution performance. There is a theoretical possibility of cache corruption if an attacker can manipulate the stack pointer to target the heap, potentially overwriting other nscd caches before the crash occurs.
Affected products
- GNU C Library 2.3.4 and later
Timeline
- 2026-09-10: disclosed
- 2026-09-11: advisory