Call to SendCaptureEnded looks suspicious
Categories
(Core :: WebRTC: Audio/Video, defect, P2)
Tracking
()
People
(Reporter: pehrsons, Assigned: pehrsons)
References
(Regression)
Details
(Keywords: csectype-uaf, regression, sec-moderate, Whiteboard: [adv-main145+][adv-ESR140.5+])
Attachments
(2 files)
|
48 bytes,
text/x-phabricator-request
|
ryanvm
:
approval-mozilla-beta+
ryanvm
:
approval-mozilla-esr140+
|
Details | Review |
|
90 bytes,
text/plain
|
Details |
I see no crash reports so unlikely to be hit in the wild, but in CallbackHelper::OnCaptureEnded there's a Dispatch to the PBackground event target with no lifetime guarantee for the passed variables.
Static analysis doesn't catch this because this is a CallbackHelper* which isn't ref-counted.
CamerasParent, which owns the CallbackHelpers, has NS_INLINE_DECL_THREADSAFE_REFCOUNTING_WITH_DELETE_ON_EVENT_TARGET(CamerasParent, mPBackgroundEventTarget) which is also the thread we are dispatching to. The CallbackHelpers have a shorter lifetime though, and could be deleted after the offending Dispatch but before its runnable has run.
To take advantage of this, an attacker would have to be able to trigger a permanent error in the screen/window capture backend. If they can do that they probably already control the machine, so exploit risk seems low.
| Assignee | ||
Comment 1•9 months ago
|
||
Updated•9 months ago
|
Comment 3•9 months ago
|
||
Comment 4•9 months ago
|
||
The patch landed in nightly and beta is affected.
:pehrsons, is this bug important enough to require an uplift?
- If yes, please nominate the patch for beta approval.
- See https://wiki.mozilla.org/Release_Management/Requesting_an_Uplift for documentation on how to request an uplift.
- If no, please set
status-firefox145towontfix.
For more information, please visit BugBot documentation.
Comment 5•8 months ago
|
||
Do we want to uplift it to 145 and ESR140?
Updated•8 months ago
|
Comment 6•8 months ago
|
||
While the exploit risk seems low, the patch seems safe enough to take, so on balance I'd say yes.
Comment 7•8 months ago
|
||
Could you fill in the uplift request and nominate for beta and esr140? Thanks
Comment 8•8 months ago
|
||
Comment on attachment 9521582 [details]
(secure)
Beta/Release Uplift Approval Request
- User impact if declined/Reason for urgency: Low risk of parent process exploit per comment 0
- Is this code covered by automated tests?: Yes
- Has the fix been verified in Nightly?: Yes
- Needs manual test from QE?: No
- If yes, steps to reproduce: Crash not reproducible
- List of other uplifts needed: None
- Risk to taking this patch: Low
- Why is the change risky/not risky? (and alternatives if risky): Adds a refcount
- String changes made/needed:
- Is Android affected?: Yes
ESR Uplift Approval Request
- If this is not a sec:{high,crit} bug, please state case for ESR consideration: Low risk of parent process exploit per comment 0
- User impact if declined: See above
- Fix Landed on Version:
- Risk to taking this patch: Low
- Why is the change risky/not risky? (and alternatives if risky): Adds a refcount
Comment 9•8 months ago
|
||
The patch conflicts with the beta and esr140 branches, we'll need separate patches to uplift.
Comment 10•8 months ago
|
||
Comment on attachment 9521582 [details]
(secure)
Approved for 145.0b9 and 140.5esr.
Updated•8 months ago
|
Comment 11•8 months ago
|
||
| uplift | ||
Comment 12•8 months ago
|
||
| uplift | ||
Updated•8 months ago
|
Updated•8 months ago
|
Comment 13•8 months ago
|
||
Updated•8 months ago
|
Updated•1 month ago
|
Description
•