Received: by 2002:a05:6a10:a841:0:0:0:0 with SMTP id d1csp533371pxy; Wed, 21 Apr 2021 08:41:25 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwXHyp0vV0TgKliUx4ownBqahuPKpBpxb/5QF72nIo+KYqcKgcfsv/uZzSJf0DX35tQv+MX X-Received: by 2002:a17:906:3544:: with SMTP id s4mr34324636eja.73.1619019685589; Wed, 21 Apr 2021 08:41:25 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1619019685; cv=none; d=google.com; s=arc-20160816; b=xNHWpfjm7L1xKEvDczWtuOpxmM/88+ZkZsyNWY8yBsB84Qnn6QByUSttxBPDOQxvwO eP5lMYtQ25o96K3pBdT6wNzV6bmOPLaARThd2dvC90sKfjpPJBoJF0q0klIRPge+DXSt I3O/2XIAD7qwXGGljne2+RQT1uHByOwhfwD+tRPZLntEltGw5kaAuueyEc8rIJnhlg2p vjd5ywRfXqTv1NU3P8phYImZ0KKXtlZb4Yi/rQpTkT2OeGqhQkXI6KdCGYnUerggMZd3 r8eWM2lUN3V9hZ1KK5d/sPmrSQw/e/8QMF1m9UIfFfmu8hzw4qiAZX0CK+JhzMrnHI6U bNwQ== 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=vSEC2dagrrH2HH1Ffkhzhajs7iDrsw3PStxQMpXKF7Q=; b=qodDwnRVvrXmHbjEo1WK0ck0UghKuryaGOBge2M6f0ea6L6I5p9s50SG/MliD8+ym+ 8R7vEtQHYac852U0BIYygUvfclGrZ69VgvS12lUEgZ4CF+NOr+ljqeuWvYEsla+rayKz Q6IZoEAaNmhLgFgUnr6VV7toM3VZGu7guRuJiOVZnPasBXxXpr/AvUM5MzoEzcny1ZkR 9YbVki6PuyseTNWo3AYwPLAFEL5HhUVSylMHs7BdaiKqfKLDEiQI1enmPBYo/rPeAjCm SaI9YTYV3o/gsr4HHHySpeuNz+3ECIdnr8Fpa660WwgSLBAXuivVwRuu2OhgcWJAIV3m y8SQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=bKS7KPxL; 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 b1si2496464ejb.714.2021.04.21.08.40.59; Wed, 21 Apr 2021 08:41:25 -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=bKS7KPxL; 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 S240679AbhDUNHA (ORCPT + 99 others); Wed, 21 Apr 2021 09:07:00 -0400 Received: from mail.kernel.org ([198.145.29.99]:46426 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S240750AbhDUNFa (ORCPT ); Wed, 21 Apr 2021 09:05:30 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id B7BB661457; Wed, 21 Apr 2021 13:04:56 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1619010297; bh=VRXrU0i3Ic6P5Dh19UvKcB9+YhPl3m8eVgbbZCEvtk0=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=bKS7KPxLQQ13N8eXfOicQ8r3TA22JGQuwVtd79txOI1CZCLtAj54Db/eqUWAat7IV PNxNsmPPuIJDJcvwMEJOcQFXFSZmGxiIFaMW7C8lBgSXwJpF4I84S/2Q0FQQiptQUm yizRYsOOp15fktbCz3C7M6sbaGf4kZObauIgl/pM= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , Wenwen Wang , Richard Guy Briggs , Paul Moore Subject: [PATCH 085/190] Revert "audit: fix a memory leak bug" Date: Wed, 21 Apr 2021 14:59:20 +0200 Message-Id: <20210421130105.1226686-86-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 70c4cf17e445264453bc5323db3e50aa0ac9e81f. 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: Wenwen Wang Cc: Richard Guy Briggs Cc: Paul Moore Signed-off-by: Greg Kroah-Hartman --- kernel/auditfilter.c | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/kernel/auditfilter.c b/kernel/auditfilter.c index 333b3bcfc545..19f908b96000 100644 --- a/kernel/auditfilter.c +++ b/kernel/auditfilter.c @@ -1125,24 +1125,22 @@ int audit_rule_change(int type, int seq, void *data, size_t datasz) int err = 0; struct audit_entry *entry; + entry = audit_data_to_entry(data, datasz); + if (IS_ERR(entry)) + return PTR_ERR(entry); + switch (type) { case AUDIT_ADD_RULE: - entry = audit_data_to_entry(data, datasz); - if (IS_ERR(entry)) - return PTR_ERR(entry); err = audit_add_rule(entry); audit_log_rule_change("add_rule", &entry->rule, !err); break; case AUDIT_DEL_RULE: - entry = audit_data_to_entry(data, datasz); - if (IS_ERR(entry)) - return PTR_ERR(entry); err = audit_del_rule(entry); audit_log_rule_change("remove_rule", &entry->rule, !err); break; default: + err = -EINVAL; WARN_ON(1); - return -EINVAL; } if (err || type == AUDIT_DEL_RULE) { -- 2.31.1