Files
Carmelo Messina c266f670b3 Partition blobs by top frame URL: Fix renderer crash in PublicURLManager and clean up Blob URL partitioning (#2922)
Fix a Null Pointer Dereference crash in `GetInsecureTopLevelSite()`
affecting sites with heavy Service Worker usage (e.g., Discord, Reddit).
This rewrite also hardens our custom `Partition-blobs-by-top-frame-URL`
logic against upstream cross-partition token leak vectors.

In `public_url_manager.cc`, the custom helper was passing the result of
`worker_global_scope->top_level_frame_security_origin()` straight into the
`BlinkSchemefulSite` constructor. However, this property is intentionally
null for Service Workers, causing a fatal null pointer dereference crash.

Additionally, since Cromite's partition checks execute downstream from
vanilla Chromium's native mitigations, the browser-side fallback using
`agent_cluster_id` inside `IsSamePartition()` was redundant dead code.

Changes:
1. Blink: Fully rewrote `GetInsecureTopLevelSite()` using safe `DynamicTo`
   casts. For Service Workers, it now safely pulls the browser-validated
   partition directly via `service_worker->storage_key().top_level_site()`,
   eliminating the null pointer crash surface.
2. Blink / Hardening: Intentionally excluded Shared Workers from Blob URL
   support (`IsSharedWorkerGlobalScope()`) by returning `std::nullopt` to prevent
   unpartitioned fallback vectors in shared contexts.
3. Storage: Streamlined `IsSamePartition()` in `blob_url_store_impl.cc`
   by removing the obsolete `agent_cluster_id` fallback, leaving a clean,
   deterministic verification of the top-level site partition.
2026-06-03 14:54:19 +02:00
..
2023-12-28 17:19:01 +01:00
2026-02-01 15:18:16 +01:00
2024-03-17 19:41:20 +01:00
2026-05-19 10:48:25 +02:00
2026-03-27 15:09:49 +01:00
2026-05-08 08:35:17 +02:00
2025-01-22 14:55:24 +01:00
2026-05-19 10:48:25 +02:00
2026-05-19 10:48:25 +02:00
2026-05-19 10:48:25 +02:00
2026-05-08 08:35:17 +02:00
2026-02-01 15:18:16 +01:00
2025-11-22 16:25:29 +01:00
2025-10-01 16:04:10 +02:00
2026-05-08 08:35:17 +02:00
2026-02-01 15:18:16 +01:00
2025-09-29 11:50:52 +02:00
2026-05-19 10:48:25 +02:00
2025-08-05 14:55:21 +02:00
2026-05-08 08:35:17 +02:00
2026-01-15 12:58:05 +01:00
2024-02-18 14:35:58 +01:00
2026-03-11 12:43:32 +01:00
2026-02-01 15:18:16 +01:00