Skip Menu |
 

From: Bean Zhang <bean.zhang@centrify.com>
To: "krb5-bugs@mit.edu" <krb5-bugs@mit.edu>
Subject: Resource leak in krb5int_get_fq_local_hostname()
Date: Tue, 19 Jun 2018 10:01:27 +0000
Hi Team,

In krb5int_get_fq_local_hostname() of krb5-1.16.1/src/lib/krb5/os/hostrealm.c,
When calls getaddrinfo(), will store the allocated memory to ai,
later if strlcpy() fails, this function returns without freeing the memory that ai points to.

The fix is to call "freeaddrinfo(ai)" if this function returns on calling strlcpy() failure.

Could someone help to take a look?

Thanks,
Bean
This was already fixed on master by commit
c3b2dc0041918128dceedaf21ad718465e759e63, which was associated with
ticket 8687.