Closed Bug 141936 Opened 22 years ago Closed 22 years ago

Crash in NSS searching for certificates with zero length nicknames

Categories

(NSS :: Libraries, defect, P2)

3.4.1
defect

Tracking

(Not tracked)

VERIFIED FIXED

People

(Reporter: KaiE, Assigned: julien.pierre)

References

Details

(Whiteboard: [adt2 RTM])

Attachments

(1 file)

Please see http://bugzilla.mozilla.org/show_bug.cgi?id=139329 comments #17 and
#18 for the full description of the problem.
Assigned the bug to Julien.

Kai, I am assigning a P2 priority to this bug because the
PSM bug 139329 has been fixed.  Are you using a workaround?

It's also not clear if the summary of this bug is correct.
In http://bugzilla.mozilla.org/show_bug.cgi?id=139329#c17,
the crash is caused by a NULL nickname, whereas the summary
of this bug says "zero length email address".  Which one is
correct?
Assignee: wtc → jpierre
Priority: -- → P2
Target Milestone: --- → 3.5
Version: unspecified → 3.4.1
The fix looked obvious to me, so here it is.  Julien, you can have the honors
of reviewing it :)
Attachment #82671 - Flags: review+
checked in.  Marking fixed, since I believe this eliminates the crash described
in the other bug.  Can't verify, though, since PSM already works around the problem.
Status: NEW → RESOLVED
Closed: 22 years ago
Resolution: --- → FIXED
Ian,

A question for you: in this particular function
(pkistore.c:match_nickname), do we consider NULL and ""
as equal, or are we only interested in nicknames that
are not empty?
We are only interested in certificates that actually have a nickname set that is
non-zero.  PKCS#11 does not include the terminating NULL character, so one could
not search for a NULL string anyway.
Wan-Teh, my bad, it's indeed about zero length nicknames. Changing summary.
Summary: Crash in NSS searching for certificates with zero length email address → Crash in NSS searching for certificates with zero length nicknames
Kai,

Actually, it's about NULL nicknames, as opposed to zero length
nicknames (which means "" to me), correct?
Wan-Teh, if you look at http://bugzilla.mozilla.org/show_bug.cgi?id=139329#c17
you can see that PSM does not pass a NULL string - it passes a zero length
string "".

But somehow, when the NSS code arrives in match_nickname, it arrives there with
a NULL nickname argument.

The conversion from "" to NULL must happen somewhere inside NSS' code.
Blocks: 145836
adt1.0.1+ (on ADT's behalf) for checkin to the 1.0 branch. Pls check this in
asap. thanks! 
Whiteboard: [adt2 RTM]
.
Status: RESOLVED → VERIFIED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: