Closed
Bug 1256296
Opened 9 years ago
Closed 9 years ago
Fix scan-build error in mpmontg.c
Categories
(NSS :: Libraries, defect)
NSS
Libraries
Tracking
(firefox48 affected)
RESOLVED
FIXED
3.24
Tracking | Status | |
---|---|---|
firefox48 | --- | affected |
People
(Reporter: rbarnes, Assigned: rbarnes)
References
Details
(Keywords: sec-audit)
Attachments
(1 file)
868 bytes,
patch
|
rrelyea
:
review+
franziskus
:
review+
|
Details | Diff | Splinter Review |
EKR's static analysis on NSS turned up a possible null pointer access in the Cachebleed fix in mpmontg.c. I don't think this is actually an issue in practice; i.e., things are more coupled than the analyzer thinks they are. But it makes sense to fix just to keep things clean.
Assignee | ||
Updated•9 years ago
|
Group: crypto-core-security
Assignee | ||
Updated•9 years ago
|
Blocks: nss-scan-build
Assignee | ||
Comment 1•9 years ago
|
||
Assignee | ||
Updated•9 years ago
|
Attachment #8730185 -
Flags: review?(rrelyea)
Attachment #8730185 -
Flags: review?(franziskuskiefer)
Comment 2•9 years ago
|
||
Comment on attachment 8730185 [details] [diff] [review]
0001-Bug-1256296-Fix-scan-build-error-in-mpmontg.c.patch
Review of attachment 8730185 [details] [diff] [review]:
-----------------------------------------------------------------
I agree, this shouldn't happen so an assert is fine.
But maybe this could be rewritten to make the code more readable. Instead of two separate parameters window_bits and num_powers handing over only window_bits seems sufficient. Computing num_powers in mp_exptmod_safe_i would make it easier to understand why this case shouldn't happen imho. (And maybe that would even convince scan-build, but not so sure about that.)
Attachment #8730185 -
Flags: review?(franziskuskiefer) → review+
Updated•9 years ago
|
Assignee: nobody → rlb
Comment 3•9 years ago
|
||
Comment on attachment 8730185 [details] [diff] [review]
0001-Bug-1256296-Fix-scan-build-error-in-mpmontg.c.patch
Review of attachment 8730185 [details] [diff] [review]:
-----------------------------------------------------------------
r+ rrelyea
NOTE: this function is using assert rather than PR_Assert(). This is consistent with all other assert usages in mpi, so it's fine.
Attachment #8730185 -
Flags: review?(rrelyea) → review+
Comment 4•9 years ago
|
||
thanks for the review Bob.
I landed the patch as https://hg.mozilla.org/projects/nss/rev/e443377fd356
Status: NEW → RESOLVED
Closed: 9 years ago
Resolution: --- → FIXED
Target Milestone: --- → 3.24
Updated•9 years ago
|
Group: crypto-core-security → core-security-release
Updated•6 years ago
|
Group: core-security-release
You need to log in
before you can comment on or make changes to this bug.
Description
•