#1075721 octave-dicom: use-after-free with dicomdict

#1075721#5
Date:
2024-07-03 17:23:32 UTC
From:
To:
Dear Maintainer,

I wanted to forward along a fix I have done for Ubuntu for octave-dicom.
Ubuntu builds of octave-dicom were FTBFS on the built-in testsuite with
use-after-free / segfault type issues.  I have not reproduced this build
failure on Sid, but memory corruption issues are treacherous and might show up
later.

If desired, more details can be found at
https://bugs.launchpad.net/ubuntu/+source/octave-dicom/+bug/2069660 ,
but the summary is that I have moved the std::maps used by dicomdict to static
storage to address this.  I believe that the destructors are getting confused
with the multiple copies of dicomdict, due to the functionality being built
into several plugins and plugins being loaded by octave with RTLD_GLOBAL.

The patch passes the built-in testsuite, along with my attempts to confuse the
dict information loaded with specific plugin ordering.

Please see attached.  Also, the upstream bug tracker at
https://octave.space/savannah/?Action=get&Format=HTMLCSS&Title=[octave%20forge]%20(dicom)
seems to be down, so if you have information about how best to reach upstream,
I'd appreciate it.

#1075721#10
Date:
2024-07-03 18:12:11 UTC
From:
To:
* Dan Bungert <daniel.bungert@canonical.com> [2024-07-03 11:23]:

Indeed, the website octave.space is down. You might try the following
URL for searching the bugs filed against the dicom package:
https://savannah.gnu.org/search/?search=Search&words0=dicom&type_of_search=bugs&only_group_id=1925&exact=1&max_rows=#options

You might file a bug report using this URL:
https://savannah.gnu.org/bugs/?group=octave&func=additem

Best,

Rafael Laboissière