diff --git a/0017-Increase-sleep-for-tests.patch b/0017-Increase-sleep-for-tests.patch index 7382801062be5ece4b99de4cfe10e0be2073f138..28b8174614c2473e7a4ceb262f5bcefb0d48ef1a 100644 --- a/0017-Increase-sleep-for-tests.patch +++ b/0017-Increase-sleep-for-tests.patch @@ -1,7 +1,7 @@ -From ee3d49874fd861472bbffedf09b186fc6d8ce83d Mon Sep 17 00:00:00 2001 -From: "Ankur Sinha (Ankur Sinha Gmail)" -Date: Tue, 2 Aug 2022 20:50:43 +0100 -Subject: [PATCH 17/18] Increase sleep for tests +From f94f4b23d25c73005db988e2aa83728adea1007e Mon Sep 17 00:00:00 2001 +From: rpm-build +Date: Fri, 19 Dec 2025 13:39:54 +0800 +Subject: [PATCH 1/1] Increase-sleep-for-tests --- dcmnet/tests/tscusession.cc | 6 +++--- @@ -9,7 +9,7 @@ Subject: [PATCH 17/18] Increase sleep for tests 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/dcmnet/tests/tscusession.cc b/dcmnet/tests/tscusession.cc -index 08a24dbbf..4d3020208 100644 +index 08a24db..4d30202 100644 --- a/dcmnet/tests/tscusession.cc +++ b/dcmnet/tests/tscusession.cc @@ -280,7 +280,7 @@ void configure_scp_for_sop_class(DcmSCPConfig& cfg, @@ -38,36 +38,36 @@ index 08a24dbbf..4d3020208 100644 // TODO: Test C-GET diff --git a/dcmtls/tests/tscuscptls.cc b/dcmtls/tests/tscuscptls.cc -index d895da7af..ed8f35883 100644 +index 9017c37..88f5f2f 100644 --- a/dcmtls/tests/tscuscptls.cc +++ b/dcmtls/tests/tscuscptls.cc -@@ -347,7 +347,7 @@ OFTEST_FLAGS(dcmtls_scp_tls, EF_None) +@@ -329,7 +329,7 @@ OFTEST_FLAGS(dcmtls_scp_tls, EF_None) port_number = 0xF000 + (rnd.getRND16() & 0xFFF); config.setPort(port_number); scp.start(); -- force_sleep(2); // wait 2 seconds for the SCP process to start -+ force_sleep(10); // wait 10 seconds for the SCP process to start +- OFStandard::forceSleep(2); // wait 2 seconds for the SCP process to start ++ OFStandard::forceSleep(10); // wait 2 seconds for the SCP process to start memory_barrier.lock(); memory_barrier.unlock(); } -@@ -429,7 +429,7 @@ OFTEST_FLAGS(dcmtls_scp_pool_tls, EF_None) +@@ -410,7 +410,7 @@ OFTEST_FLAGS(dcmtls_scp_pool_tls, EF_None) port_number = 0xF000 + (rnd.getRND16() & 0xFFF); config.setPort(port_number); pool.start(); -- force_sleep(2); // wait 2 seconds for the SCP process to start -+ force_sleep(10); // wait 10 seconds for the SCP process to start - memory_barrier.lock(); - memory_barrier.unlock(); +- OFStandard::forceSleep(2); // wait 2 seconds for the SCP process to start ++ OFStandard::forceSleep(10); // wait 2 seconds for the SCP process to start } -@@ -460,7 +460,7 @@ OFTEST_FLAGS(dcmtls_scp_pool_tls, EF_None) + while ((i++ < 5) && (! pool.m_is_running)); // try up to 5 port numbers before giving up + if (! pool.m_is_running) BAILOUT("Start of the SCP thread pool failed: " << pool.m_listen_result.text()); +@@ -439,7 +439,7 @@ OFTEST_FLAGS(dcmtls_scp_pool_tls, EF_None) // "ensure" the pool is initialized before any SCU starts connecting to it. The initialization // can take a couple of seconds on older systems, e.g. debian i368. -- force_sleep(5); -+ force_sleep(15); +- OFStandard::forceSleep(5); ++ OFStandard::forceSleep(15); for (OFVector::const_iterator it2 = scus.begin(); it2 != scus.end(); ++it2) { -- -2.39.2 +2.43.5 diff --git a/0018-chore-undo-changes-to-standard-dirs.patch b/0018-chore-undo-changes-to-standard-dirs.patch index 08e4c1a403728446414d8c69b47037a0956401d3..41987e412727ac813e9950836aedfde6ee52a3e9 100644 --- a/0018-chore-undo-changes-to-standard-dirs.patch +++ b/0018-chore-undo-changes-to-standard-dirs.patch @@ -1,14 +1,14 @@ -From ff7f5232d86375f036919f43606890e541a24cab Mon Sep 17 00:00:00 2001 -From: "Ankur Sinha (Ankur Sinha Gmail)" -Date: Sat, 17 Aug 2024 16:51:39 +0100 -Subject: [PATCH 2/2] chore: undo changes to standard dirs - +From cd328b2e95f4636bd64cff47b42f3bfc6b29d17a Mon Sep 17 00:00:00 2001 +From: rpm-build +Date: Fri, 19 Dec 2025 13:46:50 +0800 +Subject: [PATCH 1/1] chore-undo + --- CMake/GenerateDCMTKConfigure.cmake | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) - + diff --git a/CMake/GenerateDCMTKConfigure.cmake b/CMake/GenerateDCMTKConfigure.cmake -index a3856d3d0..6e2cb6827 100644 +index ac3ae70..cf70623 100644 --- a/CMake/GenerateDCMTKConfigure.cmake +++ b/CMake/GenerateDCMTKConfigure.cmake @@ -158,8 +158,8 @@ if(WIN32 AND NOT CYGWIN) @@ -35,5 +35,5 @@ index a3856d3d0..6e2cb6827 100644 # These variables are defined as macros in osconfig.h and must end with a path separator if(CMAKE_VERSION VERSION_LESS 3.20.0) -- -2.48.1 +2.43.5 diff --git a/0019-bugfix-for-CVE-2024-52333.patch b/0019-bugfix-for-CVE-2024-52333.patch deleted file mode 100644 index 5f074dcdf227624b2ccdc2210404402f707de4f5..0000000000000000000000000000000000000000 --- a/0019-bugfix-for-CVE-2024-52333.patch +++ /dev/null @@ -1,55 +0,0 @@ -From 03e851b0586d05057c3268988e180ffb426b2e03 Mon Sep 17 00:00:00 2001 -From: Joerg Riesmeier -Date: Fri, 3 Jan 2025 16:08:44 +0100 -Subject: [PATCH] Added check to make sure: HighBit < BitsAllocated. - -Added check to the image preprocessing to make sure that the value of -HighBit is always less than the value of BitsAllocated. Before, this -missing check could lead to memory corruption if an invalid combination -of values was retrieved from a malformed DICOM dataset. - -Thanks to Emmanuel Tacheau from the Cisco Talos team - for the report, sample file (PoC) -and detailed analysis. See TALOS-2024-2121 and CVE-2024-52333. ---- - dcmimgle/libsrc/diimage.cc | 16 +++++++++++----- - 1 file changed, 11 insertions(+), 5 deletions(-) - -diff --git a/dcmimgle/libsrc/diimage.cc b/dcmimgle/libsrc/diimage.cc -index 480235e3b..1827ac68b 100644 ---- a/dcmimgle/libsrc/diimage.cc -+++ b/dcmimgle/libsrc/diimage.cc -@@ -1,6 +1,6 @@ - /* - * -- * Copyright (C) 1996-2024, OFFIS e.V. -+ * Copyright (C) 1996-2025, OFFIS e.V. - * All rights reserved. See COPYRIGHT file for details. - * - * This software and supporting documentation were developed by -@@ -549,12 +549,18 @@ void DiImage::convertPixelData() - { - const unsigned long fsize = OFstatic_cast(unsigned long, Rows) * OFstatic_cast(unsigned long, Columns) * - OFstatic_cast(unsigned long, SamplesPerPixel); -- if ((BitsAllocated < 1) || (BitsStored < 1) || (BitsAllocated < BitsStored) || -- (BitsStored > OFstatic_cast(Uint16, HighBit + 1))) -+ if ((BitsAllocated < 1) || (BitsStored < 1)) - { - ImageStatus = EIS_InvalidValue; -- DCMIMGLE_ERROR("invalid values for 'BitsAllocated' (" << BitsAllocated << "), " -- << "'BitsStored' (" << BitsStored << ") and/or 'HighBit' (" << HighBit << ")"); -+ DCMIMGLE_ERROR("invalid value(s) for 'BitsAllocated' (" << BitsAllocated << "), " -+ << "and/or 'BitsStored' (" << BitsStored << ")"); -+ return; -+ } -+ else if ((BitsAllocated < BitsStored) || (BitsAllocated <= HighBit) || ((BitsStored - 1) > HighBit)) -+ { -+ ImageStatus = EIS_InvalidValue; -+ DCMIMGLE_ERROR("invalid combination of values for 'BitsAllocated' (" << BitsAllocated << "), " -+ << "'BitsStored' (" << BitsStored << ") and 'HighBit' (" << HighBit << ")"); - return; - } - else if ((evr == EVR_OB) && (BitsStored <= 8)) --- -2.39.2 - diff --git a/0020-bugfix-for-CVE-2025-2357.patch b/0020-bugfix-for-CVE-2025-2357.patch deleted file mode 100644 index 7445c00877ef1b1dbb61ce84391a059d2dd96da8..0000000000000000000000000000000000000000 --- a/0020-bugfix-for-CVE-2025-2357.patch +++ /dev/null @@ -1,515 +0,0 @@ -From 3239a791542e1ea433d23aaa9e0a05a532ffabff Mon Sep 17 00:00:00 2001 -From: Marco Eichelberg -Date: Mon, 3 Mar 2025 12:33:18 +0100 -Subject: [PATCH] Fixed segfault in JPEG-LS decoder. - -Fixed a bug in the JPEG-LS decoder that led to a segmentation fault if invalid -input data was processed, due to insufficient validation of input data. - -Thanks to Ding zhengzheng for the report -and the sample file (PoC). - -This closes DCMTK issue #1155. ---- - dcmjpls/libcharls/scan.h | 164 +++++++++++++++++++++------------------ - 1 file changed, 87 insertions(+), 77 deletions(-) - -diff --git a/dcmjpls/libcharls/scan.h b/dcmjpls/libcharls/scan.h -index b4dea20d8..f13098104 100644 ---- a/dcmjpls/libcharls/scan.h -+++ b/dcmjpls/libcharls/scan.h -@@ -1,6 +1,6 @@ --// --// (C) Jan de Vaan 2007-2010, all rights reserved. See the accompanying "License.txt" for licensed use. --// -+// -+// (C) Jan de Vaan 2007-2010, all rights reserved. See the accompanying "License.txt" for licensed use. -+// - - #ifndef CHARLS_SCAN - #define CHARLS_SCAN -@@ -11,7 +11,7 @@ - - #include "lokuptbl.h" - --// This file contains the code for handling a "scan". Usually an image is encoded as a single scan. -+// This file contains the code for handling a "scan". Usually an image is encoded as a single scan. - - #include DCMTK_DIAGNOSTIC_IGNORE_CONST_EXPRESSION_WARNING - -@@ -21,10 +21,10 @@ extern OFVector rgquant10Ll; - extern OFVector rgquant12Ll; - extern OFVector rgquant16Ll; - // --// Apply -+// Apply - // - inlinehint LONG ApplySign(LONG i, LONG sign) --{ return (sign ^ i) - sign; } -+{ return (sign ^ i) - sign; } - - - -@@ -58,20 +58,20 @@ inlinehint LONG GetPredictedValue(LONG Ra, LONG Rb, LONG Rc) - - inlinehint LONG GetPredictedValue(LONG Ra, LONG Rb, LONG Rc) - { -- // sign trick reduces the number of if statements (branches) -+ // sign trick reduces the number of if statements (branches) - LONG sgn = BitWiseSign(Rb - Ra); - -- // is Ra between Rc and Rb? -+ // is Ra between Rc and Rb? - if ((sgn ^ (Rc - Ra)) < 0) - { - return Rb; -- } -+ } - else if ((sgn ^ (Rb - Rc)) < 0) - { - return Ra; - } - -- // default case, valid if Rc element of [Ra,Rb] -+ // default case, valid if Rc element of [Ra,Rb] - return Ra + Rb - Rc; - } - -@@ -110,7 +110,7 @@ public: - - public: - -- JlsCodec(const TRAITS& inTraits, const JlsParameters& info) : STRATEGY(info), -+ JlsCodec(const TRAITS& inTraits, const JlsParameters& info) : STRATEGY(info), - traits(inTraits), - _rect(), - _width(0), -@@ -120,13 +120,13 @@ public: - _RUNindex(0), - _pquant(0), - _bCompare(0) -- -+ - { - if (Info().ilv == ILV_NONE) - { - Info().components = 1; - } -- } -+ } - - - void SetPresets(const JlsCustomParameters& presets) -@@ -135,9 +135,9 @@ public: - - InitParams(presets.T1 != 0 ? presets.T1 : presetDefault.T1, - presets.T2 != 0 ? presets.T2 : presetDefault.T2, -- presets.T3 != 0 ? presets.T3 : presetDefault.T3, -+ presets.T3 != 0 ? presets.T3 : presetDefault.T3, - presets.RESET != 0 ? presets.RESET : presetDefault.RESET); -- } -+ } - - - bool IsInterleaved() -@@ -155,13 +155,13 @@ public: - - signed char QuantizeGratientOrg(LONG Di); - inlinehint LONG QuantizeGratient(LONG Di) -- { -+ { - ASSERT(QuantizeGratientOrg(Di) == *(_pquant + Di)); -- return *(_pquant + Di); -+ return *(_pquant + Di); - } - - void InitQuantizationLUT(); -- -+ - LONG DecodeValue(LONG k, LONG limit, LONG qbpp); - inlinehint void EncodeMappedValue(LONG k, LONG mappedError, LONG limit); - -@@ -216,27 +216,27 @@ public: - { - LONG sign = BitWiseSign(Qs); - JlsContext& ctx = _contexts[ApplySign(Qs, sign)]; -- LONG k = ctx.GetGolomb(); -- LONG Px = traits.CorrectPrediction(pred + ApplySign(ctx.C, sign)); -+ LONG k = ctx.GetGolomb(); -+ LONG Px = traits.CorrectPrediction(pred + ApplySign(ctx.C, sign)); - - LONG ErrVal; - const Code& code = decodingTables[k].Get(STRATEGY::PeekByte()); - if (code.GetLength() != 0) - { - STRATEGY::Skip(code.GetLength()); -- ErrVal = code.GetValue(); -+ ErrVal = code.GetValue(); - ASSERT(ABS(ErrVal) < 65535); - } - else - { -- ErrVal = UnMapErrVal(DecodeValue(k, traits.LIMIT, traits.qbpp)); -+ ErrVal = UnMapErrVal(DecodeValue(k, traits.LIMIT, traits.qbpp)); - if (ABS(ErrVal) > 65535) - throw JlsException(InvalidCompressedData); -- } -+ } - ErrVal = ErrVal ^ ((traits.NEAR == 0) ? ctx.GetErrorCorrection(k) : 0); -- ctx.UpdateVariables(ErrVal, traits.NEAR, traits.RESET); -+ ctx.UpdateVariables(ErrVal, traits.NEAR, traits.RESET); - ErrVal = ApplySign(ErrVal, sign); -- return traits.ComputeReconstructedSample(Px, ErrVal); -+ return traits.ComputeReconstructedSample(Px, ErrVal); - } - - -@@ -245,7 +245,7 @@ public: - LONG sign = BitWiseSign(Qs); - JlsContext& ctx = _contexts[ApplySign(Qs, sign)]; - LONG k = ctx.GetGolomb(); -- LONG Px = traits.CorrectPrediction(pred + ApplySign(ctx.C, sign)); -+ LONG Px = traits.CorrectPrediction(pred + ApplySign(ctx.C, sign)); - - LONG ErrVal = traits.ComputeErrVal(ApplySign(x - Px, sign)); - -@@ -270,16 +270,16 @@ public: - size_t DecodeScan(void* rawData, const JlsRect& size, BYTE **buf, size_t *buf_size, size_t offset, bool bCompare); - - protected: -- // codec parameters -+ // codec parameters - TRAITS traits; - JlsRect _rect; - int _width; -- LONG T1; -+ LONG T1; - LONG T2; -- LONG T3; -+ LONG T3; - - // compression context -- JlsContext _contexts[365]; -+ JlsContext _contexts[365]; - CContextRunMode _contextRunmode[2]; - LONG _RUNindex; - PIXEL* _previousLine; // previous line ptr -@@ -309,7 +309,7 @@ CTable InitTable(LONG k) - CTable table; - short nerr; - for (nerr = 0; ; nerr++) -- { -+ { - // Q is not used when k != 0 - LONG merrval = GetMappedErrVal(nerr);//, k, -1); - OFPair paircode = CreateEncodedValue(k, merrval); -@@ -321,7 +321,7 @@ CTable InitTable(LONG k) - } - - for (nerr = -1; ; nerr--) -- { -+ { - // Q is not used when k != 0 - LONG merrval = GetMappedErrVal(nerr);//, k, -1); - OFPair paircode = CreateEncodedValue(k, merrval); -@@ -364,7 +364,7 @@ inlinehint void JlsCodec::EncodeMappedValue(LONG k, LONG mapped - if (highbits + 1 > 31) - { - STRATEGY::AppendToBitStream(0, highbits / 2); -- highbits = highbits - highbits / 2; -+ highbits = highbits - highbits / 2; - } - STRATEGY::AppendToBitStream(1, highbits + 1); - STRATEGY::AppendToBitStream((mappedError & ((1 << k) - 1)), k); -@@ -374,11 +374,11 @@ inlinehint void JlsCodec::EncodeMappedValue(LONG k, LONG mapped - if (limit - traits.qbpp > 31) - { - STRATEGY::AppendToBitStream(0, 31); -- STRATEGY::AppendToBitStream(1, limit - traits.qbpp - 31); -+ STRATEGY::AppendToBitStream(1, limit - traits.qbpp - 31); - } - else - { -- STRATEGY::AppendToBitStream(1, limit - traits.qbpp); -+ STRATEGY::AppendToBitStream(1, limit - traits.qbpp); - } - STRATEGY::AppendToBitStream((mappedError - 1) & ((1 << traits.qbpp) - 1), traits.qbpp); - } -@@ -389,33 +389,33 @@ inlinehint void JlsCodec::EncodeMappedValue(LONG k, LONG mapped - template - void JlsCodec::InitQuantizationLUT() - { -- // for lossless mode with default parameters, we have precomputed te luts for bitcounts 8,10,12 and 16 -+ // for lossless mode with default parameters, we have precomputed te luts for bitcounts 8,10,12 and 16 - if (traits.NEAR == 0 && traits.MAXVAL == (1 << traits.bpp) - 1) - { - JlsCustomParameters presets = ComputeDefault(traits.MAXVAL, traits.NEAR); - if (presets.T1 == T1 && presets.T2 == T2 && presets.T3 == T3) - { -- if (traits.bpp == 8) -+ if (traits.bpp == 8) - { -- _pquant = &rgquant8Ll[rgquant8Ll.size() / 2 ]; -+ _pquant = &rgquant8Ll[rgquant8Ll.size() / 2 ]; - return; - } -- if (traits.bpp == 10) -+ if (traits.bpp == 10) - { -- _pquant = &rgquant10Ll[rgquant10Ll.size() / 2 ]; -+ _pquant = &rgquant10Ll[rgquant10Ll.size() / 2 ]; - return; -- } -- if (traits.bpp == 12) -+ } -+ if (traits.bpp == 12) - { -- _pquant = &rgquant12Ll[rgquant12Ll.size() / 2 ]; -+ _pquant = &rgquant12Ll[rgquant12Ll.size() / 2 ]; - return; -- } -- if (traits.bpp == 16) -+ } -+ if (traits.bpp == 16) - { -- _pquant = &rgquant16Ll[rgquant16Ll.size() / 2 ]; -+ _pquant = &rgquant16Ll[rgquant16Ll.size() / 2 ]; - return; -- } -- } -+ } -+ } - } - - LONG RANGE = 1 << traits.bpp; -@@ -453,7 +453,7 @@ template - LONG JlsCodec::DecodeRIError(CContextRunMode& ctx) - { - LONG k = ctx.GetGolomb(); -- LONG EMErrval = DecodeValue(k, traits.LIMIT - J[_RUNindex]-1, traits.qbpp); -+ LONG EMErrval = DecodeValue(k, traits.LIMIT - J[_RUNindex]-1, traits.qbpp); - LONG Errval = ctx.ComputeErrVal(EMErrval + ctx._nRItype, k); - ctx.UpdateVariables(Errval, EMErrval); - return Errval; -@@ -466,7 +466,7 @@ void JlsCodec::EncodeRIError(CContextRunMode& ctx, LONG Errval) - { - LONG k = ctx.GetGolomb(); - bool map = ctx.ComputeMap(Errval, k); -- LONG EMErrval = 2 * ABS(Errval) - ctx._nRItype - map; -+ LONG EMErrval = 2 * ABS(Errval) - ctx._nRItype - map; - - ASSERT(Errval == ctx.ComputeErrVal(EMErrval + ctx._nRItype, k)); - EncodeMappedValue(k, EMErrval, traits.LIMIT-J[_RUNindex]-1); -@@ -476,7 +476,7 @@ void JlsCodec::EncodeRIError(CContextRunMode& ctx, LONG Errval) - - template - Triplet JlsCodec::DecodeRIPixel(Triplet Ra, Triplet Rb) --{ -+{ - LONG Errval1 = DecodeRIError(_contextRunmode[0]); - LONG Errval2 = DecodeRIError(_contextRunmode[0]); - LONG Errval3 = DecodeRIError(_contextRunmode[0]); -@@ -513,18 +513,18 @@ Triplet JlsCodec::EncodeRIPixel(Trip - template - void JlsCodec::EncodeRunPixels(LONG runLength, bool endOfLine) - { -- while (runLength >= LONG(1 << J[_RUNindex])) -+ while (runLength >= LONG(1 << J[_RUNindex])) - { - STRATEGY::AppendOnesToBitStream(1); - runLength = runLength - LONG(1 << J[_RUNindex]); - IncrementRunIndex(); - } - -- if (endOfLine) -+ if (endOfLine) - { -- if (runLength != 0) -+ if (runLength != 0) - { -- STRATEGY::AppendOnesToBitStream(1); -+ STRATEGY::AppendOnesToBitStream(1); - } - } - else -@@ -556,7 +556,7 @@ LONG JlsCodec::DecodeRunPixels(PIXEL Ra, PIXEL* startPos, LONG - - if (index != cpixelMac) - { -- // incomplete run -+ // incomplete run - index += (J[_RUNindex] > 0) ? STRATEGY::ReadValue(J[_RUNindex]) : 0; - } - -@@ -566,7 +566,7 @@ LONG JlsCodec::DecodeRunPixels(PIXEL Ra, PIXEL* startPos, LONG - for (LONG i = 0; i < index; ++i) - { - startPos[i] = Ra; -- } -+ } - - return index; - } -@@ -582,7 +582,7 @@ LONG JlsCodec::DoRunMode(LONG index, EncoderStrategy*) - - LONG runLength = 0; - -- while (traits.IsNear(ptypeCurX[runLength],Ra)) -+ while (traits.IsNear(ptypeCurX[runLength],Ra)) - { - ptypeCurX[runLength] = Ra; - runLength++; -@@ -629,14 +629,24 @@ void JlsCodec::DoLine(SAMPLE*) - LONG index = 0; - LONG Rb = _previousLine[index-1]; - LONG Rd = _previousLine[index]; -+ LONG RANGE_UPPER = 1 << traits.bpp; -+ LONG RANGE_LOWER = - RANGE_UPPER; - - while(index < _width) -- { -+ { - LONG Ra = _currentLine[index -1]; - LONG Rc = Rb; - Rb = Rd; - Rd = _previousLine[index + 1]; - -+ // make sure that values are not out of range -+ if ( (Rd - Rb < RANGE_LOWER) || (Rd - Rb > RANGE_UPPER) -+ || (Rb - Rc < RANGE_LOWER) || (Rb - Rc > RANGE_UPPER) -+ || (Rc - Ra < RANGE_LOWER) || (Rc - Ra > RANGE_UPPER)) -+ { -+ throw JlsException(InvalidCompressedData); -+ } -+ - LONG Qs = ComputeContextID(QuantizeGratient(Rd - Rb), QuantizeGratient(Rb - Rc), QuantizeGratient(Rc - Ra)); - - if (Qs != 0) -@@ -648,8 +658,8 @@ void JlsCodec::DoLine(SAMPLE*) - { - index += DoRunMode(index, (STRATEGY*)(NULL)); - Rb = _previousLine[index-1]; -- Rd = _previousLine[index]; -- } -+ Rd = _previousLine[index]; -+ } - } - } - -@@ -661,7 +671,7 @@ void JlsCodec::DoLine(Triplet*) - { - LONG index = 0; - while(index < _width) -- { -+ { - Triplet Ra = _currentLine[index -1]; - Triplet Rc = _previousLine[index-1]; - Triplet Rb = _previousLine[index]; -@@ -671,7 +681,7 @@ void JlsCodec::DoLine(Triplet*) - LONG Qs2 = ComputeContextID(QuantizeGratient(Rd.v2 - Rb.v2), QuantizeGratient(Rb.v2 - Rc.v2), QuantizeGratient(Rc.v2 - Ra.v2)); - LONG Qs3 = ComputeContextID(QuantizeGratient(Rd.v3 - Rb.v3), QuantizeGratient(Rb.v3 - Rc.v3), QuantizeGratient(Rc.v3 - Ra.v3)); - -- -+ - if (Qs1 == 0 && Qs2 == 0 && Qs3 == 0) - { - index += DoRunMode(index, (STRATEGY*)(NULL)); -@@ -684,19 +694,19 @@ void JlsCodec::DoLine(Triplet*) - Rx.v3 = DoRegular(Qs3, _currentLine[index].v3, GetPredictedValue(Ra.v3, Rb.v3, Rc.v3), (STRATEGY*)(NULL)); - _currentLine[index] = Rx; - index++; -- } -+ } - } - } - - --// DoScan: Encodes or decodes a scan. -+// DoScan: Encodes or decodes a scan. - // In ILV_SAMPLE mode, multiple components are handled in DoLine - // In ILV_LINE mode, a call do DoLine is made for every component --// In ILV_NONE mode, DoScan is called for each component -+// In ILV_NONE mode, DoScan is called for each component - - template - void JlsCodec::DoScan(BYTE **ptr, size_t *size, size_t offset) --{ -+{ - _width = Info().width; - - STRATEGY::Init(ptr, size, offset); -@@ -706,11 +716,11 @@ void JlsCodec::DoScan(BYTE **ptr, size_t *size, size_t offset) - - OFVector vectmp(2 * components * pixelstride); - OFVector rgRUNindex(components); -- -+ - for (LONG line = 0; line < Info().height; ++line) - { -- _previousLine = &vectmp[1]; -- _currentLine = &vectmp[1 + components * pixelstride]; -+ _previousLine = &vectmp[1]; -+ _currentLine = &vectmp[1 + components * pixelstride]; - if ((line & 1) == 1) - { - PIXEL *tmp = _previousLine; -@@ -724,17 +734,17 @@ void JlsCodec::DoScan(BYTE **ptr, size_t *size, size_t offset) - for (int component = 0; component < components; ++component) - { - _RUNindex = rgRUNindex[component]; -- -+ - // initialize edge pixels used for prediction - _previousLine[_width] = _previousLine[_width - 1]; - _currentLine[-1] = _previousLine[0]; - DoLine((PIXEL*) NULL); // dummy arg for overload resolution -- -+ - rgRUNindex[component] = _RUNindex; - _previousLine += pixelstride; - _currentLine += pixelstride; - } -- -+ - if (_rect.Y <= line && line < _rect.Y + _rect.Height) - { - STRATEGY::OnLineEnd(_rect.Width, _currentLine + _rect.X - (components * pixelstride), pixelstride); -@@ -754,7 +764,7 @@ ProcessLine* JlsCodec::CreateProcess(void* pvoidOut) - return new PostProcesSingleComponent(pvoidOut, Info(), sizeof(typename TRAITS::PIXEL)); - - if (Info().colorTransform == 0) -- return new ProcessTransformed >(pvoidOut, Info(), TransformNone()); -+ return new ProcessTransformed >(pvoidOut, Info(), TransformNone()); - - if (Info().bitspersample == sizeof(SAMPLE)*8) - { -@@ -765,7 +775,7 @@ ProcessLine* JlsCodec::CreateProcess(void* pvoidOut) - case COLORXFORM_HP3 : return new ProcessTransformed >(pvoidOut, Info(), TransformHp3()); break; - default: throw JlsException(UnsupportedColorTransform); - } -- } -+ } - else if (Info().bitspersample > 8) - { - int shift = 16 - Info().bitspersample; -@@ -796,7 +806,7 @@ size_t JlsCodec::EncodeScan(const void* rawData, BYTE **ptr, si - } - - DoScan(ptr, size, offset); -- -+ - return STRATEGY::GetLength(); - - } -@@ -827,7 +837,7 @@ size_t JlsCodec::DecodeScan(void* rawData, const JlsRect& rect, - _rect = rect; - - DoScan(ptr, size, offset + readBytes); -- -+ - return STRATEGY::GetCurBytePos() - (*ptr + offset); - } - --- -2.39.2 - diff --git a/0021-bugfix-for-CVE-2025-25472.patch b/0021-bugfix-for-CVE-2025-25472.patch deleted file mode 100644 index e3dccad60b3cede9a5bf5a3feea7622ab3ef62d5..0000000000000000000000000000000000000000 --- a/0021-bugfix-for-CVE-2025-25472.patch +++ /dev/null @@ -1,39 +0,0 @@ -From 89a6e399f1e17d08a8bc8cdaa05b2ac9a50cd4f6 Mon Sep 17 00:00:00 2001 -From: Joerg Riesmeier -Date: Sat, 11 Jan 2025 17:59:39 +0100 -Subject: [PATCH] Fixed issue rendering invalid monochrome image. - -Fixed issue when rendering an invalid monochrome DICOM image where the -number of pixels stored does not match the expected number of pixels. -If the stored number is less than the expected number, the rest of the -pixel matrix for the intermediate representation was always filled with -the value 0. Under certain, very rare conditions, this could result in -memory problems reported by an Address Sanitizer (ASAN). Now, the rest -of the matrix is filled with the smallest possible value for the image. - -Thanks to Emmanuel Tacheau from the Cisco Talos team - for the original report, the sample -file (PoC) and further details. See TALOS-2024-2122 and CVE-2024-47796. ---- - dcmimgle/include/dcmtk/dcmimgle/dimoipxt.h | 4 ++-- - 1 file changed, 2 insertions(+), 2 deletions(-) - -diff --git a/dcmimgle/include/dcmtk/dcmimgle/dimoipxt.h b/dcmimgle/include/dcmtk/dcmimgle/dimoipxt.h -index e749a6b16..50389a540 100644 ---- a/dcmimgle/include/dcmtk/dcmimgle/dimoipxt.h -+++ b/dcmimgle/include/dcmtk/dcmimgle/dimoipxt.h -@@ -72,9 +72,9 @@ class DiMonoInputPixelTemplate - rescale(pixel); // "copy" or reference pixel data - this->determineMinMax(OFstatic_cast(T3, this->Modality->getMinValue()), OFstatic_cast(T3, this->Modality->getMaxValue())); - } -- /* erase empty part of the buffer (= blacken the background) */ -+ /* erase empty part of the buffer (= fill the background with the smallest possible value) */ - if ((this->Data != NULL) && (this->InputCount < this->Count)) -- OFBitmanipTemplate::zeroMem(this->Data + this->InputCount, this->Count - this->InputCount); -+ OFBitmanipTemplate::setMem(this->Data + this->InputCount, OFstatic_cast(T3, this->Modality->getAbsMinimum()), this->Count - this->InputCount); - } - } - --- -2.39.2 - diff --git a/dcmtk-3.6.9.tar.gz b/dcmtk-3.7.0.tar.gz similarity index 54% rename from dcmtk-3.6.9.tar.gz rename to dcmtk-3.7.0.tar.gz index f80b7787180d71ea5b2c06b58260b14ed19ac4d4..1aee651ee81d256ac816e958bcbe0be1160deb7b 100644 Binary files a/dcmtk-3.6.9.tar.gz and b/dcmtk-3.7.0.tar.gz differ diff --git a/dcmtk.spec b/dcmtk.spec index a427a447c35aa977800a041b0654f6f7e5d5ede1..08e5bbad6519106d53d43961a3c371bc53bb862e 100644 --- a/dcmtk.spec +++ b/dcmtk.spec @@ -1,18 +1,17 @@ -%define anolis_release 4 - -%global abi_version 19 +%define anolis_release 1 +%global abi_version 20 %bcond_with charls2 Name: dcmtk Summary: Offis DICOM Toolkit (DCMTK) -Version: 3.6.9 +Version: 3.7.0 %global soname_version %{abi_version}.%{version} Release: %{anolis_release}%{?dist} License: BSD -Source: https://dicom.offis.de/download/dcmtk/dcmtk369/dcmtk-3.6.9.tar.gz +Source: https://dicom.offis.de/download/dcmtk/dcmtk370/dcmtk-3.7.0.tar.gz URL: http://dicom.offis.de/dcmtk.php.en %if %{with charls2} @@ -35,13 +34,6 @@ Patch: 0016-Update-JpegLsEncode-for-CharLS-2.patch %endif Patch: 0017-Increase-sleep-for-tests.patch Patch: 0018-chore-undo-changes-to-standard-dirs.patch -Patch: 0019-bugfix-for-CVE-2024-52333.patch - -# https://git.dcmtk.org/?p=dcmtk.git;a=patch;h=3239a791542e1ea433d23aaa9e0a05a532ffabff -Patch: 0020-bugfix-for-CVE-2025-2357.patch - -# https://git.dcmtk.org/?p=dcmtk.git;a=patch;h=89a6e399f1e17d08a8bc8cdaa05b2ac9a50cd4f6 -Patch: 0021-bugfix-for-CVE-2025-25472.patch BuildRequires: gcc BuildRequires: gcc-c++ @@ -243,6 +235,10 @@ rm -f $RPM_BUILD_ROOT%{_datadir}/%{name}/wlistdb/OFFIS/lockfile %{_libdir}/libofstd.so %changelog +* Fri Dec 19 2025 lzq11122 - 3.7.0-1 +- Update to 3.7.0 for fix CVE-2025-9732 CVE-2025-14841 and CVE-2025-14607 +- Remove patch new version included + * Thu Nov 20 2025 tomcruiseqi - 3.6.9-4 - Fix CVE-2025-25472