From: Takashi Iwai Date: Wed, 8 Feb 2017 11:35:39 +0000 (+0100) Subject: ALSA: seq: Fix race at creating a queue X-Git-Tag: v3.2.87~64 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=9ced4235b06ae65916f12f157e83bd985aa9460a;p=pandora-kernel.git ALSA: seq: Fix race at creating a queue commit 4842e98f26dd80be3623c4714a244ba52ea096a8 upstream. When a sequencer queue is created in snd_seq_queue_alloc(),it adds the new queue element to the public list before referencing it. Thus the queue might be deleted before the call of snd_seq_queue_use(), and it results in the use-after-free error, as spotted by syzkaller. The fix is to reference the queue object at the right time. Reported-by: Dmitry Vyukov Signed-off-by: Takashi Iwai Signed-off-by: Ben Hutchings --- Reading git-diff-tree failed