Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.
RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.

Bug 929358

Summary: resource leak: must call PK11_FreeSlot after SECMOD_CloseUserDB
Product: Red Hat Enterprise Linux 6 Reporter: Rich Megginson <rmeggins>
Component: openldapAssignee: Jan Synacek <jsynacek>
Status: CLOSED CURRENTRELEASE QA Contact: BaseOS QE Security Team <qe-baseos-security>
Severity: high Docs Contact:
Priority: high    
Version: 6.4CC: dspurek, ebenes, jgalipea, jrusnack, jsynacek, jv+fedora, ksrot, nkinder, ovasik, phracek, rmeggins, rodd, roysjosh
Target Milestone: rcKeywords: Regression, TestBlocker, ZStream
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Previously, OpenLDAP did not properly handle NSS resources. NSS_ShutdownContext() failed with a "resources in use" error message, which caused an unexpected termination with a segmentation fault in the Red Hat Directory Server and might have caused other unwanted behavior. With this update, the source code has been modified to properly call PK11_FreeSlot() and release the resources and, as a result, NSS resources are properly freed.
Story Points: ---
Clone Of: 929357 Environment:
Last Closed: 2013-11-14 10:39:44 UTC Type: Bug
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: 929357    
Bug Blocks: 923122, 954299, 1053437    

Description Rich Megginson 2013-03-29 21:39:51 UTC
+++ This bug was initially created as a clone of Bug #929357 +++

Created attachment 718176 [details]
patch to fix the problem

Description of problem:

NSS_ShutdownContext fails with SEC_ERROR_BUSY - resources in use.  This is because there is still a reference to the cert db opened with SECMOD_OpenUserDB.

Apps must call PK11_FreeSlot to release the reference after calling SECMOD_CloseUserDB - then NSS_ShutdownContext will return success.

Version-Release number of selected component (if applicable):


How reproducible:


Steps to Reproduce:
1.
2.
3.
  
Actual results:


Expected results:


Additional info:

Comment 1 Rich Megginson 2013-03-29 21:56:21 UTC
Would like to get a RHEL 6.4.z openldap release since this causes crashes in Red Hat Directory Server in RHEL 6.4.0

Comment 2 Rich Megginson 2013-03-29 22:12:39 UTC
This bug was caused by this upstream commit:
commit c7de9d89f3c4462fc5041b84a962af066b3f630a
Author: Jan Vcelak <jvcelak>
Date:   Thu May 31 13:09:24 2012 +0200

    ITS#7312 MozNSS: context specific token description for certdb

which introduced the use of PK11SlotInfo *tc_certdb_slot

Comment 13 Rodd Clarkson 2013-04-26 01:58:56 UTC
Without seeming pushy, is there likely to be a fix for this soon?

This is still and issue for me in 6.4.

Comment 14 Jan Synacek 2013-05-07 07:49:45 UTC
(In reply to comment #13)
> Without seeming pushy, is there likely to be a fix for this soon?
> 
> This is still and issue for me in 6.4.

This has already been fixed in 6.4 EUS: https://bugzilla.redhat.com/show_bug.cgi?id=954299.