Skip to content

Commit aea2873

Browse files
reillyeonmibrunin
authored andcommitted
[Backport] CVE-2021-30562: Use after free in WebSerial
Cherry-pick of patch originally reviewed on https://chromium-review.googlesource.com/c/chromium/src/+/3041456: serial: Fix parent class tracing for SerialPort When SerialPort was updated to be ActiveScriptWrappable and an EventTarget the Trace method was not updated to call the parent class trace methods. (cherry picked from commit 4059ecc3a5352601a4d79196f90c8ca19262afe1) Bug: 1220078 Change-Id: If6967a913268bce86d4488359a9418a814530f84 Auto-Submit: Reilly Grant <reillyg@chromium.org> Commit-Queue: Tom Sepez <tsepez@chromium.org> Reviewed-by: Tom Sepez <tsepez@chromium.org> Cr-Original-Commit-Position: refs/heads/master@{#893039} Reviewed-by: Jana Grill <janagrill@google.com> Owners-Override: Jana Grill <janagrill@google.com> Commit-Queue: Roger Felipe Zanoni da Silva <rzanoni@google.com> Cr-Commit-Position: refs/branch-heads/4430@{#1541} Cr-Branched-From: e5ce7dc4f7518237b3d9bb93cccca35d25216cbe-refs/heads/master@{#857950} Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
1 parent f336927 commit aea2873

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

chromium/third_party/blink/renderer/modules/serial/serial_port.cc

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -508,7 +508,8 @@ void SerialPort::Trace(Visitor* visitor) const {
508508
visitor->Trace(open_resolver_);
509509
visitor->Trace(signal_resolvers_);
510510
visitor->Trace(close_resolver_);
511-
ScriptWrappable::Trace(visitor);
511+
EventTargetWithInlineData::Trace(visitor);
512+
ActiveScriptWrappable<SerialPort>::Trace(visitor);
512513
}
513514

514515
bool SerialPort::HasPendingActivity() const {

0 commit comments

Comments
 (0)