Project

General

Profile

Actions

Bug #858

closed

Buffer overflow in DcmRLEDecoder::decompress()

Added by Marco Eichelberg almost 7 years ago. Updated 10 months ago.

Status:
Closed
Priority:
Normal
Category:
Library and Apps
Target version:
-
Start date:
2018-11-28
Due date:
% Done:

100%

Estimated time:
Module:
dcmdata
Operating System:
Compiler:

Description

As a part of medical infrastructure security research, the DeteAct Team started to perform fuzzing of various open source medical data processing libraries.
During fuzzing of the dcm2pnm utility, a memory corruption (buffer overflow) bug was found, which occurs in DcmRLEDecoder::decompress() (file dcrledec.h, line 122). Attached are three sample files that trigger the (same) bug when processed with either dcm2pnm or dcmdrle.

Reported 2018-11-27 by Omar Ganiev <>, DeteAct Team, Open Medical Infrastructure Security Project.


Files

dcm2pnm_case_1 (7.61 KB) dcm2pnm_case_1 Marco Eichelberg, 2018-11-28 10:16
dcm2pnm_case_2 (7.61 KB) dcm2pnm_case_2 Marco Eichelberg, 2018-11-28 10:16
dcm2pnm_case_3 (1.96 KB) dcm2pnm_case_3 Marco Eichelberg, 2018-11-28 10:16
Actions #2

Updated by Marco Eichelberg almost 7 years ago

  • Status changed from New to Closed
  • Assignee set to Marco Eichelberg
  • % Done changed from 0 to 100

Closed by commit #40917614e.

Actions #3

Updated by Michael Onken over 5 years ago

  • Target version deleted (3.6.6)
Actions #4

Updated by Marco Eichelberg 11 months ago

  • Status changed from Closed to Reopened

According to a report, the bug is still present if pixel data is accessed frame-by-frame:

The DcmRLEDecoder::decompress() function is fixed when called from the DcmRLECodeDecoder::decode() function, but not when called from the DcmRLECodeDecoder::decompress() function. When I try to load an image using the DcmPixelData::getUncompressedFrameSize() function, a buffer overflow occurs in the DcmRLEDecoder::decompress() function.

Reported 2024-10-15 by Kosuke Yoshinaga <>.

Actions #5

Updated by Marco Eichelberg 10 months ago

  • Status changed from Reopened to Closed

Closed by commit #f93cf77f1.

Actions

Also available in: Atom PDF