Received: by 2002:a05:6a10:a841:0:0:0:0 with SMTP id d1csp510352pxy; Wed, 21 Apr 2021 08:12:32 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxOdCPZH8+7GJfhNotnostjbEBkY2jDT7Kr2Knt1t/WXRjGwXZmiAjf1J/G//FN/YRFT3mb X-Received: by 2002:a63:1357:: with SMTP id 23mr22392800pgt.284.1619017952675; Wed, 21 Apr 2021 08:12:32 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1619017952; cv=none; d=google.com; s=arc-20160816; b=NdOYRGX19gcJlxFVii0duRLtuZuH11Z0soGR8aHR1gIoRTRaZALJoLqKD8/9qwcwF0 oU9CWUlSl5d6faTPrFg21HzZnwmFf7V0hcSjMg1zY7MCRzFGeQNctRnMeFRQJ0VA3U4K wgBqY+13+T003RKOqPZ4CJzE8mPd7U/aALWpEojiZ1AZ4Oz6eFu9/doWvvrXvUWkUn6r Nm6JbT/pemR1GjrhE7/8Z18LUJuHXQKcGUahbQ+Mp8NLSmcCMB8opjF7uYzGWzZ5cSOK lxdIwKewMSimT2PwNSq6j0NMdjCTSVD0lXwwMTaQUbNBQZLvJ8G4l+UiE6t+VXBpj4Tg Dk1A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=ptQkdi6KXCDKdC8IueFxL94UsCimkHs7ZOdn01G1/Ew=; b=aYvchlY2AAvTtigTxR8fvBatKuWOSFRwvnevV1HGbu75v/BgHFByFL1ghLq+BqfYMb ey1qDDi2TyDgDp/aMhSM7s5XuITUvufKGksoOaOqFOkCdJaL0/rtho/DoZxyukaKBSQp +SjFiPZu6TlLg85xhfIdaUNbsRHQHj+fixaKq9lkcQCyS5uUp6zsr4phLHs6nygOsdpC n9dP3JdxQVg2P9jJ7iQvZJ0XKI+R7sHHbXmTBOJLIfDsCd4MsbZKgtv9lYDtboyAuJQn h1OkVj2G0Ry4EVprEecwRtn+lTZbca/64XoVI8t4MoTYSA31DNnVpCANygk7L5ZdwHF3 c5Gg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b="t4GH9/kn"; 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 j18si2826848plj.249.2021.04.21.08.12.18; Wed, 21 Apr 2021 08:12:32 -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="t4GH9/kn"; 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 S239607AbhDUNEo (ORCPT + 99 others); Wed, 21 Apr 2021 09:04:44 -0400 Received: from mail.kernel.org ([198.145.29.99]:44378 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S240616AbhDUNEH (ORCPT ); Wed, 21 Apr 2021 09:04:07 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id 86B6561452; Wed, 21 Apr 2021 13:03:33 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1619010214; bh=QtDnaKBKc0kYe7eyxA54hxHE0gWxOWk1oNAd7iN2/pw=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=t4GH9/kn+mRsdJ+lIAMNzU6TjMQuJe/ey4udQ5cDYddIWyfnFAo5MzXFSi+C2padh SkxV6qap4MSAipM3IMxju1+/PbhuZo9Coco1kzAWX55WufPdt55qnrZiO25KDJBlca jW/y+2OVf5H9LrKIQ9b2NVwio0Qi6AzJILgvh88Q= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , Aditya Pakki , Tyler Hicks Subject: [PATCH 053/190] Revert "ecryptfs: replace BUG_ON with error handling code" Date: Wed, 21 Apr 2021 14:58:48 +0200 Message-Id: <20210421130105.1226686-54-gregkh@linuxfoundation.org> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20210421130105.1226686-1-gregkh@linuxfoundation.org> References: <20210421130105.1226686-1-gregkh@linuxfoundation.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org This reverts commit 2c2a7552dd6465e8fde6bc9cccf8d66ed1c1eb72. 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: Aditya Pakki Cc: Tyler Hicks Signed-off-by: Greg Kroah-Hartman --- fs/ecryptfs/crypto.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/fs/ecryptfs/crypto.c b/fs/ecryptfs/crypto.c index 943e523f4c9d..3d8623139538 100644 --- a/fs/ecryptfs/crypto.c +++ b/fs/ecryptfs/crypto.c @@ -296,10 +296,8 @@ static int crypt_scatterlist(struct ecryptfs_crypt_stat *crypt_stat, struct extent_crypt_result ecr; int rc = 0; - if (!crypt_stat || !crypt_stat->tfm - || !(crypt_stat->flags & ECRYPTFS_STRUCT_INITIALIZED)) - return -EINVAL; - + BUG_ON(!crypt_stat || !crypt_stat->tfm + || !(crypt_stat->flags & ECRYPTFS_STRUCT_INITIALIZED)); if (unlikely(ecryptfs_verbosity > 0)) { ecryptfs_printk(KERN_DEBUG, "Key size [%zd]; key:\n", crypt_stat->key_size); -- 2.31.1