Received: by 2002:a05:6a10:6d10:0:0:0:0 with SMTP id gq16csp54605pxb; Tue, 12 Apr 2022 16:37:57 -0700 (PDT) X-Google-Smtp-Source: ABdhPJw3VjS+eYT68vSm6Hfs6OONy/i+T49Lo6wKiPLyjzTVfVCazzyqZl/NMNHT/c+G1flz/dIp X-Received: by 2002:a17:903:40ce:b0:158:8178:8563 with SMTP id t14-20020a17090340ce00b0015881788563mr7142994pld.167.1649806676226; Tue, 12 Apr 2022 16:37:56 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1649806676; cv=none; d=google.com; s=arc-20160816; b=cxIjr1iL1IUafFG8GX/AzAmRpfh3iE8jzN+N9ZeC5kpCcYWUhopr+OEyFq9MwiU4CV rYT0Tma9pPaDHMO3wZSen/n5+xS1s/5NT+vTb297JKbaVblDa8Rcj4aioAjou6WQwa6i IjIL0VP6K+6woy2GLguJ9pE3byVFa4pdTCE8IOdXFjakD3xy+BsjNmCyRbnB/yG61+OD jJ+fSucQgi55QDugcTkX4NFC5jicttYsctPdUjIeuzPAkTHvTgxz1F5Ci9w/KnMTbqu7 PA7BHL7mL5LLYvGB9rOuitdfdZh0f46CHXRbKHlBaaOBsvwdrMf4rQyFIbkRX1PdNMZY Jebg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:user-agent:references:in-reply-to :subject:cc:to:from:message-id:date:dkim-signature:dkim-signature; bh=FkiUFak26W238IEF2QDnp+GxZTbgXdfnry5p+Bz72Q8=; b=pS2ixO5VXHcGLOtXzNlBCRSWMBKffMM6WGk7FTeAGIOUCZdOpVcT4A4FOHoU+ukyDG F/1Zc/E7yheqY5w4n+FHpDGHif5usWi0epFN7fWiXNFbietC8WiUiwW4d7YrPtQSIZO7 zmqz5AtymKDAFUE9OzlFVbJ1AwstkElUkGS2EKTAdpJ5pXPF1nIhrIoUt9bNPj22zZyy 3UrH81TgDVV2qzHv0DoppILRuVbvbTTRqQphodoE3fn/0ys+SViHXxt69Ca8IeU88+6Q Rmpfegfc+zq+sDGZSyB4mTLbmOXnYV8tovCsetaZbnFwiNkZ8zhlgLjv9Nzfzg7Alnl7 Vlng== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@suse.de header.s=susede2_rsa header.b="VaX/t9Ck"; dkim=neutral (no key) header.i=@suse.de; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=suse.de Return-Path: Received: from lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [2620:137:e000::1:18]) by mx.google.com with ESMTPS id kk6-20020a17090b4a0600b001befccfd1b3si14019191pjb.181.2022.04.12.16.37.54 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 12 Apr 2022 16:37:56 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) client-ip=2620:137:e000::1:18; Authentication-Results: mx.google.com; dkim=pass header.i=@suse.de header.s=susede2_rsa header.b="VaX/t9Ck"; dkim=neutral (no key) header.i=@suse.de; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=suse.de Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id F255C1BD996; Tue, 12 Apr 2022 14:29:43 -0700 (PDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S245446AbiDKHdk (ORCPT + 99 others); Mon, 11 Apr 2022 03:33:40 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:45532 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S245551AbiDKHdI (ORCPT ); Mon, 11 Apr 2022 03:33:08 -0400 Received: from smtp-out2.suse.de (smtp-out2.suse.de [195.135.220.29]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 3C20526E0 for ; Mon, 11 Apr 2022 00:30:55 -0700 (PDT) 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" Cc: Jaroslav Kysela , Takashi Iwai , Mark Brown , alsa-devel@alsa-project.org, linux-kernel@vger.kernel.org, syzbot+205eb15961852c2c5974@syzkaller.appspotmail.com 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 X-Spam-Status: No, score=-2.0 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,RDNS_NONE,SPF_HELO_NONE,T_SCC_BODY_TEXT_LINE autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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