Robb Glasser 0482dcd510 ALSA: pcm: prevent UAF in snd_pcm_info
commit 362bca57f5d78220f8b5907b875961af9436e229 upstream.

When the device descriptor is closed, the `substream->runtime` pointer
is freed. But another thread may be in the ioctl handler, case
SNDRV_CTL_IOCTL_PCM_INFO. This case calls snd_pcm_info_user() which
calls snd_pcm_info() which accesses the now freed `substream->runtime`.

Note: this fixes CVE-2017-0861

Signed-off-by: Robb Glasser <rglasser@google.com>
Signed-off-by: Nick Desaulniers <ndesaulniers@google.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-12-14 09:52:54 +01:00
..
2017-11-09 09:58:11 -08:00
2017-08-30 20:44:29 +02:00
2017-08-30 20:44:29 +02:00
2017-12-14 09:52:54 +01:00
2017-07-06 10:56:51 -07:00