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 695018 - PEM module's segfaults on debug builds when logging file was created by root
Summary: PEM module's segfaults on debug builds when logging file was created by root
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: nss
Version: 6.1
Hardware: Unspecified
OS: Unspecified
medium
medium
Target Milestone: rc
: ---
Assignee: Elio Maldonado Batiz
QA Contact: BaseOS QE Security Team
URL:
Whiteboard:
Depends On: 695011
Blocks:
TreeView+ depends on / blocked
 
Reported: 2011-04-09 19:36 UTC by Elio Maldonado Batiz
Modified: 2013-06-11 16:26 UTC (History)
7 users (show)

Fixed In Version: nss-3.12.10-3.el6
Doc Type: Bug Fix
Doc Text:
Clone Of: 695011
Environment:
Last Closed: 2011-12-06 12:10:33 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2011:1584 0 normal SHIPPED_LIVE nspr, nss, nss-softokn and nss-util bug fix and enhancement update 2011-12-06 00:38:51 UTC

Description Elio Maldonado Batiz 2011-04-09 19:36:15 UTC
+++ This bug was initially created as a clone of Bug #695011 +++

Description of problem: While running debug builds the pem module sometimes crashes while attempting to write to its log file. The problem occurs when the module is used initially by an application being run as root and later by the same or another application running as a regular user.

Version-Release number of selected component (if applicable): nss-3.12.9-14.

How reproducible: often

Steps to Reproduce:
1. Use an application such as crypto-util's genkey untility to generate a self-signed certificate for an apache server or a CA. Such an operation must be run as root.
2. Run a application, e.g. curl, that will gets its cryptographic services by the pem module.

Actual results: The pem module crashes on initialization.

Expected results: The application should complete it's task normally

Additional info:

--- Additional comment from emaldona on 2011-04-09 14:27:42 EDT ---

The PEM module's initialization function pem_Initialize we has
....
    open_log(); 
    plog("pem_Initialize\n");
....
Looing is implemented in util.c with
FILE *plogfile;
void open_log()
{
#ifdef DEBUG
    plogfile = fopen("/tmp/pkcs11.log", "a");
#endif

    return;
}
The fopen tries to open the log file to write to it. If the log file was initilially created by an application running as root fopen will fail and plogfile will be set to NULL. Later plog calls
    vfprintf(plogfile, fmt, ap);
with a NULL and a crash happens.

Using the logging utilities from NSPR will prevent this problems. It is also what's required of modules intended to be part of NSS as this one is.

--- Additional comment from emaldona on 2011-04-09 15:30:36 EDT ---

Created attachment 490990 [details]
Reimplement PEM logging in terms of NSPR's own

Comment 2 Elio Maldonado Batiz 2011-04-09 19:43:48 UTC
Normal users using standard builds will not run into this problem because
logging is compiled out. On the other hand, developers or users to whom we may
provide an NSS debug build to aid us with a bug investigation could run into
this.

Comment 3 RHEL Program Management 2011-04-10 06:00:11 UTC
Since RHEL 6.1 External Beta has begun, and this bug remains
unresolved, it has been rejected as it is not proposed as
exception or blocker.

Red Hat invites you to ask your support representative to
propose this request, if appropriate and relevant, in the
next release of Red Hat Enterprise Linux.

Comment 10 errata-xmlrpc 2011-12-06 12:10:33 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.

http://rhn.redhat.com/errata/RHBA-2011-1584.html


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