Closed
Bug 390554
Opened 17 years ago
Closed 17 years ago
all PKIX_NULLCHECK_ errors are reported as "PKIX ALLOC ERROR"
Categories
(NSS :: Libraries, defect, P1)
NSS
Libraries
Tracking
(Not tracked)
RESOLVED
FIXED
3.12
People
(Reporter: alvolkov.bgs, Assigned: alvolkov.bgs)
Details
(Whiteboard: PKIX)
Many pkix function have input arguments check. The check is done by PKIX_NULLCHECK_{ONE,TWO,THREE,FOUR} macros. If NULL check fails, then libpkix misleadingly reports such error as "PKIX ALLOC ERROR".
Assignee | ||
Updated•17 years ago
|
Priority: -- → P3
Whiteboard: PKIX
Comment 1•17 years ago
|
||
I think this is P2, if not P1. This will cause us no end of headache. People will get these errors and report that NSS is leaking memory, etc.
Priority: P3 → P2
Comment 2•17 years ago
|
||
The PKIX_NULLCHECK_{ONE,TWO,THREE,FOUR} macros all set the error code PKIX_NULLARGUMENT, for which the error string is "Null argument". include/pkix_errorstrings.h:693:PKIX_ERRORENTRY(NULLARGUMENT,Null argument), The "PKIX ALLOC ERROR" string is for PKIX_ALLOC_ERROR. See http://lxr.mozilla.org/security/source/security/nss/lib/libpkix/pkix_pl_nss/system/pkix_pl_lifecycle.c#52 So, where/how does PKIX_NULLARGUMENT get turned into PKIX_ALLOC_ERROR ??
Comment 3•17 years ago
|
||
Steve, DO you know how PKIX_NULLARGUMENT gets turned into PKIX_ALLOC_ERROR ?
Summary: libpkix reports all errors that caused by failure of PKIX_NULLCHECK_ macro as "PKIX ALLOC ERROR" → all PKIX_NULLCHECK_ errors are reported as "PKIX ALLOC ERROR"
Comment 4•17 years ago
|
||
I'm afraid I don't.
Comment 5•17 years ago
|
||
If someone can give me a reproducible test case for this (may need a test program) I am willing to dig into it.
Updated•17 years ago
|
Version: 3.12 → trunk
Assignee | ||
Updated•17 years ago
|
Priority: P2 → P1
Comment 6•17 years ago
|
||
In a patch for another bug, Alexei included a one line patch for THIS bug. It was: Index: lib/libpkix/pkix/util/pkix_tools.h #define PKIX_ERROR_FATAL(descNum) \ { \ pkixErrorReceived = PKIX_TRUE; \ pkixErrorMsg = PKIX_ErrorText[descNum]; \ + pkixErrorCode = descNum; \ _PKIX_LOG_ERROR(pkixErrorMsg, PKIX_LOGGER_LEVEL_FATALERROR); \ PKIX_RETURN(FATAL); \ } I give r+ to the above tiny patch here. That patch should be checked in by itself, separately from the patch for that other bug, with a comment pointing out that it is the fix for this bug.
Assignee | ||
Comment 7•17 years ago
|
||
Fixed by patch to bug 391457
Status: NEW → RESOLVED
Closed: 17 years ago
Resolution: --- → FIXED
You need to log in
before you can comment on or make changes to this bug.
Description
•