From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752699AbdLEWaZ (ORCPT ); Tue, 5 Dec 2017 17:30:25 -0500 Received: from mx2.suse.de ([195.135.220.15]:43316 "EHLO mx2.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752070AbdLEWaV (ORCPT ); Tue, 5 Dec 2017 17:30:21 -0500 Date: Tue, 05 Dec 2017 23:30:19 +0100 Message-ID: From: Takashi Iwai To: Kees Cook Cc: Nick Desaulniers , moderated for non-subscribers , Arvind Yadav , Robb Glasser , Jaroslav Kysela , Takashi Sakamoto , Markus Elfring , LKML Subject: Re: [PATCH] ALSA: pcm: prevent UAF in snd_pcm_info In-Reply-To: References: <20171205171657.74392-1-ndesaulniers@google.com> User-Agent: Wanderlust/2.15.9 (Almost Unreal) SEMI/1.14.6 (Maruoka) FLIM/1.14.9 (=?UTF-8?B?R29qxY0=?=) APEL/10.8 Emacs/25.3 (x86_64-suse-linux-gnu) MULE/6.0 (HANACHIRUSATO) MIME-Version: 1.0 (generated by SEMI 1.14.6 - "Maruoka") Content-Type: text/plain; charset=US-ASCII Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, 05 Dec 2017 20:29:07 +0100, Kees Cook wrote: > > On Tue, Dec 5, 2017 at 11:14 AM, Takashi Iwai wrote: > > On Tue, 05 Dec 2017 18:16:55 +0100, > > Nick Desaulniers wrote: > >> > >> From: Robb Glasser > >> > >> 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`. > >> > >> Signed-off-by: Robb Glasser > >> Signed-off-by: Nick Desaulniers > > > > Looks reasonable. Applied with Cc to stable now. > > FWIW, this was assigned CVE-2017-0861. (Best to get it into the commit > log if possible.) OK, I updated the changelog. Thanks for information. Takashi