Closed
Bug 1046221
Opened 10 years ago
Closed 10 years ago
nsCryptoHMAC and nsCryptoHash do not properly guard against NSS shutdown
Categories
(Core :: Security: PSM, defect)
Tracking
()
RESOLVED
FIXED
mozilla35
People
(Reporter: keeler, Assigned: keeler)
References
(Blocks 1 open bug)
Details
Attachments
(1 file)
6.65 KB,
patch
|
rbarnes
:
review+
|
Details | Diff | Splinter Review |
nsCryptoHash.cpp is full of things like this: 60 NS_IMETHODIMP 61 nsCryptoHash::Init(uint32_t algorithm) 62 { 63 nsNSSShutDownPreventionLock locker; 64 65 HASH_HashType hashType = (HASH_HashType)algorithm; Note that while the shutdown prevention lock has been acquired, the implementation doesn't actually check if NSS has already been shut down, which to my understanding is incorrect. Something like this needs to be added after the lock in each publicly exposed function: if (isAlreadyShutDown()) { return NS_ERROR_NOT_AVAILABLE; }
Assignee | ||
Comment 1•10 years ago
|
||
Updated•10 years ago
|
Attachment #8485105 -
Flags: review?(rlb) → review+
Assignee | ||
Comment 2•10 years ago
|
||
Thanks. https://hg.mozilla.org/integration/mozilla-inbound/rev/1c6bec021eae
Comment 3•10 years ago
|
||
https://hg.mozilla.org/mozilla-central/rev/1c6bec021eae
Status: ASSIGNED → RESOLVED
Closed: 10 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla35
You need to log in
before you can comment on or make changes to this bug.
Description
•