Closed
Bug 2025879
Opened 7 months ago
Closed 7 months ago
Content process can forge SystemPrincipal via IPC + 5 WindowGlobalParent handlers blindly accept security state
Categories
(Core :: DOM: Content Processes, defect)
Core
DOM: Content Processes
Tracking
()
RESOLVED
DUPLICATE
of bug 2014103
People
(Reporter: joren, Unassigned)
Details
(Keywords: ai-involved, reporter-external)
User Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:148.0) Gecko/20100101 Firefox/148.0
Steps to reproduce:
- From a compromised content process, serialize a PrincipalInfo of type TSystemPrincipalInfo{}
- Send PContent::StoreAndBroadcastBlobURLRegistration with:
- url: "blob:<random-uuid>"
- blob: IPCBlob containing HTML payload (e.g.,
<script>alert(ChromeUtils)</script>) - principal: the SystemPrincipalInfo from step 1
- partitionKey: ""
- The parent process deserializes SystemPrincipalInfo into a real SystemPrincipal
(ipc/glue/BackgroundUtils.cpp:52-58) with no sender validation - ValidatePrincipal passes because AllowSystem is explicitly in the options
(dom/ipc/ContentParent.cpp:5843) - From the same content process, send PContent::BlobURLDataRequest with:
- aBlobURL: the blob URL from step 2
- aTriggeringPrincipal: TSystemPrincipalInfo{} (forged, no ValidatePrincipal on this handler)
- aLoadingPrincipal: TSystemPrincipalInfo{} (forged)
- Navigate to the blob URL
Actual results:
- ParamTraits creates a real SystemPrincipal from SystemPrincipalInfo with zero sender checks
- RecvStoreAndBroadcastBlobURLRegistration accepts system principal (AllowSystem option)
- RecvBlobURLDataRequest has no ValidatePrincipal call at all
- The blob URL document loads with system principal in the content process
- ChromeUtils.importESModule(), Components.classes, and all [ChromeOnly] WebIDL APIs
become available - The attacker can load any module from omni.ja, manipulate preferences via Services.prefs,
and send further IPC messages with system principal that the parent trusts
AFFECTED CODE:
- ipc/glue/BackgroundUtils.cpp:52-58 (PrincipalInfoToPrincipal)
- dom/ipc/PermissionMessageUtils.cpp:27-47 (ParamTraits<nsIPrincipal*>::Read)
- dom/ipc/ContentParent.cpp:5836-5856 (RecvStoreAndBroadcastBlobURLRegistration)
- dom/ipc/ContentParent.cpp:7392-7419 (RecvBlobURLDataRequest)
- dom/ipc/ContentParent.cpp:1294-1338 (LogAndAssertFailedPrincipalValidationInfo - log only)
Expected results:
The parent process should reject SystemPrincipalInfo from content processes at the IPC
deserialization layer (ParamTraits<nsIPrincipal*>::Read). ValidatePrincipal failures should
return IPC_FAIL to kill the offending process, not just log telemetry.
SUGGESTED FIX:
- Block SystemPrincipalInfo deserialization from content processes in ParamTraits
- Make ValidatePrincipal failures return IPC_FAIL instead of logging
- Remove AllowSystem from RecvStoreAndBroadcastBlobURLRegistration options
- Add ValidatePrincipal to RecvBlobURLDataRequest
Updated•7 months ago
|
Keywords: ai-involved,
reporter-external
Updated•7 months ago
|
Group: core-security → dom-core-security
Status: UNCONFIRMED → RESOLVED
Closed: 7 months ago
Component: DOM: Security → DOM: Content Processes
Duplicate of bug: 2014103
Resolution: --- → DUPLICATE
Updated•7 months ago
|
Group: dom-core-security
You need to log in
before you can comment on or make changes to this bug.
Description
•