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 92913C00144 for ; Fri, 29 Jul 2022 06:08:10 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234432AbiG2GIJ (ORCPT ); Fri, 29 Jul 2022 02:08:09 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:55670 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229512AbiG2GIG (ORCPT ); Fri, 29 Jul 2022 02:08:06 -0400 Received: from smtp-out1.suse.de (smtp-out1.suse.de [IPv6:2001:67c:2178:6::1c]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 47A2172ECD for ; Thu, 28 Jul 2022 23:08:06 -0700 (PDT) Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by smtp-out1.suse.de (Postfix) with ESMTPS id 46DD421BCC; Fri, 29 Jul 2022 06:07:46 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1659074866; 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=76aolg6qJ08B8cgAH4/C8qispGD4s7bPpZZ8CT0aqEs=; b=qTvvW1FIHri+HV0kVnxb6vh0t24ok9Wjlbg8AvBfK5ETrIcB0HyhjNzHLP8hePRSzwRLrU JSmudM4dcKHXvhIRvrGge93HxBOjUW0OlFjzQGMwz6c3jlipaFKCLtM8Z9mYzak4OMreIv 1HwqXAV6u2fkdajD8n3Kslg9JjK6lfk= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1659074866; 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=76aolg6qJ08B8cgAH4/C8qispGD4s7bPpZZ8CT0aqEs=; b=dyz3hsPzI1IvQT9mljSDN0AdGp1amwcrBjLGKPkEvobdc+mTgtIFFjfT0bUR7vHq4y2aQY pQnqnK9KcK2G/wBQ== Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by imap2.suse-dmz.suse.de (Postfix) with ESMTPS id 0FE6B13A8E; Fri, 29 Jul 2022 06:07:46 +0000 (UTC) Received: from dovecot-director2.suse.de ([192.168.254.65]) by imap2.suse-dmz.suse.de with ESMTPSA id Pox5AjJ542KMEQAAMHmgww (envelope-from ); Fri, 29 Jul 2022 06:07:46 +0000 Date: Fri, 29 Jul 2022 08:07:46 +0200 Message-ID: <87bkt8ladp.wl-tiwai@suse.de> From: Takashi Iwai To: Dipanjan Das Cc: Greg KH , 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 In-Reply-To: References: <874jz82kx0.wl-tiwai@suse.de> <87tu73p1o2.wl-tiwai@suse.de> User-Agent: Wanderlust/2.15.9 (Almost Unreal) Emacs/27.2 Mule/6.0 MIME-Version: 1.0 (generated by SEMI-EPG 1.14.7 - "Harue") Content-Type: text/plain; charset=US-ASCII Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, 29 Jul 2022 01:24:12 +0200, 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? Don't worry, Greg already picked up the fix commit :) thanks, Takashi 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 AC7F0C00144 for ; Fri, 29 Jul 2022 06:09:06 +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 CFAB3163E; Fri, 29 Jul 2022 08:08:13 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz CFAB3163E DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1659074943; bh=yKUX3n74ZLq+gD9W7m9vqGicBcdVlmfifpzECgLHQGs=; h=Date:From:To:Subject:In-Reply-To:References:Cc:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: From; b=MvxY9Bm3sUD/iyv604r0Yjmy0rXFZwVlSkPkfnYCQdzNgpTvHJZpWdFXetG6+6DNr AOwNl/p5uUUJYV4lVdWA9vhk51QSFzXCBcf7mS2V9EfX2ImSUh4Zkd+B1aYg/9Qxv/ v385f6wXOoBbzvtlM/NHW7De23nG2CahYsHDGdKg= Received: from alsa1.perex.cz (localhost.localdomain [127.0.0.1]) by alsa1.perex.cz (Postfix) with ESMTP id 60135F8015B; Fri, 29 Jul 2022 08:08:13 +0200 (CEST) Received: by alsa1.perex.cz (Postfix, from userid 50401) id 609C5F8049C; Fri, 29 Jul 2022 08:08:11 +0200 (CEST) Received: from smtp-out1.suse.de (smtp-out1.suse.de [195.135.220.28]) (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 4D973F8015B for ; Fri, 29 Jul 2022 08:08:05 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz 4D973F8015B Authentication-Results: alsa1.perex.cz; dkim=pass (1024-bit key) header.d=suse.de header.i=@suse.de header.b="qTvvW1FI"; dkim=permerror (0-bit key) header.d=suse.de header.i=@suse.de header.b="dyz3hsPz" Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by smtp-out1.suse.de (Postfix) with ESMTPS id 46DD421BCC; Fri, 29 Jul 2022 06:07:46 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1659074866; 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=76aolg6qJ08B8cgAH4/C8qispGD4s7bPpZZ8CT0aqEs=; b=qTvvW1FIHri+HV0kVnxb6vh0t24ok9Wjlbg8AvBfK5ETrIcB0HyhjNzHLP8hePRSzwRLrU JSmudM4dcKHXvhIRvrGge93HxBOjUW0OlFjzQGMwz6c3jlipaFKCLtM8Z9mYzak4OMreIv 1HwqXAV6u2fkdajD8n3Kslg9JjK6lfk= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1659074866; 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=76aolg6qJ08B8cgAH4/C8qispGD4s7bPpZZ8CT0aqEs=; b=dyz3hsPzI1IvQT9mljSDN0AdGp1amwcrBjLGKPkEvobdc+mTgtIFFjfT0bUR7vHq4y2aQY pQnqnK9KcK2G/wBQ== Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by imap2.suse-dmz.suse.de (Postfix) with ESMTPS id 0FE6B13A8E; Fri, 29 Jul 2022 06:07:46 +0000 (UTC) Received: from dovecot-director2.suse.de ([192.168.254.65]) by imap2.suse-dmz.suse.de with ESMTPSA id Pox5AjJ542KMEQAAMHmgww (envelope-from ); Fri, 29 Jul 2022 06:07:46 +0000 Date: Fri, 29 Jul 2022 08:07:46 +0200 Message-ID: <87bkt8ladp.wl-tiwai@suse.de> From: Takashi Iwai To: Dipanjan Das Subject: Re: KASAN: vmalloc-out-of-bounds Write in snd_pcm_hw_params In-Reply-To: References: <874jz82kx0.wl-tiwai@suse.de> <87tu73p1o2.wl-tiwai@suse.de> User-Agent: Wanderlust/2.15.9 (Almost Unreal) Emacs/27.2 Mule/6.0 MIME-Version: 1.0 (generated by SEMI-EPG 1.14.7 - "Harue") Content-Type: text/plain; charset=US-ASCII Cc: alsa-devel@alsa-project.org, fleischermarius@googlemail.com, Greg KH , linux-kernel@vger.kernel.org, tiwai@suse.com, 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 Fri, 29 Jul 2022 01:24:12 +0200, 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? Don't worry, Greg already picked up the fix commit :) thanks, Takashi