Closed Bug 2022723 Opened 8 months ago Closed 8 months ago

Cross-Origin Blob Data Theft: RecvBlobURLDataRequest performs zero principal validation

Categories

(Core :: DOM: Content Processes, defect)

defect

Tracking

()

RESOLVED DUPLICATE of bug 2014103

People

(Reporter: b00rito.dumb, Unassigned)

Details

(Keywords: reporter-external)

Attachments

(1 file)

Steps to reproduce:

  1. A compromised content process calls SendBlobURLDataRequest with:
    • aBlobURL = any blob URL from any origin (e.g., "blob:https://bank.com/<uuid>")
    • aTriggeringPrincipal = forged SystemPrincipal
    • aLoadingPrincipal = forged SystemPrincipal
  2. The parent process receives the message in ContentParent::RecvBlobURLDataRequest
    (ContentParent.cpp:7456-7483)
  3. The handler passes both unvalidated principals directly to
    BlobURLProtocolHandler::GetDataEntry() for access control

Actual results:

RecvBlobURLDataRequest performs zero validation on either principal -- no
ValidatePrincipal(), no LogAndAssert, nothing. The forged SystemPrincipal
bypasses both access control checks in GetDataEntry():

  1. The OriginAttributes check (line 848) is skipped entirely because
    aLoadingPrincipal->IsSystemPrincipal() returns true
  2. The Subsumes() check (line 855) passes because SystemPrincipal->Subsumes()
    returns true for all principals

The victim's blob data is serialized via IPCBlobUtils::Serialize and returned
to the attacker's content process. Any blob URL from any origin can be read.

The same zero-validation pattern exists in RecvLoadURIExternal
(ContentParent.cpp:4674-4699), where forged SystemPrincipal bypasses all
access control in nsExternalHelperAppService::LoadURI.

Expected results:

RecvBlobURLDataRequest should call ValidatePrincipal() on both
aTriggeringPrincipal and aLoadingPrincipal before passing them to
GetDataEntry(). If either principal fails validation (e.g., a content process
claims to be SystemPrincipal), the handler should return IPC_FAIL and kill
the child process. The blob data should not be returned to a process that
forged its principals.

Every other handler in ContentParent.cpp that accepts nsIPrincipal* from a
content process calls at least ValidatePrincipal(). RecvBlobURLDataRequest
and RecvLoadURIExternal are outliers with zero validation.

Group: core-security → dom-core-security
Status: UNCONFIRMED → RESOLVED
Closed: 8 months ago
Duplicate of bug: 2014103
Resolution: --- → DUPLICATE
Group: dom-core-security
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: