File tree Expand file tree Collapse file tree 1 file changed +20
-0
lines changed Expand file tree Collapse file tree 1 file changed +20
-0
lines changed Original file line number Diff line number Diff line change 3
3
#include <stdio.h>
4
4
#include <unistd.h>
5
5
6
+ /*
7
+ * Brief: Integer overflow in CoreAnimation, CVE-2018-4415
8
+ * Usage:
9
+ * 1. clang FunctionIntOverFlow.c -o function_over_flow
10
+ * 2. ./function_over_flow
11
+ *
12
+ * Specifically, `CA::Render::InterpolatedFunction::allocate_storage` function in QuartzCore does
13
+ * not do any check for integer overflow in expression |result = (char *)malloc(4 * (v4 + v3));|.
14
+ *
15
+ * The bug has been fixed in macOS 10.14.1 and iOS 12.1, since the interfaces and structure of
16
+ * messages are inconsistent between different versions, this PoC may only work on macOS 10.14 and
17
+ * iOS 12.0, but it's very easy to replant it to another versions.
18
+ *
19
+ * Tips for debugging on macOS: Turn Mac to sleep mode and ssh to the target machine, this may
20
+ * help you concentrate on your work.
21
+ *
22
+ * One more: Mach service com.apple.CARenderServer is reacheable from Safari sandbox on both macOS
23
+ * and iOS. com.apple.windowserver.active accurately on macOS versions prior to macOS 10.14.
24
+ */
25
+
6
26
static void do_int_overflow () {
7
27
8
28
mach_port_t p = MACH_PORT_NULL , bs_port = MACH_PORT_NULL ;
You can’t perform that action at this time.
0 commit comments