Bug 565664

Summary: Incorrect parameter for CACHE_RETURN().
Product: [Retired] 389 Reporter: Endi Sukma Dewata <edewata>
Component: Database - GeneralAssignee: Noriko Hosoi <nhosoi>
Status: CLOSED CURRENTRELEASE QA Contact: Viktor Ashirov <vashirov>
Severity: high Docs Contact:
Priority: low    
Version: 1.3.0CC: amsharma, jgalipea
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2015-12-07 16:46:10 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 639035    
Attachments:
Description Flags
git patch file (id2entry.c) none

Description Endi Sukma Dewata 2010-02-15 21:12:21 UTC
Incorrect parameter passing when calling CACHE_RETURN() would cause slapd to crash under certain conditions.

See ldap/servers/slapd/back-ldbm/id2entry.c line 196. The second parameter should be a pointer to pointer, but the current code passes a regular pointer:

    CACHE_RETURN(&inst->inst_dncache, bdn);

According to Noriko the correct code should be:

    CACHE_RETURN(&inst->inst_dncache, &bdn);

Comment 1 Noriko Hosoi 2010-02-16 00:47:25 UTC
Created attachment 394429 [details]
git patch file (id2entry.c)

Noriko reviewed the fix proposal by Endi.

Push the fix to master.
$ git merge work
Updating 508af98..107d40e
Fast forward
 ldap/servers/slapd/back-ldbm/id2entry.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
$ git push
Counting objects: 13, done.
Delta compression using 4 threads.
Compressing objects: 100% (7/7), done.
Writing objects: 100% (7/7), 819 bytes, done.
Total 7 (delta 5), reused 0 (delta 0)
To ssh://git.fedorahosted.org/git/389/ds.git
   508af98..107d40e  master -> master

Comment 3 Noriko Hosoi 2010-02-17 18:13:07 UTC
*** Bug 565932 has been marked as a duplicate of this bug. ***

Comment 4 Noriko Hosoi 2011-07-27 00:55:42 UTC
Steps to verify
Add 1k entries and remove them.
If the server does not crash in the operations :), this bug is verified.

Comment 5 Amita Sharma 2011-07-28 11:55:27 UTC
Thanks Noriko :)

Added 1K entries and then removed them.
No crash found. hence marking as VERIFIED.