[SSSD] [PATCH] IPA: Handle bad results from c-ares lookup

Jakub Hrozek jhrozek at redhat.com
Sun Dec 2 20:59:58 UTC 2012


On Sun, Dec 02, 2012 at 09:56:04PM +0100, Jakub Hrozek wrote:
> On Wed, Nov 28, 2012 at 10:47:17AM +0100, Jakub Hrozek wrote:
> > On Tue, Nov 27, 2012 at 04:10:23PM -0500, Stephen Gallagher wrote:
> > > In some situations, the c-ares lookup can return NULL instead of
> > > a list of addresses. In this situation, we need to avoid
> > > dereferencing NULL.
> > > 
> > > This patch adds a log message and sets the count to zero so it is
> > > handled appropriately below.
> > > 
> > > This patch fixes the crash seen in
> > > https://bugzilla.redhat.com/show_bug.cgi?id=880571
> > > 
> > > This may actually be due to a bug in c-ares, but we should be
> > > defensive anyway.
> > 
> > I wonder if it may be better to perform this check at the resolver
> > level, maybe in resolv_gethostbyname_dns_parse() check out the hostent
> > structure and if it's present but empty then return ENOENT.
> > 
> > The patch is fine, though and we can commit it as well. It doesn't hurt
> > to have additional checks.
> 
> In other words, Ack.

Pushed to master and sssd-1-9



More information about the sssd-devel mailing list