Closed Bug 2025885 Opened 8 months ago Closed 8 months ago

Blob URL entries silently overwritable via InsertOrUpdate + batch revocation lacks ownership check

Categories

(Core :: DOM: Content Processes, defect)

defect

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:

  1. Origin A creates a blob URL: blob:<uuid> containing sensitive data
  2. From a compromised content process, send PContent::StoreAndBroadcastBlobURLRegistration
    with the same blob:<uuid> URL but attacker-controlled blob data
  3. InsertOrUpdate (dom/file/uri/BlobURLProtocolHandler.cpp:558) silently replaces
    the original entry
  4. When origin A loads blob:<uuid>, it gets attacker-controlled data instead

For revocation:

  1. From a compromised content process, send PContent::UnstoreAndBroadcastBlobURLUnregistration
    with any blob URL string
  2. The blob URL is revoked regardless of which process registered it
  3. No ownership check is performed (unlike the single-URI RemoveDataEntry
    which does check aPrincipal->Subsumes)

Actual results:

  • dom/file/uri/BlobURLProtocolHandler.cpp:558 uses InsertOrUpdate (silent overwrite)
  • dom/ipc/ContentParent.cpp:5858-5876 batch removal has no ownership check

AFFECTED CODE:

  • dom/file/uri/BlobURLProtocolHandler.cpp:558 (InsertOrUpdate)
  • dom/ipc/ContentParent.cpp:5858-5876 (RecvUnstoreAndBroadcastBlobURLUnregistration)

Expected results:

  • AddDataEntry should check if the URI already exists and reject duplicates
    (or validate the caller owns the existing entry)
  • UnstoreAndBroadcastBlobURLUnregistration should validate the requesting
    process owns the blob URLs being revoked
Group: core-security → dom-core-security
Status: UNCONFIRMED → RESOLVED
Closed: 8 months ago
Component: DOM: Security → DOM: Content Processes
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.