diff options
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.patch | 49 |
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 @@ | |||
1 | From 57ad2c03730d56f8432b6d66b29c0e5a9f9b1ec2 Mon Sep 17 00:00:00 2001 | ||
2 | From: Jeremy Huddleston Sequoia <jeremyhu@apple.com> | ||
3 | Date: Sun, 4 Dec 2022 17:46:18 +0000 | ||
4 | Subject: [PATCH 3/3] xquartz: Fix a possible crash when editing the | ||
5 | Application menu due to mutaing immutable arrays | ||
6 | |||
7 | Crashing on exception: -[__NSCFArray replaceObjectAtIndex:withObject:]: mutating method sent to immutable object | ||
8 | |||
9 | Application Specific Backtrace 0: | ||
10 | 0 CoreFoundation 0x00007ff80d2c5e9b __exceptionPreprocess + 242 | ||
11 | 1 libobjc.A.dylib 0x00007ff80d027e48 objc_exception_throw + 48 | ||
12 | 2 CoreFoundation 0x00007ff80d38167b _CFThrowFormattedException + 194 | ||
13 | 3 CoreFoundation 0x00007ff80d382a25 -[__NSCFArray removeObjectAtIndex:].cold.1 + 0 | ||
14 | 4 CoreFoundation 0x00007ff80d2e6c0b -[__NSCFArray replaceObjectAtIndex:withObject:] + 119 | ||
15 | 5 X11.bin 0x00000001003180f9 -[X11Controller tableView:setObjectValue:forTableColumn:row:] + 169 | ||
16 | |||
17 | Fixes: https://github.com/XQuartz/XQuartz/issues/267 | ||
18 | Signed-off-by: Jeremy Huddleston Sequoia <jeremyhu@apple.com> | ||
19 | |||
20 | Upstream-Status: Backport [https://cgit.freedesktop.org/xorg/xserver/commit/?id=dfd057996b26420309c324ec844a5ba6dd07eda3] | ||
21 | CVE: CVE-2022-3553 | ||
22 | Signed-off-by:Minjae Kim <flowergom@gmail.com> | ||
23 | |||
24 | --- | ||
25 | hw/xquartz/X11Controller.m | 8 ++++++-- | ||
26 | 1 file changed, 6 insertions(+), 2 deletions(-) | ||
27 | |||
28 | diff --git a/hw/xquartz/X11Controller.m b/hw/xquartz/X11Controller.m | ||
29 | index 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 | -- | ||
48 | 2.17.1 | ||
49 | |||