Bug 16574 - Memory leak in _nss_dns_gethostbyname4_r with big DNS answer
Summary: Memory leak in _nss_dns_gethostbyname4_r with big DNS answer
Status: RESOLVED FIXED
Alias: None
Product: glibc
Classification: Unclassified
Component: network (show other bugs)
Version: 2.11
: P2 normal
Target Milestone: 2.20
Assignee: Not yet assigned to anyone
URL:
Keywords:
: 21336 (view as bug list)
Depends on:
Blocks:
 
Reported: 2014-02-13 11:51 UTC by Andreas Schwab
Modified: 2017-04-04 18:26 UTC (History)
2 users (show)

See Also:
Host:
Target:
Build:
Last reconfirmed:
fweimer: security+


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Andreas Schwab 2014-02-13 11:51:20 UTC
When resolving both IPv4 and IPv6 and the answers from the DNS server are too big to fit together in the supplied buffer then a new buffer for the second answer is allocated by send_vc / send_dg, but _nss_dns_gethostbyname4_r fails to deallocate it.  This is the only place where the resolver functions are called in such a way that they may work with two buffers.
Comment 1 Andreas Schwab 2014-02-13 12:38:16 UTC
http://permalink.gmane.org/gmane.comp.lib.glibc.alpha/39632

Fixed by d668061.
Comment 2 Andreas Schwab 2014-02-19 10:53:06 UTC
The patch was wrong.
Comment 3 Andreas Schwab 2014-02-19 13:40:39 UTC
Properly fixed by ab09bf6.
Comment 4 Florian Weimer 2017-04-04 18:26:59 UTC
*** Bug 21336 has been marked as a duplicate of this bug. ***