Skip to content

Commit b87c39d

Browse files
authored
chore: cherry-pick 1283160e334f from chromium (#25394)
1 parent 32c7b35 commit b87c39d

File tree

2 files changed

+24
-0
lines changed

2 files changed

+24
-0
lines changed

patches/chromium/.patches

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -128,3 +128,4 @@ indexeddb_reset_async_tasks_in_webidbgetdbnamescallbacksimpl.patch
128128
cherry-pick-138b748dd0a4.patch
129129
cherry-pick-bee371eeaf66.patch
130130
cherry-pick-f6cb89728f04.patch
131+
backport_1111737.patch
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
2+
From: Cheng Zhao <zcbenz@gmail.com>
3+
Date: Thu, 4 Oct 2018 14:57:02 -0700
4+
Subject: fix: remove references to launched device before it is reset
5+
6+
[1111737] [High] [CVE-2020-6576]: Security: OffscreenCanvas - Use After Free in OffscreenCanvasRenderingContext2D::DrawTextInternal()
7+
Backport https://chromium.googlesource.com/chromium/src/+/1283160e334f78c5eed4668d95e04f2ed2e2a4a3.
8+
9+
diff --git a/content/browser/renderer_host/media/video_capture_controller.cc b/content/browser/renderer_host/media/video_capture_controller.cc
10+
index effb80cd2002d1a513a4218c110bff13241353c2..8c70d2a1ac54595ac027630d1a1897a66414ce39 100644
11+
--- a/content/browser/renderer_host/media/video_capture_controller.cc
12+
+++ b/content/browser/renderer_host/media/video_capture_controller.cc
13+
@@ -716,6 +716,10 @@ void VideoCaptureController::ReleaseDeviceAsync(base::OnceClosure done_cb) {
14+
device_launcher_->AbortLaunch();
15+
return;
16+
}
17+
+ // |buffer_contexts_| contain references to |launched_device_| as observers.
18+
+ // Clear those observer references prior to resetting |launced_device_|.
19+
+ for (auto& entry : buffer_contexts_)
20+
+ entry.set_consumer_feedback_observer(nullptr);
21+
launched_device_.reset();
22+
}
23+

0 commit comments

Comments
 (0)