Received: by 2002:a05:6358:45e:b0:b5:b6eb:e1f9 with SMTP id 30csp2830421rwe; Mon, 29 Aug 2022 00:29:10 -0700 (PDT) X-Google-Smtp-Source: AA6agR7olN+Ecgtv4imNIsrnn7FWKOjUNlvmoKxQUsM5SePuuQm/2TyLDZ0gmNHimbf8Xxil+eYG X-Received: by 2002:a63:ba05:0:b0:42b:229d:e644 with SMTP id k5-20020a63ba05000000b0042b229de644mr12564602pgf.125.1661758150569; Mon, 29 Aug 2022 00:29:10 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1661758150; cv=none; d=google.com; s=arc-20160816; b=jw3NimKdM3HV4pSFjr16aOlDNyJaJGoUSkKGkGeuCRRQeJfzgLH3rIi+J51/GUdLp0 5QAuVPr1QtE0ZD7AXb8bqfyJBqApqjT9TFgb/7x9G/NRLNeKtbhMQyPum28cHp03za3Z YCecARo3io5j8fBRIiUIW9x9lCblveUTYqD/WQbxTbaWsQJmVft9feY61DB2JMBgoT8R MpGQCMLvrI62rFSvjrmNkn8fGWIzx9BZyNul4zB5hxaAYBv5i5sjmfH99IWCDVbOfzNo FItRmlHOCzvNvuEZmGpI0JpYbjSthV2YZwO9cEOA6PXVQOM4ZinN+5x7C8xmMCRICqy7 Tj1g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to:from :references:cc:to:content-language:subject:user-agent:mime-version :date:message-id:dkim-signature; bh=hcPRhFm7mNV6NpDp2k0Lb7eWVPc8YWQH000p3YsLMTU=; b=pFav0YQmsfIGGYfYxdR94RPKn6IVPpwsb6pLpmdVkhc4r1EPTWr2a9K1jZLcUgy+Q2 r/8l/aT8j+Bb4iIvTxfTU9b1G8WBIrwPvYCWzYGen1NQ5yLjkgzRVYbDz4Fq/Guh6n0e Fw9diFC5qGWfgCpC4WKvoig7IZwDUtfkwBcxcGM3pXNwgzsm0y46j4TMF6jlFzVJBSkG CnOPUBXjAKM2AUGhA/FofGoF37LAaKO1h4voYQHnJEuuOMOhgR/W9laYgXM4WszgQdGc ONlBYIwaaTF8ldlfFs40x+IHAuJ3Iwx6g7RKvkbxJe66Zz75kO60Pl57AE8pZt0xPbRD dDVQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=Uxn4y1SX; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id l24-20020a17090aaa9800b001fd833579aesi5761982pjq.111.2022.08.29.00.28.59; Mon, 29 Aug 2022 00:29:10 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=Uxn4y1SX; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229468AbiH2HXp (ORCPT + 99 others); Mon, 29 Aug 2022 03:23:45 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:42128 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229683AbiH2HXk (ORCPT ); Mon, 29 Aug 2022 03:23:40 -0400 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 64D5A4DF0C for ; Mon, 29 Aug 2022 00:23:39 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1661757818; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=hcPRhFm7mNV6NpDp2k0Lb7eWVPc8YWQH000p3YsLMTU=; b=Uxn4y1SXoRWugzFGvW6MhjriLT1hq+7zrd/y61PzVpmzJLjos0ZUvR1dmvlpfzZkYmiNoM bczeX8SBvHOAzBnutAhrSxdTvhvkrEcYu+YPyby3EhXSNIPXVTeI+8BGdD+HtWvQSStzGH G7avESVNpQlGhM45sLCQy9X6mUbRh18= Received: from mimecast-mx02.redhat.com (mimecast-mx02.redhat.com [66.187.233.88]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-595-32U3eHkIMCOWtsWdYN67hA-1; Mon, 29 Aug 2022 03:23:35 -0400 X-MC-Unique: 32U3eHkIMCOWtsWdYN67hA-1 Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.rdu2.redhat.com [10.11.54.6]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 736BF811E81; Mon, 29 Aug 2022 07:23:34 +0000 (UTC) Received: from [10.39.208.19] (unknown [10.39.208.19]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 40EA72166B26; Mon, 29 Aug 2022 07:23:32 +0000 (UTC) Message-ID: <6f874c0b-cea2-e835-ad1c-8cd21fb1a82e@redhat.com> Date: Mon, 29 Aug 2022 09:23:30 +0200 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.12.0 Subject: Re: [PATCH] vduse: prevent uninitialized memory accesses Content-Language: en-US To: Dan Carpenter Cc: linux-kernel@vger.kernel.org, virtualization@lists.linux-foundation.org, elic@nvidia.com, guanjun@linux.alibaba.com, parav@nvidia.com, gautam.dawar@xilinx.com, xieyongji@bytedance.com, jasowang@redhat.com, mst@redhat.com References: <20220826161605.559317-1-maxime.coquelin@redhat.com> <20220827065435.GL2030@kadam> From: Maxime Coquelin In-Reply-To: <20220827065435.GL2030@kadam> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Scanned-By: MIMEDefang 2.78 on 10.11.54.6 X-Spam-Status: No, score=-2.8 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,NICE_REPLY_A, RCVD_IN_DNSWL_LOW,SPF_HELO_NONE,SPF_NONE,T_SCC_BODY_TEXT_LINE autolearn=ham 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 8/27/22 08:54, Dan Carpenter wrote: > On Fri, Aug 26, 2022 at 06:16:05PM +0200, Maxime Coquelin wrote: >> If the VDUSE application provides a smaller config space >> than the driver expects, the driver may use uninitialized >> memory from the stack. >> >> This patch prevents it by initializing the buffer passed by >> the driver to store the config value. >> >> Signed-off-by: Maxime Coquelin > > This sounds like it needs a Fixes tag? Yes, I actually did it, but somehow forgot to generate the patch bedore posting. I'll post a v2 soon. Thanks, Maxime > regards, > dan carpenter >