]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
ALSA: seq: oss: Fix races at processing SysEx messages
authorTakashi Iwai <tiwai@suse.de>
Mon, 30 Dec 2024 11:05:35 +0000 (12:05 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 9 Jan 2025 12:30:05 +0000 (13:30 +0100)
commitcff1de87ed14fc0f2332213d2367100e7ad0753a
tree0958f7ecaee124bff912865877c1141a15bdac13
parent12539ac4a671ab7e777732c02df885511170ab13
ALSA: seq: oss: Fix races at processing SysEx messages

commit 0179488ca992d79908b8e26b9213f1554fc5bacc upstream.

OSS sequencer handles the SysEx messages split in 6 bytes packets, and
ALSA sequencer OSS layer tries to combine those.  It stores the data
in the internal buffer and this access is racy as of now, which may
lead to the out-of-bounds access.

As a temporary band-aid fix, introduce a mutex for serializing the
process of the SysEx message packets.

Reported-by: Kun Hu <huk23@m.fudan.edu.cn>
Closes: https://lore.kernel.org/2B7E93E4-B13A-4AE4-8E87-306A8EE9BBB7@m.fudan.edu.cn
Cc: <stable@vger.kernel.org>
Link: https://patch.msgid.link/20241230110543.32454-1-tiwai@suse.de
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
sound/core/seq/oss/seq_oss_synth.c