Possible incorrect locking in nsNSSCallbacks.cpp
Categories
(Core :: Security: PSM, defect)
Tracking
()
People
(Reporter: jesup, Assigned: keeler)
References
(Blocks 1 open bug)
Details
(Keywords: sec-audit, sec-low, Whiteboard: [psm-assigned][adv-main96-])
Attachments
(1 file)
PreliminaryHandshakeDone(fd) in nsNSSCallbacks.cpp accesses several fields that I think are supposed to be protected by the mMutex in nsNSSSocketInfo. In particular:
mCipherSuite, mProtocolVersion, mKeaGroup, and mSignatureSchemeName
I set a breakpoint and verified we do not hold the mutex at this point. Several of them appear to only be accessed with a locked mutex in TransportSecurityInfo.cpp, such as in GetSecretKeyLength() (mCipherSuite).
At minimum, even if none of these require locking, what's supposed to require locking should be documented in TransportSecurityInfo.h.
Comment 1•2 years ago
|
||
It would be nice if we could start using DataMutex instead. That would make it less likely to get the locking wrong when this code changes in the future.
Assignee | ||
Updated•2 years ago
|
Updated•2 years ago
|
Assignee | ||
Updated•2 years ago
|
Assignee | ||
Comment 2•2 years ago
|
||
Comment 3•2 years ago
|
||
Based on https://firefox-source-docs.mozilla.org/bug-mgmt/processes/security-approval.html this needs a sec-approval to land.
Reporter | ||
Comment 4•2 years ago
|
||
(In reply to Sebastian Hengst [:aryx] (needinfo on intermittent or backout) from comment #3)
Based on https://firefox-source-docs.mozilla.org/bug-mgmt/processes/security-approval.html this needs a sec-approval to land.
Given there's no sec rating yet, I concur. dveditz?
Assignee | ||
Comment 5•2 years ago
|
||
These fields are for display purposes or tests, so this doesn't seem like a huge concern from a security perspective.
Comment 6•2 years ago
|
||
reorganize setting TLS handshake information r=jschanck
https://hg.mozilla.org/integration/autoland/rev/7d346ded011aad5812aee428a25cc43e768d9ea6
https://hg.mozilla.org/mozilla-central/rev/7d346ded011a
Updated•2 years ago
|
Updated•2 years ago
|
Updated•2 years ago
|
Updated•2 years ago
|
Updated•2 years ago
|
Updated•2 years ago
|
Description
•