-
Notifications
You must be signed in to change notification settings - Fork 52
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix 3 security problems found by fuzzer #23
base: master
Are you sure you want to change the base?
Conversation
…ng out of bounds read access.
…s, causing oob read.
crash-3.zip |
` 0x61c00000c0c1 is located 65 bytes inside of 1800-byte region [0x61c00000c080,0x61c00000c788) previously allocated by thread T0 here: SUMMARY: AddressSanitizer: heap-use-after-free /home/niko/gitrepo/gifdec/gifdec.c:409:66 in read_image_data |
@everestsummer CVE-2022-43359 assigned |
cc @lecram |
uint8_t size; | ||
|
||
do { | ||
read(gif->fd, &size, 1); | ||
if (!first_try && size == seek_pos) //To prevent infinite loop |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is Uninitialized when used.
The following sample generated by fuzzer may cause a SIGSEGV in gifdec.
The root cause is variable "key" may be a larger value than count of entries, causing program accesses out-of-bounds heap buffer.
Program received signal SIGSEGV, Segmentation fault.
0x0000555555558280 in read_image_data (interlace=64, gif=0x55555555d2a0) at gifdec.c:395
395 entry = table->entries[entry.prefix];
(gdb) bt
#0 0x0000555555558280 in read_image_data (interlace=64, gif=0x55555555d2a0) at gifdec.c:395
#1 read_image (gif=0x55555555d2a0) at gifdec.c:441
#2 gd_get_frame (gif=gif@entry=0x55555555d2a0) at gifdec.c:500
#3 0x00005555555554b4 in main (argc=, argv=0x7fffffffe1a8) at example2.c:38
crash-1.zip