Closed Bug 2091892 Opened 3 days ago Closed 12 hours ago

[wpt-sync] Sync PR 64540 - Only pass verified integrity metadata on ModuleMap CSP re-check

Categories

(Core :: DOM: Security, task, P4)

task

Tracking

()

RESOLVED FIXED
162 Branch
Tracking Status
firefox162 --- fixed

People

(Reporter: wpt-sync, Unassigned)

References

()

Details

(Whiteboard: [wptsync downstream])

Sync web-platform-tests PR 64540 into mozilla-central (this bug is closed when the sync is complete).

PR: https://github.com/web-platform-tests/wpt/pull/64540
Details from upstream follow.

Camille Lamy <clamy@chromium.org> wrote:

Only pass verified integrity metadata on ModuleMap CSP re-check

When a module script hits an existing entry in the ModuleMap,
FetchSingleModuleScript re-checks CSP with the request's parser state to
prevent a modulepreload strict-dynamic bypass. Previously, that re-check
passed the consumer request's integrity metadata even when it did not
match the entry's SRI-verified integrity metadata, allowing an
unverified integrity attribute matching a policy hash to satisfy CSP
without SRI enforcement.

Only forward the request's integrity metadata to AllowScriptFromSource()
when it matches the cached entry's integrity metadata; otherwise pass an
empty set.

Bug: 574603289
Change-Id: I1fe6aa02c3d0e6e476d60c849d128df6f66bee00
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/8674247
Reviewed-by: Mike West \<mkwst@chromium.org>
Commit-Queue: Camille Lamy \<clamy@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1732722}

Component: web-platform-tests → DOM: Security
Product: Testing → Core

CI Results

Ran 9 Firefox configurations based on mozilla-central, and Firefox, Chrome, and Safari on GitHub CI

Total 98 tests and 2 subtests

Status Summary

Firefox

OK : 1[GitHub] 96[Gecko-windows11-32-25h2-debug, Gecko-windows11-32-25h2-opt, Gecko-windows11-64-25h2-debug, Gecko-windows11-64-25h2-opt] 97[Gecko-android-em-14-x86_64-debug-geckoview, Gecko-android-em-14-x86_64-lite-opt-geckoview, Gecko-android-em-14-x86_64-opt-geckoview, Gecko-linux2404-64-debug, Gecko-linux2404-64-opt]
PASS : 3[GitHub] 214[Gecko-windows11-32-25h2-debug, Gecko-windows11-32-25h2-opt, Gecko-windows11-64-25h2-debug, Gecko-windows11-64-25h2-opt] 217[Gecko-android-em-14-x86_64-debug-geckoview, Gecko-android-em-14-x86_64-lite-opt-geckoview, Gecko-android-em-14-x86_64-opt-geckoview, Gecko-linux2404-64-debug, Gecko-linux2404-64-opt]
FAIL : 3[GitHub] 37[Gecko-android-em-14-x86_64-debug-geckoview, Gecko-android-em-14-x86_64-lite-opt-geckoview, Gecko-android-em-14-x86_64-opt-geckoview, Gecko-linux2404-64-debug, Gecko-linux2404-64-opt, Gecko-windows11-32-25h2-debug, Gecko-windows11-32-25h2-opt, Gecko-windows11-64-25h2-debug, Gecko-windows11-64-25h2-opt]

Chrome

OK : 1
PASS : 3
FAIL : 3

Safari

PASS : 2
FAIL : 1
TIMEOUT: 4

Links

Gecko CI (Treeherder)
GitHub PR Head
GitHub PR Base

Details

New Tests That Don't Pass

Tests Disabled in Gecko Infrastructure

Status: NEW → RESOLVED
Closed: 12 hours ago
Resolution: --- → FIXED
Target Milestone: --- → 162 Branch
You need to log in before you can comment on or make changes to this bug.