vendor:
N/A
by:
Exploit Database
9.8
CVSS
HIGH
Use-After-Free
416
CWE
Product Name: N/A
Affected Version From: N/A
Affected Version To: N/A
Patch Exists: YES
Related CWE: N/A
CPE: N/A
Metasploit:
N/A
Other Scripts:
N/A
Platforms Tested: Windows
2020
MidiManagerWin Use-After-Free
MidiManagerWin uses an instance_id mechanism to ensure that delayed tasks are only executed if the MidiManager instance that they were scheduled on is still alive. However, this instance_id is an int, and there is no check that it hasn't overflowed, unlike in the linux and mac implementations (MidiManagerAlsa). This means that if a delayed sendData on a stale MidiManagerWin instance is queued up, and then the instance id is wrapped, this will trigger a use-after-free when that task triggers. A proof of concept is available that demonstrates the issue in a more convenient amount of time for testing.
Mitigation:
Ensure that the instance_id is checked for overflow and that the MidiManagerWin instance is still alive before executing any delayed tasks.