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 33#include <stdio.h>
44#include <unistd.h>
55
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+
626static void do_int_overflow () {
727
828 mach_port_t p = MACH_PORT_NULL , bs_port = MACH_PORT_NULL ;
You can’t perform that action at this time.
0 commit comments