Permalink
Show file tree
Hide file tree
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
exif_scan_JPEG_header: Added length check to prevent information leak
Summary: 'exif_process_SOFn' assumes that the JPEG header has at least 6 length. On providing a length < 6, this leads to an out of bounds heap read. Fixes CVE-2019-11926 Reviewed By: fredemmott Differential Revision: D16927050 fbshipit-source-id: 76c4b7c95acbb7852b0435298613d559d94e7270
- Loading branch information
1 parent
7d8655f
commit f9680d2
Showing
3 changed files
with
14 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,8 @@ | ||
| <?hh | ||
|
|
||
| <<__EntryPoint>> | ||
| function main_exifreaddata() { | ||
| $jpeg = "\xff\xd8\xc9\x00\x03\x04\x03\xf8"; | ||
| $data_stream = "data://text/plain;base64," . base64_encode($jpeg); | ||
| var_dump(exif_read_data($data_stream)); | ||
| } |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,2 @@ | ||
| Warning: Invalid JPEG file in %s/ext_gd/exifreaddata.php on line 7 | ||
| bool(false) |