diff options
author | Takashi Iwai <tiwai@suse.de> | 2025-04-29 14:48:41 +0200 |
---|---|---|
committer | Takashi Iwai <tiwai@suse.de> | 2025-04-29 14:52:06 +0200 |
commit | 56f1f30e6795b890463d9b20b11e576adf5a2f77 (patch) | |
tree | 638f4f28ded2134537e2130ed34e50c10fead5e6 /scripts/generate_rust_analyzer.py | |
parent | 1149719442d28c96dc63cad432b5a6db7c300e1a (diff) | |
download | linux-56f1f30e6795b890463d9b20b11e576adf5a2f77.tar.gz linux-56f1f30e6795b890463d9b20b11e576adf5a2f77.tar.bz2 linux-56f1f30e6795b890463d9b20b11e576adf5a2f77.zip |
ALSA: ump: Fix buffer overflow at UMP SysEx message conversion
The conversion function from MIDI 1.0 to UMP packet contains an
internal buffer to keep the incoming MIDI bytes, and its size is 4, as
it was supposed to be the max size for a MIDI1 UMP packet data.
However, the implementation overlooked that SysEx is handled in a
different format, and it can be up to 6 bytes, as found in
do_convert_to_ump(). It leads eventually to a buffer overflow, and
may corrupt the memory when a longer SysEx message is received.
The fix is simply to extend the buffer size to 6 to fit with the SysEx
UMP message.
Fixes: 0b5288f5fe63 ("ALSA: ump: Add legacy raw MIDI support")
Reported-by: Argusee <vr@darknavy.com>
Link: https://patch.msgid.link/20250429124845.25128-1-tiwai@suse.de
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to 'scripts/generate_rust_analyzer.py')
0 files changed, 0 insertions, 0 deletions