remarkable-linux/sound/core
Takashi Iwai f3ac9f7376 ALSA: seq: Fix link corruption by event error handling
The sequencer FIFO management has a bug that may lead to a corruption
(shortage) of the cell linked list.  When a sequencer client faces an
error at the event delivery, it tries to put back the dequeued cell.
When the first queue was put back, this forgot the tail pointer
tracking, and the link will be screwed up.

Although there is no memory corruption, the sequencer client may stall
forever at exit while flushing the pending FIFO cells in
snd_seq_pool_done(), as spotted by syzkaller.

This patch addresses the missing tail pointer tracking at
snd_seq_fifo_cell_putback().  Also the patch makes sure to clear the
cell->enxt pointer at snd_seq_fifo_event_in() for avoiding a similar
mess-up of the FIFO linked list.

Reported-by: Dmitry Vyukov <dvyukov@google.com>
Cc: <stable@vger.kernel.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2017-02-28 22:15:51 +01:00
..
oss ALSA: oss: don't opencode IS_REACHABLE() 2016-11-12 10:12:00 +01:00
seq ALSA: seq: Fix link corruption by event error handling 2017-02-28 22:15:51 +01:00
compress_offload.c ALSA: compress: fix some missing and misplaced \n in messages 2016-09-16 19:24:13 +02:00
control.c Merge branch 'for-next' into for-linus 2016-07-25 17:01:14 +02:00
control_compat.c ALSA: ctl: change return value in compatibility layer so that it's the same value in core implementation 2016-03-17 14:11:36 +01:00
ctljack.c
device.c
hrtimer.c ktime: Get rid of the union 2016-12-25 17:21:22 +01:00
hwdep.c
hwdep_compat.c
info.c ALSA: info: Return error for invalid read/write 2016-11-08 14:37:26 +01:00
info_oss.c
init.c
isadma.c
jack.c ALSA: jack: Allow building the jack layer without input device 2016-02-23 09:03:07 +01:00
Kconfig ALSA: timer: remove legacy rtctimer 2016-04-25 10:41:46 +02:00
Makefile ALSA: timer: remove legacy rtctimer 2016-04-25 10:41:46 +02:00
memalloc.c
memory.c
misc.c printk/sound: handle more message headers 2016-12-12 18:55:09 -08:00
pcm.c ALSA: pcm: Free chmap at PCM free callback, too 2016-07-08 09:15:44 +02:00
pcm_compat.c ALSA: pcm: Fix ioctls for X32 ABI 2016-02-28 17:44:35 +01:00
pcm_dmaengine.c ASoC: dmaengine_pcm: Add support for packed transfers 2016-04-27 17:34:11 +01:00
pcm_drm_eld.c
pcm_iec958.c ALSA: pcm: Allow 32 bit sample format in IEC958 channel status helper 2016-04-06 14:33:38 -07:00
pcm_lib.c ALSA: pcm: Bail out when chmap is already present 2016-05-10 17:05:16 +02:00
pcm_memory.c
pcm_misc.c
pcm_native.c ALSA: pcm: Fix avail to return error if stream is suspended 2016-09-06 12:10:29 +02:00
pcm_timer.c
pcm_trace.h
rawmidi.c ALSA: rawmidi: Add const to snd_rawmidi_ops 2017-01-12 12:49:36 +01:00
rawmidi_compat.c ALSA: rawmidi: Fix ioctls X32 ABI 2016-02-28 17:44:51 +01:00
sgbuf.c
sound.c
sound_oss.c
timer.c ALSA: timer: Reject user params with too small ticks 2017-02-28 15:06:01 +01:00
timer_compat.c ALSA: timer: fix gparams ioctl compatibility for different architectures 2016-03-23 08:06:16 +01:00
vmaster.c