FS#69425 - [sdl2_mixer] Crash in fluidsynth >= 2.1.6

Attached to Project: Arch Linux
Opened by Dirk Dankhoff (Bluthund) - Sunday, 24 January 2021, 14:09 GMT
Last edited by Sven-Hendrik Haase (Svenstaro) - Friday, 29 January 2021, 06:27 GMT
Task Type Bug Report
Category Upstream Bugs
Status Closed
Assigned To Sven-Hendrik Haase (Svenstaro)
Architecture All
Severity Medium
Priority Normal
Reported Version
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 0
Private No

Details

Description:

A bug in SDL2_Mixer <= 2.0.4 will crash fluidsynth >= 2.1.6 because the objects are destroyed in an illegal order.

Additional info:
* package version(s)
sdl2_mixer-2.0.4-5-x86_64
fluidsynth-2.1.6-1-x86_64

* config and/or log files etc.
coredump (see attachment)

* link to upstream bug report, if any
https://www.fluidsynth.org/news/2021/01/23/sdl2-mixer-bug/

Steps to reproduce:

- Setup SDL2_mixer to use fluidsynth via SDL_SOUNDFONTS env variable (soundfonts for testing: https://github.com/FluidSynth/fluidsynth/wiki/SoundFont): `export SDL_SOUNDFONTS=${HOME}/.local/share/soundfonts/RLNDGM.SF2`
- Start application that uses fluidsynth via SDL2_mixer - e.g crispy-doom(AUR) (https://aur.archlinux.org/packages/crispy-doom): `crispy-doom-setup (Configure Sound -> Music: MIDI -> Save parameters and launch DOOM)`
- Start a new game or wait for first demo to play
- Crash when MIDI change is supposed to take place

As a workaround downgrading fluidsynth to 2.1.5-2 mitigates the crash.
This task depends upon

Closed by  Sven-Hendrik Haase (Svenstaro)
Friday, 29 January 2021, 06:27 GMT
Reason for closing:  Fixed
Comment by Sven-Hendrik Haase (Svenstaro) - Monday, 25 January 2021, 11:21 GMT
Any chance you can report this upstream to sdl and link the report here?
Comment by Dirk Dankhoff (Bluthund) - Monday, 25 January 2021, 11:56 GMT
Upstream already patched the use-after-free in https://hg.libsdl.org/SDL_mixer/rev/b0afe341a91d after the fluidsynth guys send them a patch (https://github.com/FluidSynth/fluidsynth/issues/748). This seems to have been "fast-pathed" since there is no related bug report in the SDL bug tracker.

There hasn't been a new release though (Debian and openSUSE backported).
Comment by Sven-Hendrik Haase (Svenstaro) - Tuesday, 26 January 2021, 19:58 GMT
Should be fixed. Please test your use case.
Comment by Dirk Dankhoff (Bluthund) - Thursday, 28 January 2021, 19:37 GMT
Can confirm this is fixed with sdl2_mixer-2.0.4-6-x86_64.

Loading...