Closed Bug 1995686 (CVE-2025-13020) Opened 9 months ago Closed 9 months ago

Call to SendCaptureEnded looks suspicious

Categories

(Core :: WebRTC: Audio/Video, defect, P2)

defect

Tracking

()

RESOLVED FIXED
146 Branch
Tracking Status
firefox-esr115 --- unaffected
firefox-esr140 145+ fixed
firefox144 --- wontfix
firefox145 + fixed
firefox146 + fixed

People

(Reporter: pehrsons, Assigned: pehrsons)

References

(Regression)

Details

(Keywords: csectype-uaf, regression, sec-moderate, Whiteboard: [adv-main145+][adv-ESR140.5+])

Attachments

(2 files)

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.

Group: media-core-security → core-security-release
Status: ASSIGNED → RESOLVED
Closed: 9 months ago
Resolution: --- → FIXED
Target Milestone: --- → 146 Branch

The patch landed in nightly and beta is affected.
:pehrsons, is this bug important enough to require an uplift?

For more information, please visit BugBot documentation.

Flags: needinfo?(apehrson)

Do we want to uplift it to 145 and ESR140?

Flags: needinfo?(jib)

While the exploit risk seems low, the patch seems safe enough to take, so on balance I'd say yes.

Flags: needinfo?(jib)

Could you fill in the uplift request and nominate for beta and esr140? Thanks

Flags: needinfo?(jib)

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
Flags: needinfo?(jib)
Attachment #9521582 - Flags: approval-mozilla-esr140?
Attachment #9521582 - Flags: approval-mozilla-beta?

The patch conflicts with the beta and esr140 branches, we'll need separate patches to uplift.

Flags: needinfo?(jib)

Comment on attachment 9521582 [details]
(secure)

Approved for 145.0b9 and 140.5esr.

Flags: needinfo?(jib)
Flags: needinfo?(apehrson)
Attachment #9521582 - Flags: approval-mozilla-esr140?
Attachment #9521582 - Flags: approval-mozilla-esr140+
Attachment #9521582 - Flags: approval-mozilla-beta?
Attachment #9521582 - Flags: approval-mozilla-beta+
QA Whiteboard: [sec] [uplift] [qa-triage-done-c146/b145]
Whiteboard: [adv-main145+][adv-ESR140.5+]
Attached file advisory.txt
Alias: CVE-2025-13020
Group: core-security-release
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: