Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: cherry-pick 0e36d324d6ef from chromium #29777

Merged
merged 3 commits into from Jun 21, 2021

Conversation

ppontes
Copy link
Member

@ppontes ppontes commented Jun 18, 2021

[M86-LTS] BFCache: remove a controllee stored in bfcached_controllee_map_

This CL fixes the UAF that happens with the following case:
Let's assume we have 2 service workers (sw1.js and sw2.js) are
registered in the same page. When the second service worker (sw2.js) is
registered, ServiceWorkerContainerHost::UpdateController() is called
and the previous SWVersion (sw1.js) removes a controllee from
controllee_map_. If BackForwardCache is enabled, a controllee is
stored in bfcached_controllee_map_ instead and the controllee will
not be removed in ServiceWorkerContainerHost::UpdateController().
When ServiceWorkerContainerHost::UpdateController() is called and
keep a controllee in bfcached_controllee_map_, and a page navigates to
a different page (evicts BFCache), use-after-free (UAF) happens.

This CL updates ServiceWorkerContainerHost::UpdateController()
to remove a controllee from bfcached_controllee_map_ if it exists.

(cherry picked from commit a2414a05a486ca0ad18ba4caf78e883a668a0555)

(cherry picked from commit 7cd7f6741fc4491c2f7ef21052a370ee23887e37)

Bug: 1212618
Change-Id: I13e023e6d273268a08ea9276a056f7f5acba39cd
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2919020
Commit-Queue: Asami Doi asamidoi@chromium.org
Reviewed-by: Matt Falkenhagen falken@chromium.org
Cr-Original-Original-Commit-Position: refs/heads/master@{#887109}
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2929401
Reviewed-by: Krishna Govind govind@chromium.org
Reviewed-by: Ben Mason benmason@chromium.org
Reviewed-by: Prudhvi Kumar Bommana pbommana@google.com
Commit-Queue: Krishna Govind govind@chromium.org
Owners-Override: Krishna Govind govind@chromium.org
Cr-Original-Commit-Position: refs/branch-heads/4472@{#1375}
Cr-Original-Branched-From: 3d60439cfb36485e76a1c5bb7f513d3721b20da1-refs/heads/master@{#870763}
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2948660
Owners-Override: Victor-Gabriel Savu vsavu@google.com
Reviewed-by: Artem Sumaneev asumaneev@google.com
Commit-Queue: Victor-Gabriel Savu vsavu@google.com
Cr-Commit-Position: refs/branch-heads/4240@{#1663}
Cr-Branched-From: f297677702651916bbf65e59c0d4bbd4ce57d1ee-refs/heads/master@{#800218}

Notes: Security: backported fix for CVE-2021-30544.

@ppontes ppontes requested a review from a team as a code owner June 18, 2021 14:01
@ppontes ppontes added 11-x-y backport-check-skip Skip trop's backport validity checking semver/patch backwards-compatible bug fixes labels Jun 18, 2021
@electron-cation electron-cation bot added new-pr 🌱 PR opened in the last 24 hours and removed new-pr 🌱 PR opened in the last 24 hours labels Jun 18, 2021
@zcbenz zcbenz merged commit 8117de4 into 11-x-y Jun 21, 2021
@zcbenz zcbenz deleted the cherry-pick/11-x-y/chromium/0e36d324d6ef branch June 21, 2021 10:07
@release-clerk
Copy link

release-clerk bot commented Jun 21, 2021

Release Notes Persisted

Security: backported fix for CVE-2021-30544.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
11-x-y backport-check-skip Skip trop's backport validity checking security 🔒 semver/patch backwards-compatible bug fixes
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants