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.Additional References
https://github.com/libjpeg-turbo/libjpeg-turbo/commit/43e84cff1bb2bd8293066f6ac4eb0df61ddddbc6Disclosure Timeline
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]