mDNSResponder -- corrupted stack crash when parsing bad resolv.conf

2010-05-26T00:00:00
ID 1CD87E2A-81E3-11DF-81D8-00262D5ED8EE
Type freebsd
Reporter FreeBSD
Modified 2010-05-26T00:00:00

Description

Juli Mallett reports:

mdnsd will crash on some systems with a corrupt stack and once that's fixed it will still leak a file descriptor when parsing resolv.conf. The crash is because scanf is used with %10s for a buffer that is only 10 chars long. The buffer size needs increased to 11 chars to hold the trailing NUL. To fix the leak, an fclose needs added.