[Freeipa-devel] [PATCH 0023] topology plugins sigsev when adding a managed host

Ludwig Krispenz lkrispen at redhat.com
Mon Jun 13 08:04:21 UTC 2016


revised patch (v2) attached:
changed log level
fixed order of statements in freeing host list

On 06/10/2016 05:56 PM, Ludwig Krispenz wrote:
>
> On 06/10/2016 05:41 PM, thierry bordaz wrote:
>>
>>
>> On 06/10/2016 05:23 PM, Ludwig Krispenz wrote:
>>>
>>> On 06/10/2016 04:44 PM, thierry bordaz wrote:
>>>> Hi Ludwig,
>>>>
>>>> I agree with you there is no path to add a host with an empty hostname.
>>>> You fix looks valid but I would prefer a log in FATAL rather in PLUGIN.
>>> yes, of course that was my intention, copy paste :-)
>>>>
>>>> Also I wonder if a reason of empty hostname could be a 
>>>> slapi_ch_free on it but with the host remaining in the list.
>>>> Looking at 
>>>> https://git.fedorahosted.org/cgit/freeipa.git/tree/daemons/ipa-slapi-plugins/topology/topology_cfg.c#n852,
>>>> I wonder if the two lines 852 and 853 could lead to this situation.
>>> but this frees the complete replica structure tconf and in the 
>>> caller tconf is set to null, so should never be used again.
>>
>> Yes you are right, it can not conduct to empty hostname into tconf.
>> However I think it can leak because host will be set to 0 at the end 
>> of the first iteration.
> yes, line 852 and 853 should be switched
>>
>> An other possibility is that in
>> https://git.fedorahosted.org/cgit/freeipa.git/tree/daemons/ipa-slapi-plugins/topology/topology_util.c#n1449|
>> ipa_topo_util_init_hosts, 'cn' has an empty value. newhost is not 
>> null but empty, so we may create an empty hostname.
>> |
>>>>
>>>> thanks
>>>> thierry
>>>>
>>>>
>>>> On 06/10/2016 12:36 PM, Ludwig Krispenz wrote:
>>>>> Hi,
>>>>> the attached patch will prevent the crash reported in ticket #5928.
>>>>>
>>>>> So far I do not understand how this situation can occur, there is 
>>>>> no reproducer yet. I do not really like this fix as it hides a 
>>>>> probable corrupted data structure and would prefer to find the 
>>>>> root cause.
>>>>>
>>>>> But please review it, so we can commit it if there is no progress 
>>>>> on the root cause.
>>>>>
>>>>> Ludwig
>>>>>
>>>>>
>>>>>
>>>>
>>>
>>> -- 
>>> Red Hat GmbH,http://www.de.redhat.com/, Registered seat: Grasbrunn,
>>> Commercial register: Amtsgericht Muenchen, HRB 153243,
>>> Managing Directors: Charles Cachera, Michael Cunningham, Michael O'Neill, Eric Shander
>>
>
> -- 
> Red Hat GmbH,http://www.de.redhat.com/, Registered seat: Grasbrunn,
> Commercial register: Amtsgericht Muenchen, HRB 153243,
> Managing Directors: Charles Cachera, Michael Cunningham, Michael O'Neill, Eric Shander
>
>

-- 
Red Hat GmbH, http://www.de.redhat.com/, Registered seat: Grasbrunn,
Commercial register: Amtsgericht Muenchen, HRB 153243,
Managing Directors: Charles Cachera, Michael Cunningham, Michael O'Neill, Eric Shander

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://listman.redhat.com/archives/freeipa-devel/attachments/20160613/79fdfe4d/attachment.htm>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: freeipa-lkrispen-0023-v2-avoid-crash-in-topology-plugin-when-host-list-con.patch
Type: text/x-patch
Size: 1907 bytes
Desc: not available
URL: <http://listman.redhat.com/archives/freeipa-devel/attachments/20160613/79fdfe4d/attachment.bin>


More information about the Freeipa-devel mailing list