Fix wlmscpfs crash on VR-spoofed seq. attributes.
authorMichael Onken <onken@open-connections.de>
Mon, 6 Jul 2026 20:39:03 +0000 (22:39 +0200)
committerÉtienne Mollier <emollier@debian.org>
Mon, 6 Jul 2026 20:39:03 +0000 (22:39 +0200)
commitd6244c102a6ef4ba0bb4d294420db6f21e673945
treea8a6f2c65d6b13c857aac1604923228c0d3a867e
parent4d1a8a91c01d5596ccc7c1d42c2d3776134772ef
Fix wlmscpfs crash on VR-spoofed seq. attributes.

Applied-Upstream: f4e0074682645b1a4289d62581926c4394d5c6d5
Last-Update: 2026-05-29
Reviewed-By: Étienne Mollier <emollier@debian.org>
Bug-Debian: https://bugs.debian.org/1141411

wldsfs.cc cast findAndGetElement() results to DcmSequenceOfItems*
without checking the VR. A C-FIND with a dictionary-SQ tag declared
under a non-SQ wire VR (Explicit VR) thus dispatched through the wrong
vtable and crashes the SCP (see also CVE-2024-28130 in dcmpstat).

Use findAndGetSequence(), which validates the VR. Also guard getItem(0)
against an empty ScheduledProcedureStepSequence and drop a bogus cast.

Thanks for the report and analysis to Abhinav Agarwal.

This closes DCMTK issue #1218.

Gbp-Pq: Name CVE-2026-44628a.patch
dcmwlm/libsrc/wldsfs.cc