Facebook Google Plus Twitter LinkedIn YouTube RSS Menu Search Resource - BlogResource - WebinarResource - ReportResource - Eventicons_066 icons_067icons_068icons_069icons_070

[R1] libturbo-jpeg Denial of Service

Medium

Synopsis

Tenable discovered a denial of service vulnerability in libjpeg-turbo. The vulnerability is caused by a divide by zero error in the function allow_sarray in jmemmgr.c. The variable samplesperrow holds a value of zero when the following calculation occurs:

  /* Calculate max # of rows allowed in one allocation chunk */
  ltemp = (MAX_ALLOC_CHUNK - sizeof(large_pool_hdr)) /
          ((long)samplesperrow * sizeof(JSAMPLE));

A four component BMP whose BITMAPINFOHEADER has a biWidth of 1073741824 triggers this vulnerability.

Solution

A patch has been committed to the libjpeg-turbo GitHub repository.

Disclosure Timeline

05-25-2018 - Tenable asks [email protected] for a security contact.
05-25-2018 - D. R. Commander responds that [email protected] is the appropriate contact.
05-25-2018 - Tenable sends details of a divide by zero error including a stack trace, test file, and instructions to reproduce.
05-31-2018 - Tenable asks if there were any issues reproducing the problem.
05-31-2018 - D. R. Commander responds that they haven't been able to look at it yet.
06-12-2018 - D. R. Commander pushes a fix to the public libjpeg-turbo repository.
06-12-2018 - D. R. Commander informs Tenable that a patch has been merged.

All information within TRA advisories is provided “as is”, without warranty of any kind, including the implied warranties of merchantability and fitness for a particular purpose, and with no guarantee of completeness, accuracy, or timeliness. Individuals and organizations are responsible for assessing the impact of any actual or potential security vulnerability.

Tenable takes product security very seriously. If you believe you have found a vulnerability in one of our products, we ask that you please work with us to quickly resolve it in order to protect customers. Tenable believes in responding quickly to such reports, maintaining communication with researchers, and providing a solution in short order.

For more details on submitting vulnerability information, please see our Vulnerability Reporting Guidelines page.

If you have questions or corrections about this advisory, please email [email protected]

Risk Information

CVE ID: CVE-2018-1152
Tenable Advisory ID: TRA-2018-17
Credit:
Jacob Baines
CVSSv2 Base / Temporal Score:
4.9 / 3.8
CVSSv2 Vector:
AV:L/AC:L/Au:N/C:N/I:N/A:C
Affected Products:
libturbo-jpeg 1.5.90
Risk Factor:
Medium

Advisory Timeline

06-15-2018 - [R1] Initial Release