Project

General

Profile

Actions

Bug #1026

closed

dcmqrscp may crash when reading malformed configuration file

Added by Marco Eichelberg over 3 years ago. Updated over 3 years ago.

Status:
Closed
Priority:
Normal
Category:
Library and Apps
Target version:
Start date:
2022-05-24
Due date:
% Done:

100%

Estimated time:
1:00 h
Module:
dcmqrscp
Operating System:
Compiler:

Description

Three issues have been detected in class DcmQueryRetrieveConfig that may cause an application crash of dcmqrscp when reading a malformed configuration file, due to insufficient validation of the input data. The issues can be reproduced by compiling DCMTK (on Linux, with gcc) using the following cmake options:

cmake -G"Unix Makefiles" .. -DCMAKE_C_FLAGS="-g -fprofile-arcs -ftest-coverage -fsanitize=address" -DCMAKE_CXX_FLAGS="-g -fprofile-arcs -ftest-coverage -fsanitize=address" 

and then running dcmqrscp -c bugN_dcmqrscp.cfg with one of the three configuration files provided below.

Reported 2022-05-24 by Zahra Mirzamomen <> and Marcel Böhme <>.


Files

bug1_dcmqrscp.cfg (2.31 KB) bug1_dcmqrscp.cfg Malformed config file that causes a segmentation fault Marco Eichelberg, 2022-05-24 11:16
bug2_dcmqrscp.cfg (2.36 KB) bug2_dcmqrscp.cfg Malformed config file that causes a huge memory allocation Marco Eichelberg, 2022-05-24 11:16
bug3_dcmqrscp.cfg (261 Bytes) bug3_dcmqrscp.cfg Malformed config file that causes a stack overflow Marco Eichelberg, 2022-05-24 11:16
Actions #1

Updated by Marco Eichelberg over 3 years ago

  • Status changed from New to Closed
  • Assignee set to Marco Eichelberg
  • % Done changed from 0 to 100
  • Estimated time set to 1:00 h

Fixed by commit #957fb31e5.

Actions

Also available in: Atom PDF