Bug 653619 - specifying directory or other non-file can crash pemnss
Summary: specifying directory or other non-file can crash pemnss
Keywords:
Status: CLOSED DUPLICATE of bug 642433
Alias: None
Product: Fedora
Classification: Fedora
Component: nss
Version: 14
Hardware: Unspecified
OS: Unspecified
low
medium
Target Milestone: ---
Assignee: Elio Maldonado Batiz
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2010-11-15 19:56 UTC by Rich Megginson
Modified: 2010-11-15 20:33 UTC (History)
3 users (show)

Fixed In Version:
Clone Of:
Environment:
Last Closed: 2010-11-15 20:33:53 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)

Description Rich Megginson 2010-11-15 19:56:46 UTC
Adding a cert or key from a pem file causes a crash:

	PK11_SETATTRS( attrs, CKA_CLASS, &objClass, sizeof(objClass) ); attrs++;
	PK11_SETATTRS( attrs, CKA_TOKEN, &cktrue, sizeof(CK_BBOOL) ); attrs++;
	PK11_SETATTRS( attrs, CKA_LABEL, (unsigned char *)filename, strlen(filename)+1 ); attrs++;
	if ( isca ) {
		PK11_SETATTRS( attrs, CKA_TRUST, &cktrue, sizeof(CK_BBOOL) ); attrs++;
	} else {
		PK11_SETATTRS( attrs, CKA_TRUST, &ckfalse, sizeof(CK_BBOOL) ); attrs++;
	}
	/* This loads the certificate in our PEM module into the appropriate
	 * slot.
	 */
	rv = PK11_CreateGenericObject( slot, theTemplate, 4, PR_FALSE /* isPerm */ );

e.g. if filename is the name of a directory or other non-file (device, socket, etc.), pemnss will crash.

Comment 1 Kamil Dudka 2010-11-15 20:08:35 UTC
Is this a duplicate of bug 642433 ?

Comment 2 Rich Megginson 2010-11-15 20:33:53 UTC

*** This bug has been marked as a duplicate of bug 642433 ***


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