Received: by 2002:a05:6a10:a841:0:0:0:0 with SMTP id d1csp117565pxy; Wed, 28 Apr 2021 00:19:47 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxvULam0pEVgxwo1fhn49yET4nL/n+I4Nco0YsBnWffLAkmfSgQ7yqrGkMbfsGzwJBu6w1S X-Received: by 2002:a17:906:2504:: with SMTP id i4mr27306072ejb.297.1619594387011; Wed, 28 Apr 2021 00:19:47 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1619594387; cv=none; d=google.com; s=arc-20160816; b=qprSUvyowLVPCHpQoCT89KlB2xeP5zjeBqNd1z0FdHPduESR9780mM+ZCh+pYjTXE7 Whd08jN4nTFoZP6GjBqtLV7SYlw6uiFCbCjZZuSMJzdjvLqNUvsT1feFi2oKD/QBuxLF H3WdRPWOfefbvUCraGf9u5qUJLcPGN3RXZgy7K5f+yJQ79P8OX5CDm8dip8KyOMA5u6Y btoBtnMXGD5VtKhpHFyhyqLs//NJQ47w6qTKkodE1SpT2623yQTG/ts9g1/ywBOHMy4d GKUZtEuDi7BOdFokLUl5kQEXvF79rOUmmkEqk1W3l8rlPiZ9tpCMvPO2mH85L3f6YgJ6 pI2Q== 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=upFJMIVOt51ufy+oyg7kxIYNADwDA5bflvLQ4xJfuk0=; b=RPErQ1AaBYmK4NV7Yr+dRRw88XrOxuu4zNxn3WtZx8Xkw5PvsVYskOUq1S9lpZ+nbZ euNpDc86ic41TCV7azaxV3fqjeqU1V+QMfPpJUoSLNYl9SblTXast5WLRiEm+mXiOBWf IAr8PxyL0MQJB8L81ctj/gxV+AeCWcQ0RhwU3CudizGE73ASpIBOgNc0Ps0H0AOOeBEN y44B9sjX8mWtxqatr0Ph6xyryZGFEeSwS1KKuLQzMuoXNRgMKewquAOVo6hU5+vbfpcj VXe+qwtX8/iODt/7Sme1vE+Mpd/BcXrBB6PKR89c21YEglqOBBeDYnfX9TGXHudzMaU3 /6yQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=ffXAMZRC; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 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 vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id n5si5032792edc.304.2021.04.28.00.19.21; Wed, 28 Apr 2021 00:19:47 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=ffXAMZRC; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 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 S236453AbhD1HTE (ORCPT + 99 others); Wed, 28 Apr 2021 03:19:04 -0400 Received: from mail.kernel.org ([198.145.29.99]:35588 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S236394AbhD1HTB (ORCPT ); Wed, 28 Apr 2021 03:19:01 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id 994AF601FC; Wed, 28 Apr 2021 07:18:05 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1619594286; bh=+a3wPK2As0qZPFjLyLysQQNzrUKRo/Xbgi5bzhCpgNo=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=ffXAMZRCkCq4LM+Agk2MiDvpdgIeYNEepKYx0nM+9lEEEbQ9Ow/MPdmGU5XGszody UNWzSLJQxq0dCmH0zYOLMiYaRzqXVsCf8bRkG89m/+N+IgeuqQPRbtd/JQuaufRdrQ gChblV53JGeF1UkM+UNYct6DISGN3nUqABR5YNBc= Date: Wed, 28 Apr 2021 09:18:03 +0200 From: Greg Kroah-Hartman To: Ulf Hansson Cc: Laurent Pinchart , Linux Kernel Mailing List , Kangjie Lu Subject: Re: [PATCH 088/190] Revert "mmc_spi: add a status check for spi_sync_locked" Message-ID: References: <20210421130105.1226686-1-gregkh@linuxfoundation.org> <20210421130105.1226686-89-gregkh@linuxfoundation.org> 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, Apr 22, 2021 at 10:08:45AM +0200, Ulf Hansson wrote: > On Wed, 21 Apr 2021 at 15:19, Laurent Pinchart > wrote: > > > > Hi Greg, > > > > Thank you for the patch. > > > > On Wed, Apr 21, 2021 at 02:59:23PM +0200, Greg Kroah-Hartman wrote: > > > This reverts commit 611025983b7976df0183390a63a2166411d177f1. > > > > > > Commits from @umn.edu addresses have been found to be submitted in "bad > > > faith" to try to test the kernel community's ability to review "known > > > malicious" changes. The result of these submissions can be found in a > > > paper published at the 42nd IEEE Symposium on Security and Privacy > > > entitled, "Open Source Insecurity: Stealthily Introducing > > > Vulnerabilities via Hypocrite Commits" written by Qiushi Wu (University > > > of Minnesota) and Kangjie Lu (University of Minnesota). > > > > > > Because of this, all submissions from this group must be reverted from > > > the kernel tree and will need to be re-reviewed again to determine if > > > they actually are a valid fix. Until that work is complete, remove this > > > change to ensure that no problems are being introduced into the > > > codebase. > > > > > > Cc: Kangjie Lu > > > Cc: Laurent Pinchart > > > Cc: Ulf Hansson > > > Signed-off-by: Greg Kroah-Hartman > > > > Acked-by: Laurent Pinchart > > > > I don't spot an obvious issue with the original patch though. > > > > > --- > > > drivers/mmc/host/mmc_spi.c | 4 ---- > > > 1 file changed, 4 deletions(-) > > > > > > diff --git a/drivers/mmc/host/mmc_spi.c b/drivers/mmc/host/mmc_spi.c > > > index 02f4fd26e76a..cc40b050e302 100644 > > > --- a/drivers/mmc/host/mmc_spi.c > > > +++ b/drivers/mmc/host/mmc_spi.c > > > @@ -800,10 +800,6 @@ mmc_spi_readblock(struct mmc_spi_host *host, struct spi_transfer *t, > > > } > > > > > > status = spi_sync_locked(spi, &host->m); > > > - if (status < 0) { > > > - dev_dbg(&spi->dev, "read error %d\n", status); > > > - return status; > > > - } > > Returning here means we never give back the ownership of the buffer to > the CPU. Can that be considered as vulnerability? It's a "resource leak", which is a bug. If you want to declare that as a "vulnerability" or not, I do not know. Personally I do not think it is... > If that is that a problem, I can point out that there is already one > more case in this file, where this pattern is repeated. See > mmc_spi_writeblock(). This code has been there since 2007. Yeah, these error paths are impossible to hit anyway. I'll go drop this patch as it is not correct and will create a "correct" patch for this as well. thanks, greg k-h