Bug 852839 - variable dn should not be used in ldbm_back_delete
Summary: variable dn should not be used in ldbm_back_delete
Alias: None
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: 389-ds-base
Version: 6.4
Hardware: Unspecified
OS: Unspecified
Target Milestone: rc
: ---
Assignee: Rich Megginson
QA Contact: Sankar Ramalingam
Depends On:
TreeView+ depends on / blocked
Reported: 2012-08-29 18:00 UTC by Nathan Kinder
Modified: 2013-02-21 08:20 UTC (History)
3 users (show)

Fixed In Version: 389-ds-base-
Doc Type: Bug Fix
Doc Text:
Cause: Uninitialized variable dn was referred in the backend delete error message. Consequence: If deleting an entry fails in the backend layer, logging an error message fails the server. Fix: This patch initializes the variable properly. Result: Deletion error is properly logged in the error log.
Clone Of:
Last Closed: 2013-02-21 08:20:43 UTC
Target Upstream Version:

Attachments (Terms of Use)

System ID Priority Status Summary Last Updated
Red Hat Product Errata RHSA-2013:0503 normal SHIPPED_LIVE Moderate: 389-ds-base security, bug fix, and enhancement update 2013-02-21 08:18:44 UTC

Description Nathan Kinder 2012-08-29 18:00:13 UTC
This bug is created as a clone of upstream ticket:

The variable
char *dn = NULL;
appears to be used in several places in ldbm_back_delete - perhaps references to this variable were not changed to sdn or sdnp when the code was converted to use Slapi_DN instead of string dns?

Comment 1 Jenny Severance 2012-08-29 18:16:55 UTC
Please add steps to reproduce /verify

Comment 2 Noriko Hosoi 2012-08-29 19:25:53 UTC
The fix is pushed to origin/389-ds-base-1.2.11.

This is a potential crash bug.
1. trying to delete a tombstone entry but it turned out it is not a tombstone.
2. trying to make a tombstone entry from a tombstone.
3. deleting an entry causes a collision with other operation.
These 3 could crash the server.  The first 2 are less likely happening, but the 3rd one could be in a stress.

To verify this bug, making any of these 3 would be tricky.  But there is a DEBUG code which referrs the variable.  The code is enabled only when --enable-debug is used to build the server AND replication log level is set.

Once, the build candidate is built and the git tag is set, I'm going to build the server with --enable-debug and run the test.

Comment 5 Noriko Hosoi 2012-09-25 22:27:51 UTC
Steps to verify:

Downloaded src RPM: 389-ds-base- (info) (download)
... 3040242 Sep 25 13:47 389-ds-base-

Built from the src rpm with --enable-debug

Set up 2-way MMR; set the replication log level.

Added uid=Nuser2,dc=example,dc=com, then deleted it, which is correctly logged as follows:

[...] ldbm_back_delete - entry: uid=Nuser2,dc=example,dc=com  - flags: delete 0 is_tombstone_entry 0 create 1 

If 'dn' is not initialized correctly as this bug originally reported, this message should not be able to have "uid=Nuser2,dc=example,dc=com".

Hence, this bug is verified.

Comment 6 errata-xmlrpc 2013-02-21 08:20:43 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.


Note You need to log in before you can comment on or make changes to this bug.