From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from alsa0.perex.cz (alsa0.perex.cz [77.48.224.243]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id CF1EEC433EF for ; Mon, 11 Apr 2022 07:32:00 +0000 (UTC) Received: from alsa1.perex.cz (alsa1.perex.cz [207.180.221.201]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by alsa0.perex.cz (Postfix) with ESMTPS id 0D47A16C6; Mon, 11 Apr 2022 09:31:08 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz 0D47A16C6 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1649662318; bh=aElULTWrmQ9nA06GFAxFWUzzQUnI6LEzmGYSvr9MDEA=; h=Date:From:To:Subject:In-Reply-To:References:Cc:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: From; b=dTmX7sb9+8pybJtyPT3ihKNrSFEXIGKVFLIqovzEtYasAWJmwPupNZ5AMPp4MDs9X Xl/0sOd23Skvkkz7ObqK9lhHmA+kAw3aOWitqVrpnygA1Jym6NhBvb3WBF3EFyFpZu YNWGLmTELD4CcDTH2bQTOiUSSKoTDLdzWC1FC9hk= Received: from alsa1.perex.cz (localhost.localdomain [127.0.0.1]) by alsa1.perex.cz (Postfix) with ESMTP id 8BF5EF80249; Mon, 11 Apr 2022 09:31:07 +0200 (CEST) Received: by alsa1.perex.cz (Postfix, from userid 50401) id 61E5FF80279; Mon, 11 Apr 2022 09:31:05 +0200 (CEST) Received: from smtp-out2.suse.de (smtp-out2.suse.de [195.135.220.29]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by alsa1.perex.cz (Postfix) with ESMTPS id B3B1FF800E8 for ; Mon, 11 Apr 2022 09:30:54 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz B3B1FF800E8 Authentication-Results: alsa1.perex.cz; dkim=pass (1024-bit key) header.d=suse.de header.i=@suse.de header.b="VaX/t9Ck"; dkim=permerror (0-bit key) header.d=suse.de header.i=@suse.de header.b="HMPQ5Y8k" Received: from relay2.suse.de (relay2.suse.de [149.44.160.134]) by smtp-out2.suse.de (Postfix) with ESMTP id E9E1F1F38D; Mon, 11 Apr 2022 07:30:53 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1649662253; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=FkiUFak26W238IEF2QDnp+GxZTbgXdfnry5p+Bz72Q8=; b=VaX/t9CkRQ8mJFi/T2qHw3HWMhL6QJZOQ3RJQivpldSfSPOBQ8LWYtSX1Qc+3qyB2ZX6lc z1bS9ApZLX0XbF08sDIQ5fA5rN5UBiBX65Sk+9aJE6fZwFslcA9lxWTDG7hFNfI+oWMywz xC/GEsbK6j/IvtPrrPXdUXxGhVXJvos= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1649662253; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=FkiUFak26W238IEF2QDnp+GxZTbgXdfnry5p+Bz72Q8=; b=HMPQ5Y8kPZMA+kiMsbHF/yVX7IGaILTy24ySHKbpCsb9GRvgFOq6XYW6ZFNcMXFgtW2Hk2 a464EOcjb9DoN6CA== Received: from alsa1.suse.de (alsa1.suse.de [10.160.4.42]) by relay2.suse.de (Postfix) with ESMTP id CD0EDA3B8A; Mon, 11 Apr 2022 07:30:53 +0000 (UTC) Date: Mon, 11 Apr 2022 09:30:53 +0200 Message-ID: From: Takashi Iwai To: "Fabio M. De Francesco" Subject: Re: [PATCH] ALSA: pcm: Test for "silence" field in struct "pcm_format_data" In-Reply-To: <20220409012655.9399-1-fmdefrancesco@gmail.com> References: <20220409012655.9399-1-fmdefrancesco@gmail.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 Cc: alsa-devel@alsa-project.org, linux-kernel@vger.kernel.org, Takashi Iwai , syzbot+205eb15961852c2c5974@syzkaller.appspotmail.com, Mark Brown X-BeenThere: alsa-devel@alsa-project.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: "Alsa-devel mailing list for ALSA developers - http://www.alsa-project.org" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: alsa-devel-bounces@alsa-project.org Sender: "Alsa-devel" On Sat, 09 Apr 2022 03:26:55 +0200, Fabio M. De Francesco wrote: > > Syzbot reports "KASAN: null-ptr-deref Write in > snd_pcm_format_set_silence".[1] > > It is due to missing validation of the "silence" field of struct > "pcm_format_data" in "pcm_formats" array. > > Add a test for valid "pat" and, if it is not so, return -EINVAL. > > [1] https://lore.kernel.org/lkml/000000000000d188ef05dc2c7279@google.com/ > > Reported-and-tested-by: syzbot+205eb15961852c2c5974@syzkaller.appspotmail.com > Signed-off-by: Fabio M. De Francesco Thanks, applied now. > --- > > I wasn't able to figure out the commit for the "Fixes:" tag. If this patch > is good, can someone please help with providing this missing information? That must be present from the very beginning. I just add Cc-to-stable for allowing backport to all releases. thanks, Takashi