glibc 2.15 provides /var/db/Makefile, which creates various databases for plaintext files using makedb:
make -C /var/db
If /var/db/services.db is created, service name lookup using getaddrinfo() (but not getservbyname()) results in an infinite loop (full CPU load and no system calls).
This happens, e.g., if iptables is supplied named --sport / --dport parameters. An example program (to be attached) uses relevant code from iptables-1.4.13.
Created attachment 321734 [details]
Created attachment 321736 [details]
Created attachment 321738 [details]
This is a hardened system, but the problem appears both under hardened and regular kernel (in a chroot).
nice test case -- doesn't really need iptables setup. i've moved this upstream.
glibc-2.21+ should be fixed, and that's stable now, so closing out