Received: by 2002:a05:6358:45e:b0:b5:b6eb:e1f9 with SMTP id 30csp2855547rwe; Mon, 29 Aug 2022 01:07:43 -0700 (PDT) X-Google-Smtp-Source: AA6agR4/07v5DKTpqXulzrDKehwUHWkyDzhYiXkqxZdBpC/d6u4dxOb/q35IHtVzm52mGkD8uNHe X-Received: by 2002:a05:6402:378f:b0:43a:d3f5:79f2 with SMTP id et15-20020a056402378f00b0043ad3f579f2mr15665627edb.338.1661760463613; Mon, 29 Aug 2022 01:07:43 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1661760463; cv=none; d=google.com; s=arc-20160816; b=HT6AeEXw4EsDhtdkdiFDXxHHd8NiTZQ5NMymAD8jVFekvaXan16CEKBrSW3cNqvU5M 7ver3As8USRD926cE34fryRg7UeV1xrlKP3baZC3RMHqbqkubwC+DFU/XYFnZWYWbXB2 f27jkQtMMptTI4MjM2+3fgCdNej/zJvY5huY5ApYy/RA3oOzrLaV3JMb8WGYH2Iau+IO pgEHDL8cRvoNnKWqfnWZ/eW7whplnqa4KWWkScslNVQ2whPl5nyWJNdjvFh7r+BJ8v1m B9Kz3K6QxMpWtPO9Zbnop0B+a7NreWdFnZo6argXO449QX/M4+W4cPdMw+DaZ2rKJHao JzGA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=uw7FhB3N8R3kKYDzEneA6x2edMUyNzPRX6+zCtpPgg0=; b=NN4Gy3m+20+Rgys0KAWp38KiR9GgD00OJZBQjN3mGmRvfMImjV87tQg8ThPhTPdakP axGWZu8704mV+2zKAX2UokIebZbdybi8AWeCi34JcC1tjKuCcwEq0NyjXnZwWABz1xb8 /TLe+f/ZnRfU6q7YzFV0L1qpLG5MHh4o6NamtZ3yn7HFtM6wOSCHH2KQz+eC+yMBVZaL B3Oc/htcj1kb8w0+aEcS/y7h1GMR7q30o4y++PlJI1hIXbH7UGpsY+cSUlDxUYrzMUg0 ra30ZX5NGItKkAEID6YeZrOR5Qeft//nTNYDiqQ67ZGEJ+UBSCQ8ZlK7/ksOKR1HiFR3 +aKg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=yt6GPMZR; 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=linuxfoundation.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id g16-20020a056402321000b00447f0236543si6051713eda.514.2022.08.29.01.07.18; Mon, 29 Aug 2022 01:07:43 -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=@linuxfoundation.org header.s=korg header.b=yt6GPMZR; 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=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229561AbiH2Htt (ORCPT + 99 others); Mon, 29 Aug 2022 03:49:49 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:42258 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229715AbiH2Htp (ORCPT ); Mon, 29 Aug 2022 03:49:45 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [IPv6:2604:1380:4641:c500::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id F1FDE4F66C; Mon, 29 Aug 2022 00:49:42 -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 4553B60ED2; Mon, 29 Aug 2022 07:49:42 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id F3748C433D6; Mon, 29 Aug 2022 07:49:40 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1661759381; bh=aGFduZhHwfv9PnY3vRPitP/7usWw3M+bWFBLuYbVIS0=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=yt6GPMZRoQxQaQf7mU/klM55vy27vm/KW0cqKOSj5iD/P/uxiaB1ghupJK+xPOHZE jycDWKH4POpzprvZDeN7T2Blk08twg/3ueahnOlDziRYemic+wlJlb/b7Ty6IgS/HJ yKAcr7PsClex4E5DnXvgHPsNsfCpWcgDjEqnMmng= Date: Mon, 29 Aug 2022 09:48:44 +0200 From: Greg KH To: Maxime Coquelin 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, dan.carpenter@oracle.com, xieyongji@bytedance.com, jasowang@redhat.com, mst@redhat.com, stable@vger.kernel.org Subject: Re: [PATCH v2] vduse: prevent uninitialized memory accesses Message-ID: References: <20220829073424.5677-1-maxime.coquelin@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20220829073424.5677-1-maxime.coquelin@redhat.com> X-Spam-Status: No, score=-7.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_HI, SPF_HELO_NONE,SPF_PASS,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 Mon, Aug 29, 2022 at 09:34:24AM +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. > > This fix addresses CVE-2022-2308. > > Cc: xieyongji@bytedance.com > Cc: stable@vger.kernel.org # v5.15+ > Fixes: c8a6153b6c59 ("vduse: Introduce VDUSE - vDPA Device in Userspace") > > Acked-by: Jason Wang > Signed-off-by: Maxime Coquelin Please no blank line above the Acked-by: line here if possible. thanks, greg k-h