summaryrefslogtreecommitdiffstats
path: root/meta/recipes-sato
diff options
context:
space:
mode:
authorYogita Urade <yogita.urade@windriver.com>2023-09-27 05:14:15 +0000
committerSteve Sakoman <steve@sakoman.com>2023-09-30 09:43:59 -1000
commite67e90c5572ec0c3d01732272ff24aedbce340a3 (patch)
tree567ca3b8fa1df47494afba2d3996a4f1d98a8998 /meta/recipes-sato
parenta54b91946cff4ec8a417b74bdb2c7f22ef0c9b11 (diff)
downloadpoky-e67e90c5572ec0c3d01732272ff24aedbce340a3.tar.gz
webkitgtk: fix CVE-2023-32439
A type confusion issue was addressed with improved checks. This issue is fixed in iOS 16.5.1 and iPadOS 16.5.1, Safari 16.5.1, macOS Ventura 13.4.1, iOS 15.7.7 and iPadOS 15.7.7. Processing maliciously crafted web content may lead to arbitrary code execution. Apple is aware of a report that this issue may have been actively exploited. (From OE-Core rev: cdbc3c1548299eb78aeebb94909224eca8410158) Signed-off-by: Yogita Urade <yogita.urade@windriver.com> Signed-off-by: Steve Sakoman <steve@sakoman.com>
Diffstat (limited to 'meta/recipes-sato')
-rw-r--r--meta/recipes-sato/webkit/webkitgtk/CVE-2023-32439.patch127
-rw-r--r--meta/recipes-sato/webkit/webkitgtk_2.36.8.bb1
2 files changed, 128 insertions, 0 deletions
diff --git a/meta/recipes-sato/webkit/webkitgtk/CVE-2023-32439.patch b/meta/recipes-sato/webkit/webkitgtk/CVE-2023-32439.patch
new file mode 100644
index 0000000000..f8d7b613fa
--- /dev/null
+++ b/meta/recipes-sato/webkit/webkitgtk/CVE-2023-32439.patch
@@ -0,0 +1,127 @@
1From ebefb9e6b7e7440ab6bb29452f4ac6350bd8b975 Mon Sep 17 00:00:00 2001
2From: Yijia Huang <yijia_huang@apple.com>
3Date: Tue, 26 Sep 2023 09:23:31 +0000
4Subject: [PATCH] Cherry-pick 263909@main (52fe95e5805c).
5 https://bugs.webkit.org/show_bug.cgi?id=256567
6
7 EnumeratorNextUpdateIndexAndMode and HasIndexedProperty should have different heap location kinds
8 https://bugs.webkit.org/show_bug.cgi?id=256567
9 rdar://109089013
10
11 Reviewed by Yusuke Suzuki.
12
13 EnumeratorNextUpdateIndexAndMode and HasIndexedProperty are different DFG nodes. However,
14 they might introduce the same heap location kind in DFGClobberize.h which might lead to
15 hash collision. We should introduce a new locationn kind for EnumeratorNextUpdateIndexAndMode.
16
17 * JSTests/stress/heap-location-collision-dfg-clobberize.js: Added.
18 (foo):
19 * Source/JavaScriptCore/dfg/DFGClobberize.h:
20 (JSC::DFG::clobberize):
21 * Source/JavaScriptCore/dfg/DFGHeapLocation.cpp:
22 (WTF::printInternal):
23 * Source/JavaScriptCore/dfg/DFGHeapLocation.h:
24
25 Canonical link: https://commits.webkit.org/263909@main
26
27Canonical link: https://commits.webkit.org/260527.376@webkitglib/2.40
28
29CVE: CVE-2023-32439
30
31Upstream-Status: Backport [https://github.com/WebKit/WebKit/commit/ebefb9e]
32
33Signed-off-by: Yogita Urade <yogita.urade@windriver.com>
34---
35 .../stress/heap-location-collision-dfg-clobberize.js | 12 ++++++++++++
36 Source/JavaScriptCore/dfg/DFGClobberize.h | 7 ++++---
37 Source/JavaScriptCore/dfg/DFGHeapLocation.cpp | 4 ++++
38 Source/JavaScriptCore/dfg/DFGHeapLocation.h | 1 +
39 4 files changed, 21 insertions(+), 3 deletions(-)
40 create mode 100644 JSTests/stress/heap-location-collision-dfg-clobberize.js
41
42diff --git a/JSTests/stress/heap-location-collision-dfg-clobberize.js b/JSTests/stress/heap-location-collision-dfg-clobberize.js
43new file mode 100644
44index 00000000..ed40601e
45--- /dev/null
46+++ b/JSTests/stress/heap-location-collision-dfg-clobberize.js
47@@ -0,0 +1,12 @@
48+//@ runDefault("--watchdog=300", "--watchdog-exception-ok")
49+const arr = [0];
50+
51+function foo() {
52+ for (let _ in arr) {
53+ 0 in arr;
54+ while(1);
55+ }
56+}
57+
58+
59+foo();
60diff --git a/Source/JavaScriptCore/dfg/DFGClobberize.h b/Source/JavaScriptCore/dfg/DFGClobberize.h
61index f96e21d2..af3e864b 100644
62--- a/Source/JavaScriptCore/dfg/DFGClobberize.h
63+++ b/Source/JavaScriptCore/dfg/DFGClobberize.h
64@@ -371,6 +371,7 @@ void clobberize(Graph& graph, Node* node, const ReadFunctor& read, const WriteFu
65
66 read(JSObject_butterfly);
67 ArrayMode mode = node->arrayMode();
68+ LocationKind locationKind = node->op() == EnumeratorNextUpdateIndexAndMode ? EnumeratorNextUpdateIndexAndModeLoc : HasIndexedPropertyLoc;
69 switch (mode.type()) {
70 case Array::ForceExit: {
71 write(SideState);
72@@ -380,7 +381,7 @@ void clobberize(Graph& graph, Node* node, const ReadFunctor& read, const WriteFu
73 if (mode.isInBounds()) {
74 read(Butterfly_publicLength);
75 read(IndexedInt32Properties);
76- def(HeapLocation(HasIndexedPropertyLoc, IndexedInt32Properties, graph.varArgChild(node, 0), graph.varArgChild(node, 1)), LazyNode(node));
77+ def(HeapLocation(locationKind, IndexedInt32Properties, graph.varArgChild(node, 0), graph.varArgChild(node, 1)), LazyNode(node));
78 return;
79 }
80 break;
81@@ -390,7 +391,7 @@ void clobberize(Graph& graph, Node* node, const ReadFunctor& read, const WriteFu
82 if (mode.isInBounds()) {
83 read(Butterfly_publicLength);
84 read(IndexedDoubleProperties);
85- def(HeapLocation(HasIndexedPropertyLoc, IndexedDoubleProperties, graph.varArgChild(node, 0), graph.varArgChild(node, 1)), LazyNode(node));
86+ def(HeapLocation(locationKind, IndexedDoubleProperties, graph.varArgChild(node, 0), graph.varArgChild(node, 1)), LazyNode(node));
87 return;
88 }
89 break;
90@@ -400,7 +401,7 @@ void clobberize(Graph& graph, Node* node, const ReadFunctor& read, const WriteFu
91 if (mode.isInBounds()) {
92 read(Butterfly_publicLength);
93 read(IndexedContiguousProperties);
94- def(HeapLocation(HasIndexedPropertyLoc, IndexedContiguousProperties, graph.varArgChild(node, 0), graph.varArgChild(node, 1)), LazyNode(node));
95+ def(HeapLocation(locationKind, IndexedContiguousProperties, graph.varArgChild(node, 0), graph.varArgChild(node, 1)), LazyNode(node));
96 return;
97 }
98 break;
99diff --git a/Source/JavaScriptCore/dfg/DFGHeapLocation.cpp b/Source/JavaScriptCore/dfg/DFGHeapLocation.cpp
100index 0661e5b8..698a6d4b 100644
101--- a/Source/JavaScriptCore/dfg/DFGHeapLocation.cpp
102+++ b/Source/JavaScriptCore/dfg/DFGHeapLocation.cpp
103@@ -134,6 +134,10 @@ void printInternal(PrintStream& out, LocationKind kind)
104 out.print("HasIndexedPorpertyLoc");
105 return;
106
107+ case EnumeratorNextUpdateIndexAndModeLoc:
108+ out.print("EnumeratorNextUpdateIndexAndModeLoc");
109+ return;
110+
111 case IndexedPropertyDoubleLoc:
112 out.print("IndexedPropertyDoubleLoc");
113 return;
114diff --git a/Source/JavaScriptCore/dfg/DFGHeapLocation.h b/Source/JavaScriptCore/dfg/DFGHeapLocation.h
115index 40fb7167..7238491b 100644
116--- a/Source/JavaScriptCore/dfg/DFGHeapLocation.h
117+++ b/Source/JavaScriptCore/dfg/DFGHeapLocation.h
118@@ -46,6 +46,7 @@ enum LocationKind {
119 DirectArgumentsLoc,
120 GetterLoc,
121 GlobalVariableLoc,
122+ EnumeratorNextUpdateIndexAndModeLoc,
123 HasIndexedPropertyLoc,
124 IndexedPropertyDoubleLoc,
125 IndexedPropertyDoubleSaneChainLoc,
126--
1272.40.0
diff --git a/meta/recipes-sato/webkit/webkitgtk_2.36.8.bb b/meta/recipes-sato/webkit/webkitgtk_2.36.8.bb
index 10fcd0813a..f4b8456749 100644
--- a/meta/recipes-sato/webkit/webkitgtk_2.36.8.bb
+++ b/meta/recipes-sato/webkit/webkitgtk_2.36.8.bb
@@ -23,6 +23,7 @@ SRC_URI = "https://www.webkitgtk.org/releases/${BP}.tar.xz \
23 file://CVE-2022-46700.patch \ 23 file://CVE-2022-46700.patch \
24 file://CVE-2023-23529.patch \ 24 file://CVE-2023-23529.patch \
25 file://CVE-2022-48503.patch \ 25 file://CVE-2022-48503.patch \
26 file://CVE-2023-32439.patch \
26 " 27 "
27SRC_URI[sha256sum] = "0ad9fb6bf28308fe3889faf184bd179d13ac1b46835d2136edbab2c133d00437" 28SRC_URI[sha256sum] = "0ad9fb6bf28308fe3889faf184bd179d13ac1b46835d2136edbab2c133d00437"
28 29