[Freeipa-devel] [PATCH 0234] Prevent NULL dereference before sync_concurr_limit_signal() calls

Petr Spacek pspacek at redhat.com
Wed Apr 9 14:38:24 UTC 2014


On 9.4.2014 15:20, Tomas Hozza wrote:
> On 04/09/2014 02:07 PM, Petr Spacek wrote:
>> Hello,
>>
>> Prevent NULL dereference before sync_concurr_limit_signal() calls.
>>
>> Missing check was causing NULL dereference in case where
>> manager_get_ldap_instance() failed. This typically happens when BIND
>> is processing LDAP updates during shutdown.
>>
>> I noticed this crash during sanity testing 4.2 release...
>>
>> Please review it ASAP so I can release 4.3.
>>
>> How to reproduce the problem:
>> Run BIND manually from console:
>> $ named -4 -g -u named -m record -n 10
>> and press Ctrl+C "almost immediately".
>>
>> Sometimes it shutdowns cleanly and sometimes you can see a crash:
>>
>> Thank you for your time!
>>
>
> ACK.
>
> I'm not able to reproduce the issue, but the patch looks reasonable and
> should not break anything.

Thanks. I have modified the patch once again before push to silence Clang 
warnings about potential NULL-inst deference on following lines:

if (dns_name_dynamic(&name))
     dns_name_free(&name, inst->mctx);

In reality the NULL dereference cannot happen because it is guarded by 
condition in dns_name_dynamic().

This is not a problem now but the behavior depends on internal implementation 
in BIND. It is definitely better to add explicit check to stay safe ...

-- 
Petr^2 Spacek
-------------- next part --------------
A non-text attachment was scrubbed...
Name: bind-dyndb-ldap-pspacek-0234-2-Prevent-NULL-dereference-before-sync_concurr_limit_s.patch
Type: text/x-patch
Size: 3268 bytes
Desc: not available
URL: <http://listman.redhat.com/archives/freeipa-devel/attachments/20140409/0cac5ccc/attachment.bin>


More information about the Freeipa-devel mailing list