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 819d876e1bb8 from chromium #36687

Merged
merged 1 commit into from
Dec 20, 2022

Conversation

ppontes
Copy link
Member

@ppontes ppontes commented Dec 16, 2022

Fix UAF caused by vector operations during iteration

MediaInspectorContextImpl::CullPlayers iterates through dead_players_
to remove their events, but this can cause a GC event which can
end up adding more players to the |dead_players_| vector, causing
it to get re-allocated and it's iterators invalidated.

We can fix this simply by not using an iterator, and removing elements
from the vector before we trigger any GC operations that might cause
other changes to the vector.

Bug: 1383991

Change-Id: I59f5824c156ff58cf6b55ac9b942c8efdb1ed65a
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4064295
Reviewed-by: Andrey Kosyakov caseq@chromium.org
Commit-Queue: Ted (Chromium) Meyer tmathmeyer@chromium.org
Reviewed-by: Thomas Guilbert tguilbert@chromium.org
Cr-Commit-Position: refs/heads/main@{#1078842}

Notes: Security: backported fix for CVE-2022-4436.

@ppontes ppontes requested review from a team as code owners December 16, 2022 02:24
@ppontes ppontes added 21-x-y backport-check-skip Skip trop's backport validity checking security 🔒 semver/patch backwards-compatible bug fixes labels Dec 16, 2022
@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 Dec 16, 2022
@ppontes ppontes force-pushed the cherry-pick/21-x-y/chromium/819d876e1bb8 branch from 3572de8 to c3fae7c Compare December 16, 2022 02:27
@ppontes ppontes force-pushed the cherry-pick/21-x-y/chromium/819d876e1bb8 branch from 1235a57 to 7e8c16f Compare December 20, 2022 10:57
@nornagon
Copy link
Member

failures are flakes; merging.

@nornagon nornagon merged commit ed8c833 into 21-x-y Dec 20, 2022
@nornagon nornagon deleted the cherry-pick/21-x-y/chromium/819d876e1bb8 branch December 20, 2022 18:08
@release-clerk
Copy link

release-clerk bot commented Dec 20, 2022

Release Notes Persisted

Security: backported fix for CVE-2022-4436.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
21-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

2 participants