Received: by 2002:a05:6a10:a841:0:0:0:0 with SMTP id d1csp411948pxy; Wed, 21 Apr 2021 06:08:48 -0700 (PDT) X-Google-Smtp-Source: ABdhPJy1yRo2je8za40Cbk6Oo3ng25CW1+1i+VqsUstwm2YUir3tMgS7I7ULpgG3HSvod9cGxqFN X-Received: by 2002:a17:906:1313:: with SMTP id w19mr32457141ejb.64.1619010527956; Wed, 21 Apr 2021 06:08:47 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1619010527; cv=none; d=google.com; s=arc-20160816; b=TAUyn6QelvC5u4BV1sD4OFQRKUYvS2GOaGprguc7vkVoxN2jV7E86SIjDOTBeh/c5L ma3drZnaiq1w19V00z2w/IbMpGFd9WEBy19LyrqP44YywBGPSvogNfZOTOWwMkM+IZiu trKIj+nHHzujsH7eEan0tLoWQELUPTxDKuv2Vn/3jafCq1OgnYbiCwMkSFQF5wxWWS51 l7nzP1gCFnFDsy9vVZcmm2BPIjXmhP75PRNPnCGbrjKERFzbB4FIwvaKBVZUXkgkkDds 9T/0fxDG+bkDX6KRxqXQuOjf9D5EQb4DX/osSD1vheHvBQm+h1QkF+wd8NfjE6+uu4Q7 30GQ== 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=JafsuzucQCWDmthcFvYZLlMhI7mwWG6UNrzNKIRtIpI=; b=igtCxQ5Z233NFewXKtPrixXkvw0EVxiT//Aty2BTmdVzMf3Qdhnw+6SrTGxwK1Jn5I fulSherqjlov+lKHa5u/WRp47s47Q6fLkbLLf49U/TSBbG87D2Pnu+dXrdGcqi3vUGWE IQ8eEZyirNq79Xsy6Q2jpMCdCNhVHHoK6cB8h8bYc/y/29NtW7jxZJksyjkhR/9du1c3 YfjlnWgiEDxX392vyOStWNcdAHHC6nVLZ+HYwVwpPSL8sQncKKBsW3djNZUXraQ1wOHM ob8+VbYTaH/fhwAJy+qHntWCOVMjc8WzR5Zl1GyULff8ja8igDA+XuFxZ8JtWyB1/q8Y oA6g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b="sQ/1leI6"; 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 m7si1999324edd.486.2021.04.21.06.08.24; Wed, 21 Apr 2021 06:08: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="sQ/1leI6"; 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 S236099AbhDUNFu (ORCPT + 99 others); Wed, 21 Apr 2021 09:05:50 -0400 Received: from mail.kernel.org ([198.145.29.99]:45290 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S240663AbhDUNEq (ORCPT ); Wed, 21 Apr 2021 09:04:46 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id E269861456; Wed, 21 Apr 2021 13:04:10 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1619010251; bh=x0vsa/qDfa6fZnfroSb5vwjMRZa5ySo4U3GVJN0UZfY=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=sQ/1leI6S8PgsF2pZO4UhFWtNcvfM9fEGdavdRy8hNRL202BzHz/zPde+ubV2UElp 0fIDd32mrtYTiM9eLIo5PhI9h3AR9dctS8kJQWUGl7DV9xc3G4i/h9cXz6a34eRiQv Oc3sBp5uar6uKgih54N26nFoTkznh9hrSBotwcf4= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , Aditya Pakki , Daniel Borkmann Subject: [PATCH 066/190] Revert "bpf: Remove unnecessary assertion on fp_old" Date: Wed, 21 Apr 2021 14:59:01 +0200 Message-Id: <20210421130105.1226686-67-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 5bf2fc1f9c88397b125d5ec5f65b1ed9300ba59d. 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: Daniel Borkmann Cc: https Signed-off-by: Greg Kroah-Hartman --- kernel/bpf/core.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/kernel/bpf/core.c b/kernel/bpf/core.c index 75244ecb2389..da29211ea5d8 100644 --- a/kernel/bpf/core.c +++ b/kernel/bpf/core.c @@ -230,6 +230,8 @@ struct bpf_prog *bpf_prog_realloc(struct bpf_prog *fp_old, unsigned int size, struct bpf_prog *fp; u32 pages; + BUG_ON(fp_old == NULL); + size = round_up(size, PAGE_SIZE); pages = size / PAGE_SIZE; if (pages <= fp_old->pages) -- 2.31.1