GDCM versions 2.6.0 and 2.6.1 suffer from an out-of-bounds read due to missing checks. The vulnerability occurs during the decoding of JPEG-LS images when the dimensions of the embedded JPEG-LS image (as specified in the JPEG headers) are smaller than the ones of the selected region (set by gdcm::ImageRegionReader::SetRegion and usually based on DICOM header values).
9fe160664c3de2590fc55b8d5d31baa051f09a4bfdb6a7eea28c5c6a6e20f826
Grassroots DICOM (GDCM) is a C++ library for processing DICOM medical
images.
It provides routines to view and manipulate a wide range of image formats
and can be accessed through many popular programming languages like Python,
C#, Java and PHP.
GDCM versions 2.6.0 and 2.6.1 (and possibly previous versions) are prone to
an out-of-bounds read vulnerability due to missing checks. The vulnerability
occurs during the decoding of JPEG-LS images when the dimensions of the
embedded JPEG-LS image (as specified in the JPEG headers) are smaller than
the ones of the selected region (set by gdcm::ImageRegionReader::SetRegion
and usually based on DICOM header values).
More information about this vulnerability can be found at
http://census-labs.com/news/2016/01/11/gdcm-out-bounds-read-jpeglscodec-decodeextent/
The GDCM project has released version 2.6.2 that addresses this issue.
It is advised to upgrade all GDCM installations to the latest stable
release.
Disclosure Timeline
-------------------
CVE assignment: December 2nd, 2015
Vendor Contact: December 4th, 2015
Vendor Patch Release: December 23rd, 2015
Public Disclosure: January 11th, 2016
Regards,
Stelios Tsampas
IT Security Researcher
CENSUS S.A.