]> git.proxmox.com Git - mirror_ubuntu-artful-kernel.git/commit
ALSA: seq: Fix OSS sysex delivery in OSS emulation
authorTakashi Iwai <tiwai@suse.de>
Tue, 7 Nov 2017 15:05:24 +0000 (16:05 +0100)
committerThadeu Lima de Souza Cascardo <cascardo@canonical.com>
Thu, 16 Nov 2017 21:05:38 +0000 (19:05 -0200)
commit55d632c52c08562548e67938a8d8fc5c1542d5bd
treec13c8b33fd0e9c861979146f67dbecede7feb87c
parente098c21e5ebd576b6b9afbc3a715a9b8df24d9fe
ALSA: seq: Fix OSS sysex delivery in OSS emulation

BugLink: http://bugs.launchpad.net/bugs/1732726
commit 132d358b183ac6ad8b3fea32ad5e0663456d18d1 upstream.

The SYSEX event delivery in OSS sequencer emulation assumed that the
event is encoded in the variable-length data with the straight
buffering.  This was the normal behavior in the past, but during the
development, the chained buffers were introduced for carrying more
data, while the OSS code was left intact.  As a result, when a SYSEX
event with the chained buffer data is passed to OSS sequencer port,
it may end up with the wrong memory access, as if it were having a too
large buffer.

This patch addresses the bug, by applying the buffer data expansion by
the generic snd_seq_dump_var_event() helper function.

Reported-by: syzbot <syzkaller@googlegroups.com>
Reported-by: Mark Salyzyn <salyzyn@android.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Stefan Bader <stefan.bader@canonical.com>
Signed-off-by: Thadeu Lima de Souza Cascardo <cascardo@canonical.com>
sound/core/seq/oss/seq_oss_midi.c
sound/core/seq/oss/seq_oss_readq.c
sound/core/seq/oss/seq_oss_readq.h