summaryrefslogtreecommitdiffstats
path: root/meta/recipes-graphics/xorg-xserver/xserver-xorg/CVE-2022-3553.patch
diff options
context:
space:
mode:
Diffstat (limited to 'meta/recipes-graphics/xorg-xserver/xserver-xorg/CVE-2022-3553.patch')
-rw-r--r--meta/recipes-graphics/xorg-xserver/xserver-xorg/CVE-2022-3553.patch49
1 files changed, 49 insertions, 0 deletions
diff --git a/meta/recipes-graphics/xorg-xserver/xserver-xorg/CVE-2022-3553.patch b/meta/recipes-graphics/xorg-xserver/xserver-xorg/CVE-2022-3553.patch
new file mode 100644
index 0000000000..94cea77edc
--- /dev/null
+++ b/meta/recipes-graphics/xorg-xserver/xserver-xorg/CVE-2022-3553.patch
@@ -0,0 +1,49 @@
1From 57ad2c03730d56f8432b6d66b29c0e5a9f9b1ec2 Mon Sep 17 00:00:00 2001
2From: Jeremy Huddleston Sequoia <jeremyhu@apple.com>
3Date: Sun, 4 Dec 2022 17:46:18 +0000
4Subject: [PATCH 3/3] xquartz: Fix a possible crash when editing the
5 Application menu due to mutaing immutable arrays
6
7Crashing on exception: -[__NSCFArray replaceObjectAtIndex:withObject:]: mutating method sent to immutable object
8
9Application Specific Backtrace 0:
100 CoreFoundation 0x00007ff80d2c5e9b __exceptionPreprocess + 242
111 libobjc.A.dylib 0x00007ff80d027e48 objc_exception_throw + 48
122 CoreFoundation 0x00007ff80d38167b _CFThrowFormattedException + 194
133 CoreFoundation 0x00007ff80d382a25 -[__NSCFArray removeObjectAtIndex:].cold.1 + 0
144 CoreFoundation 0x00007ff80d2e6c0b -[__NSCFArray replaceObjectAtIndex:withObject:] + 119
155 X11.bin 0x00000001003180f9 -[X11Controller tableView:setObjectValue:forTableColumn:row:] + 169
16
17Fixes: https://github.com/XQuartz/XQuartz/issues/267
18Signed-off-by: Jeremy Huddleston Sequoia <jeremyhu@apple.com>
19
20Upstream-Status: Backport [https://cgit.freedesktop.org/xorg/xserver/commit/?id=dfd057996b26420309c324ec844a5ba6dd07eda3]
21CVE: CVE-2022-3553
22Signed-off-by:Minjae Kim <flowergom@gmail.com>
23
24---
25 hw/xquartz/X11Controller.m | 8 ++++++--
26 1 file changed, 6 insertions(+), 2 deletions(-)
27
28diff --git a/hw/xquartz/X11Controller.m b/hw/xquartz/X11Controller.m
29index 3efda50..9870ff2 100644
30--- a/hw/xquartz/X11Controller.m
31+++ b/hw/xquartz/X11Controller.m
32@@ -467,8 +467,12 @@ extern char *bundle_id_prefix;
33 self.table_apps = table_apps;
34
35 NSArray * const apps = self.apps;
36- if (apps != nil)
37- [table_apps addObjectsFromArray:apps];
38+
39+ if (apps != nil) {
40+ for (NSArray <NSString *> * row in apps) {
41+ [table_apps addObject:row.mutableCopy];
42+ }
43+ }
44
45 columns = [apps_table tableColumns];
46 [[columns objectAtIndex:0] setIdentifier:@"0"];
47--
482.17.1
49