Compromised content process can read/write any origin's BroadcastChannel (missing ValidatePrincipal in AllocPBroadcastChannelParent) — Fission site-isolation bypass
Categories
(Core :: DOM: postMessage, defect)
Tracking
()
People
(Reporter: apple.hazem, Unassigned)
Details
(Keywords: reporter-external)
Attachments
(3 files)
User Agent: Mozilla/5.0 (X11; Linux x86_64; rv:140.0) Gecko/20100101 Firefox/140.0
Steps to reproduce:
Threat model: compromised content process (the standard Fission site-isolation boundary). A
normal web page cannot trigger this — it requires control of a content process; the forged
ContentPrincipalInfo is just attacker-controlled serialized bytes.
PoC (models the compromised renderer via gdb — no source edits). Two origins, different ports =
different origins, different content processes under Fission:
VICTIM : http://HOST:8001/...?role=victim (broadcasts SESSION-TOKEN-N every 1s on channel "secret")
ATTACKER : http://HOST:8000/...?role=attacker (listens + injects on channel "secret")
A real compromised renderer needs no gdb: it calls SendPBroadcastChannelConstructor with a
ContentPrincipalInfo it crafts for the victim origin plus the matching origin string (both are
plain serializable fields it fully controls). We model that parent-side with gdb
(attached harness bc_forge_lead22.gdb):
1. At AllocPBroadcastChannelParent, rewrite the attacker actor origin ...:8000 -> ...:8001 (keys
the actor to the victim origin).
2. Skip the origin != principal.GetOrigin() KillHard at BackgroundParentImpl.cpp:775 (a real
renderer instead sends a matching forged principal, satisfying the consistency check).
Confirmed on a Firefox debug build, Fission on, ContentSandboxLevel 6.
User agent: Mozilla/5.0 (X11; Linux x86_64; rv:154.0) Gecko/20100101 Firefox/154.0
Actual results:
Cross-origin isolation is bypassed for BroadcastChannel:
- Attacker page (:8000) logs: RECEIVED: {"from":"victim","secret":"SESSION-TOKEN-31"...}
=> cross-origin EAVESDROP of the victim's broadcasts. - Victim page (:8001) logs: RECEIVED: {"from":"attacker","payload":"INJECTED-..."}
(origin of event: http://HOST:8001)
=> cross-origin INJECTION, delivered to the victim with the victim's OWN origin, i.e.
indistinguishable from a legitimate same-origin message.
Root cause: BackgroundParentImpl::AllocPBroadcastChannelParent (ipc/glue/BackgroundParentImpl.cpp:714)
builds the routing key "<channel>|<origin>" from the content-supplied aOrigin string with NO
process-binding check (no ValidatePrincipalCouldPotentiallyBeLoadedBy). The only gate,
CheckPrincipalRunnable::Run (:752), merely checks aOrigin == principal.GetOrigin() — an internal
Expected results:
The parent should reject a BroadcastChannel whose principal/origin the sending process is not
allowed to host. AllocPBroadcastChannelParent / RecvPBroadcastChannelConstructor should call
ValidatePrincipalCouldPotentiallyBeLoadedBy(principal, contentParent->GetRemoteType())
(the gate RecvCreateMLSTransaction and FetchParent already use) — not merely check
origin == principalInfo. With that check, a process hosting attacker.com cannot register an
actor keyed to victim.com, and cross-origin isolation holds.
Note: this is one instance of a broader pattern — several BackgroundParentImpl constructors
(WebTransport, Notification, LockManager, SharedWorker) take a content principal without the
process-binding check.
Hi team,
I forgot to mention that it was also reproduced on Firefox Nightly 153.0a1 (opt / release-channel build) with
Build ID 20260625145212 , in addition to the debug build in the original report — same gdb forge: re-key the attacker's BroadcastChannel actor origin to the victim origin at AllocPBroadcastChannelParent, and skip the origin/principal consistency KillHard at BackgroundParentImpl.cpp:775 (a real compromised
renderer instead sends a matching forged ContentPrincipalInfo, satisfying that check).
Result is identical on Nightly: the attacker page (origin A, :8000) receives the victim's
(origin B, :8001) SESSION-TOKEN broadcasts (cross-origin eavesdrop), and the victim receives
the attacker's injected messages with the victim's own origin as the event origin
(cross-origin injection). This confirms the missing process-binding check
(ValidatePrincipalCouldPotentiallyBeLoadedBy) affects the release-channel Nightly build, not
only debug.
Updated•4 months ago
|
Updated•4 months ago
|
Updated•1 month ago
|
Description
•