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

Petr Spacek pspacek at redhat.com
Wed Apr 9 15:43:18 UTC 2014


On 9.4.2014 17:39, Lukas Slebodnik wrote:
> On (09/04/14 16:38), Petr Spacek wrote:
>> 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
>
>>From cb9ed81e6b1fdd26a06739fe819b730eb4a70839 Mon Sep 17 00:00:00 2001
>> From: Petr Spacek <pspacek at redhat.com>
>> Date: Wed, 9 Apr 2014 14:01:00 +0200
>> Subject: [PATCH] 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.
>>
>> Signed-off-by: Petr Spacek <pspacek at redhat.com>
>> ---
>
> scan-build: No bugs found.
>
> ACK

Thanks!

Pushed to master: cb9ed81e6b1fdd26a06739fe819b730eb4a70839

-- 
Petr^2 Spacek




More information about the Freeipa-devel mailing list