389ds / 389-ds-base

The enterprise-class Open Source LDAP server for Linux
https://www.port389.org/
Other
210 stars 90 forks source link

valgrind reported memleaks and mem errors #313

Closed 389-ds-bot closed 4 years ago

389-ds-bot commented 4 years ago

Cloned from Pagure issue: https://pagure.io/389-ds-base/issue/313


1) the ldbm instance dse preop delete callback deletes the entry and dn caches - some other plugins called after this attempt to access those caches

2) normalize_mods2bvals allocs the berval twice in the dn syntax case

3) mep_parse_config_entry allocs value but does not free it

4) dna_be_txn_pre_op can goto bail: in certain cases and attempt to free NULL smods

389-ds-bot commented 4 years ago

Comment from rmeggins (@richm) at 2012-03-03 02:54:03

0001-handle-null-smods.patch 0001-handle-null-smods.patch

389-ds-bot commented 4 years ago

Comment from rmeggins (@richm) at 2012-03-03 02:54:23

0002-memleak-in-mep_parse_config_entry.patch 0002-memleak-in-mep_parse_config_entry.patch

389-ds-bot commented 4 years ago

Comment from rmeggins (@richm) at 2012-03-03 02:54:42

0003-memleak-in-normalize_mods2bvals.patch 0003-memleak-in-normalize_mods2bvals.patch

389-ds-bot commented 4 years ago

Comment from rmeggins (@richm) at 2012-03-03 02:54:58

0004-destroy-the-entry-cache-and-dn-cache-in-the-dse-post.patch 0004-destroy-the-entry-cache-and-dn-cache-in-the-dse-post.patch

389-ds-bot commented 4 years ago

Comment from rmeggins (@richm) at 2012-03-03 03:34:53

To ssh://git.fedorahosted.org/git/389/ds.git e2532d8..93adf5f master -> master commit changeset:93adf5f97832e5ec1539953feb11c060d30554eb/389-ds-base Author: Rich Megginson richm@redhat.com Date: Thu Mar 1 19:27:09 2012 -0700

destroy the entry cache and dn cache in the dse post op delete callback

don't destroy the entry and dn cache in the ldbm instance pre op delete
callback because other preop callback may attempt to access the
caches - wait and destroy it in the dse post op delete callback
Reviewed by: nhosoi (Thanks!)

commit changeset:f6e4d3d0d4313ef9b4396ab8433a1c260989274b/389-ds-base Author: Rich Megginson richm@redhat.com Date: Thu Mar 1 18:50:05 2012 -0700

memleak in normalize_mods2bvals

do not re malloc the berval again - only need to do it once
Reviewed by: nhosoi (Thanks!)

commit changeset:54fbe0b3b3669a0379a4b0a50769b4855539c225/389-ds-base Author: Rich Megginson richm@redhat.com Date: Thu Mar 1 18:47:34 2012 -0700

memleak in mep_parse_config_entry

pass in value to slapi_sdn_new_dn_passin() so that entry->template_sdn
will own the memory
Reviewed by: nhosoi (Thanks!)

commit changeset:afd6b1fd63c48642dd050e0e821b3d7c69fc4991/389-ds-base Author: Rich Megginson richm@redhat.com Date: Wed Feb 29 17:27:32 2012 -0700

handle null smods

Under certain error conditions, smods will be NULL at the end of the function.
Do not call passout if smods is NULL.
Reviewed by: nhosoi (Thanks!)
389-ds-bot commented 4 years ago

Comment from nkinder (@nkinder) at 2012-06-09 03:49:35

Ticket has been cloned to Bugzilla: https://bugzilla.redhat.com/show_bug.cgi?id=830353

389-ds-bot commented 4 years ago

Comment from nkinder (@nkinder) at 2012-08-28 04:14:41

Added initial screened field value.

389-ds-bot commented 4 years ago

Comment from rmeggins (@richm) at 2017-02-11 22:56:13

Metadata Update from @richm: