WEBVTT
Kind: captions
Language: en

00:00:00.000 --> 00:00:01.830 align:start position:0%
 
This<00:00:00.320><c> image</c><00:00:00.680><c> is</c><00:00:00.800><c> made</c><00:00:01.080><c> up</c><00:00:01.240><c> of</c><00:00:01.360><c> carefully</c>

00:00:01.830 --> 00:00:01.840 align:start position:0%
This image is made up of carefully
 

00:00:01.840 --> 00:00:03.510 align:start position:0%
This image is made up of carefully
crafted<00:00:02.320><c> data</c><00:00:02.680><c> that</c><00:00:02.800><c> is</c><00:00:02.920><c> capable</c><00:00:03.400><c> of</c>

00:00:03.510 --> 00:00:03.520 align:start position:0%
crafted data that is capable of
 

00:00:03.520 --> 00:00:04.910 align:start position:0%
crafted data that is capable of
triggering<00:00:04.000><c> a</c><00:00:04.080><c> memory</c><00:00:04.440><c> corruption</c>

00:00:04.910 --> 00:00:04.920 align:start position:0%
triggering a memory corruption
 

00:00:04.920 --> 00:00:07.710 align:start position:0%
triggering a memory corruption
vulnerability<00:00:05.600><c> on</c><00:00:05.880><c> iOS</c><00:00:06.400><c> and</c><00:00:06.560><c> macOS</c><00:00:06.920><c> devices.</c>

00:00:07.710 --> 00:00:07.720 align:start position:0%
vulnerability on iOS and macOS devices.
 

00:00:07.720 --> 00:00:09.790 align:start position:0%
vulnerability on iOS and macOS devices.
In<00:00:07.840><c> its</c><00:00:07.960><c> most</c><00:00:08.280><c> innocent</c><00:00:08.720><c> form,</c><00:00:09.080><c> it</c><00:00:09.240><c> can</c><00:00:09.440><c> crash</c>

00:00:09.790 --> 00:00:09.800 align:start position:0%
In its most innocent form, it can crash
 

00:00:09.800 --> 00:00:11.590 align:start position:0%
In its most innocent form, it can crash
various<00:00:10.200><c> system</c><00:00:10.560><c> apps</c><00:00:10.960><c> and</c><00:00:11.200><c> background</c>

00:00:11.590 --> 00:00:11.600 align:start position:0%
various system apps and background
 

00:00:11.600 --> 00:00:13.670 align:start position:0%
various system apps and background
processes,<00:00:12.360><c> but</c><00:00:12.520><c> at</c><00:00:12.600><c> its</c><00:00:12.720><c> most</c><00:00:13.000><c> dangerous,</c><00:00:13.560><c> it</c>

00:00:13.670 --> 00:00:13.680 align:start position:0%
processes, but at its most dangerous, it
 

00:00:13.680 --> 00:00:15.190 align:start position:0%
processes, but at its most dangerous, it
could<00:00:13.800><c> be</c><00:00:13.960><c> used</c><00:00:14.240><c> as</c><00:00:14.360><c> an</c><00:00:14.480><c> entry</c><00:00:14.800><c> point</c><00:00:15.080><c> to</c>

00:00:15.190 --> 00:00:15.200 align:start position:0%
could be used as an entry point to
 

00:00:15.200 --> 00:00:17.270 align:start position:0%
could be used as an entry point to
deliver<00:00:15.560><c> an</c><00:00:15.720><c> exploit</c><00:00:16.160><c> payload</c><00:00:16.720><c> to</c><00:00:16.840><c> a</c><00:00:16.880><c> victim's</c>

00:00:17.270 --> 00:00:17.280 align:start position:0%
deliver an exploit payload to a victim's
 

00:00:17.280 --> 00:00:19.550 align:start position:0%
deliver an exploit payload to a victim's
iPhone.<00:00:17.800><c> Simply</c><00:00:18.240><c> viewing</c><00:00:18.600><c> the</c><00:00:18.760><c> image</c><00:00:19.160><c> on</c><00:00:19.320><c> your</c>

00:00:19.550 --> 00:00:19.560 align:start position:0%
iPhone. Simply viewing the image on your
 

00:00:19.560 --> 00:00:21.470 align:start position:0%
iPhone. Simply viewing the image on your
iOS<00:00:19.840><c> device</c><00:00:20.240><c> is</c><00:00:20.400><c> enough</c><00:00:20.720><c> for</c><00:00:20.840><c> it</c><00:00:20.960><c> to</c><00:00:21.080><c> trigger</c>

00:00:21.470 --> 00:00:21.480 align:start position:0%
iOS device is enough for it to trigger
 

00:00:21.480 --> 00:00:23.270 align:start position:0%
iOS device is enough for it to trigger
an<00:00:21.680><c> integer</c><00:00:22.080><c> overflow</c><00:00:22.480><c> bug</c><00:00:22.800><c> in</c><00:00:22.960><c> one</c><00:00:23.120><c> of</c>

00:00:23.270 --> 00:00:23.280 align:start position:0%
an integer overflow bug in one of
 

00:00:23.280 --> 00:00:25.510 align:start position:0%
an integer overflow bug in one of
Apple's<00:00:23.640><c> system</c><00:00:24.040><c> frameworks</c><00:00:24.920><c> and</c><00:00:25.040><c> then</c><00:00:25.160><c> trick</c>

00:00:25.510 --> 00:00:25.520 align:start position:0%
Apple's system frameworks and then trick
 

00:00:25.520 --> 00:00:27.500 align:start position:0%
Apple's system frameworks and then trick
the<00:00:25.680><c> image</c><00:00:26.000><c> decoder</c><00:00:26.600><c> into</c><00:00:26.920><c> writing</c><00:00:27.400><c> huge</c>

00:00:27.500 --> 00:00:27.510 align:start position:0%
the image decoder into writing huge
 

00:00:27.510 --> 00:00:29.390 align:start position:0%
the image decoder into writing huge
[snorts]<00:00:27.760><c> amounts</c><00:00:28.160><c> of</c><00:00:28.280><c> pixel</c><00:00:28.600><c> data</c><00:00:29.120><c> into</c>

00:00:29.390 --> 00:00:29.400 align:start position:0%
[snorts] amounts of pixel data into
 

00:00:29.400 --> 00:00:31.630 align:start position:0%
[snorts] amounts of pixel data into
adjacent<00:00:29.960><c> memory,</c><00:00:30.560><c> corrupting</c><00:00:31.160><c> important</c>

00:00:31.630 --> 00:00:31.640 align:start position:0%
adjacent memory, corrupting important
 

00:00:31.640 --> 00:00:33.670 align:start position:0%
adjacent memory, corrupting important
pointers<00:00:32.160><c> and</c><00:00:32.360><c> data</c><00:00:32.599><c> structures.</c><00:00:33.320><c> Let's</c><00:00:33.520><c> take</c>

00:00:33.670 --> 00:00:33.680 align:start position:0%
pointers and data structures. Let's take
 

00:00:33.680 --> 00:00:35.390 align:start position:0%
pointers and data structures. Let's take
a<00:00:33.720><c> look</c><00:00:33.960><c> at</c><00:00:34.080><c> how</c><00:00:34.280><c> I</c><00:00:34.360><c> managed</c><00:00:34.720><c> to</c><00:00:34.840><c> generate</c><00:00:35.240><c> this</c>

00:00:35.390 --> 00:00:35.400 align:start position:0%
a look at how I managed to generate this
 

00:00:35.400 --> 00:00:37.430 align:start position:0%
a look at how I managed to generate this
image<00:00:35.760><c> and</c><00:00:35.880><c> exactly</c><00:00:36.360><c> how</c><00:00:36.640><c> it</c><00:00:36.760><c> is</c><00:00:36.880><c> capable</c><00:00:37.320><c> of</c>

00:00:37.430 --> 00:00:37.440 align:start position:0%
image and exactly how it is capable of
 

00:00:37.440 --> 00:00:39.390 align:start position:0%
image and exactly how it is capable of
causing<00:00:37.880><c> memory</c><00:00:38.120><c> corruption.</c><00:00:38.800><c> The</c><00:00:38.960><c> image</c><00:00:39.280><c> is</c>

00:00:39.390 --> 00:00:39.400 align:start position:0%
causing memory corruption. The image is
 

00:00:39.400 --> 00:00:41.790 align:start position:0%
causing memory corruption. The image is
in<00:00:39.560><c> the</c><00:00:39.800><c> EXR</c><00:00:40.360><c> format,</c><00:00:41.000><c> which</c><00:00:41.280><c> according</c><00:00:41.720><c> to</c>

00:00:41.790 --> 00:00:41.800 align:start position:0%
in the EXR format, which according to
 

00:00:41.800 --> 00:00:44.230 align:start position:0%
in the EXR format, which according to
the<00:00:41.920><c> official</c><00:00:42.280><c> spec</c><00:00:42.840><c> is</c><00:00:43.120><c> a</c><00:00:43.200><c> format</c><00:00:43.720><c> used</c><00:00:44.040><c> to</c>

00:00:44.230 --> 00:00:44.240 align:start position:0%
the official spec is a format used to
 

00:00:44.240 --> 00:00:46.110 align:start position:0%
the official spec is a format used to
accurately<00:00:44.880><c> and</c><00:00:45.000><c> efficiently</c><00:00:45.560><c> represent</c>

00:00:46.110 --> 00:00:46.120 align:start position:0%
accurately and efficiently represent
 

00:00:46.120 --> 00:00:48.630 align:start position:0%
accurately and efficiently represent
high<00:00:46.360><c> dynamic</c><00:00:46.920><c> range</c><00:00:47.480><c> scene</c><00:00:47.960><c> linear</c><00:00:48.360><c> image</c>

00:00:48.630 --> 00:00:48.640 align:start position:0%
high dynamic range scene linear image
 

00:00:48.640 --> 00:00:50.630 align:start position:0%
high dynamic range scene linear image
data.<00:00:49.280><c> But,</c><00:00:49.400><c> that's</c><00:00:49.600><c> not</c><00:00:49.760><c> really</c><00:00:49.960><c> important.</c>

00:00:50.630 --> 00:00:50.640 align:start position:0%
data. But, that's not really important.
 

00:00:50.640 --> 00:00:52.510 align:start position:0%
data. But, that's not really important.
What<00:00:50.800><c> is</c><00:00:50.920><c> important,</c><00:00:51.360><c> however,</c><00:00:51.680><c> is</c><00:00:51.880><c> how</c><00:00:52.200><c> Apple</c>

00:00:52.510 --> 00:00:52.520 align:start position:0%
What is important, however, is how Apple
 

00:00:52.520 --> 00:00:54.990 align:start position:0%
What is important, however, is how Apple
decodes<00:00:53.080><c> these</c><00:00:53.240><c> images.</c><00:00:54.080><c> Image</c><00:00:54.360><c> files</c><00:00:54.720><c> come</c>

00:00:54.990 --> 00:00:55.000 align:start position:0%
decodes these images. Image files come
 

00:00:55.000 --> 00:00:57.270 align:start position:0%
decodes these images. Image files come
in<00:00:55.200><c> all</c><00:00:55.360><c> kinds</c><00:00:55.720><c> of</c><00:00:55.920><c> formats</c><00:00:56.360><c> and</c><00:00:56.600><c> types,</c><00:00:57.080><c> and</c>

00:00:57.270 --> 00:00:57.280 align:start position:0%
in all kinds of formats and types, and
 

00:00:57.280 --> 00:00:58.670 align:start position:0%
in all kinds of formats and types, and
in<00:00:57.400><c> order</c><00:00:57.560><c> for</c><00:00:57.680><c> your</c><00:00:57.840><c> phone</c><00:00:58.200><c> to</c><00:00:58.320><c> be</c><00:00:58.400><c> able</c><00:00:58.560><c> to</c>

00:00:58.670 --> 00:00:58.680 align:start position:0%
in order for your phone to be able to
 

00:00:58.680 --> 00:01:00.390 align:start position:0%
in order for your phone to be able to
render<00:00:58.960><c> them</c><00:00:59.120><c> properly,</c><00:00:59.640><c> it</c><00:00:59.880><c> needs</c><00:01:00.080><c> to</c><00:01:00.200><c> have</c>

00:01:00.390 --> 00:01:00.400 align:start position:0%
render them properly, it needs to have
 

00:01:00.400 --> 00:01:02.910 align:start position:0%
render them properly, it needs to have
decoders<00:01:01.040><c> built</c><00:01:01.360><c> into</c><00:01:01.600><c> the</c><00:01:01.680><c> system</c><00:01:02.440><c> capable</c>

00:01:02.910 --> 00:01:02.920 align:start position:0%
decoders built into the system capable
 

00:01:02.920 --> 00:01:04.950 align:start position:0%
decoders built into the system capable
of<00:01:03.040><c> understanding</c><00:01:03.760><c> each</c><00:01:04.000><c> of</c><00:01:04.080><c> the</c><00:01:04.160><c> formats.</c>

00:01:04.950 --> 00:01:04.960 align:start position:0%
of understanding each of the formats.
 

00:01:04.960 --> 00:01:06.830 align:start position:0%
of understanding each of the formats.
These<00:01:05.199><c> decoders</c><00:01:05.800><c> can,</c><00:01:05.960><c> of</c><00:01:06.080><c> course,</c><00:01:06.360><c> be</c><00:01:06.520><c> prone</c>

00:01:06.830 --> 00:01:06.840 align:start position:0%
These decoders can, of course, be prone
 

00:01:06.840 --> 00:01:08.950 align:start position:0%
These decoders can, of course, be prone
to<00:01:06.960><c> bugs</c><00:01:07.480><c> and</c><00:01:07.720><c> sometimes</c><00:01:08.240><c> even</c><00:01:08.560><c> critical</c>

00:01:08.950 --> 00:01:08.960 align:start position:0%
to bugs and sometimes even critical
 

00:01:08.960 --> 00:01:10.510 align:start position:0%
to bugs and sometimes even critical
vulnerabilities,<00:01:10.000><c> as</c><00:01:10.160><c> we've</c><00:01:10.280><c> seen</c>

00:01:10.510 --> 00:01:10.520 align:start position:0%
vulnerabilities, as we've seen
 

00:01:10.520 --> 00:01:12.350 align:start position:0%
vulnerabilities, as we've seen
previously<00:01:10.960><c> in</c><00:01:11.120><c> iPhone</c><00:01:11.480><c> exploits</c><00:01:11.960><c> such</c><00:01:12.200><c> as</c>

00:01:12.350 --> 00:01:12.360 align:start position:0%
previously in iPhone exploits such as
 

00:01:12.360 --> 00:01:14.870 align:start position:0%
previously in iPhone exploits such as
Blastpass<00:01:13.160><c> used</c><00:01:13.480><c> in</c><00:01:13.600><c> the</c><00:01:13.720><c> Pegasus</c><00:01:14.160><c> spyware.</c>

00:01:14.870 --> 00:01:14.880 align:start position:0%
Blastpass used in the Pegasus spyware.
 

00:01:14.880 --> 00:01:16.790 align:start position:0%
Blastpass used in the Pegasus spyware.
For<00:01:15.000><c> the</c><00:01:15.080><c> majority</c><00:01:15.560><c> of</c><00:01:15.680><c> image</c><00:01:15.960><c> formats,</c><00:01:16.520><c> Apple</c>

00:01:16.790 --> 00:01:16.800 align:start position:0%
For the majority of image formats, Apple
 

00:01:16.800 --> 00:01:19.630 align:start position:0%
For the majority of image formats, Apple
provides<00:01:17.320><c> a</c><00:01:17.400><c> decoder</c><00:01:18.040><c> inside</c><00:01:18.640><c> their</c><00:01:18.880><c> image</c><00:01:19.320><c> IO</c>

00:01:19.630 --> 00:01:19.640 align:start position:0%
provides a decoder inside their image IO
 

00:01:19.640 --> 00:01:21.950 align:start position:0%
provides a decoder inside their image IO
framework.<00:01:20.320><c> This</c><00:01:20.560><c> is</c><00:01:20.760><c> a</c><00:01:20.840><c> big</c><00:01:21.080><c> chunk</c><00:01:21.400><c> of</c><00:01:21.600><c> shared</c>

00:01:21.950 --> 00:01:21.960 align:start position:0%
framework. This is a big chunk of shared
 

00:01:21.960 --> 00:01:24.150 align:start position:0%
framework. This is a big chunk of shared
code<00:01:22.440><c> that</c><00:01:22.680><c> system</c><00:01:23.040><c> processes</c><00:01:23.600><c> and</c><00:01:23.800><c> normal</c>

00:01:24.150 --> 00:01:24.160 align:start position:0%
code that system processes and normal
 

00:01:24.160 --> 00:01:25.950 align:start position:0%
code that system processes and normal
iPhone<00:01:24.440><c> apps</c><00:01:24.680><c> can</c><00:01:24.840><c> use</c><00:01:25.160><c> in</c><00:01:25.320><c> order</c><00:01:25.520><c> to</c><00:01:25.680><c> render</c>

00:01:25.950 --> 00:01:25.960 align:start position:0%
iPhone apps can use in order to render
 

00:01:25.960 --> 00:01:27.670 align:start position:0%
iPhone apps can use in order to render
images.<00:01:26.640><c> Obviously,</c><00:01:27.040><c> if</c><00:01:27.120><c> you're</c><00:01:27.240><c> developing</c>

00:01:27.670 --> 00:01:27.680 align:start position:0%
images. Obviously, if you're developing
 

00:01:27.680 --> 00:01:29.110 align:start position:0%
images. Obviously, if you're developing
an<00:01:27.800><c> app,</c><00:01:28.040><c> you</c><00:01:28.120><c> don't</c><00:01:28.360><c> want</c><00:01:28.480><c> to</c><00:01:28.600><c> manually</c>

00:01:29.110 --> 00:01:29.120 align:start position:0%
an app, you don't want to manually
 

00:01:29.120 --> 00:01:30.870 align:start position:0%
an app, you don't want to manually
implement<00:01:29.560><c> your</c><00:01:29.760><c> own</c><00:01:30.000><c> parser</c><00:01:30.440><c> for</c><00:01:30.640><c> every</c>

00:01:30.870 --> 00:01:30.880 align:start position:0%
implement your own parser for every
 

00:01:30.880 --> 00:01:33.030 align:start position:0%
implement your own parser for every
possible<00:01:31.320><c> image</c><00:01:31.600><c> format.</c><00:01:32.120><c> You</c><00:01:32.280><c> instead</c><00:01:32.800><c> call</c>

00:01:33.030 --> 00:01:33.040 align:start position:0%
possible image format. You instead call
 

00:01:33.040 --> 00:01:35.110 align:start position:0%
possible image format. You instead call
into<00:01:33.320><c> Apple's</c><00:01:33.720><c> precompiled</c><00:01:34.600><c> image</c><00:01:34.920><c> IO</c>

00:01:35.110 --> 00:01:35.120 align:start position:0%
into Apple's precompiled image IO
 

00:01:35.120 --> 00:01:37.110 align:start position:0%
into Apple's precompiled image IO
framework<00:01:35.880><c> and</c><00:01:36.000><c> make</c><00:01:36.240><c> use</c><00:01:36.440><c> of</c><00:01:36.560><c> the</c><00:01:36.640><c> decoders</c>

00:01:37.110 --> 00:01:37.120 align:start position:0%
framework and make use of the decoders
 

00:01:37.120 --> 00:01:39.310 align:start position:0%
framework and make use of the decoders
provided<00:01:37.600><c> there.</c><00:01:38.160><c> Image</c><00:01:38.480><c> IO</c><00:01:38.760><c> provides</c><00:01:39.280><c> a</c>

00:01:39.310 --> 00:01:39.320 align:start position:0%
provided there. Image IO provides a
 

00:01:39.320 --> 00:01:42.070 align:start position:0%
provided there. Image IO provides a
decoder<00:01:39.880><c> for</c><00:01:40.120><c> images</c><00:01:40.480><c> in</c><00:01:40.600><c> the</c><00:01:40.800><c> EXR</c><00:01:41.360><c> format,</c>

00:01:42.070 --> 00:01:42.080 align:start position:0%
decoder for images in the EXR format,
 

00:01:42.080 --> 00:01:43.750 align:start position:0%
decoder for images in the EXR format,
and<00:01:42.200><c> it</c><00:01:42.280><c> is</c><00:01:42.400><c> within</c><00:01:42.680><c> a</c><00:01:42.720><c> specific</c><00:01:43.200><c> function</c><00:01:43.600><c> in</c>

00:01:43.750 --> 00:01:43.760 align:start position:0%
and it is within a specific function in
 

00:01:43.760 --> 00:01:45.430 align:start position:0%
and it is within a specific function in
this<00:01:43.920><c> decoder</c><00:01:44.400><c> that</c><00:01:44.560><c> an</c><00:01:44.680><c> integer</c><00:01:45.080><c> overflow</c>

00:01:45.430 --> 00:01:45.440 align:start position:0%
this decoder that an integer overflow
 

00:01:45.440 --> 00:01:47.470 align:start position:0%
this decoder that an integer overflow
bug<00:01:45.680><c> occurs</c><00:01:46.160><c> during</c><00:01:46.480><c> the</c><00:01:46.560><c> calculation</c><00:01:47.400><c> for</c>

00:01:47.470 --> 00:01:47.480 align:start position:0%
bug occurs during the calculation for
 

00:01:47.480 --> 00:01:49.470 align:start position:0%
bug occurs during the calculation for
the<00:01:47.600><c> size</c><00:01:48.120><c> of</c><00:01:48.360><c> some</c><00:01:48.600><c> buffer.</c><00:01:49.200><c> But,</c><00:01:49.360><c> let's</c>

00:01:49.470 --> 00:01:49.480 align:start position:0%
the size of some buffer. But, let's
 

00:01:49.480 --> 00:01:50.870 align:start position:0%
the size of some buffer. But, let's
quickly<00:01:49.840><c> rewind</c><00:01:50.240><c> a</c><00:01:50.280><c> bit</c><00:01:50.480><c> and</c><00:01:50.600><c> actually</c>

00:01:50.870 --> 00:01:50.880 align:start position:0%
quickly rewind a bit and actually
 

00:01:50.880 --> 00:01:52.870 align:start position:0%
quickly rewind a bit and actually
understand<00:01:51.400><c> how</c><00:01:51.600><c> we</c><00:01:51.720><c> got</c><00:01:51.880><c> to</c><00:01:51.960><c> this</c><00:01:52.120><c> point.</c>

00:01:52.870 --> 00:01:52.880 align:start position:0%
understand how we got to this point.
 

00:01:52.880 --> 00:01:54.630 align:start position:0%
understand how we got to this point.
This<00:01:53.080><c> bug</c><00:01:53.360><c> was</c><00:01:53.560><c> not</c><00:01:53.800><c> originally</c><00:01:54.200><c> discovered</c>

00:01:54.630 --> 00:01:54.640 align:start position:0%
This bug was not originally discovered
 

00:01:54.640 --> 00:01:56.390 align:start position:0%
This bug was not originally discovered
by<00:01:54.800><c> me.</c><00:01:55.440><c> Although,</c><00:01:55.800><c> as</c><00:01:55.960><c> of</c><00:01:56.040><c> the</c><00:01:56.160><c> time</c><00:01:56.320><c> of</c>

00:01:56.390 --> 00:01:56.400 align:start position:0%
by me. Although, as of the time of
 

00:01:56.400 --> 00:01:57.910 align:start position:0%
by me. Although, as of the time of
recording<00:01:56.760><c> this</c><00:01:56.880><c> video,</c><00:01:57.360><c> I</c><00:01:57.440><c> think</c><00:01:57.720><c> I'm</c><00:01:57.840><c> the</c>

00:01:57.910 --> 00:01:57.920 align:start position:0%
recording this video, I think I'm the
 

00:01:57.920 --> 00:02:00.470 align:start position:0%
recording this video, I think I'm the
first<00:01:58.280><c> to</c><00:01:58.480><c> publicly</c><00:01:58.920><c> discuss</c><00:01:59.320><c> its</c><00:01:59.480><c> details.</c>

00:02:00.470 --> 00:02:00.480 align:start position:0%
first to publicly discuss its details.
 

00:02:00.480 --> 00:02:01.990 align:start position:0%
first to publicly discuss its details.
The<00:02:00.520><c> bug</c><00:02:00.720><c> was</c><00:02:00.880><c> actually</c><00:02:01.120><c> found</c><00:02:01.400><c> by</c><00:02:01.600><c> another</c>

00:02:01.990 --> 00:02:02.000 align:start position:0%
The bug was actually found by another
 

00:02:02.000 --> 00:02:03.950 align:start position:0%
The bug was actually found by another
security<00:02:02.480><c> researcher</c><00:02:03.120><c> and</c><00:02:03.240><c> was</c><00:02:03.400><c> patched</c><00:02:03.840><c> in</c>

00:02:03.950 --> 00:02:03.960 align:start position:0%
security researcher and was patched in
 

00:02:03.960 --> 00:02:07.110 align:start position:0%
security researcher and was patched in
Apple's<00:02:04.360><c> recent</c><00:02:04.800><c> iOS</c><00:02:05.200><c> and</c><00:02:05.360><c> macOS</c><00:02:06.000><c> 26.5</c>

00:02:07.110 --> 00:02:07.120 align:start position:0%
Apple's recent iOS and macOS 26.5
 

00:02:07.120 --> 00:02:09.350 align:start position:0%
Apple's recent iOS and macOS 26.5
update.<00:02:08.000><c> On</c><00:02:08.160><c> the</c><00:02:08.240><c> security</c><00:02:08.679><c> notes</c><00:02:08.920><c> page,</c><00:02:09.240><c> we</c>

00:02:09.350 --> 00:02:09.360 align:start position:0%
update. On the security notes page, we
 

00:02:09.360 --> 00:02:12.350 align:start position:0%
update. On the security notes page, we
can<00:02:09.479><c> see</c><00:02:09.720><c> that</c><00:02:09.920><c> iOS</c><00:02:10.280><c> 26.5</c><00:02:11.440><c> fixed</c><00:02:11.959><c> three</c>

00:02:12.350 --> 00:02:12.360 align:start position:0%
can see that iOS 26.5 fixed three
 

00:02:12.360 --> 00:02:13.949 align:start position:0%
can see that iOS 26.5 fixed three
separate<00:02:12.800><c> vulnerabilities</c><00:02:13.560><c> within</c><00:02:13.840><c> the</c>

00:02:13.949 --> 00:02:13.959 align:start position:0%
separate vulnerabilities within the
 

00:02:13.959 --> 00:02:16.110 align:start position:0%
separate vulnerabilities within the
Image<00:02:14.240><c> IO</c><00:02:14.440><c> framework.</c><00:02:15.280><c> When</c><00:02:15.480><c> I</c><00:02:15.520><c> saw</c><00:02:15.760><c> this,</c><00:02:16.040><c> I</c>

00:02:16.110 --> 00:02:16.120 align:start position:0%
Image IO framework. When I saw this, I
 

00:02:16.120 --> 00:02:17.990 align:start position:0%
Image IO framework. When I saw this, I
decided<00:02:16.600><c> to</c><00:02:16.720><c> do</c><00:02:16.880><c> some</c><00:02:17.120><c> patch</c><00:02:17.440><c> diffing</c><00:02:17.880><c> to</c>

00:02:17.990 --> 00:02:18.000 align:start position:0%
decided to do some patch diffing to
 

00:02:18.000 --> 00:02:19.630 align:start position:0%
decided to do some patch diffing to
figure<00:02:18.280><c> out</c><00:02:18.440><c> what</c><00:02:18.560><c> had</c><00:02:18.720><c> changed</c><00:02:19.200><c> between</c><00:02:19.560><c> the</c>

00:02:19.630 --> 00:02:19.640 align:start position:0%
figure out what had changed between the
 

00:02:19.640 --> 00:02:21.750 align:start position:0%
figure out what had changed between the
two<00:02:19.800><c> versions.</c><00:02:20.720><c> Patch</c><00:02:20.959><c> diffing</c><00:02:21.280><c> is</c><00:02:21.440><c> something</c>

00:02:21.750 --> 00:02:21.760 align:start position:0%
two versions. Patch diffing is something
 

00:02:21.760 --> 00:02:22.790 align:start position:0%
two versions. Patch diffing is something
we've<00:02:21.880><c> looked</c><00:02:22.080><c> at</c><00:02:22.200><c> previously</c><00:02:22.560><c> on</c><00:02:22.640><c> this</c>

00:02:22.790 --> 00:02:22.800 align:start position:0%
we've looked at previously on this
 

00:02:22.800 --> 00:02:24.670 align:start position:0%
we've looked at previously on this
channel<00:02:23.320><c> and</c><00:02:23.560><c> in</c><00:02:23.680><c> its</c><00:02:23.800><c> simplest</c><00:02:24.200><c> form,</c><00:02:24.560><c> it</c>

00:02:24.670 --> 00:02:24.680 align:start position:0%
channel and in its simplest form, it
 

00:02:24.680 --> 00:02:26.990 align:start position:0%
channel and in its simplest form, it
refers<00:02:25.120><c> to</c><00:02:25.200><c> the</c><00:02:25.320><c> process</c><00:02:25.800><c> of</c><00:02:26.000><c> comparing</c><00:02:26.760><c> two</c>

00:02:26.990 --> 00:02:27.000 align:start position:0%
refers to the process of comparing two
 

00:02:27.000 --> 00:02:29.030 align:start position:0%
refers to the process of comparing two
versions<00:02:27.480><c> of</c><00:02:27.560><c> the</c><00:02:27.640><c> same</c><00:02:27.920><c> code</c><00:02:28.160><c> base</c><00:02:28.800><c> and</c>

00:02:29.030 --> 00:02:29.040 align:start position:0%
versions of the same code base and
 

00:02:29.040 --> 00:02:31.190 align:start position:0%
versions of the same code base and
deriving<00:02:29.520><c> information</c><00:02:30.080><c> from</c><00:02:30.280><c> it.</c><00:02:30.800><c> Usually</c>

00:02:31.190 --> 00:02:31.200 align:start position:0%
deriving information from it. Usually
 

00:02:31.200 --> 00:02:33.470 align:start position:0%
deriving information from it. Usually
related<00:02:31.600><c> to</c><00:02:31.720><c> security</c><00:02:32.200><c> issues</c><00:02:32.560><c> by</c><00:02:32.800><c> observing</c>

00:02:33.470 --> 00:02:33.480 align:start position:0%
related to security issues by observing
 

00:02:33.480 --> 00:02:35.390 align:start position:0%
related to security issues by observing
what<00:02:33.720><c> the</c><00:02:33.840><c> newly</c><00:02:34.160><c> patched</c><00:02:34.520><c> code</c><00:02:34.880><c> is</c><00:02:35.040><c> checking</c>

00:02:35.390 --> 00:02:35.400 align:start position:0%
what the newly patched code is checking
 

00:02:35.400 --> 00:02:37.750 align:start position:0%
what the newly patched code is checking
for<00:02:35.959><c> that</c><00:02:36.120><c> the</c><00:02:36.280><c> older</c><00:02:36.480><c> code</c><00:02:36.760><c> missed.</c><00:02:37.560><c> It's</c><00:02:37.720><c> a</c>

00:02:37.750 --> 00:02:37.760 align:start position:0%
for that the older code missed. It's a
 

00:02:37.760 --> 00:02:39.390 align:start position:0%
for that the older code missed. It's a
very<00:02:38.000><c> common</c><00:02:38.240><c> technique</c><00:02:38.680><c> used</c><00:02:39.000><c> among</c><00:02:39.280><c> the</c>

00:02:39.390 --> 00:02:39.400 align:start position:0%
very common technique used among the
 

00:02:39.400 --> 00:02:41.150 align:start position:0%
very common technique used among the
security<00:02:39.840><c> community</c><00:02:40.680><c> and</c><00:02:40.800><c> it's</c><00:02:40.920><c> a</c><00:02:40.959><c> really</c>

00:02:41.150 --> 00:02:41.160 align:start position:0%
security community and it's a really
 

00:02:41.160 --> 00:02:42.870 align:start position:0%
security community and it's a really
good<00:02:41.320><c> exercise</c><00:02:41.800><c> to</c><00:02:41.920><c> practice</c><00:02:42.400><c> vulnerability</c>

00:02:42.870 --> 00:02:42.880 align:start position:0%
good exercise to practice vulnerability
 

00:02:42.880 --> 00:02:44.590 align:start position:0%
good exercise to practice vulnerability
research<00:02:43.440><c> as</c><00:02:43.560><c> it</c><00:02:43.680><c> shows</c><00:02:43.959><c> you</c><00:02:44.120><c> real-life</c>

00:02:44.590 --> 00:02:44.600 align:start position:0%
research as it shows you real-life
 

00:02:44.600 --> 00:02:46.510 align:start position:0%
research as it shows you real-life
examples<00:02:45.320><c> of</c><00:02:45.440><c> what</c><00:02:45.600><c> to</c><00:02:45.680><c> look</c><00:02:45.840><c> out</c><00:02:46.040><c> for</c><00:02:46.280><c> when</c>

00:02:46.510 --> 00:02:46.520 align:start position:0%
examples of what to look out for when
 

00:02:46.520 --> 00:02:48.870 align:start position:0%
examples of what to look out for when
hunting<00:02:46.880><c> for</c><00:02:47.000><c> bugs.</c><00:02:47.760><c> So,</c><00:02:47.920><c> I</c><00:02:47.959><c> decided</c><00:02:48.440><c> to</c><00:02:48.520><c> patch</c>

00:02:48.870 --> 00:02:48.880 align:start position:0%
hunting for bugs. So, I decided to patch
 

00:02:48.880 --> 00:02:51.190 align:start position:0%
hunting for bugs. So, I decided to patch
diff<00:02:49.120><c> the</c><00:02:49.280><c> Image</c><00:02:49.680><c> IO</c><00:02:49.920><c> library</c><00:02:50.440><c> by</c><00:02:50.600><c> comparing</c>

00:02:51.190 --> 00:02:51.200 align:start position:0%
diff the Image IO library by comparing
 

00:02:51.200 --> 00:02:55.070 align:start position:0%
diff the Image IO library by comparing
the<00:02:51.320><c> 26.5</c><00:02:52.400><c> version</c><00:02:52.959><c> to</c><00:02:53.080><c> the</c><00:02:53.200><c> prior</c><00:02:53.720><c> 26.4.2</c>

00:02:55.070 --> 00:02:55.080 align:start position:0%
the 26.5 version to the prior 26.4.2
 

00:02:55.080 --> 00:02:57.190 align:start position:0%
the 26.5 version to the prior 26.4.2
version.<00:02:55.920><c> And</c><00:02:56.040><c> this</c><00:02:56.200><c> is</c><00:02:56.320><c> how</c><00:02:56.600><c> I</c><00:02:56.680><c> uncovered</c><00:02:57.120><c> the</c>

00:02:57.190 --> 00:02:57.200 align:start position:0%
version. And this is how I uncovered the
 

00:02:57.200 --> 00:03:00.150 align:start position:0%
version. And this is how I uncovered the
details<00:02:57.720><c> of</c><00:02:57.840><c> this</c><00:02:58.000><c> specific</c><00:02:58.640><c> EXR</c><00:02:59.160><c> bug.</c><00:02:59.760><c> Using</c>

00:03:00.150 --> 00:03:00.160 align:start position:0%
details of this specific EXR bug. Using
 

00:03:00.160 --> 00:03:01.870 align:start position:0%
details of this specific EXR bug. Using
IDA<00:03:00.400><c> Pro</c><00:03:00.720><c> as</c><00:03:00.880><c> my</c><00:03:01.040><c> disassembler</c><00:03:01.680><c> and</c>

00:03:01.870 --> 00:03:01.880 align:start position:0%
IDA Pro as my disassembler and
 

00:03:01.880 --> 00:03:03.830 align:start position:0%
IDA Pro as my disassembler and
decompiler<00:03:02.480><c> of</c><00:03:02.640><c> choice,</c><00:03:03.080><c> I</c><00:03:03.160><c> was</c><00:03:03.360><c> able</c><00:03:03.600><c> to</c>

00:03:03.830 --> 00:03:03.840 align:start position:0%
decompiler of choice, I was able to
 

00:03:03.840 --> 00:03:05.590 align:start position:0%
decompiler of choice, I was able to
identify<00:03:04.480><c> which</c><00:03:04.760><c> functions</c><00:03:05.280><c> had</c><00:03:05.440><c> been</c>

00:03:05.590 --> 00:03:05.600 align:start position:0%
identify which functions had been
 

00:03:05.600 --> 00:03:07.790 align:start position:0%
identify which functions had been
modified<00:03:06.120><c> between</c><00:03:06.440><c> the</c><00:03:06.519><c> two</c><00:03:06.720><c> versions</c><00:03:07.519><c> and</c>

00:03:07.790 --> 00:03:07.800 align:start position:0%
modified between the two versions and
 

00:03:07.800 --> 00:03:09.590 align:start position:0%
modified between the two versions and
analyze<00:03:08.280><c> the</c><00:03:08.400><c> exact</c><00:03:08.800><c> lines</c><00:03:09.040><c> of</c><00:03:09.160><c> code</c><00:03:09.480><c> that</c>

00:03:09.590 --> 00:03:09.600 align:start position:0%
analyze the exact lines of code that
 

00:03:09.600 --> 00:03:11.310 align:start position:0%
analyze the exact lines of code that
were<00:03:09.680><c> changed.</c><00:03:10.440><c> This</c><00:03:10.640><c> is</c><00:03:10.720><c> where</c><00:03:10.920><c> I</c><00:03:10.959><c> found</c><00:03:11.239><c> the</c>

00:03:11.310 --> 00:03:11.320 align:start position:0%
were changed. This is where I found the
 

00:03:11.320 --> 00:03:14.470 align:start position:0%
were changed. This is where I found the
function<00:03:11.880><c> EXR</c><00:03:12.480><c> read</c><00:03:12.760><c> plugin</c><00:03:13.440><c> decode</c><00:03:14.040><c> block</c>

00:03:14.470 --> 00:03:14.480 align:start position:0%
function EXR read plugin decode block
 

00:03:14.480 --> 00:03:16.870 align:start position:0%
function EXR read plugin decode block
Apple<00:03:14.840><c> EXR.</c><00:03:15.720><c> This</c><00:03:15.880><c> function</c><00:03:16.280><c> is</c><00:03:16.480><c> part</c><00:03:16.680><c> of</c><00:03:16.800><c> the</c>

00:03:16.870 --> 00:03:16.880 align:start position:0%
Apple EXR. This function is part of the
 

00:03:16.880 --> 00:03:20.190 align:start position:0%
Apple EXR. This function is part of the
C++<00:03:17.519><c> class</c><00:03:17.840><c> used</c><00:03:18.120><c> for</c><00:03:18.320><c> decoding</c><00:03:18.959><c> EXR</c><00:03:19.440><c> images</c>

00:03:20.190 --> 00:03:20.200 align:start position:0%
C++ class used for decoding EXR images
 

00:03:20.200 --> 00:03:22.190 align:start position:0%
C++ class used for decoding EXR images
and<00:03:20.440><c> an</c><00:03:20.519><c> important</c><00:03:21.120><c> check</c><00:03:21.480><c> was</c><00:03:21.680><c> added</c><00:03:22.040><c> in</c>

00:03:22.190 --> 00:03:22.200 align:start position:0%
and an important check was added in
 

00:03:22.200 --> 00:03:24.870 align:start position:0%
and an important check was added in
version<00:03:22.600><c> 26.5.</c><00:03:24.000><c> Look</c><00:03:24.200><c> at</c><00:03:24.280><c> this</c><00:03:24.440><c> snippet</c><00:03:24.760><c> of</c>

00:03:24.870 --> 00:03:24.880 align:start position:0%
version 26.5. Look at this snippet of
 

00:03:24.880 --> 00:03:27.030 align:start position:0%
version 26.5. Look at this snippet of
code.<00:03:25.440><c> Here,</c><00:03:25.760><c> the</c><00:03:25.880><c> decoder</c><00:03:26.440><c> is</c><00:03:26.600><c> trying</c><00:03:26.920><c> to</c>

00:03:27.030 --> 00:03:27.040 align:start position:0%
code. Here, the decoder is trying to
 

00:03:27.040 --> 00:03:29.390 align:start position:0%
code. Here, the decoder is trying to
calculate<00:03:27.560><c> the</c><00:03:27.680><c> size</c><00:03:28.160><c> needed</c><00:03:28.519><c> for</c><00:03:28.800><c> a</c><00:03:28.880><c> buffer</c>

00:03:29.390 --> 00:03:29.400 align:start position:0%
calculate the size needed for a buffer
 

00:03:29.400 --> 00:03:31.590 align:start position:0%
calculate the size needed for a buffer
which<00:03:29.680><c> it</c><00:03:29.800><c> will</c><00:03:29.920><c> allocate</c><00:03:30.360><c> using</c><00:03:30.800><c> malloc.</c><00:03:31.440><c> To</c>

00:03:31.590 --> 00:03:31.600 align:start position:0%
which it will allocate using malloc. To
 

00:03:31.600 --> 00:03:33.750 align:start position:0%
which it will allocate using malloc. To
calculate<00:03:32.080><c> the</c><00:03:32.160><c> required</c><00:03:32.640><c> size,</c><00:03:33.080><c> it</c><00:03:33.239><c> performs</c>

00:03:33.750 --> 00:03:33.760 align:start position:0%
calculate the required size, it performs
 

00:03:33.760 --> 00:03:35.949 align:start position:0%
calculate the required size, it performs
this<00:03:33.959><c> multiplication.</c><00:03:35.080><c> That</c><00:03:35.280><c> is</c><00:03:35.400><c> the</c><00:03:35.560><c> number</c>

00:03:35.949 --> 00:03:35.959 align:start position:0%
this multiplication. That is the number
 

00:03:35.959 --> 00:03:38.270 align:start position:0%
this multiplication. That is the number
of<00:03:36.080><c> channels</c><00:03:36.640><c> multiplied</c><00:03:37.360><c> by</c><00:03:37.480><c> the</c><00:03:37.720><c> width</c><00:03:38.080><c> and</c>

00:03:38.270 --> 00:03:38.280 align:start position:0%
of channels multiplied by the width and
 

00:03:38.280 --> 00:03:40.590 align:start position:0%
of channels multiplied by the width and
height<00:03:38.640><c> of</c><00:03:38.760><c> the</c><00:03:38.920><c> image's</c><00:03:39.480><c> data</c><00:03:39.800><c> window.</c><00:03:40.400><c> This,</c>

00:03:40.590 --> 00:03:40.600 align:start position:0%
height of the image's data window. This,
 

00:03:40.600 --> 00:03:42.830 align:start position:0%
height of the image's data window. This,
of<00:03:40.680><c> course,</c><00:03:41.040><c> makes</c><00:03:41.360><c> sense.</c><00:03:41.959><c> If</c><00:03:42.120><c> we</c><00:03:42.239><c> infer</c><00:03:42.640><c> that</c>

00:03:42.830 --> 00:03:42.840 align:start position:0%
of course, makes sense. If we infer that
 

00:03:42.840 --> 00:03:44.670 align:start position:0%
of course, makes sense. If we infer that
this<00:03:43.000><c> is</c><00:03:43.120><c> some</c><00:03:43.360><c> buffer</c><00:03:43.720><c> to</c><00:03:43.920><c> store</c><00:03:44.280><c> the</c><00:03:44.400><c> image</c>

00:03:44.670 --> 00:03:44.680 align:start position:0%
this is some buffer to store the image
 

00:03:44.680 --> 00:03:46.910 align:start position:0%
this is some buffer to store the image
data,<00:03:45.000><c> for</c><00:03:45.160><c> example,</c><00:03:46.000><c> you</c><00:03:46.120><c> can</c><00:03:46.280><c> see</c><00:03:46.560><c> how</c><00:03:46.720><c> you'd</c>

00:03:46.910 --> 00:03:46.920 align:start position:0%
data, for example, you can see how you'd
 

00:03:46.920 --> 00:03:48.790 align:start position:0%
data, for example, you can see how you'd
need<00:03:47.120><c> to</c><00:03:47.239><c> multiply</c><00:03:47.720><c> the</c><00:03:47.840><c> data</c><00:03:48.080><c> window's</c><00:03:48.560><c> width</c>

00:03:48.790 --> 00:03:48.800 align:start position:0%
need to multiply the data window's width
 

00:03:48.800 --> 00:03:50.390 align:start position:0%
need to multiply the data window's width
and<00:03:48.920><c> height</c><00:03:49.160><c> together</c><00:03:49.720><c> in</c><00:03:49.840><c> order</c><00:03:50.040><c> to</c><00:03:50.160><c> get</c><00:03:50.320><c> the</c>

00:03:50.390 --> 00:03:50.400 align:start position:0%
and height together in order to get the
 

00:03:50.400 --> 00:03:52.470 align:start position:0%
and height together in order to get the
total<00:03:50.760><c> pixel</c><00:03:51.120><c> number</c><00:03:51.720><c> and</c><00:03:51.840><c> then</c><00:03:52.000><c> multiply</c>

00:03:52.470 --> 00:03:52.480 align:start position:0%
total pixel number and then multiply
 

00:03:52.480 --> 00:03:53.950 align:start position:0%
total pixel number and then multiply
this<00:03:52.800><c> by</c><00:03:52.960><c> the</c><00:03:53.080><c> amount</c><00:03:53.360><c> of</c><00:03:53.440><c> channels</c><00:03:53.800><c> per</c>

00:03:53.950 --> 00:03:53.960 align:start position:0%
this by the amount of channels per
 

00:03:53.960 --> 00:03:56.030 align:start position:0%
this by the amount of channels per
pixel.<00:03:54.840><c> The</c><00:03:54.920><c> Now,</c><00:03:55.040><c> here's</c><00:03:55.280><c> the</c><00:03:55.400><c> issue.</c><00:03:55.920><c> The</c>

00:03:56.030 --> 00:03:56.040 align:start position:0%
pixel. The Now, here's the issue. The
 

00:03:56.040 --> 00:03:58.470 align:start position:0%
pixel. The Now, here's the issue. The
newer<00:03:56.440><c> patched</c><00:03:56.840><c> version</c><00:03:57.160><c> of</c><00:03:57.240><c> the</c><00:03:57.320><c> code</c><00:03:58.080><c> adds</c><00:03:58.400><c> a</c>

00:03:58.470 --> 00:03:58.480 align:start position:0%
newer patched version of the code adds a
 

00:03:58.480 --> 00:04:01.350 align:start position:0%
newer patched version of the code adds a
check<00:03:58.920><c> around</c><00:03:59.280><c> this</c><00:03:59.480><c> multiplication.</c><00:04:00.720><c> The</c><00:04:01.000><c> is</c>

00:04:01.350 --> 00:04:01.360 align:start position:0%
check around this multiplication. The is
 

00:04:01.360 --> 00:04:04.270 align:start position:0%
check around this multiplication. The is
mole<00:04:01.840><c> okay</c><00:04:02.360><c> that</c><00:04:02.480><c> we</c><00:04:02.600><c> see</c><00:04:02.840><c> here</c><00:04:03.520><c> is</c><00:04:03.680><c> an</c><00:04:03.840><c> integer</c>

00:04:04.270 --> 00:04:04.280 align:start position:0%
mole okay that we see here is an integer
 

00:04:04.280 --> 00:04:06.150 align:start position:0%
mole okay that we see here is an integer
overflow<00:04:04.640><c> check</c><00:04:05.200><c> that</c><00:04:05.360><c> ensures</c><00:04:05.920><c> that</c><00:04:06.040><c> the</c>

00:04:06.150 --> 00:04:06.160 align:start position:0%
overflow check that ensures that the
 

00:04:06.160 --> 00:04:08.070 align:start position:0%
overflow check that ensures that the
result<00:04:06.560><c> of</c><00:04:06.640><c> this</c><00:04:06.800><c> calculation</c><00:04:07.520><c> has</c><00:04:07.720><c> not</c>

00:04:08.070 --> 00:04:08.080 align:start position:0%
result of this calculation has not
 

00:04:08.080 --> 00:04:10.070 align:start position:0%
result of this calculation has not
wrapped<00:04:08.400><c> around</c><00:04:09.040><c> due</c><00:04:09.240><c> to</c><00:04:09.360><c> the</c><00:04:09.440><c> values</c><00:04:09.840><c> being</c>

00:04:10.070 --> 00:04:10.080 align:start position:0%
wrapped around due to the values being
 

00:04:10.080 --> 00:04:11.990 align:start position:0%
wrapped around due to the values being
too<00:04:10.320><c> large.</c><00:04:11.120><c> If</c><00:04:11.240><c> you're</c><00:04:11.360><c> unfamiliar</c><00:04:11.840><c> with</c>

00:04:11.990 --> 00:04:12.000 align:start position:0%
too large. If you're unfamiliar with
 

00:04:12.000 --> 00:04:13.510 align:start position:0%
too large. If you're unfamiliar with
integer<00:04:12.360><c> overflows,</c><00:04:12.920><c> let's</c><00:04:13.120><c> take</c><00:04:13.280><c> a</c><00:04:13.320><c> quick</c>

00:04:13.510 --> 00:04:13.520 align:start position:0%
integer overflows, let's take a quick
 

00:04:13.520 --> 00:04:15.510 align:start position:0%
integer overflows, let's take a quick
look<00:04:13.760><c> at</c><00:04:13.920><c> how</c><00:04:14.080><c> that</c><00:04:14.240><c> would</c><00:04:14.400><c> work.</c><00:04:15.040><c> Integers</c>

00:04:15.510 --> 00:04:15.520 align:start position:0%
look at how that would work. Integers
 

00:04:15.520 --> 00:04:17.870 align:start position:0%
look at how that would work. Integers
are<00:04:15.680><c> stored</c><00:04:16.160><c> as</c><00:04:16.400><c> binary</c><00:04:16.840><c> values,</c><00:04:17.480><c> and</c><00:04:17.640><c> in</c><00:04:17.720><c> this</c>

00:04:17.870 --> 00:04:17.880 align:start position:0%
are stored as binary values, and in this
 

00:04:17.880 --> 00:04:20.670 align:start position:0%
are stored as binary values, and in this
case,<00:04:18.400><c> 32-bit</c><00:04:19.239><c> binary</c><00:04:19.560><c> values.</c>

00:04:20.670 --> 00:04:20.680 align:start position:0%
case, 32-bit binary values.
 

00:04:20.680 --> 00:04:22.950 align:start position:0%
case, 32-bit binary values.
32-bits<00:04:21.400><c> means</c><00:04:21.720><c> that</c><00:04:21.840><c> the</c><00:04:22.000><c> largest</c><00:04:22.440><c> value</c><00:04:22.840><c> an</c>

00:04:22.950 --> 00:04:22.960 align:start position:0%
32-bits means that the largest value an
 

00:04:22.960 --> 00:04:25.990 align:start position:0%
32-bits means that the largest value an
integer<00:04:23.400><c> could</c><00:04:23.600><c> possibly</c><00:04:24.080><c> be</c><00:04:24.560><c> is</c><00:04:24.960><c> 4.29</c>

00:04:25.990 --> 00:04:26.000 align:start position:0%
integer could possibly be is 4.29
 

00:04:26.000 --> 00:04:28.230 align:start position:0%
integer could possibly be is 4.29
billion<00:04:26.360><c> or</c><00:04:26.440><c> so.</c><00:04:27.040><c> Or</c><00:04:27.200><c> in</c><00:04:27.280><c> hexadecimal,</c><00:04:28.000><c> this</c>

00:04:28.230 --> 00:04:28.240 align:start position:0%
billion or so. Or in hexadecimal, this
 

00:04:28.240 --> 00:04:31.110 align:start position:0%
billion or so. Or in hexadecimal, this
is<00:04:28.560><c> 0xFFFFFFFF.</c>

00:04:31.110 --> 00:04:31.120 align:start position:0%
is 0xFFFFFFFF.
 

00:04:31.120 --> 00:04:33.430 align:start position:0%
is 0xFFFFFFFF.
This<00:04:31.280><c> is</c><00:04:31.400><c> the</c><00:04:31.520><c> value</c><00:04:31.880><c> when</c><00:04:32.120><c> all</c><00:04:32.400><c> 32-bits</c><00:04:33.240><c> are</c>

00:04:33.430 --> 00:04:33.440 align:start position:0%
This is the value when all 32-bits are
 

00:04:33.440 --> 00:04:35.870 align:start position:0%
This is the value when all 32-bits are
set<00:04:33.720><c> to</c><00:04:33.880><c> one.</c><00:04:34.480><c> Now,</c><00:04:34.640><c> what</c><00:04:34.840><c> happens</c><00:04:35.320><c> if</c><00:04:35.480><c> we</c><00:04:35.600><c> have</c>

00:04:35.870 --> 00:04:35.880 align:start position:0%
set to one. Now, what happens if we have
 

00:04:35.880 --> 00:04:38.070 align:start position:0%
set to one. Now, what happens if we have
the<00:04:36.000><c> maximum</c><00:04:36.480><c> 32-bit</c><00:04:37.080><c> integer</c><00:04:37.400><c> value</c><00:04:37.880><c> and</c><00:04:38.000><c> we</c>

00:04:38.070 --> 00:04:38.080 align:start position:0%
the maximum 32-bit integer value and we
 

00:04:38.080 --> 00:04:40.630 align:start position:0%
the maximum 32-bit integer value and we
try<00:04:38.360><c> to</c><00:04:38.600><c> add</c><00:04:38.919><c> one</c><00:04:39.200><c> more,</c><00:04:39.480><c> for</c><00:04:39.600><c> example?</c><00:04:40.440><c> If</c><00:04:40.560><c> we</c>

00:04:40.630 --> 00:04:40.640 align:start position:0%
try to add one more, for example? If we
 

00:04:40.640 --> 00:04:43.430 align:start position:0%
try to add one more, for example? If we
look<00:04:40.800><c> at</c><00:04:40.880><c> it</c><00:04:41.000><c> in</c><00:04:41.120><c> decimal,</c><00:04:41.919><c> that</c><00:04:42.240><c> 4.29</c><00:04:43.120><c> billion</c>

00:04:43.430 --> 00:04:43.440 align:start position:0%
look at it in decimal, that 4.29 billion
 

00:04:43.440 --> 00:04:46.430 align:start position:0%
look at it in decimal, that 4.29 billion
number<00:04:44.080><c> becomes</c><00:04:44.560><c> 4.29</c><00:04:45.240><c> billion</c><00:04:45.720><c> and</c><00:04:45.960><c> just</c><00:04:46.240><c> one</c>

00:04:46.430 --> 00:04:46.440 align:start position:0%
number becomes 4.29 billion and just one
 

00:04:46.440 --> 00:04:49.350 align:start position:0%
number becomes 4.29 billion and just one
more,<00:04:47.080><c> ending</c><00:04:47.480><c> in</c><00:04:47.680><c> a</c><00:04:47.760><c> six</c><00:04:48.160><c> instead</c><00:04:48.400><c> of</c><00:04:48.520><c> a</c><00:04:48.560><c> five.</c>

00:04:49.350 --> 00:04:49.360 align:start position:0%
more, ending in a six instead of a five.
 

00:04:49.360 --> 00:04:50.510 align:start position:0%
more, ending in a six instead of a five.
But,<00:04:49.440><c> what</c><00:04:49.520><c> does</c><00:04:49.640><c> it</c><00:04:49.720><c> actually</c><00:04:50.000><c> look</c><00:04:50.160><c> like</c><00:04:50.400><c> in</c>

00:04:50.510 --> 00:04:50.520 align:start position:0%
But, what does it actually look like in
 

00:04:50.520 --> 00:04:52.630 align:start position:0%
But, what does it actually look like in
binary?<00:04:51.320><c> As</c><00:04:51.480><c> you</c><00:04:51.560><c> can</c><00:04:51.680><c> see,</c><00:04:52.000><c> the</c><00:04:52.200><c> binary</c>

00:04:52.630 --> 00:04:52.640 align:start position:0%
binary? As you can see, the binary
 

00:04:52.640 --> 00:04:54.310 align:start position:0%
binary? As you can see, the binary
representation<00:04:53.360><c> for</c><00:04:53.480><c> this</c><00:04:53.640><c> number</c><00:04:54.160><c> is</c>

00:04:54.310 --> 00:04:54.320 align:start position:0%
representation for this number is
 

00:04:54.320 --> 00:04:58.030 align:start position:0%
representation for this number is
actually<00:04:54.720><c> a</c><00:04:54.840><c> one</c><00:04:55.320><c> followed</c><00:04:55.800><c> by</c><00:04:56.000><c> 32</c><00:04:56.840><c> zero</c><00:04:57.240><c> bits.</c>

00:04:58.030 --> 00:04:58.040 align:start position:0%
actually a one followed by 32 zero bits.
 

00:04:58.040 --> 00:05:00.070 align:start position:0%
actually a one followed by 32 zero bits.
And<00:04:58.200><c> the</c><00:04:58.280><c> one</c><00:04:58.560><c> bit</c><00:04:58.800><c> that</c><00:04:58.960><c> was</c><00:04:59.080><c> actually</c><00:04:59.400><c> set</c><00:04:59.960><c> is</c>

00:05:00.070 --> 00:05:00.080 align:start position:0%
And the one bit that was actually set is
 

00:05:00.080 --> 00:05:03.230 align:start position:0%
And the one bit that was actually set is
now<00:05:00.400><c> outside</c><00:05:01.160><c> of</c><00:05:01.320><c> the</c><00:05:01.440><c> 32-bit</c><00:05:02.200><c> range.</c><00:05:02.960><c> So,</c><00:05:03.120><c> if</c>

00:05:03.230 --> 00:05:03.240 align:start position:0%
now outside of the 32-bit range. So, if
 

00:05:03.240 --> 00:05:05.270 align:start position:0%
now outside of the 32-bit range. So, if
a<00:05:03.280><c> piece</c><00:05:03.520><c> of</c><00:05:03.640><c> code</c><00:05:04.000><c> is</c><00:05:04.160><c> working</c><00:05:04.600><c> specifically</c>

00:05:05.270 --> 00:05:05.280 align:start position:0%
a piece of code is working specifically
 

00:05:05.280 --> 00:05:08.030 align:start position:0%
a piece of code is working specifically
with<00:05:05.480><c> 32-bit</c><00:05:06.280><c> unsigned</c><00:05:06.760><c> integers,</c><00:05:07.640><c> when</c><00:05:07.840><c> we</c>

00:05:08.030 --> 00:05:08.040 align:start position:0%
with 32-bit unsigned integers, when we
 

00:05:08.040 --> 00:05:10.870 align:start position:0%
with 32-bit unsigned integers, when we
add<00:05:08.360><c> one</c><00:05:08.840><c> to</c><00:05:08.960><c> the</c><00:05:09.040><c> maximum</c><00:05:09.640><c> 32-bit</c><00:05:10.200><c> value,</c><00:05:10.760><c> the</c>

00:05:10.870 --> 00:05:10.880 align:start position:0%
add one to the maximum 32-bit value, the
 

00:05:10.880 --> 00:05:12.710 align:start position:0%
add one to the maximum 32-bit value, the
variable<00:05:11.360><c> being</c><00:05:11.720><c> used</c><00:05:12.200><c> doesn't</c><00:05:12.480><c> actually</c>

00:05:12.710 --> 00:05:12.720 align:start position:0%
variable being used doesn't actually
 

00:05:12.720 --> 00:05:14.830 align:start position:0%
variable being used doesn't actually
have<00:05:12.880><c> a</c><00:05:12.960><c> way</c><00:05:13.280><c> to</c><00:05:13.440><c> store</c><00:05:13.800><c> that</c><00:05:14.040><c> extra</c><00:05:14.320><c> bit</c>

00:05:14.830 --> 00:05:14.840 align:start position:0%
have a way to store that extra bit
 

00:05:14.840 --> 00:05:17.150 align:start position:0%
have a way to store that extra bit
because<00:05:15.080><c> it's</c><00:05:15.280><c> outside</c><00:05:16.000><c> of</c><00:05:16.080><c> the</c><00:05:16.160><c> 32-bit</c><00:05:16.840><c> size</c>

00:05:17.150 --> 00:05:17.160 align:start position:0%
because it's outside of the 32-bit size
 

00:05:17.160 --> 00:05:18.830 align:start position:0%
because it's outside of the 32-bit size
of<00:05:17.280><c> the</c><00:05:17.360><c> variable</c><00:05:17.840><c> used.</c>

00:05:18.830 --> 00:05:18.840 align:start position:0%
of the variable used.
 

00:05:18.840 --> 00:05:20.190 align:start position:0%
of the variable used.
And<00:05:18.919><c> since</c><00:05:19.200><c> all</c><00:05:19.360><c> of</c><00:05:19.440><c> the</c><00:05:19.600><c> other</c><00:05:19.760><c> bits</c><00:05:20.080><c> have</c>

00:05:20.190 --> 00:05:20.200 align:start position:0%
And since all of the other bits have
 

00:05:20.200 --> 00:05:22.390 align:start position:0%
And since all of the other bits have
been<00:05:20.400><c> set</c><00:05:20.640><c> to</c><00:05:20.760><c> zero,</c><00:05:21.560><c> we</c><00:05:21.680><c> actually</c><00:05:22.000><c> end</c><00:05:22.240><c> up</c>

00:05:22.390 --> 00:05:22.400 align:start position:0%
been set to zero, we actually end up
 

00:05:22.400 --> 00:05:24.990 align:start position:0%
been set to zero, we actually end up
with<00:05:22.520><c> a</c><00:05:22.560><c> value</c><00:05:23.040><c> of</c><00:05:23.280><c> just</c><00:05:23.680><c> zero.</c><00:05:24.480><c> That</c><00:05:24.760><c> upper</c>

00:05:24.990 --> 00:05:25.000 align:start position:0%
with a value of just zero. That upper
 

00:05:25.000 --> 00:05:26.950 align:start position:0%
with a value of just zero. That upper
bit<00:05:25.320><c> gets</c><00:05:25.560><c> completely</c><00:05:26.080><c> lost,</c><00:05:26.760><c> and</c><00:05:26.880><c> our</c>

00:05:26.950 --> 00:05:26.960 align:start position:0%
bit gets completely lost, and our
 

00:05:26.960 --> 00:05:29.030 align:start position:0%
bit gets completely lost, and our
program<00:05:27.520><c> is</c><00:05:27.720><c> none</c><00:05:27.919><c> the</c><00:05:28.000><c> wiser.</c>

00:05:29.030 --> 00:05:29.040 align:start position:0%
program is none the wiser.
 

00:05:29.040 --> 00:05:31.150 align:start position:0%
program is none the wiser.
This<00:05:29.120><c> is</c><00:05:29.240><c> known</c><00:05:29.560><c> as</c><00:05:29.760><c> an</c><00:05:29.880><c> integer</c><00:05:30.240><c> overflow</c><00:05:30.840><c> or</c>

00:05:31.150 --> 00:05:31.160 align:start position:0%
This is known as an integer overflow or
 

00:05:31.160 --> 00:05:33.350 align:start position:0%
This is known as an integer overflow or
a<00:05:31.240><c> wrap</c><00:05:31.480><c> around.</c><00:05:32.280><c> By</c><00:05:32.520><c> adding</c><00:05:32.880><c> beyond</c><00:05:33.280><c> the</c>

00:05:33.350 --> 00:05:33.360 align:start position:0%
a wrap around. By adding beyond the
 

00:05:33.360 --> 00:05:35.590 align:start position:0%
a wrap around. By adding beyond the
maximum<00:05:33.800><c> value</c><00:05:34.160><c> for</c><00:05:34.280><c> a</c><00:05:34.360><c> given</c><00:05:34.640><c> integer,</c><00:05:35.480><c> we</c>

00:05:35.590 --> 00:05:35.600 align:start position:0%
maximum value for a given integer, we
 

00:05:35.600 --> 00:05:37.430 align:start position:0%
maximum value for a given integer, we
have<00:05:35.720><c> essentially</c><00:05:36.160><c> wrapped</c><00:05:36.560><c> back</c><00:05:36.800><c> around</c><00:05:37.320><c> to</c>

00:05:37.430 --> 00:05:37.440 align:start position:0%
have essentially wrapped back around to
 

00:05:37.440 --> 00:05:39.550 align:start position:0%
have essentially wrapped back around to
the<00:05:37.600><c> lowest</c><00:05:38.040><c> possible</c><00:05:38.360><c> value.</c><00:05:39.240><c> So,</c><00:05:39.360><c> if</c><00:05:39.480><c> we</c>

00:05:39.550 --> 00:05:39.560 align:start position:0%
the lowest possible value. So, if we
 

00:05:39.560 --> 00:05:41.230 align:start position:0%
the lowest possible value. So, if we
look<00:05:39.760><c> back</c><00:05:40.040><c> at</c><00:05:40.160><c> the</c><00:05:40.280><c> patch</c><00:05:40.640><c> diff</c><00:05:40.840><c> between</c><00:05:41.160><c> the</c>

00:05:41.230 --> 00:05:41.240 align:start position:0%
look back at the patch diff between the
 

00:05:41.240 --> 00:05:44.070 align:start position:0%
look back at the patch diff between the
two<00:05:41.400><c> versions,</c><00:05:42.040><c> we</c><00:05:42.160><c> can</c><00:05:42.280><c> see</c><00:05:42.440><c> the</c><00:05:42.560><c> 26.5</c><00:05:43.680><c> code</c>

00:05:44.070 --> 00:05:44.080 align:start position:0%
two versions, we can see the 26.5 code
 

00:05:44.080 --> 00:05:46.230 align:start position:0%
two versions, we can see the 26.5 code
has<00:05:44.360><c> added</c><00:05:44.720><c> a</c><00:05:44.800><c> new</c><00:05:45.040><c> check</c><00:05:45.440><c> that</c><00:05:45.560><c> will</c><00:05:45.680><c> detect</c>

00:05:46.230 --> 00:05:46.240 align:start position:0%
has added a new check that will detect
 

00:05:46.240 --> 00:05:48.470 align:start position:0%
has added a new check that will detect
this<00:05:46.440><c> type</c><00:05:46.760><c> of</c><00:05:46.960><c> integer</c><00:05:47.320><c> overflow</c><00:05:47.680><c> bug</c><00:05:48.240><c> on</c><00:05:48.400><c> the</c>

00:05:48.470 --> 00:05:48.480 align:start position:0%
this type of integer overflow bug on the
 

00:05:48.480 --> 00:05:50.590 align:start position:0%
this type of integer overflow bug on the
multiplication<00:05:49.200><c> that</c><00:05:49.320><c> takes</c><00:05:49.560><c> place</c><00:05:49.840><c> here.</c>

00:05:50.590 --> 00:05:50.600 align:start position:0%
multiplication that takes place here.
 

00:05:50.600 --> 00:05:52.470 align:start position:0%
multiplication that takes place here.
And<00:05:50.680><c> if</c><00:05:50.800><c> it</c><00:05:50.920><c> does</c><00:05:51.120><c> overflow,</c><00:05:51.920><c> it</c><00:05:52.040><c> will</c><00:05:52.160><c> bail</c>

00:05:52.470 --> 00:05:52.480 align:start position:0%
And if it does overflow, it will bail
 

00:05:52.480 --> 00:05:54.430 align:start position:0%
And if it does overflow, it will bail
out<00:05:52.640><c> of</c><00:05:52.760><c> the</c><00:05:52.840><c> decoding</c><00:05:53.240><c> operation</c><00:05:53.840><c> and</c><00:05:54.080><c> return</c>

00:05:54.430 --> 00:05:54.440 align:start position:0%
out of the decoding operation and return
 

00:05:54.440 --> 00:05:56.750 align:start position:0%
out of the decoding operation and return
an<00:05:54.600><c> error.</c><00:05:55.280><c> From</c><00:05:55.480><c> this,</c><00:05:55.800><c> we</c><00:05:55.960><c> can</c><00:05:56.160><c> gather</c><00:05:56.520><c> that</c>

00:05:56.750 --> 00:05:56.760 align:start position:0%
an error. From this, we can gather that
 

00:05:56.760 --> 00:05:58.750 align:start position:0%
an error. From this, we can gather that
on<00:05:56.920><c> the</c><00:05:57.080><c> prior</c><00:05:57.440><c> version,</c><00:05:58.080><c> if</c><00:05:58.280><c> an</c><00:05:58.400><c> integer</c>

00:05:58.750 --> 00:05:58.760 align:start position:0%
on the prior version, if an integer
 

00:05:58.760 --> 00:06:00.030 align:start position:0%
on the prior version, if an integer
overflow<00:05:59.120><c> occurred</c><00:05:59.720><c> during</c><00:05:59.960><c> the</c>

00:06:00.030 --> 00:06:00.040 align:start position:0%
overflow occurred during the
 

00:06:00.040 --> 00:06:02.110 align:start position:0%
overflow occurred during the
multiplication,<00:06:01.160><c> then</c><00:06:01.320><c> it</c><00:06:01.400><c> went</c><00:06:01.560><c> completely</c>

00:06:02.110 --> 00:06:02.120 align:start position:0%
multiplication, then it went completely
 

00:06:02.120 --> 00:06:04.630 align:start position:0%
multiplication, then it went completely
unnoticed<00:06:03.000><c> and</c><00:06:03.120><c> presumably</c><00:06:03.720><c> led</c><00:06:03.920><c> to</c><00:06:04.160><c> unwanted</c>

00:06:04.630 --> 00:06:04.640 align:start position:0%
unnoticed and presumably led to unwanted
 

00:06:04.640 --> 00:06:06.270 align:start position:0%
unnoticed and presumably led to unwanted
side<00:06:04.840><c> effects.</c><00:06:05.680><c> So,</c><00:06:05.800><c> at</c><00:06:05.880><c> this</c><00:06:06.000><c> point,</c><00:06:06.200><c> you</c>

00:06:06.270 --> 00:06:06.280 align:start position:0%
side effects. So, at this point, you
 

00:06:06.280 --> 00:06:07.750 align:start position:0%
side effects. So, at this point, you
might<00:06:06.400><c> be</c><00:06:06.480><c> thinking,</c><00:06:06.960><c> "Yeah,</c><00:06:07.200><c> I</c><00:06:07.320><c> understand</c>

00:06:07.750 --> 00:06:07.760 align:start position:0%
might be thinking, "Yeah, I understand
 

00:06:07.760 --> 00:06:09.470 align:start position:0%
might be thinking, "Yeah, I understand
how<00:06:07.920><c> an</c><00:06:08.000><c> integer</c><00:06:08.280><c> overflow</c><00:06:08.640><c> works,</c><00:06:09.120><c> but</c><00:06:09.360><c> it</c>

00:06:09.470 --> 00:06:09.480 align:start position:0%
how an integer overflow works, but it
 

00:06:09.480 --> 00:06:11.670 align:start position:0%
how an integer overflow works, but it
still<00:06:09.680><c> seems</c><00:06:10.000><c> pretty</c><00:06:10.280><c> uninteresting."</c>

00:06:11.670 --> 00:06:11.680 align:start position:0%
still seems pretty uninteresting."
 

00:06:11.680 --> 00:06:13.230 align:start position:0%
still seems pretty uninteresting."
How<00:06:11.800><c> could</c><00:06:11.960><c> something</c><00:06:12.280><c> like</c><00:06:12.520><c> a</c><00:06:12.600><c> single</c><00:06:13.000><c> bit</c>

00:06:13.230 --> 00:06:13.240 align:start position:0%
How could something like a single bit
 

00:06:13.240 --> 00:06:15.190 align:start position:0%
How could something like a single bit
going<00:06:13.480><c> over</c><00:06:13.680><c> the</c><00:06:13.760><c> maximum</c><00:06:14.160><c> size</c><00:06:14.640><c> cause</c><00:06:15.000><c> any</c>

00:06:15.190 --> 00:06:15.200 align:start position:0%
going over the maximum size cause any
 

00:06:15.200 --> 00:06:17.390 align:start position:0%
going over the maximum size cause any
real<00:06:15.400><c> issues?</c><00:06:16.240><c> It</c><00:06:16.440><c> is,</c><00:06:16.560><c> of</c><00:06:16.640><c> course,</c><00:06:16.960><c> all</c><00:06:17.160><c> about</c>

00:06:17.390 --> 00:06:17.400 align:start position:0%
real issues? It is, of course, all about
 

00:06:17.400 --> 00:06:19.270 align:start position:0%
real issues? It is, of course, all about
the<00:06:17.520><c> context</c><00:06:18.080><c> of</c><00:06:18.160><c> the</c><00:06:18.320><c> overflow,</c><00:06:18.960><c> and</c><00:06:19.120><c> more</c>

00:06:19.270 --> 00:06:19.280 align:start position:0%
the context of the overflow, and more
 

00:06:19.280 --> 00:06:21.750 align:start position:0%
the context of the overflow, and more
specifically,<00:06:19.960><c> what</c><00:06:20.120><c> the</c><00:06:20.240><c> code</c><00:06:20.600><c> does</c><00:06:20.840><c> next.</c>

00:06:21.750 --> 00:06:21.760 align:start position:0%
specifically, what the code does next.
 

00:06:21.760 --> 00:06:23.510 align:start position:0%
specifically, what the code does next.
As<00:06:21.919><c> we</c><00:06:22.000><c> discussed,</c><00:06:22.560><c> the</c><00:06:22.720><c> multiplication</c><00:06:23.400><c> in</c>

00:06:23.510 --> 00:06:23.520 align:start position:0%
As we discussed, the multiplication in
 

00:06:23.520 --> 00:06:25.270 align:start position:0%
As we discussed, the multiplication in
question<00:06:23.880><c> here</c><00:06:24.240><c> is</c><00:06:24.360><c> used</c><00:06:24.600><c> to</c><00:06:24.680><c> calculate</c><00:06:25.200><c> the</c>

00:06:25.270 --> 00:06:25.280 align:start position:0%
question here is used to calculate the
 

00:06:25.280 --> 00:06:28.030 align:start position:0%
question here is used to calculate the
size<00:06:25.840><c> to</c><00:06:26.000><c> use</c><00:06:26.320><c> in</c><00:06:26.480><c> a</c><00:06:26.560><c> buffer</c><00:06:26.919><c> allocation.</c><00:06:27.960><c> The</c>

00:06:28.030 --> 00:06:28.040 align:start position:0%
size to use in a buffer allocation. The
 

00:06:28.040 --> 00:06:30.230 align:start position:0%
size to use in a buffer allocation. The
buffer<00:06:28.360><c> will</c><00:06:28.480><c> be</c><00:06:28.640><c> allocated</c><00:06:29.160><c> using</c><00:06:29.560><c> malloc,</c>

00:06:30.230 --> 00:06:30.240 align:start position:0%
buffer will be allocated using malloc,
 

00:06:30.240 --> 00:06:32.390 align:start position:0%
buffer will be allocated using malloc,
and<00:06:30.440><c> malloc's</c><00:06:30.840><c> first</c><00:06:31.200><c> argument</c><00:06:31.680><c> is</c><00:06:31.800><c> the</c><00:06:31.919><c> size</c>

00:06:32.390 --> 00:06:32.400 align:start position:0%
and malloc's first argument is the size
 

00:06:32.400 --> 00:06:34.630 align:start position:0%
and malloc's first argument is the size
in<00:06:32.600><c> bytes</c><00:06:33.040><c> that</c><00:06:33.160><c> the</c><00:06:33.240><c> buffer</c><00:06:33.600><c> should</c><00:06:33.800><c> be.</c><00:06:34.600><c> So,</c>

00:06:34.630 --> 00:06:34.640 align:start position:0%
in bytes that the buffer should be. So,
 

00:06:34.640 --> 00:06:36.950 align:start position:0%
in bytes that the buffer should be. So,
if<00:06:34.720><c> we</c><00:06:34.840><c> had</c><00:06:34.960><c> an</c><00:06:35.080><c> image</c><00:06:35.400><c> of</c><00:06:35.600><c> 10</c><00:06:35.880><c> by</c><00:06:36.040><c> 10</c><00:06:36.320><c> pixels</c>

00:06:36.950 --> 00:06:36.960 align:start position:0%
if we had an image of 10 by 10 pixels
 

00:06:36.960 --> 00:06:39.230 align:start position:0%
if we had an image of 10 by 10 pixels
and<00:06:37.280><c> four</c><00:06:37.560><c> channels,</c><00:06:38.320><c> what</c><00:06:38.480><c> should</c><00:06:38.680><c> happen</c><00:06:39.080><c> is</c>

00:06:39.230 --> 00:06:39.240 align:start position:0%
and four channels, what should happen is
 

00:06:39.240 --> 00:06:40.630 align:start position:0%
and four channels, what should happen is
that<00:06:39.360><c> the</c><00:06:39.440><c> program</c><00:06:39.840><c> would</c><00:06:40.000><c> multiply</c><00:06:40.480><c> these</c>

00:06:40.630 --> 00:06:40.640 align:start position:0%
that the program would multiply these
 

00:06:40.640 --> 00:06:43.630 align:start position:0%
that the program would multiply these
values<00:06:41.000><c> together,</c><00:06:41.720><c> and</c><00:06:41.840><c> the</c><00:06:41.919><c> result</c><00:06:42.400><c> of</c><00:06:42.680><c> 400</c>

00:06:43.630 --> 00:06:43.640 align:start position:0%
values together, and the result of 400
 

00:06:43.640 --> 00:06:45.510 align:start position:0%
values together, and the result of 400
will<00:06:43.760><c> be</c><00:06:43.960><c> used</c><00:06:44.280><c> in</c><00:06:44.400><c> the</c><00:06:44.480><c> call</c><00:06:44.720><c> to</c><00:06:45.000><c> malloc</c><00:06:45.320><c> to</c>

00:06:45.510 --> 00:06:45.520 align:start position:0%
will be used in the call to malloc to
 

00:06:45.520 --> 00:06:47.950 align:start position:0%
will be used in the call to malloc to
allocate<00:06:45.960><c> a</c><00:06:46.040><c> buffer</c><00:06:46.360><c> of</c><00:06:46.520><c> 400</c><00:06:47.040><c> bytes.</c><00:06:47.840><c> The</c>

00:06:47.950 --> 00:06:47.960 align:start position:0%
allocate a buffer of 400 bytes. The
 

00:06:47.960 --> 00:06:49.630 align:start position:0%
allocate a buffer of 400 bytes. The
program<00:06:48.320><c> will</c><00:06:48.440><c> then</c><00:06:48.680><c> do</c><00:06:48.840><c> what</c><00:06:48.960><c> it</c><00:06:49.080><c> needs</c><00:06:49.320><c> to</c><00:06:49.440><c> do</c>

00:06:49.630 --> 00:06:49.640 align:start position:0%
program will then do what it needs to do
 

00:06:49.640 --> 00:06:51.750 align:start position:0%
program will then do what it needs to do
in<00:06:49.760><c> terms</c><00:06:50.080><c> of</c><00:06:50.200><c> copying</c><00:06:50.640><c> the</c><00:06:50.760><c> image</c><00:06:51.080><c> data</c><00:06:51.480><c> into</c>

00:06:51.750 --> 00:06:51.760 align:start position:0%
in terms of copying the image data into
 

00:06:51.760 --> 00:06:53.830 align:start position:0%
in terms of copying the image data into
this<00:06:51.919><c> buffer</c><00:06:52.360><c> and</c><00:06:52.720><c> continuing</c><00:06:53.280><c> the</c><00:06:53.400><c> decoding</c>

00:06:53.830 --> 00:06:53.840 align:start position:0%
this buffer and continuing the decoding
 

00:06:53.840 --> 00:06:55.990 align:start position:0%
this buffer and continuing the decoding
process.<00:06:54.720><c> But</c><00:06:54.919><c> what</c><00:06:55.040><c> if</c><00:06:55.160><c> we</c><00:06:55.280><c> had</c><00:06:55.440><c> an</c><00:06:55.600><c> image</c>

00:06:55.990 --> 00:06:56.000 align:start position:0%
process. But what if we had an image
 

00:06:56.000 --> 00:06:58.030 align:start position:0%
process. But what if we had an image
with<00:06:56.240><c> absurdly</c><00:06:56.880><c> large</c><00:06:57.440><c> width</c><00:06:57.640><c> and</c><00:06:57.760><c> height</c>

00:06:58.030 --> 00:06:58.040 align:start position:0%
with absurdly large width and height
 

00:06:58.040 --> 00:07:00.150 align:start position:0%
with absurdly large width and height
values?<00:06:58.840><c> What</c><00:06:59.080><c> if</c><00:06:59.360><c> the</c><00:06:59.520><c> width</c><00:06:59.760><c> and</c><00:06:59.919><c> height</c>

00:07:00.150 --> 00:07:00.160 align:start position:0%
values? What if the width and height
 

00:07:00.160 --> 00:07:02.190 align:start position:0%
values? What if the width and height
values<00:07:00.600><c> have</c><00:07:00.760><c> been</c><00:07:00.919><c> set</c><00:07:01.240><c> in</c><00:07:01.400><c> such</c><00:07:01.680><c> a</c><00:07:01.720><c> way</c><00:07:02.040><c> that</c>

00:07:02.190 --> 00:07:02.200 align:start position:0%
values have been set in such a way that
 

00:07:02.200 --> 00:07:04.070 align:start position:0%
values have been set in such a way that
when<00:07:02.360><c> multiplying</c><00:07:02.880><c> them</c><00:07:03.000><c> together,</c><00:07:03.680><c> we</c><00:07:03.840><c> reach</c>

00:07:04.070 --> 00:07:04.080 align:start position:0%
when multiplying them together, we reach
 

00:07:04.080 --> 00:07:06.470 align:start position:0%
when multiplying them together, we reach
a<00:07:04.160><c> value</c><00:07:04.520><c> that</c><00:07:04.720><c> falls</c><00:07:05.080><c> outside</c><00:07:05.680><c> of</c><00:07:05.760><c> the</c><00:07:05.840><c> 32-bit</c>

00:07:06.470 --> 00:07:06.480 align:start position:0%
a value that falls outside of the 32-bit
 

00:07:06.480 --> 00:07:08.230 align:start position:0%
a value that falls outside of the 32-bit
integer<00:07:06.840><c> limit,</c><00:07:07.400><c> and</c><00:07:07.520><c> the</c><00:07:07.600><c> result</c><00:07:07.960><c> of</c><00:07:08.080><c> that</c>

00:07:08.230 --> 00:07:08.240 align:start position:0%
integer limit, and the result of that
 

00:07:08.240 --> 00:07:10.470 align:start position:0%
integer limit, and the result of that
calculation<00:07:08.919><c> wraps</c><00:07:09.160><c> around</c><00:07:09.440><c> to</c><00:07:09.560><c> zero</c><00:07:10.200><c> due</c><00:07:10.400><c> to</c>

00:07:10.470 --> 00:07:10.480 align:start position:0%
calculation wraps around to zero due to
 

00:07:10.480 --> 00:07:11.950 align:start position:0%
calculation wraps around to zero due to
the<00:07:10.600><c> integer</c><00:07:10.919><c> overflow?</c>

00:07:11.950 --> 00:07:11.960 align:start position:0%
the integer overflow?
 

00:07:11.960 --> 00:07:14.350 align:start position:0%
the integer overflow?
This<00:07:12.120><c> is</c><00:07:12.240><c> exactly</c><00:07:12.720><c> the</c><00:07:12.800><c> problem.</c><00:07:13.720><c> The</c><00:07:13.800><c> decoder</c>

00:07:14.350 --> 00:07:14.360 align:start position:0%
This is exactly the problem. The decoder
 

00:07:14.360 --> 00:07:16.990 align:start position:0%
This is exactly the problem. The decoder
will<00:07:14.520><c> still</c><00:07:14.800><c> proceed</c><00:07:15.440><c> to</c><00:07:15.560><c> call</c><00:07:15.880><c> malloc.</c><00:07:16.919><c> And</c>

00:07:16.990 --> 00:07:17.000 align:start position:0%
will still proceed to call malloc. And
 

00:07:17.000 --> 00:07:18.909 align:start position:0%
will still proceed to call malloc. And
it<00:07:17.080><c> will</c><00:07:17.200><c> pass</c><00:07:17.560><c> this</c><00:07:17.800><c> incorrectly</c><00:07:18.360><c> calculated</c>

00:07:18.909 --> 00:07:18.919 align:start position:0%
it will pass this incorrectly calculated
 

00:07:18.919 --> 00:07:21.470 align:start position:0%
it will pass this incorrectly calculated
size<00:07:19.360><c> of</c><00:07:19.600><c> zero</c><00:07:20.240><c> to</c><00:07:20.360><c> the</c><00:07:20.480><c> call.</c>

00:07:21.470 --> 00:07:21.480 align:start position:0%
size of zero to the call.
 

00:07:21.480 --> 00:07:22.830 align:start position:0%
size of zero to the call.
Now,<00:07:21.680><c> I</c><00:07:21.760><c> would</c><00:07:21.880><c> have</c><00:07:22.000><c> actually</c><00:07:22.240><c> assumed</c><00:07:22.680><c> that</c>

00:07:22.830 --> 00:07:22.840 align:start position:0%
Now, I would have actually assumed that
 

00:07:22.840 --> 00:07:24.990 align:start position:0%
Now, I would have actually assumed that
calling<00:07:23.240><c> malloc</c><00:07:23.720><c> with</c><00:07:23.919><c> a</c><00:07:23.960><c> size</c><00:07:24.320><c> of</c><00:07:24.440><c> zero</c><00:07:24.840><c> would</c>

00:07:24.990 --> 00:07:25.000 align:start position:0%
calling malloc with a size of zero would
 

00:07:25.000 --> 00:07:27.230 align:start position:0%
calling malloc with a size of zero would
just<00:07:25.200><c> return</c><00:07:25.600><c> a</c><00:07:25.680><c> null</c><00:07:25.960><c> pointer,</c><00:07:26.720><c> or</c><00:07:26.960><c> in</c><00:07:27.080><c> other</c>

00:07:27.230 --> 00:07:27.240 align:start position:0%
just return a null pointer, or in other
 

00:07:27.240 --> 00:07:28.750 align:start position:0%
just return a null pointer, or in other
words,<00:07:27.480><c> would</c><00:07:27.640><c> fail</c><00:07:28.120><c> and</c><00:07:28.240><c> not</c><00:07:28.400><c> give</c><00:07:28.600><c> you</c><00:07:28.720><c> a</c>

00:07:28.750 --> 00:07:28.760 align:start position:0%
words, would fail and not give you a
 

00:07:28.760 --> 00:07:30.390 align:start position:0%
words, would fail and not give you a
buffer.<00:07:29.480><c> But</c><00:07:29.600><c> actually,</c><00:07:29.880><c> this</c><00:07:30.040><c> is</c><00:07:30.160><c> not</c><00:07:30.320><c> the</c>

00:07:30.390 --> 00:07:30.400 align:start position:0%
buffer. But actually, this is not the
 

00:07:30.400 --> 00:07:33.470 align:start position:0%
buffer. But actually, this is not the
case,<00:07:30.880><c> at</c><00:07:31.000><c> least</c><00:07:31.320><c> on</c><00:07:31.560><c> iOS</c><00:07:31.919><c> and</c><00:07:32.040><c> macOS.</c><00:07:33.120><c> Calling</c>

00:07:33.470 --> 00:07:33.480 align:start position:0%
case, at least on iOS and macOS. Calling
 

00:07:33.480 --> 00:07:35.470 align:start position:0%
case, at least on iOS and macOS. Calling
malloc<00:07:33.840><c> with</c><00:07:34.000><c> zero</c><00:07:34.520><c> still</c><00:07:34.840><c> allocates</c><00:07:35.400><c> some</c>

00:07:35.470 --> 00:07:35.480 align:start position:0%
malloc with zero still allocates some
 

00:07:35.480 --> 00:07:37.110 align:start position:0%
malloc with zero still allocates some
memory<00:07:35.760><c> for</c><00:07:35.919><c> you,</c><00:07:36.200><c> and</c><00:07:36.280><c> it</c><00:07:36.400><c> returns</c><00:07:36.760><c> a</c><00:07:36.800><c> pointer</c>

00:07:37.110 --> 00:07:37.120 align:start position:0%
memory for you, and it returns a pointer
 

00:07:37.120 --> 00:07:39.510 align:start position:0%
memory for you, and it returns a pointer
to<00:07:37.320><c> it.</c><00:07:38.080><c> It</c><00:07:38.160><c> just</c><00:07:38.360><c> defaults</c><00:07:38.840><c> to</c><00:07:39.040><c> using</c><00:07:39.400><c> the</c>

00:07:39.510 --> 00:07:39.520 align:start position:0%
to it. It just defaults to using the
 

00:07:39.520 --> 00:07:41.430 align:start position:0%
to it. It just defaults to using the
smallest<00:07:40.080><c> available</c><00:07:40.520><c> allocation</c><00:07:41.000><c> size,</c>

00:07:41.430 --> 00:07:41.440 align:start position:0%
smallest available allocation size,
 

00:07:41.440 --> 00:07:44.750 align:start position:0%
smallest available allocation size,
which<00:07:41.720><c> on</c><00:07:41.840><c> iOS</c><00:07:42.240><c> and</c><00:07:42.360><c> macOS</c><00:07:42.840><c> is</c><00:07:43.160><c> 16</c><00:07:43.680><c> bytes.</c>

00:07:44.750 --> 00:07:44.760 align:start position:0%
which on iOS and macOS is 16 bytes.
 

00:07:44.760 --> 00:07:46.110 align:start position:0%
which on iOS and macOS is 16 bytes.
So,<00:07:44.840><c> at</c><00:07:44.880><c> this</c><00:07:45.040><c> point,</c><00:07:45.320><c> the</c><00:07:45.440><c> issue</c><00:07:45.800><c> might</c><00:07:46.000><c> be</c>

00:07:46.110 --> 00:07:46.120 align:start position:0%
So, at this point, the issue might be
 

00:07:46.120 --> 00:07:47.590 align:start position:0%
So, at this point, the issue might be
more<00:07:46.280><c> obvious</c><00:07:46.560><c> to</c><00:07:46.720><c> you.</c>

00:07:47.590 --> 00:07:47.600 align:start position:0%
more obvious to you.
 

00:07:47.600 --> 00:07:49.070 align:start position:0%
more obvious to you.
If<00:07:47.680><c> we</c><00:07:47.760><c> have</c><00:07:47.880><c> an</c><00:07:47.960><c> image</c><00:07:48.240><c> file</c><00:07:48.480><c> with</c><00:07:48.600><c> enormous</c>

00:07:49.070 --> 00:07:49.080 align:start position:0%
If we have an image file with enormous
 

00:07:49.080 --> 00:07:50.750 align:start position:0%
If we have an image file with enormous
width<00:07:49.280><c> and</c><00:07:49.400><c> height</c><00:07:49.600><c> values,</c><00:07:50.400><c> due</c><00:07:50.560><c> to</c><00:07:50.680><c> the</c>

00:07:50.750 --> 00:07:50.760 align:start position:0%
width and height values, due to the
 

00:07:50.760 --> 00:07:52.670 align:start position:0%
width and height values, due to the
faulty<00:07:51.040><c> calculation,</c><00:07:51.880><c> the</c><00:07:51.960><c> decoder</c><00:07:52.480><c> will</c>

00:07:52.670 --> 00:07:52.680 align:start position:0%
faulty calculation, the decoder will
 

00:07:52.680 --> 00:07:55.830 align:start position:0%
faulty calculation, the decoder will
allocate<00:07:53.080><c> a</c><00:07:53.160><c> mere</c><00:07:53.480><c> 16</c><00:07:54.040><c> bytes</c><00:07:54.520><c> for</c><00:07:54.680><c> the</c><00:07:54.760><c> buffer.</c>

00:07:55.830 --> 00:07:55.840 align:start position:0%
allocate a mere 16 bytes for the buffer.
 

00:07:55.840 --> 00:07:57.950 align:start position:0%
allocate a mere 16 bytes for the buffer.
This<00:07:56.120><c> is</c><00:07:56.360><c> hugely</c><00:07:56.800><c> problematic</c><00:07:57.400><c> because</c><00:07:57.760><c> as</c>

00:07:57.950 --> 00:07:57.960 align:start position:0%
This is hugely problematic because as
 

00:07:57.960 --> 00:07:59.910 align:start position:0%
This is hugely problematic because as
soon<00:07:58.240><c> as</c><00:07:58.360><c> the</c><00:07:58.440><c> decoder</c><00:07:58.880><c> tries</c><00:07:59.240><c> to</c><00:07:59.400><c> copy</c><00:07:59.760><c> the</c>

00:07:59.910 --> 00:07:59.920 align:start position:0%
soon as the decoder tries to copy the
 

00:07:59.920 --> 00:08:02.030 align:start position:0%
soon as the decoder tries to copy the
image<00:08:00.240><c> data</c><00:08:00.640><c> into</c><00:08:00.960><c> the</c><00:08:01.040><c> buffer,</c><00:08:01.760><c> it</c><00:08:01.880><c> will</c>

00:08:02.030 --> 00:08:02.040 align:start position:0%
image data into the buffer, it will
 

00:08:02.040 --> 00:08:03.870 align:start position:0%
image data into the buffer, it will
almost<00:08:02.320><c> immediately</c><00:08:02.840><c> begin</c><00:08:03.160><c> writing</c><00:08:03.600><c> out</c><00:08:03.760><c> of</c>

00:08:03.870 --> 00:08:03.880 align:start position:0%
almost immediately begin writing out of
 

00:08:03.880 --> 00:08:05.750 align:start position:0%
almost immediately begin writing out of
bounds,<00:08:04.280><c> corrupting</c><00:08:04.880><c> adjacent</c><00:08:05.400><c> memory</c><00:08:05.680><c> in</c>

00:08:05.750 --> 00:08:05.760 align:start position:0%
bounds, corrupting adjacent memory in
 

00:08:05.760 --> 00:08:07.750 align:start position:0%
bounds, corrupting adjacent memory in
the<00:08:05.840><c> process</c><00:08:06.600><c> because</c><00:08:06.880><c> the</c><00:08:06.960><c> buffer</c><00:08:07.280><c> is</c><00:08:07.400><c> simply</c>

00:08:07.750 --> 00:08:07.760 align:start position:0%
the process because the buffer is simply
 

00:08:07.760 --> 00:08:09.550 align:start position:0%
the process because the buffer is simply
not<00:08:08.000><c> big</c><00:08:08.200><c> enough</c><00:08:08.560><c> for</c><00:08:08.680><c> the</c><00:08:08.760><c> data</c><00:08:09.160><c> that</c><00:08:09.320><c> it</c><00:08:09.400><c> was</c>

00:08:09.550 --> 00:08:09.560 align:start position:0%
not big enough for the data that it was
 

00:08:09.560 --> 00:08:11.910 align:start position:0%
not big enough for the data that it was
intended<00:08:10.080><c> to</c><00:08:10.160><c> hold.</c><00:08:11.120><c> This</c><00:08:11.280><c> is</c><00:08:11.360><c> known</c><00:08:11.680><c> as</c><00:08:11.840><c> a</c>

00:08:11.910 --> 00:08:11.920 align:start position:0%
intended to hold. This is known as a
 

00:08:11.920 --> 00:08:14.190 align:start position:0%
intended to hold. This is known as a
heap<00:08:12.240><c> buffer</c><00:08:12.560><c> overflow</c><00:08:12.880><c> vulnerability.</c><00:08:14.080><c> Up</c>

00:08:14.190 --> 00:08:14.200 align:start position:0%
heap buffer overflow vulnerability. Up
 

00:08:14.200 --> 00:08:15.790 align:start position:0%
heap buffer overflow vulnerability. Up
until<00:08:14.440><c> now,</c><00:08:14.680><c> this</c><00:08:14.840><c> has</c><00:08:14.960><c> all</c><00:08:15.080><c> been</c><00:08:15.360><c> theory</c>

00:08:15.790 --> 00:08:15.800 align:start position:0%
until now, this has all been theory
 

00:08:15.800 --> 00:08:17.390 align:start position:0%
until now, this has all been theory
based<00:08:16.120><c> on</c><00:08:16.280><c> reading</c><00:08:16.520><c> the</c><00:08:16.600><c> code</c><00:08:16.960><c> between</c><00:08:17.280><c> the</c>

00:08:17.390 --> 00:08:17.400 align:start position:0%
based on reading the code between the
 

00:08:17.400 --> 00:08:19.390 align:start position:0%
based on reading the code between the
two<00:08:17.640><c> iOS</c><00:08:17.960><c> versions.</c><00:08:18.840><c> But,</c><00:08:19.000><c> how</c><00:08:19.160><c> can</c><00:08:19.280><c> we</c>

00:08:19.390 --> 00:08:19.400 align:start position:0%
two iOS versions. But, how can we
 

00:08:19.400 --> 00:08:21.070 align:start position:0%
two iOS versions. But, how can we
actually<00:08:19.720><c> generate</c><00:08:20.120><c> a</c><00:08:20.200><c> real</c><00:08:20.520><c> image</c><00:08:20.800><c> file</c>

00:08:21.070 --> 00:08:21.080 align:start position:0%
actually generate a real image file
 

00:08:21.080 --> 00:08:22.909 align:start position:0%
actually generate a real image file
capable<00:08:21.520><c> of</c><00:08:21.680><c> triggering</c><00:08:22.160><c> this</c><00:08:22.400><c> integer</c><00:08:22.760><c> wrap</c>

00:08:22.909 --> 00:08:22.919 align:start position:0%
capable of triggering this integer wrap
 

00:08:22.919 --> 00:08:25.510 align:start position:0%
capable of triggering this integer wrap
around<00:08:23.400><c> and</c><00:08:23.640><c> subsequent</c><00:08:24.120><c> heap</c><00:08:24.360><c> overflow?</c>

00:08:25.510 --> 00:08:25.520 align:start position:0%
around and subsequent heap overflow?
 

00:08:25.520 --> 00:08:27.270 align:start position:0%
around and subsequent heap overflow?
First,<00:08:25.880><c> we'll</c><00:08:26.000><c> need</c><00:08:26.240><c> to</c><00:08:26.360><c> set</c><00:08:26.640><c> up</c><00:08:26.880><c> a</c><00:08:26.960><c> small</c>

00:08:27.270 --> 00:08:27.280 align:start position:0%
First, we'll need to set up a small
 

00:08:27.280 --> 00:08:29.310 align:start position:0%
First, we'll need to set up a small
program<00:08:27.880><c> that</c><00:08:28.080><c> will</c><00:08:28.200><c> actually</c><00:08:28.560><c> call</c><00:08:28.960><c> into</c>

00:08:29.310 --> 00:08:29.320 align:start position:0%
program that will actually call into
 

00:08:29.320 --> 00:08:31.390 align:start position:0%
program that will actually call into
ImageIO,<00:08:30.080><c> and</c><00:08:30.360><c> more</c><00:08:30.520><c> specifically,</c><00:08:31.320><c> the</c>

00:08:31.390 --> 00:08:31.400 align:start position:0%
ImageIO, and more specifically, the
 

00:08:31.400 --> 00:08:33.430 align:start position:0%
ImageIO, and more specifically, the
vulnerable<00:08:31.760><c> function</c><00:08:32.400><c> whenever</c><00:08:32.760><c> I</c><00:08:32.840><c> supply</c><00:08:33.280><c> an</c>

00:08:33.430 --> 00:08:33.440 align:start position:0%
vulnerable function whenever I supply an
 

00:08:33.440 --> 00:08:35.589 align:start position:0%
vulnerable function whenever I supply an
image<00:08:33.719><c> file.</c><00:08:34.400><c> I</c><00:08:34.520><c> built</c><00:08:34.800><c> a</c><00:08:34.880><c> simple</c><00:08:35.280><c> harness</c>

00:08:35.589 --> 00:08:35.599 align:start position:0%
image file. I built a simple harness
 

00:08:35.599 --> 00:08:37.670 align:start position:0%
image file. I built a simple harness
program<00:08:36.039><c> based</c><00:08:36.360><c> on</c><00:08:36.479><c> the</c><00:08:36.560><c> code</c><00:08:36.960><c> used</c><00:08:37.280><c> in</c><00:08:37.479><c> this</c>

00:08:37.670 --> 00:08:37.680 align:start position:0%
program based on the code used in this
 

00:08:37.680 --> 00:08:40.149 align:start position:0%
program based on the code used in this
blog<00:08:37.919><c> post</c><00:08:38.280><c> about</c><00:08:38.640><c> ImageIO</c><00:08:39.200><c> fuzzing,</c><00:08:40.080><c> and</c>

00:08:40.149 --> 00:08:40.159 align:start position:0%
blog post about ImageIO fuzzing, and
 

00:08:40.159 --> 00:08:41.709 align:start position:0%
blog post about ImageIO fuzzing, and
I'll<00:08:40.240><c> leave</c><00:08:40.400><c> the</c><00:08:40.479><c> link</c><00:08:40.680><c> down</c><00:08:40.800><c> below.</c>

00:08:41.709 --> 00:08:41.719 align:start position:0%
I'll leave the link down below.
 

00:08:41.719 --> 00:08:44.150 align:start position:0%
I'll leave the link down below.
Secondly,<00:08:42.240><c> we</c><00:08:42.360><c> of</c><00:08:42.479><c> course</c><00:08:42.760><c> need</c><00:08:43.000><c> a</c><00:08:43.120><c> real</c><00:08:43.560><c> EXR</c>

00:08:44.150 --> 00:08:44.160 align:start position:0%
Secondly, we of course need a real EXR
 

00:08:44.160 --> 00:08:46.510 align:start position:0%
Secondly, we of course need a real EXR
image<00:08:44.440><c> file</c><00:08:44.720><c> to</c><00:08:44.839><c> work</c><00:08:45.120><c> with.</c><00:08:45.920><c> I</c><00:08:46.000><c> started</c><00:08:46.360><c> by</c>

00:08:46.510 --> 00:08:46.520 align:start position:0%
image file to work with. I started by
 

00:08:46.520 --> 00:08:48.829 align:start position:0%
image file to work with. I started by
Googling<00:08:47.000><c> for</c><00:08:47.280><c> EXR</c><00:08:47.760><c> sample</c><00:08:48.120><c> images,</c><00:08:48.600><c> and</c><00:08:48.800><c> I</c>

00:08:48.829 --> 00:08:48.839 align:start position:0%
Googling for EXR sample images, and I
 

00:08:48.839 --> 00:08:50.990 align:start position:0%
Googling for EXR sample images, and I
downloaded<00:08:49.360><c> a</c><00:08:49.400><c> couple.</c><00:08:50.160><c> I</c><00:08:50.280><c> ran</c><00:08:50.480><c> these</c><00:08:50.720><c> through</c>

00:08:50.990 --> 00:08:51.000 align:start position:0%
downloaded a couple. I ran these through
 

00:08:51.000 --> 00:08:53.430 align:start position:0%
downloaded a couple. I ran these through
my<00:08:51.120><c> harness</c><00:08:51.480><c> program,</c><00:08:52.080><c> and</c><00:08:52.240><c> I</c><00:08:52.320><c> used</c><00:08:52.640><c> LLDB</c><00:08:53.240><c> to</c>

00:08:53.430 --> 00:08:53.440 align:start position:0%
my harness program, and I used LLDB to
 

00:08:53.440 --> 00:08:54.790 align:start position:0%
my harness program, and I used LLDB to
set<00:08:53.640><c> a</c><00:08:53.720><c> breakpoint</c><00:08:54.240><c> on</c><00:08:54.360><c> the</c><00:08:54.440><c> vulnerable</c>

00:08:54.790 --> 00:08:54.800 align:start position:0%
set a breakpoint on the vulnerable
 

00:08:54.800 --> 00:08:56.430 align:start position:0%
set a breakpoint on the vulnerable
function<00:08:55.320><c> to</c><00:08:55.520><c> confirm</c><00:08:56.000><c> that</c><00:08:56.160><c> I</c><00:08:56.240><c> was</c>

00:08:56.430 --> 00:08:56.440 align:start position:0%
function to confirm that I was
 

00:08:56.440 --> 00:08:58.750 align:start position:0%
function to confirm that I was
triggering<00:08:56.920><c> the</c><00:08:57.040><c> correct</c><00:08:57.440><c> code</c><00:08:57.680><c> path.</c><00:08:58.520><c> Here,</c>

00:08:58.750 --> 00:08:58.760 align:start position:0%
triggering the correct code path. Here,
 

00:08:58.760 --> 00:09:01.070 align:start position:0%
triggering the correct code path. Here,
I<00:08:58.880><c> ran</c><00:08:59.200><c> into</c><00:08:59.440><c> a</c><00:08:59.520><c> small</c><00:08:59.839><c> issue.</c><00:09:00.560><c> While</c><00:09:00.760><c> I</c><00:09:00.839><c> was</c>

00:09:01.070 --> 00:09:01.080 align:start position:0%
I ran into a small issue. While I was
 

00:09:01.080 --> 00:09:02.510 align:start position:0%
I ran into a small issue. While I was
hitting<00:09:01.280><c> the</c><00:09:01.400><c> vulnerable</c><00:09:01.720><c> function,</c><00:09:02.280><c> I</c><00:09:02.360><c> was</c>

00:09:02.510 --> 00:09:02.520 align:start position:0%
hitting the vulnerable function, I was
 

00:09:02.520 --> 00:09:03.910 align:start position:0%
hitting the vulnerable function, I was
never<00:09:02.760><c> actually</c><00:09:03.040><c> reaching</c><00:09:03.440><c> the</c><00:09:03.600><c> buggy</c>

00:09:03.910 --> 00:09:03.920 align:start position:0%
never actually reaching the buggy
 

00:09:03.920 --> 00:09:05.950 align:start position:0%
never actually reaching the buggy
calculation<00:09:04.520><c> code</c><00:09:04.920><c> because</c><00:09:05.240><c> that</c><00:09:05.480><c> block</c><00:09:05.839><c> was</c>

00:09:05.950 --> 00:09:05.960 align:start position:0%
calculation code because that block was
 

00:09:05.960 --> 00:09:08.750 align:start position:0%
calculation code because that block was
actually<00:09:06.280><c> guarded</c><00:09:06.839><c> by</c><00:09:07.000><c> this</c><00:09:07.440><c> decode</c><00:09:08.080><c> to</c><00:09:08.280><c> STR</c>

00:09:08.750 --> 00:09:08.760 align:start position:0%
actually guarded by this decode to STR
 

00:09:08.760 --> 00:09:10.910 align:start position:0%
actually guarded by this decode to STR
flag<00:09:09.080><c> check.</c><00:09:09.960><c> I</c><00:09:10.000><c> did</c><00:09:10.160><c> some</c><00:09:10.320><c> digging,</c><00:09:10.680><c> and</c><00:09:10.839><c> I</c>

00:09:10.910 --> 00:09:10.920 align:start position:0%
flag check. I did some digging, and I
 

00:09:10.920 --> 00:09:13.070 align:start position:0%
flag check. I did some digging, and I
tried<00:09:11.240><c> to</c><00:09:11.320><c> use</c><00:09:11.520><c> a</c><00:09:11.600><c> bunch</c><00:09:11.880><c> of</c><00:09:12.040><c> other</c><00:09:12.320><c> EXR</c><00:09:12.800><c> image</c>

00:09:13.070 --> 00:09:13.080 align:start position:0%
tried to use a bunch of other EXR image
 

00:09:13.080 --> 00:09:14.990 align:start position:0%
tried to use a bunch of other EXR image
samples<00:09:13.480><c> to</c><00:09:13.600><c> see</c><00:09:13.800><c> if</c><00:09:13.960><c> they</c><00:09:14.120><c> would</c><00:09:14.280><c> hit</c><00:09:14.480><c> it,</c><00:09:14.839><c> but</c>

00:09:14.990 --> 00:09:15.000 align:start position:0%
samples to see if they would hit it, but
 

00:09:15.000 --> 00:09:16.350 align:start position:0%
samples to see if they would hit it, but
eventually<00:09:15.440><c> I</c><00:09:15.480><c> discovered</c><00:09:15.920><c> that</c><00:09:16.040><c> this</c><00:09:16.240><c> was</c>

00:09:16.350 --> 00:09:16.360 align:start position:0%
eventually I discovered that this was
 

00:09:16.360 --> 00:09:18.310 align:start position:0%
eventually I discovered that this was
actually<00:09:16.680><c> an</c><00:09:16.880><c> option</c><00:09:17.280><c> that</c><00:09:17.440><c> you</c><00:09:17.560><c> configure</c><00:09:18.160><c> in</c>

00:09:18.310 --> 00:09:18.320 align:start position:0%
actually an option that you configure in
 

00:09:18.320 --> 00:09:20.230 align:start position:0%
actually an option that you configure in
the<00:09:18.440><c> dictionary</c><00:09:18.960><c> that</c><00:09:19.120><c> I</c><00:09:19.160><c> was</c><00:09:19.360><c> passing</c><00:09:19.920><c> into</c>

00:09:20.230 --> 00:09:20.240 align:start position:0%
the dictionary that I was passing into
 

00:09:20.240 --> 00:09:22.510 align:start position:0%
the dictionary that I was passing into
the<00:09:20.360><c> original</c><00:09:20.800><c> decoding</c><00:09:21.320><c> function.</c><00:09:22.320><c> So,</c><00:09:22.480><c> I</c>

00:09:22.510 --> 00:09:22.520 align:start position:0%
the original decoding function. So, I
 

00:09:22.520 --> 00:09:24.310 align:start position:0%
the original decoding function. So, I
had<00:09:22.720><c> to</c><00:09:22.839><c> amend</c><00:09:23.320><c> the</c><00:09:23.440><c> harness</c><00:09:23.720><c> program</c><00:09:24.160><c> to</c>

00:09:24.310 --> 00:09:24.320 align:start position:0%
had to amend the harness program to
 

00:09:24.320 --> 00:09:26.670 align:start position:0%
had to amend the harness program to
include<00:09:24.880><c> this</c><00:09:25.160><c> decode</c><00:09:25.680><c> request</c><00:09:26.080><c> key</c><00:09:26.480><c> and</c><00:09:26.600><c> a</c>

00:09:26.670 --> 00:09:26.680 align:start position:0%
include this decode request key and a
 

00:09:26.680 --> 00:09:30.470 align:start position:0%
include this decode request key and a
value<00:09:27.160><c> of</c><00:09:27.760><c> CGImageSourceDecodeToSTR</c>

00:09:30.470 --> 00:09:30.480 align:start position:0%
value of CGImageSourceDecodeToSTR
 

00:09:30.480 --> 00:09:32.470 align:start position:0%
value of CGImageSourceDecodeToSTR
to<00:09:30.600><c> tell</c><00:09:30.839><c> ImageIO</c><00:09:31.360><c> to</c><00:09:31.520><c> follow</c><00:09:31.839><c> this</c><00:09:32.000><c> specific</c>

00:09:32.470 --> 00:09:32.480 align:start position:0%
to tell ImageIO to follow this specific
 

00:09:32.480 --> 00:09:34.829 align:start position:0%
to tell ImageIO to follow this specific
block.<00:09:33.320><c> With</c><00:09:33.480><c> that,</c><00:09:33.800><c> I</c><00:09:33.920><c> reran</c><00:09:34.320><c> the</c><00:09:34.400><c> harness</c>

00:09:34.829 --> 00:09:34.839 align:start position:0%
block. With that, I reran the harness
 

00:09:34.839 --> 00:09:36.950 align:start position:0%
block. With that, I reran the harness
under<00:09:35.080><c> LLDB,</c><00:09:35.760><c> and</c><00:09:35.920><c> this</c><00:09:36.080><c> time</c><00:09:36.320><c> my</c><00:09:36.480><c> breakpoint</c>

00:09:36.950 --> 00:09:36.960 align:start position:0%
under LLDB, and this time my breakpoint
 

00:09:36.960 --> 00:09:39.150 align:start position:0%
under LLDB, and this time my breakpoint
was<00:09:37.080><c> hit</c><00:09:37.360><c> successfully.</c><00:09:38.560><c> So,</c><00:09:38.680><c> we</c><00:09:38.800><c> have</c><00:09:38.920><c> a</c><00:09:39.000><c> way</c>

00:09:39.150 --> 00:09:39.160 align:start position:0%
was hit successfully. So, we have a way
 

00:09:39.160 --> 00:09:40.790 align:start position:0%
was hit successfully. So, we have a way
to<00:09:39.400><c> reach</c><00:09:39.680><c> the</c><00:09:39.800><c> vulnerable</c><00:09:40.200><c> calculation</c>

00:09:40.790 --> 00:09:40.800 align:start position:0%
to reach the vulnerable calculation
 

00:09:40.800 --> 00:09:42.750 align:start position:0%
to reach the vulnerable calculation
code.<00:09:41.440><c> Now,</c><00:09:41.640><c> it</c><00:09:41.720><c> just</c><00:09:41.880><c> becomes</c><00:09:42.200><c> a</c><00:09:42.280><c> challenge</c>

00:09:42.750 --> 00:09:42.760 align:start position:0%
code. Now, it just becomes a challenge
 

00:09:42.760 --> 00:09:45.190 align:start position:0%
code. Now, it just becomes a challenge
of<00:09:42.920><c> generating</c><00:09:43.560><c> an</c><00:09:43.720><c> EXR</c><00:09:44.200><c> image</c><00:09:44.640><c> with</c><00:09:44.840><c> a</c><00:09:44.920><c> width</c>

00:09:45.190 --> 00:09:45.200 align:start position:0%
of generating an EXR image with a width
 

00:09:45.200 --> 00:09:47.550 align:start position:0%
of generating an EXR image with a width
and<00:09:45.360><c> height</c><00:09:45.680><c> that</c><00:09:45.840><c> result</c><00:09:46.240><c> in</c><00:09:46.400><c> this</c><00:09:46.560><c> overflow.</c>

00:09:47.550 --> 00:09:47.560 align:start position:0%
and height that result in this overflow.
 

00:09:47.560 --> 00:09:49.790 align:start position:0%
and height that result in this overflow.
Upon<00:09:47.880><c> minimal</c><00:09:48.160><c> investigation</c><00:09:48.920><c> into</c><00:09:49.160><c> the</c><00:09:49.320><c> EXR</c>

00:09:49.790 --> 00:09:49.800 align:start position:0%
Upon minimal investigation into the EXR
 

00:09:49.800 --> 00:09:51.510 align:start position:0%
Upon minimal investigation into the EXR
format<00:09:50.280><c> and</c><00:09:50.480><c> specifically</c><00:09:51.080><c> the</c><00:09:51.280><c> header</c>

00:09:51.510 --> 00:09:51.520 align:start position:0%
format and specifically the header
 

00:09:51.520 --> 00:09:53.470 align:start position:0%
format and specifically the header
fields<00:09:51.880><c> that</c><00:09:52.000><c> it</c><00:09:52.120><c> uses,</c><00:09:52.760><c> I</c><00:09:52.840><c> discovered</c><00:09:53.320><c> that</c>

00:09:53.470 --> 00:09:53.480 align:start position:0%
fields that it uses, I discovered that
 

00:09:53.480 --> 00:09:55.230 align:start position:0%
fields that it uses, I discovered that
the<00:09:53.640><c> width</c><00:09:53.880><c> and</c><00:09:54.000><c> height</c><00:09:54.200><c> values</c><00:09:54.640><c> for</c><00:09:54.760><c> the</c><00:09:54.920><c> data</c>

00:09:55.230 --> 00:09:55.240 align:start position:0%
the width and height values for the data
 

00:09:55.240 --> 00:09:57.510 align:start position:0%
the width and height values for the data
window<00:09:55.960><c> were</c><00:09:56.080><c> defined</c><00:09:56.560><c> as</c><00:09:56.760><c> constants</c><00:09:57.280><c> right</c>

00:09:57.510 --> 00:09:57.520 align:start position:0%
window were defined as constants right
 

00:09:57.520 --> 00:09:59.030 align:start position:0%
window were defined as constants right
here<00:09:57.720><c> within</c><00:09:57.920><c> the</c><00:09:58.000><c> file.</c>

00:09:59.030 --> 00:09:59.040 align:start position:0%
here within the file.
 

00:09:59.040 --> 00:10:00.390 align:start position:0%
here within the file.
So,<00:09:59.120><c> my</c><00:09:59.240><c> initial</c><00:09:59.560><c> approach</c><00:09:59.960><c> was</c><00:10:00.080><c> to</c><00:10:00.200><c> just</c>

00:10:00.390 --> 00:10:00.400 align:start position:0%
So, my initial approach was to just
 

00:10:00.400 --> 00:10:03.150 align:start position:0%
So, my initial approach was to just
modify<00:10:00.920><c> a</c><00:10:01.040><c> legitimate</c><00:10:01.600><c> EXR</c><00:10:02.040><c> file</c><00:10:02.440><c> inside</c><00:10:03.040><c> a</c>

00:10:03.150 --> 00:10:03.160 align:start position:0%
modify a legitimate EXR file inside a
 

00:10:03.160 --> 00:10:04.790 align:start position:0%
modify a legitimate EXR file inside a
hex<00:10:03.440><c> editor</c><00:10:03.920><c> to</c><00:10:04.040><c> change</c><00:10:04.400><c> the</c><00:10:04.480><c> width</c><00:10:04.680><c> and</c>

00:10:04.790 --> 00:10:04.800 align:start position:0%
hex editor to change the width and
 

00:10:04.800 --> 00:10:06.950 align:start position:0%
hex editor to change the width and
height<00:10:05.160><c> to</c><00:10:05.320><c> something</c><00:10:05.680><c> very</c><00:10:05.880><c> large.</c>

00:10:06.950 --> 00:10:06.960 align:start position:0%
height to something very large.
 

00:10:06.960 --> 00:10:08.190 align:start position:0%
height to something very large.
I<00:10:07.000><c> did</c><00:10:07.240><c> this,</c><00:10:07.480><c> and</c><00:10:07.600><c> I</c><00:10:07.640><c> tried</c><00:10:07.880><c> to</c><00:10:07.960><c> run</c><00:10:08.120><c> it</c>

00:10:08.190 --> 00:10:08.200 align:start position:0%
I did this, and I tried to run it
 

00:10:08.200 --> 00:10:10.030 align:start position:0%
I did this, and I tried to run it
through<00:10:08.360><c> the</c><00:10:08.440><c> harness</c><00:10:08.760><c> again.</c><00:10:09.600><c> However,</c><00:10:09.920><c> as</c>

00:10:10.030 --> 00:10:10.040 align:start position:0%
through the harness again. However, as
 

00:10:10.040 --> 00:10:11.910 align:start position:0%
through the harness again. However, as
you<00:10:10.120><c> can</c><00:10:10.240><c> see</c><00:10:10.400><c> from</c><00:10:10.560><c> this</c><00:10:10.760><c> error</c><00:10:11.000><c> right</c><00:10:11.240><c> here,</c>

00:10:11.910 --> 00:10:11.920 align:start position:0%
you can see from this error right here,
 

00:10:11.920 --> 00:10:14.190 align:start position:0%
you can see from this error right here,
ImageIO<00:10:12.640><c> had</c><00:10:12.720><c> actually</c><00:10:13.000><c> bailed</c><00:10:13.400><c> out</c><00:10:13.600><c> early</c><00:10:14.040><c> as</c>

00:10:14.190 --> 00:10:14.200 align:start position:0%
ImageIO had actually bailed out early as
 

00:10:14.200 --> 00:10:15.950 align:start position:0%
ImageIO had actually bailed out early as
it<00:10:14.320><c> considered</c><00:10:14.720><c> the</c><00:10:14.840><c> EXR</c><00:10:15.320><c> file</c><00:10:15.640><c> to</c><00:10:15.760><c> be</c>

00:10:15.950 --> 00:10:15.960 align:start position:0%
it considered the EXR file to be
 

00:10:15.960 --> 00:10:18.150 align:start position:0%
it considered the EXR file to be
corrupted.<00:10:16.920><c> So,</c><00:10:17.200><c> it</c><00:10:17.360><c> seemed</c><00:10:17.600><c> that</c><00:10:17.760><c> changing</c>

00:10:18.150 --> 00:10:18.160 align:start position:0%
corrupted. So, it seemed that changing
 

00:10:18.160 --> 00:10:19.710 align:start position:0%
corrupted. So, it seemed that changing
the<00:10:18.240><c> width</c><00:10:18.440><c> and</c><00:10:18.520><c> height</c><00:10:18.720><c> values</c><00:10:19.080><c> alone</c><00:10:19.520><c> wasn't</c>

00:10:19.710 --> 00:10:19.720 align:start position:0%
the width and height values alone wasn't
 

00:10:19.720 --> 00:10:21.590 align:start position:0%
the width and height values alone wasn't
going<00:10:19.840><c> to</c><00:10:19.920><c> work.</c><00:10:20.840><c> I</c><00:10:20.920><c> probably</c><00:10:21.240><c> needed</c><00:10:21.480><c> to</c>

00:10:21.590 --> 00:10:21.600 align:start position:0%
going to work. I probably needed to
 

00:10:21.600 --> 00:10:24.510 align:start position:0%
going to work. I probably needed to
generate<00:10:22.000><c> my</c><00:10:22.240><c> own</c><00:10:22.520><c> EXR</c><00:10:22.920><c> from</c><00:10:23.080><c> scratch</c><00:10:23.480><c> somehow</c>

00:10:24.510 --> 00:10:24.520 align:start position:0%
generate my own EXR from scratch somehow
 

00:10:24.520 --> 00:10:26.670 align:start position:0%
generate my own EXR from scratch somehow
so<00:10:24.680><c> that</c><00:10:24.840><c> the</c><00:10:25.000><c> pixel</c><00:10:25.320><c> data</c><00:10:25.760><c> was</c><00:10:26.000><c> still</c><00:10:26.200><c> in</c><00:10:26.360><c> line</c>

00:10:26.670 --> 00:10:26.680 align:start position:0%
so that the pixel data was still in line
 

00:10:26.680 --> 00:10:28.470 align:start position:0%
so that the pixel data was still in line
with<00:10:26.800><c> the</c><00:10:27.000><c> defined</c><00:10:27.440><c> width</c><00:10:27.640><c> and</c><00:10:27.760><c> height.</c><00:10:28.360><c> I</c>

00:10:28.470 --> 00:10:28.480 align:start position:0%
with the defined width and height. I
 

00:10:28.480 --> 00:10:30.590 align:start position:0%
with the defined width and height. I
asked<00:10:28.840><c> Claude</c><00:10:29.320><c> to</c><00:10:29.600><c> write</c><00:10:29.880><c> a</c><00:10:29.960><c> short</c><00:10:30.240><c> Python</c>

00:10:30.590 --> 00:10:30.600 align:start position:0%
asked Claude to write a short Python
 

00:10:30.600 --> 00:10:32.110 align:start position:0%
asked Claude to write a short Python
script<00:10:30.880><c> to</c><00:10:30.960><c> do</c><00:10:31.120><c> this,</c><00:10:31.480><c> and</c><00:10:31.720><c> this</c><00:10:31.840><c> actually</c>

00:10:32.110 --> 00:10:32.120 align:start position:0%
script to do this, and this actually
 

00:10:32.120 --> 00:10:34.190 align:start position:0%
script to do this, and this actually
worked<00:10:32.480><c> right</c><00:10:32.680><c> out</c><00:10:32.800><c> of</c><00:10:32.880><c> the</c><00:10:32.960><c> box.</c><00:10:33.800><c> It</c><00:10:33.920><c> built</c><00:10:34.160><c> a</c>

00:10:34.190 --> 00:10:34.200 align:start position:0%
worked right out of the box. It built a
 

00:10:34.200 --> 00:10:35.710 align:start position:0%
worked right out of the box. It built a
very<00:10:34.400><c> simple</c><00:10:34.680><c> script</c><00:10:35.080><c> that</c><00:10:35.240><c> manually</c>

00:10:35.710 --> 00:10:35.720 align:start position:0%
very simple script that manually
 

00:10:35.720 --> 00:10:37.710 align:start position:0%
very simple script that manually
constructs<00:10:36.360><c> the</c><00:10:36.480><c> header</c><00:10:36.720><c> fields</c><00:10:37.080><c> of</c><00:10:37.200><c> an</c><00:10:37.320><c> EXR</c>

00:10:37.710 --> 00:10:37.720 align:start position:0%
constructs the header fields of an EXR
 

00:10:37.720 --> 00:10:39.790 align:start position:0%
constructs the header fields of an EXR
file,<00:10:38.440><c> and</c><00:10:38.560><c> then</c><00:10:38.680><c> appends</c><00:10:39.200><c> the</c><00:10:39.280><c> appropriate</c>

00:10:39.790 --> 00:10:39.800 align:start position:0%
file, and then appends the appropriate
 

00:10:39.800 --> 00:10:41.550 align:start position:0%
file, and then appends the appropriate
pixel<00:10:40.120><c> data</c><00:10:40.440><c> based</c><00:10:40.800><c> on</c><00:10:40.880><c> the</c><00:10:40.960><c> width</c><00:10:41.200><c> and</c><00:10:41.320><c> height</c>

00:10:41.550 --> 00:10:41.560 align:start position:0%
pixel data based on the width and height
 

00:10:41.560 --> 00:10:42.790 align:start position:0%
pixel data based on the width and height
of<00:10:41.640><c> the</c><00:10:41.760><c> image.</c>

00:10:42.790 --> 00:10:42.800 align:start position:0%
of the image.
 

00:10:42.800 --> 00:10:44.110 align:start position:0%
of the image.
So,<00:10:42.880><c> with</c><00:10:43.040><c> this,</c><00:10:43.360><c> I</c><00:10:43.440><c> could</c><00:10:43.640><c> configure</c><00:10:44.040><c> the</c>

00:10:44.110 --> 00:10:44.120 align:start position:0%
So, with this, I could configure the
 

00:10:44.120 --> 00:10:45.790 align:start position:0%
So, with this, I could configure the
values<00:10:44.560><c> used</c><00:10:44.880><c> for</c><00:10:44.960><c> the</c><00:10:45.040><c> width</c><00:10:45.280><c> and</c><00:10:45.400><c> height,</c>

00:10:45.790 --> 00:10:45.800 align:start position:0%
values used for the width and height,
 

00:10:45.800 --> 00:10:47.190 align:start position:0%
values used for the width and height,
and<00:10:45.960><c> the</c><00:10:46.080><c> script</c><00:10:46.560><c> would</c><00:10:46.680><c> generate</c><00:10:47.160><c> a</c>

00:10:47.190 --> 00:10:47.200 align:start position:0%
and the script would generate a
 

00:10:47.200 --> 00:10:49.070 align:start position:0%
and the script would generate a
non-corrupt<00:10:48.040><c> output</c><00:10:48.360><c> image</c><00:10:48.680><c> that</c><00:10:48.800><c> I</c><00:10:48.880><c> could</c>

00:10:49.070 --> 00:10:49.080 align:start position:0%
non-corrupt output image that I could
 

00:10:49.080 --> 00:10:51.110 align:start position:0%
non-corrupt output image that I could
run<00:10:49.280><c> through</c><00:10:49.480><c> the</c><00:10:49.560><c> decoder.</c><00:10:50.520><c> In</c><00:10:50.640><c> the</c><00:10:50.760><c> end,</c>

00:10:51.110 --> 00:10:51.120 align:start position:0%
run through the decoder. In the end,
 

00:10:51.120 --> 00:10:52.910 align:start position:0%
run through the decoder. In the end,
this<00:10:51.360><c> is</c><00:10:51.520><c> the</c><00:10:51.640><c> proof-of-concept</c><00:10:52.360><c> image</c><00:10:52.720><c> that</c>

00:10:52.910 --> 00:10:52.920 align:start position:0%
this is the proof-of-concept image that
 

00:10:52.920 --> 00:10:55.310 align:start position:0%
this is the proof-of-concept image that
I<00:10:52.960><c> managed</c><00:10:53.240><c> to</c><00:10:53.320><c> generate.</c><00:10:54.280><c> It</c><00:10:54.360><c> has</c><00:10:54.520><c> a</c><00:10:54.600><c> width</c><00:10:55.040><c> of</c>

00:10:55.310 --> 00:10:55.320 align:start position:0%
I managed to generate. It has a width of
 

00:10:55.320 --> 00:10:58.710 align:start position:0%
I managed to generate. It has a width of
hex<00:10:55.640><c> 4000</c><00:10:56.560><c> and</c><00:10:56.680><c> a</c><00:10:56.760><c> height</c><00:10:57.120><c> of</c><00:10:57.360><c> hex</c><00:10:57.680><c> 10000</c><00:10:58.560><c> and</c><00:10:58.680><c> a</c>

00:10:58.710 --> 00:10:58.720 align:start position:0%
hex 4000 and a height of hex 10000 and a
 

00:10:58.720 --> 00:11:00.430 align:start position:0%
hex 4000 and a height of hex 10000 and a
channel<00:10:59.040><c> count</c><00:10:59.280><c> of</c><00:10:59.400><c> four.</c>

00:11:00.430 --> 00:11:00.440 align:start position:0%
channel count of four.
 

00:11:00.440 --> 00:11:01.710 align:start position:0%
channel count of four.
When<00:11:00.600><c> multiplying</c><00:11:01.200><c> the</c><00:11:01.280><c> three</c><00:11:01.480><c> of</c><00:11:01.560><c> these</c>

00:11:01.710 --> 00:11:01.720 align:start position:0%
When multiplying the three of these
 

00:11:01.720 --> 00:11:03.510 align:start position:0%
When multiplying the three of these
values<00:11:02.080><c> together,</c><00:11:02.760><c> we</c><00:11:02.920><c> see</c><00:11:03.120><c> that</c><00:11:03.320><c> we</c><00:11:03.400><c> of</c>

00:11:03.510 --> 00:11:03.520 align:start position:0%
values together, we see that we of
 

00:11:03.520 --> 00:11:05.350 align:start position:0%
values together, we see that we of
course<00:11:03.800><c> get</c><00:11:04.000><c> the</c><00:11:04.160><c> integer</c><00:11:04.560><c> overflow</c><00:11:05.120><c> that</c><00:11:05.240><c> we</c>

00:11:05.350 --> 00:11:05.360 align:start position:0%
course get the integer overflow that we
 

00:11:05.360 --> 00:11:07.430 align:start position:0%
course get the integer overflow that we
intended<00:11:05.760><c> to</c><00:11:05.839><c> have,</c><00:11:06.560><c> and</c><00:11:06.680><c> the</c><00:11:06.760><c> result</c><00:11:07.280><c> is</c>

00:11:07.430 --> 00:11:07.440 align:start position:0%
intended to have, and the result is
 

00:11:07.440 --> 00:11:09.630 align:start position:0%
intended to have, and the result is
actually<00:11:07.839><c> hex</c><00:11:08.280><c> one</c><00:11:08.920><c> followed</c><00:11:09.240><c> by</c><00:11:09.480><c> eight</c>

00:11:09.630 --> 00:11:09.640 align:start position:0%
actually hex one followed by eight
 

00:11:09.640 --> 00:11:10.910 align:start position:0%
actually hex one followed by eight
zeros,

00:11:10.910 --> 00:11:10.920 align:start position:0%
zeros,
 

00:11:10.920 --> 00:11:13.390 align:start position:0%
zeros,
which<00:11:11.160><c> when</c><00:11:11.280><c> interpreted</c><00:11:11.920><c> as</c><00:11:12.080><c> a</c><00:11:12.160><c> 32-bit</c><00:11:12.839><c> value</c>

00:11:13.390 --> 00:11:13.400 align:start position:0%
which when interpreted as a 32-bit value
 

00:11:13.400 --> 00:11:15.110 align:start position:0%
which when interpreted as a 32-bit value
is<00:11:13.560><c> just</c><00:11:13.960><c> zero.</c>

00:11:15.110 --> 00:11:15.120 align:start position:0%
is just zero.
 

00:11:15.120 --> 00:11:16.390 align:start position:0%
is just zero.
So,<00:11:15.240><c> let's</c><00:11:15.400><c> run</c><00:11:15.600><c> this</c><00:11:15.720><c> through</c><00:11:15.880><c> the</c><00:11:15.960><c> harness</c>

00:11:16.390 --> 00:11:16.400 align:start position:0%
So, let's run this through the harness
 

00:11:16.400 --> 00:11:18.190 align:start position:0%
So, let's run this through the harness
and<00:11:16.640><c> see</c><00:11:16.800><c> what</c><00:11:17.000><c> happens.</c>

00:11:18.190 --> 00:11:18.200 align:start position:0%
and see what happens.
 

00:11:18.200 --> 00:11:19.950 align:start position:0%
and see what happens.
We<00:11:18.320><c> see</c><00:11:18.560><c> we</c><00:11:18.680><c> hit</c><00:11:18.839><c> the</c><00:11:18.880><c> breakpoint</c><00:11:19.320><c> again,</c><00:11:19.839><c> and</c>

00:11:19.950 --> 00:11:19.960 align:start position:0%
We see we hit the breakpoint again, and
 

00:11:19.960 --> 00:11:21.870 align:start position:0%
We see we hit the breakpoint again, and
now<00:11:20.200><c> if</c><00:11:20.360><c> we</c><00:11:20.520><c> single</c><00:11:20.920><c> step</c><00:11:21.200><c> through,</c><00:11:21.640><c> we</c><00:11:21.760><c> can</c>

00:11:21.870 --> 00:11:21.880 align:start position:0%
now if we single step through, we can
 

00:11:21.880 --> 00:11:23.950 align:start position:0%
now if we single step through, we can
observe<00:11:22.360><c> the</c><00:11:22.480><c> buggy</c><00:11:22.800><c> calculation</c><00:11:23.520><c> happening</c>

00:11:23.950 --> 00:11:23.960 align:start position:0%
observe the buggy calculation happening
 

00:11:23.960 --> 00:11:25.350 align:start position:0%
observe the buggy calculation happening
in<00:11:24.160><c> real</c><00:11:24.360><c> time.</c>

00:11:25.350 --> 00:11:25.360 align:start position:0%
in real time.
 

00:11:25.360 --> 00:11:27.670 align:start position:0%
in real time.
We<00:11:25.480><c> see</c><00:11:25.640><c> these</c><00:11:26.000><c> MUO</c><00:11:26.440><c> instructions</c><00:11:27.200><c> used</c><00:11:27.520><c> to</c>

00:11:27.670 --> 00:11:27.680 align:start position:0%
We see these MUO instructions used to
 

00:11:27.680 --> 00:11:29.870 align:start position:0%
We see these MUO instructions used to
multiply<00:11:28.160><c> values,</c><00:11:29.000><c> and</c><00:11:29.120><c> we</c><00:11:29.200><c> see</c><00:11:29.360><c> the</c><00:11:29.560><c> output</c>

00:11:29.870 --> 00:11:29.880 align:start position:0%
multiply values, and we see the output
 

00:11:29.880 --> 00:11:31.910 align:start position:0%
multiply values, and we see the output
value<00:11:30.200><c> has</c><00:11:30.360><c> wrapped</c><00:11:30.600><c> around</c><00:11:30.880><c> to</c><00:11:30.960><c> zero</c><00:11:31.360><c> just</c><00:11:31.760><c> as</c>

00:11:31.910 --> 00:11:31.920 align:start position:0%
value has wrapped around to zero just as
 

00:11:31.920 --> 00:11:33.270 align:start position:0%
value has wrapped around to zero just as
we'd<00:11:32.080><c> hoped.</c>

00:11:33.270 --> 00:11:33.280 align:start position:0%
we'd hoped.
 

00:11:33.280 --> 00:11:34.870 align:start position:0%
we'd hoped.
We<00:11:33.360><c> continue</c><00:11:33.760><c> on</c><00:11:33.880><c> a</c><00:11:33.920><c> bit</c><00:11:34.160><c> and</c><00:11:34.280><c> we</c><00:11:34.400><c> see</c><00:11:34.600><c> that</c><00:11:34.760><c> the</c>

00:11:34.870 --> 00:11:34.880 align:start position:0%
We continue on a bit and we see that the
 

00:11:34.880 --> 00:11:37.270 align:start position:0%
We continue on a bit and we see that the
call<00:11:35.120><c> to</c><00:11:35.280><c> malloc</c><00:11:35.720><c> is</c><00:11:35.840><c> being</c><00:11:36.120><c> made</c><00:11:36.600><c> with</c><00:11:36.760><c> a</c><00:11:36.840><c> size</c>

00:11:37.270 --> 00:11:37.280 align:start position:0%
call to malloc is being made with a size
 

00:11:37.280 --> 00:11:38.910 align:start position:0%
call to malloc is being made with a size
argument<00:11:37.760><c> of</c><00:11:37.880><c> zero.</c>

00:11:38.910 --> 00:11:38.920 align:start position:0%
argument of zero.
 

00:11:38.920 --> 00:11:40.830 align:start position:0%
argument of zero.
And<00:11:39.040><c> once</c><00:11:39.240><c> malloc</c><00:11:39.560><c> has</c><00:11:39.680><c> returned,</c><00:11:40.440><c> we</c><00:11:40.560><c> can</c><00:11:40.680><c> see</c>

00:11:40.830 --> 00:11:40.840 align:start position:0%
And once malloc has returned, we can see
 

00:11:40.840 --> 00:11:42.710 align:start position:0%
And once malloc has returned, we can see
that<00:11:41.000><c> it's</c><00:11:41.120><c> given</c><00:11:41.360><c> us</c><00:11:41.480><c> a</c><00:11:41.560><c> pointer</c><00:11:42.080><c> to</c><00:11:42.240><c> a</c><00:11:42.320><c> small</c>

00:11:42.710 --> 00:11:42.720 align:start position:0%
that it's given us a pointer to a small
 

00:11:42.720 --> 00:11:45.430 align:start position:0%
that it's given us a pointer to a small
allocation<00:11:43.320><c> of</c><00:11:43.480><c> just</c><00:11:43.760><c> 16</c><00:11:44.360><c> bytes,</c><00:11:45.160><c> which</c><00:11:45.320><c> we</c>

00:11:45.430 --> 00:11:45.440 align:start position:0%
allocation of just 16 bytes, which we
 

00:11:45.440 --> 00:11:48.150 align:start position:0%
allocation of just 16 bytes, which we
can<00:11:45.560><c> verify</c><00:11:46.000><c> by</c><00:11:46.160><c> calling</c><00:11:46.680><c> malloc</c><00:11:47.040><c> size.</c>

00:11:48.150 --> 00:11:48.160 align:start position:0%
can verify by calling malloc size.
 

00:11:48.160 --> 00:11:49.590 align:start position:0%
can verify by calling malloc size.
Now,<00:11:48.320><c> if</c><00:11:48.480><c> I</c><00:11:48.520><c> let</c><00:11:48.680><c> the</c><00:11:48.760><c> program</c><00:11:49.160><c> continue</c>

00:11:49.590 --> 00:11:49.600 align:start position:0%
Now, if I let the program continue
 

00:11:49.600 --> 00:11:51.310 align:start position:0%
Now, if I let the program continue
normally,<00:11:50.400><c> we</c><00:11:50.560><c> see</c><00:11:50.760><c> that</c><00:11:50.880><c> we</c><00:11:51.000><c> almost</c>

00:11:51.310 --> 00:11:51.320 align:start position:0%
normally, we see that we almost
 

00:11:51.320 --> 00:11:53.430 align:start position:0%
normally, we see that we almost
immediately<00:11:51.840><c> hit</c><00:11:52.000><c> a</c><00:11:52.040><c> crash</c><00:11:52.520><c> with</c><00:11:52.760><c> an</c><00:11:52.920><c> invalid</c>

00:11:53.430 --> 00:11:53.440 align:start position:0%
immediately hit a crash with an invalid
 

00:11:53.440 --> 00:11:55.470 align:start position:0%
immediately hit a crash with an invalid
access<00:11:53.840><c> violation</c><00:11:54.760><c> due</c><00:11:54.960><c> to</c><00:11:55.080><c> the</c><00:11:55.160><c> memory</c>

00:11:55.470 --> 00:11:55.480 align:start position:0%
access violation due to the memory
 

00:11:55.480 --> 00:11:57.110 align:start position:0%
access violation due to the memory
corruption<00:11:55.920><c> caused.</c>

00:11:57.110 --> 00:11:57.120 align:start position:0%
corruption caused.
 

00:11:57.120 --> 00:11:58.910 align:start position:0%
corruption caused.
We've<00:11:57.240><c> confirmed</c><00:11:57.760><c> that</c><00:11:57.920><c> the</c><00:11:58.080><c> generated</c><00:11:58.640><c> image</c>

00:11:58.910 --> 00:11:58.920 align:start position:0%
We've confirmed that the generated image
 

00:11:58.920 --> 00:12:01.190 align:start position:0%
We've confirmed that the generated image
file<00:11:59.400><c> satisfies</c><00:12:00.080><c> the</c><00:12:00.200><c> exact</c><00:12:00.640><c> conditions</c>

00:12:01.190 --> 00:12:01.200 align:start position:0%
file satisfies the exact conditions
 

00:12:01.200 --> 00:12:03.350 align:start position:0%
file satisfies the exact conditions
required<00:12:01.640><c> to</c><00:12:01.720><c> cause</c><00:12:01.960><c> memory</c><00:12:02.240><c> corruption.</c>

00:12:03.350 --> 00:12:03.360 align:start position:0%
required to cause memory corruption.
 

00:12:03.360 --> 00:12:04.910 align:start position:0%
required to cause memory corruption.
Anywhere<00:12:03.720><c> on</c><00:12:03.840><c> the</c><00:12:03.920><c> system</c><00:12:04.320><c> that</c><00:12:04.480><c> tries</c><00:12:04.800><c> to</c>

00:12:04.910 --> 00:12:04.920 align:start position:0%
Anywhere on the system that tries to
 

00:12:04.920 --> 00:12:06.870 align:start position:0%
Anywhere on the system that tries to
decode<00:12:05.440><c> this</c><00:12:05.680><c> image</c><00:12:06.160><c> should</c><00:12:06.360><c> be</c><00:12:06.480><c> vulnerable</c>

00:12:06.870 --> 00:12:06.880 align:start position:0%
decode this image should be vulnerable
 

00:12:06.880 --> 00:12:08.990 align:start position:0%
decode this image should be vulnerable
to<00:12:07.000><c> the</c><00:12:07.120><c> exact</c><00:12:07.520><c> same</c><00:12:07.760><c> issues.</c>

00:12:08.990 --> 00:12:09.000 align:start position:0%
to the exact same issues.
 

00:12:09.000 --> 00:12:10.950 align:start position:0%
to the exact same issues.
This<00:12:09.120><c> includes</c><00:12:09.600><c> opening</c><00:12:10.040><c> it</c><00:12:10.160><c> in</c><00:12:10.280><c> the</c><00:12:10.480><c> previews</c>

00:12:10.950 --> 00:12:10.960 align:start position:0%
This includes opening it in the previews
 

00:12:10.960 --> 00:12:13.630 align:start position:0%
This includes opening it in the previews
app<00:12:11.360><c> or</c><00:12:11.480><c> the</c><00:12:11.720><c> iOS</c><00:12:12.080><c> photos</c><00:12:12.520><c> app,</c><00:12:13.120><c> which</c><00:12:13.400><c> as</c><00:12:13.520><c> you</c>

00:12:13.630 --> 00:12:13.640 align:start position:0%
app or the iOS photos app, which as you
 

00:12:13.640 --> 00:12:15.270 align:start position:0%
app or the iOS photos app, which as you
can<00:12:13.760><c> see</c><00:12:14.120><c> causes</c><00:12:14.400><c> those</c><00:12:14.600><c> applications</c><00:12:15.200><c> to</c>

00:12:15.270 --> 00:12:15.280 align:start position:0%
can see causes those applications to
 

00:12:15.280 --> 00:12:16.590 align:start position:0%
can see causes those applications to
crash.

00:12:16.590 --> 00:12:16.600 align:start position:0%
crash.
 

00:12:16.600 --> 00:12:18.070 align:start position:0%
crash.
But<00:12:16.680><c> it</c><00:12:16.800><c> could</c><00:12:16.920><c> also</c><00:12:17.120><c> include</c><00:12:17.440><c> more</c><00:12:17.640><c> critical</c>

00:12:18.070 --> 00:12:18.080 align:start position:0%
But it could also include more critical
 

00:12:18.080 --> 00:12:19.870 align:start position:0%
But it could also include more critical
system<00:12:18.400><c> processes.</c>

00:12:19.870 --> 00:12:19.880 align:start position:0%
system processes.
 

00:12:19.880 --> 00:12:21.590 align:start position:0%
system processes.
Anything<00:12:20.280><c> that</c><00:12:20.440><c> calls</c><00:12:20.800><c> into</c><00:12:21.040><c> the</c><00:12:21.160><c> vulnerable</c>

00:12:21.590 --> 00:12:21.600 align:start position:0%
Anything that calls into the vulnerable
 

00:12:21.600 --> 00:12:23.670 align:start position:0%
Anything that calls into the vulnerable
image<00:12:21.960><c> IO</c><00:12:22.120><c> decoder</c><00:12:22.880><c> is</c><00:12:23.040><c> vulnerable</c><00:12:23.400><c> to</c><00:12:23.520><c> this</c>

00:12:23.670 --> 00:12:23.680 align:start position:0%
image IO decoder is vulnerable to this
 

00:12:23.680 --> 00:12:24.950 align:start position:0%
image IO decoder is vulnerable to this
issue.

00:12:24.950 --> 00:12:24.960 align:start position:0%
issue.
 

00:12:24.960 --> 00:12:27.030 align:start position:0%
issue.
So,<00:12:25.160><c> what</c><00:12:25.320><c> about</c><00:12:25.560><c> exploitability?</c><00:12:26.880><c> What</c>

00:12:27.030 --> 00:12:27.040 align:start position:0%
So, what about exploitability? What
 

00:12:27.040 --> 00:12:29.230 align:start position:0%
So, what about exploitability? What
could<00:12:27.160><c> you</c><00:12:27.240><c> really</c><00:12:27.520><c> do</c><00:12:27.800><c> with</c><00:12:28.000><c> this</c><00:12:28.200><c> bug?</c>

00:12:29.230 --> 00:12:29.240 align:start position:0%
could you really do with this bug?
 

00:12:29.240 --> 00:12:30.830 align:start position:0%
could you really do with this bug?
Memory<00:12:29.480><c> corruption</c><00:12:30.000><c> is,</c><00:12:30.160><c> of</c><00:12:30.280><c> course,</c><00:12:30.600><c> much</c>

00:12:30.830 --> 00:12:30.840 align:start position:0%
Memory corruption is, of course, much
 

00:12:30.840 --> 00:12:32.230 align:start position:0%
Memory corruption is, of course, much
more<00:12:31.000><c> serious</c><00:12:31.520><c> than</c><00:12:31.680><c> just</c><00:12:31.840><c> making</c><00:12:32.120><c> your</c>

00:12:32.230 --> 00:12:32.240 align:start position:0%
more serious than just making your
 

00:12:32.240 --> 00:12:33.870 align:start position:0%
more serious than just making your
friends<00:12:32.560><c> apps</c><00:12:32.800><c> crash.</c>

00:12:33.870 --> 00:12:33.880 align:start position:0%
friends apps crash.
 

00:12:33.880 --> 00:12:35.950 align:start position:0%
friends apps crash.
Many<00:12:34.160><c> similar</c><00:12:34.520><c> style</c><00:12:34.880><c> bugs</c><00:12:35.200><c> within</c><00:12:35.520><c> Apple's</c>

00:12:35.950 --> 00:12:35.960 align:start position:0%
Many similar style bugs within Apple's
 

00:12:35.960 --> 00:12:37.710 align:start position:0%
Many similar style bugs within Apple's
image<00:12:36.280><c> and</c><00:12:36.440><c> video</c><00:12:36.760><c> processing</c><00:12:37.240><c> code</c><00:12:37.560><c> have</c>

00:12:37.710 --> 00:12:37.720 align:start position:0%
image and video processing code have
 

00:12:37.720 --> 00:12:39.750 align:start position:0%
image and video processing code have
been<00:12:37.920><c> known</c><00:12:38.200><c> to</c><00:12:38.320><c> have</c><00:12:38.440><c> been</c><00:12:38.680><c> used</c><00:12:39.120><c> in</c><00:12:39.280><c> advanced</c>

00:12:39.750 --> 00:12:39.760 align:start position:0%
been known to have been used in advanced
 

00:12:39.760 --> 00:12:42.829 align:start position:0%
been known to have been used in advanced
exploit<00:12:40.160><c> technology</c><00:12:40.760><c> against</c><00:12:41.240><c> iPhone</c><00:12:41.560><c> users.</c>

00:12:42.829 --> 00:12:42.839 align:start position:0%
exploit technology against iPhone users.
 

00:12:42.839 --> 00:12:44.390 align:start position:0%
exploit technology against iPhone users.
So,<00:12:43.000><c> while</c><00:12:43.280><c> to</c><00:12:43.440><c> a</c><00:12:43.520><c> novice,</c><00:12:43.960><c> crashing</c><00:12:44.360><c> a</c>

00:12:44.390 --> 00:12:44.400 align:start position:0%
So, while to a novice, crashing a
 

00:12:44.400 --> 00:12:46.110 align:start position:0%
So, while to a novice, crashing a
decoder<00:12:44.880><c> might</c><00:12:45.120><c> seem</c><00:12:45.280><c> nothing</c><00:12:45.600><c> more</c><00:12:45.880><c> than</c><00:12:46.040><c> a</c>

00:12:46.110 --> 00:12:46.120 align:start position:0%
decoder might seem nothing more than a
 

00:12:46.120 --> 00:12:48.430 align:start position:0%
decoder might seem nothing more than a
small<00:12:46.440><c> inconvenience,</c><00:12:47.640><c> if</c><00:12:47.800><c> a</c><00:12:47.880><c> dedicated</c>

00:12:48.430 --> 00:12:48.440 align:start position:0%
small inconvenience, if a dedicated
 

00:12:48.440 --> 00:12:50.390 align:start position:0%
small inconvenience, if a dedicated
attacker<00:12:48.920><c> is</c><00:12:49.120><c> able</c><00:12:49.360><c> to</c><00:12:49.480><c> craft</c><00:12:49.880><c> an</c><00:12:49.960><c> image</c><00:12:50.240><c> that</c>

00:12:50.390 --> 00:12:50.400 align:start position:0%
attacker is able to craft an image that
 

00:12:50.400 --> 00:12:52.630 align:start position:0%
attacker is able to craft an image that
not<00:12:50.640><c> only</c><00:12:50.880><c> triggers</c><00:12:51.200><c> the</c><00:12:51.280><c> heap</c><00:12:51.520><c> overflow,</c><00:12:52.440><c> but</c>

00:12:52.630 --> 00:12:52.640 align:start position:0%
not only triggers the heap overflow, but
 

00:12:52.640 --> 00:12:54.990 align:start position:0%
not only triggers the heap overflow, but
also<00:12:52.960><c> carefully</c><00:12:53.440><c> arranges</c><00:12:54.000><c> object</c><00:12:54.400><c> in</c><00:12:54.480><c> memory</c>

00:12:54.990 --> 00:12:55.000 align:start position:0%
also carefully arranges object in memory
 

00:12:55.000 --> 00:12:56.710 align:start position:0%
also carefully arranges object in memory
in<00:12:55.160><c> such</c><00:12:55.440><c> a</c><00:12:55.480><c> way</c><00:12:55.720><c> that</c><00:12:55.880><c> the</c><00:12:55.960><c> corruption</c><00:12:56.520><c> to</c><00:12:56.600><c> the</c>

00:12:56.710 --> 00:12:56.720 align:start position:0%
in such a way that the corruption to the
 

00:12:56.720 --> 00:12:58.630 align:start position:0%
in such a way that the corruption to the
memory<00:12:57.080><c> would</c><00:12:57.240><c> result</c><00:12:57.640><c> in</c><00:12:57.720><c> important</c><00:12:58.280><c> data</c>

00:12:58.630 --> 00:12:58.640 align:start position:0%
memory would result in important data
 

00:12:58.640 --> 00:13:01.030 align:start position:0%
memory would result in important data
being<00:12:58.880><c> manipulated,</c><00:13:00.280><c> they</c><00:13:00.400><c> could</c><00:13:00.600><c> leverage</c>

00:13:01.030 --> 00:13:01.040 align:start position:0%
being manipulated, they could leverage
 

00:13:01.040 --> 00:13:03.190 align:start position:0%
being manipulated, they could leverage
such<00:13:01.280><c> a</c><00:13:01.320><c> bug</c><00:13:01.680><c> to</c><00:13:01.839><c> actually</c><00:13:02.120><c> take</c><00:13:02.320><c> control</c><00:13:02.960><c> over</c>

00:13:03.190 --> 00:13:03.200 align:start position:0%
such a bug to actually take control over
 

00:13:03.200 --> 00:13:06.030 align:start position:0%
such a bug to actually take control over
the<00:13:03.320><c> code</c><00:13:03.560><c> execution</c><00:13:04.480><c> inside</c><00:13:04.880><c> a</c><00:13:04.920><c> given</c><00:13:05.200><c> app.</c>

00:13:06.030 --> 00:13:06.040 align:start position:0%
the code execution inside a given app.
 

00:13:06.040 --> 00:13:07.390 align:start position:0%
the code execution inside a given app.
This<00:13:06.200><c> could</c><00:13:06.360><c> then</c><00:13:06.480><c> be</c><00:13:06.640><c> used</c><00:13:06.960><c> to</c><00:13:07.080><c> actually</c>

00:13:07.390 --> 00:13:07.400 align:start position:0%
This could then be used to actually
 

00:13:07.400 --> 00:13:09.790 align:start position:0%
This could then be used to actually
kickstart<00:13:08.080><c> a</c><00:13:08.160><c> full</c><00:13:08.520><c> remote</c><00:13:08.920><c> exploit</c><00:13:09.280><c> chain</c><00:13:09.680><c> on</c>

00:13:09.790 --> 00:13:09.800 align:start position:0%
kickstart a full remote exploit chain on
 

00:13:09.800 --> 00:13:11.950 align:start position:0%
kickstart a full remote exploit chain on
the<00:13:09.880><c> victim's</c><00:13:10.320><c> iPhone,</c><00:13:11.080><c> just</c><00:13:11.360><c> as</c><00:13:11.480><c> we've</c><00:13:11.640><c> seen</c>

00:13:11.950 --> 00:13:11.960 align:start position:0%
the victim's iPhone, just as we've seen
 

00:13:11.960 --> 00:13:13.950 align:start position:0%
the victim's iPhone, just as we've seen
in<00:13:12.200><c> past</c><00:13:12.480><c> attacks,</c><00:13:13.200><c> as</c><00:13:13.360><c> I</c><00:13:13.400><c> mentioned</c><00:13:13.800><c> the</c>

00:13:13.950 --> 00:13:13.960 align:start position:0%
in past attacks, as I mentioned the
 

00:13:13.960 --> 00:13:16.150 align:start position:0%
in past attacks, as I mentioned the
Pegasus<00:13:14.440><c> blastpass</c><00:13:15.040><c> exploit,</c><00:13:15.839><c> which</c><00:13:16.080><c> I</c>

00:13:16.150 --> 00:13:16.160 align:start position:0%
Pegasus blastpass exploit, which I
 

00:13:16.160 --> 00:13:18.430 align:start position:0%
Pegasus blastpass exploit, which I
covered<00:13:16.520><c> in</c><00:13:16.680><c> depth</c><00:13:17.040><c> in</c><00:13:17.160><c> another</c><00:13:17.400><c> video.</c>

00:13:18.430 --> 00:13:18.440 align:start position:0%
covered in depth in another video.
 

00:13:18.440 --> 00:13:19.950 align:start position:0%
covered in depth in another video.
Check<00:13:18.640><c> that</c><00:13:18.800><c> out</c><00:13:18.960><c> if</c><00:13:19.120><c> you're</c><00:13:19.240><c> interested</c><00:13:19.839><c> in</c>

00:13:19.950 --> 00:13:19.960 align:start position:0%
Check that out if you're interested in
 

00:13:19.960 --> 00:13:22.150 align:start position:0%
Check that out if you're interested in
how<00:13:20.240><c> a</c><00:13:20.360><c> seemingly</c><00:13:20.880><c> dumb</c><00:13:21.160><c> bug</c><00:13:21.440><c> like</c><00:13:21.640><c> this</c><00:13:21.960><c> can</c>

00:13:22.150 --> 00:13:22.160 align:start position:0%
how a seemingly dumb bug like this can
 

00:13:22.160 --> 00:13:23.710 align:start position:0%
how a seemingly dumb bug like this can
be<00:13:22.280><c> used</c><00:13:22.600><c> to</c><00:13:22.680><c> gain</c><00:13:22.920><c> full</c><00:13:23.200><c> remote</c><00:13:23.560><c> code</c>

00:13:23.710 --> 00:13:23.720 align:start position:0%
be used to gain full remote code
 

00:13:23.720 --> 00:13:26.310 align:start position:0%
be used to gain full remote code
execution<00:13:24.360><c> on</c><00:13:24.600><c> iOS</c><00:13:25.160><c> given</c><00:13:25.440><c> enough</c><00:13:25.680><c> dedication</c>

00:13:26.310 --> 00:13:26.320 align:start position:0%
execution on iOS given enough dedication
 

00:13:26.320 --> 00:13:28.150 align:start position:0%
execution on iOS given enough dedication
and<00:13:26.520><c> creativity.</c><00:13:27.560><c> The</c><00:13:27.720><c> full</c><00:13:27.920><c> written</c>

00:13:28.150 --> 00:13:28.160 align:start position:0%
and creativity. The full written
 

00:13:28.160 --> 00:13:30.390 align:start position:0%
and creativity. The full written
analysis<00:13:28.680><c> of</c><00:13:28.840><c> this</c><00:13:29.040><c> EXL</c><00:13:29.480><c> vulnerability</c><00:13:30.160><c> is</c>

00:13:30.390 --> 00:13:30.400 align:start position:0%
analysis of this EXL vulnerability is
 

00:13:30.400 --> 00:13:33.430 align:start position:0%
analysis of this EXL vulnerability is
available<00:13:30.920><c> on</c><00:13:31.040><c> my</c><00:13:31.200><c> blog</c><00:13:31.680><c> at</c><00:13:31.880><c> zygosec.com.</c>

00:13:33.430 --> 00:13:33.440 align:start position:0%
available on my blog at zygosec.com.
 

00:13:33.440 --> 00:13:35.390 align:start position:0%
available on my blog at zygosec.com.
You<00:13:33.560><c> can</c><00:13:33.680><c> also</c><00:13:33.920><c> find</c><00:13:34.240><c> the</c><00:13:34.360><c> sample</c><00:13:34.800><c> image</c><00:13:35.080><c> file</c>

00:13:35.390 --> 00:13:35.400 align:start position:0%
You can also find the sample image file
 

00:13:35.400 --> 00:13:37.190 align:start position:0%
You can also find the sample image file
and<00:13:35.560><c> the</c><00:13:35.640><c> generation</c><00:13:36.160><c> scripts</c><00:13:36.600><c> on</c><00:13:36.760><c> the</c><00:13:36.840><c> GitHub</c>

00:13:37.190 --> 00:13:37.200 align:start position:0%
and the generation scripts on the GitHub
 

00:13:37.200 --> 00:13:38.750 align:start position:0%
and the generation scripts on the GitHub
repo.<00:13:38.120><c> Let</c><00:13:38.200><c> me</c><00:13:38.280><c> know</c><00:13:38.360><c> what</c><00:13:38.480><c> you</c><00:13:38.520><c> thought</c><00:13:38.680><c> of</c>

00:13:38.750 --> 00:13:38.760 align:start position:0%
repo. Let me know what you thought of
 

00:13:38.760 --> 00:13:40.750 align:start position:0%
repo. Let me know what you thought of
this<00:13:38.880><c> video</c><00:13:39.160><c> down</c><00:13:39.400><c> below</c><00:13:39.720><c> in</c><00:13:39.840><c> the</c><00:13:39.960><c> comments.</c>

00:13:40.750 --> 00:13:40.760 align:start position:0%
this video down below in the comments.
 

00:13:40.760 --> 00:13:42.230 align:start position:0%
this video down below in the comments.
Thanks<00:13:40.960><c> for</c><00:13:41.040><c> watching</c><00:13:41.480><c> and</c><00:13:41.640><c> I'll</c><00:13:41.760><c> see</c><00:13:41.960><c> you</c><00:13:42.120><c> in</c>

00:13:42.230 --> 00:13:42.240 align:start position:0%
Thanks for watching and I'll see you in
 

00:13:42.240 --> 00:13:44.840 align:start position:0%
Thanks for watching and I'll see you in
the<00:13:42.320><c> next</c><00:13:42.560><c> one.</c>

