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 51daffbf5cd8 from chromium #35549

Merged
merged 4 commits into from Sep 7, 2022

Conversation

ppontes
Copy link
Member

@ppontes ppontes commented Sep 1, 2022

Fix UAF on network::URLLoader

network::URLLoader::SetUpUpload calls NotifyCompleted asynchronously,
as it can be called in the constructor and we don't want to run
NotifyCompleted in the constructor.

The problem is that it attaches a raw pointer to the method, which leads to a use-after-free problem if the URLLoader is destructed before
NotifyCompleted is called.

Use weak pointers instead of raw pointers to avoid the problem.

Bug: 1340253
Change-Id: Iacb1e772bf7a8e3de4a7bb9de342fea9ba0f3f3c
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3740150
Reviewed-by: Kenichi Ishibashi bashi@chromium.org
Commit-Queue: Yutaka Hirano yhirano@chromium.org
Cr-Commit-Position: refs/heads/main@{#1020539}

Ref electron/security#203

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

@ppontes ppontes requested review from a team as code owners September 1, 2022 19:54
@ppontes ppontes added 20-x-y backport-check-skip Skip trop's backport validity checking security 🔒 semver/patch backwards-compatible bug fixes labels Sep 1, 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 Sep 1, 2022
@codebytere codebytere merged commit 85ae4c4 into 20-x-y Sep 7, 2022
@codebytere codebytere deleted the cherry-pick/20-x-y/chromium/51daffbf5cd8 branch September 7, 2022 09:45
@release-clerk
Copy link

release-clerk bot commented Sep 7, 2022

Release Notes Persisted

Security: backported fix for CVE-2022-3038.

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