[SSSD] [PATCH] Protect against segfault in remove_ldap_connection_callbacks

Stephen Gallagher sgallagh at redhat.com
Fri Jun 18 13:48:11 UTC 2010


On 06/18/2010 09:37 AM, Simo Sorce wrote:
> On Thu, 17 Jun 2010 16:25:24 -0400
> Stephen Gallagher<sgallagh at redhat.com>  wrote:
>
>> +    if (sh->sdap_fd_events) {
>> +        ret = talloc_free(sh->sdap_fd_events->conncb);
>> +        if (ret != 0) {
>> +            return EIO;
>> +        }
>>
>
> NACK, it makes no sense for us to abort here, we have no way to recover.
> And the destructor should never return error for conncb anyway, waiting
> patch for both issues.
>
> Simo.
>

[PATCH 1/2] Fix return value from remove_connection_callback() destructor

ldap_get_option() can only fail if the option we're removing has
already been removed. It is sufficient to log this and continue.

[PATCH 2/2] Protect against segfault in remove_ldap_connection_callbacks

If sdap_mark_offline() is called before a live connection is
established, sdap_fd_events could be NULL, causing a segfault when
remove_ldap_connection_callbacks() attempts to free the
sdap_fd_events->conncb



-- 
Stephen Gallagher
RHCE 804006346421761

Delivering value year after year.
Red Hat ranks #1 in value among software vendors.
http://www.redhat.com/promo/vendor/
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-Fix-return-value-from-remove_connection_callback-des.patch
Type: text/x-patch
Size: 1416 bytes
Desc: not available
URL: <https://lists.fedorahosted.org/pipermail/sssd-devel/attachments/20100618/4489d6e7/attachment.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0002-Protect-against-segfault-in-remove_ldap_connection_c.patch
Type: text/x-patch
Size: 1318 bytes
Desc: not available
URL: <https://lists.fedorahosted.org/pipermail/sssd-devel/attachments/20100618/4489d6e7/attachment-0001.bin>


More information about the sssd-devel mailing list