Fix A-ASSOCIATE-RQ/AC error-path leaks in DUL FSM.
Applied-Upstream:
2312891a8d058c862e00bcbd636e5da26308658a
Last-Update: 2026-05-29
Reviewed-By: Étienne Mollier <emollier@debian.org>
Bug-Debian: https://bugs.debian.org/
1141411
AE_3_AssociateConfirmationAccept and AE_6_ExamineAssociateRequest leaked
the whole parsed PDU graph (presentation contexts, transfer syntax
sub-chains, role list, user info) on error returns taken after
parseAssociate() succeeded, since only the success path freed it. For an
SCP this is remotely triggerable and accumulates per connection.
Free the parsed PDU before each such return;
translatePresentationContextList() also frees the proposed transfer
syntax list of a rejected context. Add a dcmnet regression test
(tassocleak.cc) driving the AE_6 zero-transfer-syntax path against an
in-process DcmSCP; leak-clean with the fix under DCMTK_WITH_SANITIZERS.
Thanks for the report and analysis to Abhinav Agarwal.
This closes DCMTK issue #1217.
Gbp-Pq: Name CVE-2026-35505.patch