Closed Bug 2023387 Opened 8 months ago Closed 8 months ago

PClientManagerOp accepts child-forged SystemPrincipalInfo and reaches parent-side chrome:// LoadURI in ClientOpenWindow

Categories

(Core :: DOM: Service Workers, defect)

defect

Tracking

()

RESOLVED DUPLICATE of bug 2018164

People

(Reporter: 1seal, Unassigned)

Details

(Keywords: reporter-external)

Attachments

(4 files)

Attached file poc.zip —

User Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/145.0.0.0 Safari/537.36

Steps to reproduce:

  1. checked mozilla-firefox/firefox at commit 4bade96cdbdebf3f288b90f6eb17f08848553318.

  2. reproduced the issue against the parent-side PClientManagerOp -> ClientManagerService::OpenWindow -> ClientOpenWindow -> WaitForLoad path.

  3. from a compromised content-process test harness, sent PClientManagerOp(ClientOpenWindowArgs) over PBackground with a forged principalInfo = SystemPrincipalInfo{} and a privileged target URL:

    • target URL: chrome://global/content/commonDialog.xhtml
    • base URL: attacker-controlled web origin
    • sender: unprivileged content process
  4. observed the parent accept the forged PrincipalInfo, materialize it through PrincipalInfoToPrincipal(), and use it as the triggeringPrincipal in WaitForLoad.

  5. compared that against a control run using a normal content principal on the same target.

reproduction evidence from the attached PoC bundle:

canonical:

  • [CALLSITE_HIT]: ClientManagerOpParent::Init -> ClientManagerService::OpenWindow -> ClientOpenWindow::WaitForLoad
  • [PROOF_MARKER]: clientopenwindow windowless loadURI_ok=true rv=0x00000000 url=chrome://global/content/commonDialog.xhtml
  • [PROOF_MARKER]: clientopenwindow promise_ok=true err=0x00000000
  • [IMPACT_MARKER]: privileged_chrome_load_allowed=true target=chrome://global/content/commonDialog.xhtml

control:

  • [NC_MARKER]: clientopenwindow windowless loadURI_ok=false rv=0x805303f4 url=chrome://global/content/commonDialog.xhtml
  • [NC_MARKER]: clientopenwindow promise_ok=false err=0x805303f4
  • [NC_MARKER]: loadURI target=chrome://global/content/commonDialog.xhtml content_ok=false error=NS_ERROR_DOM_BAD_URI

relevant pinned callsites:

  • dom/clients/manager/ClientManagerOpParent.cpp:19-25, 73-75
  • dom/clients/manager/ClientOpenWindowUtils.cpp:364, 472
  • ipc/glue/BackgroundUtils.cpp:46-60
  • caps/nsScriptSecurityManager.cpp:709-712, 984-994

related precedent:

  • CVE-2025-2857 / MFSA 2025-19 is a different primitive, but it confirms Mozilla treats child-to-parent IPC sandbox escapes as sec-critical.

user agent / environment:

  • reproduced on a local mozilla-central / Nightly-style macOS arm64 build from commit 4bade96cdbdebf3f288b90f6eb17f08848553318.

Actual results:

the parent process accepted child-supplied SystemPrincipalInfo in the PClientManager open-window path without binding that principal to the sending content process.

PrincipalInfoToPrincipal() materialized the forged value as SystemPrincipal, WaitForLoad() stored it as the navigation triggeringPrincipal, and the parent-side LoadURI(chrome://global/content/commonDialog.xhtml) path succeeded.

for the same target, the control case using a normal content principal was rejected with NS_ERROR_DOM_BAD_URI / 0x805303f4.

in other words, a compromised content process can flip the parent-side authorization result for a privileged chrome:// navigation by forging principal metadata across IPC.

Expected results:

the parent should have rejected SystemPrincipalInfo from an unprivileged content-process sender before PrincipalInfoToPrincipal() ran.

a child content process must not be able to cause a parent-side chrome:// navigation, or any equivalent privileged navigation decision, by forging principalInfo in PClientManagerOp(ClientOpenWindowArgs).

the effective principal for this path should be derived from trusted parent-owned sender state, or the IPC argument should be explicitly validated and rejected for system principals.

Attached file attack_scenario.md —
Attached file addendum.md —
Attached file SUBMISSION.md —
Group: core-security → dom-core-security
Status: UNCONFIRMED → RESOLVED
Closed: 8 months ago
Duplicate of bug: 2018164
Resolution: --- → DUPLICATE
Group: dom-core-security
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: