Impact
A race condition during unloading of a DLS file can trigger a heap-based use-after-free. A concurrently running thread may be pending to unload a DLS file, leading to use of freed memory, if
- the synthesizer is being concurrently destroyed, or
- samples of the (unloaded) DLS file are concurrently used to synthesize audio.
Realistically, both scenarios will result in a denial of service. In worst cases, it may result in arbitrary code execution in the context of an application using FluidSynth.
Patches
Update to 2.5.2 or later.
Workarounds
The problem will not occur, when explicitly unloading a DLS file (before synth destruction), provided that at the time of unloading, no samples of the respective file are used by active voices.
The problem will not occur in versions of FluidSynth that have been compiled without native DLS support.
References
#1728, #1717
Impact
A race condition during unloading of a DLS file can trigger a heap-based use-after-free. A concurrently running thread may be pending to unload a DLS file, leading to use of freed memory, if
Realistically, both scenarios will result in a denial of service. In worst cases, it may result in arbitrary code execution in the context of an application using FluidSynth.
Patches
Update to 2.5.2 or later.
Workarounds
The problem will not occur, when explicitly unloading a DLS file (before synth destruction), provided that at the time of unloading, no samples of the respective file are used by active voices.
The problem will not occur in versions of FluidSynth that have been compiled without native DLS support.
References
#1728, #1717