Closed Bug 387052 Opened 17 years ago Closed 17 years ago

OOM crash in softoken

Categories

(NSS :: Libraries, defect, P2)

3.11
defect

Tracking

(Not tracked)

RESOLVED FIXED
3.11.8

People

(Reporter: julien.pierre, Assigned: julien.pierre)

Details

Attachments

(1 file)

pkcs11u.c contains the following code :

    object  = (SFTKObject*)PORT_ZAlloc(size);
    if (isSessionObject) {
	((SFTKSessionObject *)object)->hashSize = hashSize;
    }

object is not checked after the allocation. Some customers are seeing this crash in OOM situations.
Priority: -- → P2
Attached patch Fix OOM crashSplinter Review
Attachment #271149 - Flags: superreview?(nelson)
Attachment #271149 - Flags: review?(alexei.volkov.bugs)
Comment on attachment 271149 [details] [diff] [review]
Fix OOM crash

(Julien and I must have been working on this at the same time. He won the race. :)

sr=nelson
I'm surprised that Coverity didn't report this.
Attachment #271149 - Flags: superreview?(nelson) → superreview+
Attachment #271149 - Flags: review?(alexei.volkov.bugs) → review+
Nelson, Alexei, thanks for the reviews.

Checked in to the trunk :
Checking in pkcs11u.c;
/cvsroot/mozilla/security/nss/lib/softoken/pkcs11u.c,v  <--  pkcs11u.c
new revision: 1.75; previous revision: 1.74
done

And to NSS_3_11_BRANCH :
Checking in pkcs11u.c;
/cvsroot/mozilla/security/nss/lib/softoken/pkcs11u.c,v  <--  pkcs11u.c
new revision: 1.69.2.5; previous revision: 1.69.2.4
done
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.

Attachment

General

Creator:
Created:
Updated:
Size: