[SSSD] [PATCH] AUTOFS: terminate array after the last entry

Jakub Hrozek jhrozek at redhat.com
Fri Apr 4 12:16:47 UTC 2014


On Fri, Apr 04, 2014 at 11:56:58AM +0200, Pavel Březina wrote:
> On 04/03/2014 05:31 PM, Lukas Slebodnik wrote:
> >ehlo,
> >
> >If LDAP entries have more then one attribute "automountKey"
> >automount map will be skipped and error message will be printed to log files
> >and sssd_be will crash.
> >     DEBUG(SSSDBG_MINOR_FAILURE, "Malformed entry, skipping\n");
> >
> >The output array with automount maps will contain uninitialized pointers
> >because array was terminated after the expected count of entries and not
> >after the last successfully retrieved entry
> >
> >Resolves:
> >https://fedorahosted.org/sssd/ticket/2288
> >
> >How to reproduce crash?
> >You need to have more than two automountKey attributes in LDAP entry
> >for automount map.
> >
> >Attached patch fix crash only in sssd_be. (There was another crash
> >in automount client)
> >
> >LS
> 
> It may be better to allocate the array using talloc_zero_array() to
> make sure all unset values will be initialized.
> 
> But since the array is supposed to be iterated only anyway - ack.

Pushed to master - e18d5c703c529f99bd375da887d9aeaee6b82fcd



More information about the sssd-devel mailing list