Missing locking around access to nsJAR members, especially the zip library
Categories
(Core :: Networking: JAR, defect, P2)
Tracking
()
People
(Reporter: jesup, Assigned: jesup)
References
(Depends on 1 open bug, Blocks 1 open bug, Regressed 1 open bug)
Details
(Keywords: csectype-race, sec-audit, sec-moderate, Whiteboard: [necko-triaged][post-critsmash-triage][adv-main100+r])
Attachments
(1 file, 1 obsolete file)
nsJAR has had a lock for access to the zip library (and other things) since 2000; however a large number of methods it implements don't take the lock. Since this is used in a multi-threaded manner, this can cause significant risks.
Switching to a RecursiveMutex allows us to lock on all these entrypoints without a major refactor to avoid self-deadlock.
In addition, access to most of the other members of nsJAR should be locked as well.
Assignee | ||
Comment 1•2 years ago
|
||
Assignee | ||
Comment 2•2 years ago
|
||
Is there any chance this is related to corrupted OmniJar files?
Comment 3•2 years ago
|
||
Comment on attachment 9253434 [details]
Bug 1744043: Clean up nsJAR r=nika,dragana
Revision D132642 was moved to bug 1207753. Setting attachment 9253434 [details] to obsolete.
Comment 4•2 years ago
|
||
It might be! I'd be happy to investigate correlation. Can you add me to bug 1207753?
Assignee | ||
Comment 5•2 years ago
|
||
Grrr, why did phabricator move my patch?
Assignee | ||
Comment 6•2 years ago
|
||
Updated•2 years ago
|
Comment 7•2 years ago
|
||
Backed out together with bug 1754063 (touched same file) for causing xpcshell failures on test_ext_clear_cached_resources.js:
https://hg.mozilla.org/integration/autoland/rev/2422c1c90a1e3ee0fbeb4d328eb9ace3986de59d
Push with failure: https://treeherder.mozilla.org/jobs?repo=autoland&group_state=expanded&selectedTaskRun=EZa03lxxRhmxcHr2cp0CFA.0&resultStatus=testfailed%2Cbusted%2Cexception%2Cretry%2Cusercancel&revision=24ee1c0756ae49b467d53c499dd0c16839e05eb2
Failure log: https://treeherder.mozilla.org/logviewer?job_id=370308371&repo=autoland
TEST-UNEXPECTED-FAIL | xpcshell.ini:toolkit/components/extensions/test/xpcshell/test_ext_clear_cached_resources.js | xpcshell return code: 0
Comment 8•2 years ago
|
||
Clean up nsJAR r=nika,valentin,extension-reviewers,robwu
https://hg.mozilla.org/integration/autoland/rev/17a501a1991842d8488ff3e7d4611bb688abfc87
https://hg.mozilla.org/mozilla-central/rev/17a501a19918
Fix lint failure, r=fix . CLOSED TREE
https://hg.mozilla.org/integration/autoland/rev/92a4a071c9bf988c6d8f4d4b27fcb474a4f04378
https://hg.mozilla.org/mozilla-central/rev/92a4a071c9bf
Updated•2 years ago
|
Updated•2 years ago
|
Updated•2 years ago
|
Updated•2 years ago
|
Updated•2 years ago
|
Description
•