Skip to content

Commit c91c781

Browse files
victorgomesmibrunin
authored andcommitted
[Backport] CVE-2024-7550: Type Confusion in V8
Manual cherry-pick of patch originally reviewed on https://chromium-review.googlesource.com/c/v8/v8/+/5741275: [maglev] Consider WasmStruct in InferHasInPrototypeChain Fixed: 355256380 Change-Id: I0d82c1a723685cf4c1a093ed9e8eb8190502fce8 Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/5741275 Commit-Queue: Leszek Swirski <[email protected]> Auto-Submit: Victor Gomes <[email protected]> Reviewed-by: Leszek Swirski <[email protected]> Cr-Commit-Position: refs/heads/main@{#95271} Reviewed-on: https://codereview.qt-project.org/c/qt/qtwebengine-chromium/+/582139 Reviewed-by: Allan Sandfeld Jensen <[email protected]>
1 parent ef135ee commit c91c781

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

chromium/v8/src/maglev/maglev-graph-builder.cc

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7428,7 +7428,9 @@ MaglevGraphBuilder::InferHasInPrototypeChain(
74287428
// might be a different object each time, so it's much simpler to include
74297429
// {prototype}. That does, however, mean that we must check {prototype}'s
74307430
// map stability.
7431-
if (!prototype.map(broker()).is_stable()) return kMayBeInPrototypeChain;
7431+
if (!prototype.IsJSObject() || !prototype.map(broker()).is_stable()) {
7432+
return kMayBeInPrototypeChain;
7433+
}
74327434
last_prototype = prototype.AsJSObject();
74337435
}
74347436
broker()->dependencies()->DependOnStablePrototypeChains(

0 commit comments

Comments
 (0)