[389-devel] Please review: [Bug 573896] initializing subtree with invalid syntax crashes ns-slapd

Noriko Hosoi nhosoi at redhat.com
Wed Mar 17 00:01:35 UTC 2010


Subject: initializing subtree with invalid syntax crashes ns-slapd

https://bugzilla.redhat.com/show_bug.cgi?id=573896

Files:
  ldap/servers/slapd/slap.h
  ldap/servers/slapd/task.c

Description: When an import is executed using a task mechanism,
slapi_task_log_notice is called for logging, where task_log field
points the memory storing the log messages.  If multiple log
messages were logged by multiple worker threads simultaneously,
there was a chance that the address of the log message was switched
by realloc while the other threads were accessing the old address.
This patch introduces task_log_lock per task to protect task_log.
Note: slapi_ch_malloc and its friends never return NULL. They rather
exits.  Thus, to avoid the confusion which may look leaking the
lock, I eliminated 2 error returns from slapi_task_log_notice.

Proposed patch:
https://bugzilla.redhat.com/attachment.cgi?id=400601&action=diff
https://bugzilla.redhat.com/attachment.cgi?id=400601&action=edit



-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/pkcs7-signature
Size: 6646 bytes
Desc: S/MIME Cryptographic Signature
Url : http://lists.fedoraproject.org/pipermail/389-devel/attachments/20100316/96a30097/attachment.bin 


More information about the 389-devel mailing list