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 vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 7A196C00144 for ; Fri, 29 Jul 2022 08:13:33 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235510AbiG2INc (ORCPT ); Fri, 29 Jul 2022 04:13:32 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:52158 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235432AbiG2INa (ORCPT ); Fri, 29 Jul 2022 04:13:30 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id B45F281B1A for ; Fri, 29 Jul 2022 01:13:29 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 50ECC61CA5 for ; Fri, 29 Jul 2022 08:13:29 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 514A0C433C1; Fri, 29 Jul 2022 08:13:28 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1659082408; bh=yDZnCB3APvLSk3XRDlJBpBbSxgoh+g1mEqhb2QgyFDc=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=DoxTatfhQb/8esRQ+KtIyE1ZXjVjpBPY3kglXwx7xahU4peTY6kTo9Q9Eewr9qypb P0HxCrA1d22/JFR6nmZRr0aSVWHxKWPxXJ8/n6a6Uz+tXizo8JA/AZm2adRqEdyp1D ybJyOHq+wJfDv3wuU2x9St2rAKfz4oPoNXyN5cFM= Date: Fri, 29 Jul 2022 10:13:26 +0200 From: Greg KH To: Dipanjan Das Cc: Takashi Iwai , perex@perex.cz, tiwai@suse.com, consult.awy@gmail.com, alsa-devel@alsa-project.org, linux-kernel@vger.kernel.org, syzkaller@googlegroups.com, fleischermarius@googlemail.com, its.priyanka.bose@gmail.com Subject: Re: KASAN: vmalloc-out-of-bounds Write in snd_pcm_hw_params Message-ID: References: <874jz82kx0.wl-tiwai@suse.de> <87tu73p1o2.wl-tiwai@suse.de> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Jul 28, 2022 at 04:24:12PM -0700, Dipanjan Das wrote: > On Tue, Jul 26, 2022 at 10:25 PM Takashi Iwai wrote: > > > > Thanks for the analysis. A good news is that, at least for the > > vmalloc() case, it's a kind of false-positive; vmalloc() always takes > > the full pages, so practically seen, the size is page-aligned. It's > > fooling the memory checker, though. > > > > But the similar problem could be seen with genalloc calls, and this > > was fixed by the upstream commit > > 5c1733e33c888a3cb7f576564d8ad543d5ad4a9e > > ALSA: memalloc: Align buffer allocations in page size > > > > I suppose you can simply backport this commit to 5.10.y. Could you > > confirm that this fixes your problem? > > We confirm that the patch you proposed fixes the problem (blocks the > reproducer). How do we proceed with getting the issue fixed? Do we > send a patch according to the steps detailed here: > https://www.kernel.org/doc/html/latest/process/stable-kernel-rules.html? Normally, yes, that is the correct process. But as Takashi mentioned, I already picked it up as I happened to see this thread. thanks, greg k-h 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 40D3FC19F2B for ; Fri, 29 Jul 2022 08:14:32 +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 8F412165D; Fri, 29 Jul 2022 10:13:40 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz 8F412165D DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1659082470; bh=yDZnCB3APvLSk3XRDlJBpBbSxgoh+g1mEqhb2QgyFDc=; h=Date:From:To:Subject:References:In-Reply-To:Cc:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: From; b=cZLaLp47+DQ1AtcowiYrQ9YR0amD++lC4LVgYlKx3WCqxivcoRNWak2PqbBNLbdhL dJPSw9n3DH9nMwnxH5mwn1AUZ3GNrEYgklHuZ2HHUvCYT+mzdTzOkErP74B7RdyxQN DPwDHP4FWQMjH7Zs7O2zXCHZlAQhSbn8Sqtw46dc= Received: from alsa1.perex.cz (localhost.localdomain [127.0.0.1]) by alsa1.perex.cz (Postfix) with ESMTP id 3250BF80224; Fri, 29 Jul 2022 10:13:40 +0200 (CEST) Received: by alsa1.perex.cz (Postfix, from userid 50401) id 806B6F8049C; Fri, 29 Jul 2022 10:13:38 +0200 (CEST) Received: from dfw.source.kernel.org (dfw.source.kernel.org [IPv6:2604:1380:4641:c500::1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by alsa1.perex.cz (Postfix) with ESMTPS id 4CD0BF80224 for ; Fri, 29 Jul 2022 10:13:32 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz 4CD0BF80224 Authentication-Results: alsa1.perex.cz; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b="DoxTatfh" Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 4CB7861CA1; Fri, 29 Jul 2022 08:13:29 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 514A0C433C1; Fri, 29 Jul 2022 08:13:28 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1659082408; bh=yDZnCB3APvLSk3XRDlJBpBbSxgoh+g1mEqhb2QgyFDc=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=DoxTatfhQb/8esRQ+KtIyE1ZXjVjpBPY3kglXwx7xahU4peTY6kTo9Q9Eewr9qypb P0HxCrA1d22/JFR6nmZRr0aSVWHxKWPxXJ8/n6a6Uz+tXizo8JA/AZm2adRqEdyp1D ybJyOHq+wJfDv3wuU2x9St2rAKfz4oPoNXyN5cFM= Date: Fri, 29 Jul 2022 10:13:26 +0200 From: Greg KH To: Dipanjan Das Subject: Re: KASAN: vmalloc-out-of-bounds Write in snd_pcm_hw_params Message-ID: References: <874jz82kx0.wl-tiwai@suse.de> <87tu73p1o2.wl-tiwai@suse.de> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Cc: alsa-devel@alsa-project.org, fleischermarius@googlemail.com, Takashi Iwai , tiwai@suse.com, linux-kernel@vger.kernel.org, consult.awy@gmail.com, syzkaller@googlegroups.com, its.priyanka.bose@gmail.com 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 Thu, Jul 28, 2022 at 04:24:12PM -0700, Dipanjan Das wrote: > On Tue, Jul 26, 2022 at 10:25 PM Takashi Iwai wrote: > > > > Thanks for the analysis. A good news is that, at least for the > > vmalloc() case, it's a kind of false-positive; vmalloc() always takes > > the full pages, so practically seen, the size is page-aligned. It's > > fooling the memory checker, though. > > > > But the similar problem could be seen with genalloc calls, and this > > was fixed by the upstream commit > > 5c1733e33c888a3cb7f576564d8ad543d5ad4a9e > > ALSA: memalloc: Align buffer allocations in page size > > > > I suppose you can simply backport this commit to 5.10.y. Could you > > confirm that this fixes your problem? > > We confirm that the patch you proposed fixes the problem (blocks the > reproducer). How do we proceed with getting the issue fixed? Do we > send a patch according to the steps detailed here: > https://www.kernel.org/doc/html/latest/process/stable-kernel-rules.html? Normally, yes, that is the correct process. But as Takashi mentioned, I already picked it up as I happened to see this thread. thanks, greg k-h