Received: by 2002:a25:8b91:0:0:0:0:0 with SMTP id j17csp21772353ybl; Mon, 6 Jan 2020 10:57:25 -0800 (PST) X-Google-Smtp-Source: APXvYqxz+GF/QTibVgWEJIZegKAvvpVMUqvNdWfJ1pMdUF/Ol2soqldK+uRjh4sKkgX1Lykjq7ZN X-Received: by 2002:a05:6830:4ca:: with SMTP id s10mr78243294otd.268.1578337045149; Mon, 06 Jan 2020 10:57:25 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1578337045; cv=none; d=google.com; s=arc-20160816; b=1FcFvGEKR7v4c8/8K5n+AHnP+shr5UbhRQtjkD88AJsmfo28jHah1KmJlEvgg56NhO /dKvJ1R2gQ3AX370UlO6XizjBFRFTEiqs8RUCC5B2qsWAu3cvWR/k7BN75bhzJSkCvNP ZGIo9iePx1/1O7Mb3LHozVo5nOzL+OUeSHDLL3TKzSLj4jsCcjsmC/r4tp3AZa7cxfQY aZ003LWxasx3JVoYvCK4j0g5iKHu0ZvemitYBaCQ6WfDKMw5GPtkC5im9Zh8l7Kd+VUl ETXZ4wzqIHxWqXWXUdZYhgUfSOnFLMwdlLJfU8BjgSyrngq5wadEGNPxKl5Fga9BAqLJ UNtw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:references :in-reply-to:message-id:date:subject:cc:to:from:dkim-signature; bh=Dh8lw2DNzJRKEq0E/akxy2Xmi5d1kEPv5+7clve7zr4=; b=oIiBRFDpha786rkkd6Hh61F4BNZl3P5/rBJURsHvBRlENzs3E4hntt9hf7Wrm/Kx2+ 2fpPEcDW9BaOYdPBIJ3QvxPT74+nw7B+P1IdfYpJ58ag+nwzkVLaK9XLTC3aOwWkddpX yktOljofG2X889PQhP8+qEU5Cl5OFPB5g2+tzojT8GhLxI9QbX9RGqvkXIMIgUr8k8L8 sK7Ljw9s79uaRVA31hBUTJ49WWXWq3E8a1EMxHs9HyLW3X05o65oPL9tflJsRxA1Fghs myRc87d3QL0YFWBoP3eYzpUM35q0j1ZfLUohHzXTHFyzcnOfTEZdQZl//jFUdSdr5Ko5 D4aA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=cbrmWZPf; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id z10si37226761oto.36.2020.01.06.10.57.13; Mon, 06 Jan 2020 10:57:25 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=cbrmWZPf; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727077AbgAFS4R (ORCPT + 99 others); Mon, 6 Jan 2020 13:56:17 -0500 Received: from us-smtp-delivery-1.mimecast.com ([205.139.110.120]:40338 "EHLO us-smtp-1.mimecast.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1726698AbgAFS4R (ORCPT ); Mon, 6 Jan 2020 13:56:17 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1578336976; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:in-reply-to:in-reply-to:in-reply-to: references:references:references; bh=Dh8lw2DNzJRKEq0E/akxy2Xmi5d1kEPv5+7clve7zr4=; b=cbrmWZPfv70FDd4tb63W41/ZbXYkxwnCZyqOJOpAp3r0obizvsyutFmd4XFNdh0j7F6Kdw 5MFm8XzDkBx/9kNIV9X+LPxVJHv5HxdgU3oc1gcZM/owiaA3luRWwj+u4XaFLHAkgXonb2 vSyWrADdVEZImUxVeuuKcn1oX/7690I= Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-436-0BKKEI_yPe-8KUeI3AFk0A-1; Mon, 06 Jan 2020 13:56:13 -0500 X-MC-Unique: 0BKKEI_yPe-8KUeI3AFk0A-1 Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.phx2.redhat.com [10.5.11.14]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 95E511087B41; Mon, 6 Jan 2020 18:56:11 +0000 (UTC) Received: from madcap2.tricolour.ca (ovpn-112-34.phx2.redhat.com [10.3.112.34]) by smtp.corp.redhat.com (Postfix) with ESMTP id E5A555D9D6; Mon, 6 Jan 2020 18:55:51 +0000 (UTC) From: Richard Guy Briggs To: Linux-Audit Mailing List , LKML , netfilter-devel@vger.kernel.org Cc: Paul Moore , sgrubb@redhat.com, omosnace@redhat.com, fw@strlen.de, twoerner@redhat.com, eparis@parisplace.org, ebiederm@xmission.com, tgraf@infradead.org, Richard Guy Briggs Subject: [PATCH ghak25 v2 7/9] netfilter: ebtables audit table registration Date: Mon, 6 Jan 2020 13:54:08 -0500 Message-Id: <9f16dee52bac9a3068939283a0122a632ee0438d.1577830902.git.rgb@redhat.com> In-Reply-To: References: In-Reply-To: References: X-Scanned-By: MIMEDefang 2.79 on 10.5.11.14 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Generate audit NETFILTER_CFG records on ebtables table registration. Previously this was only being done for all x_tables operations and ebtables table replacement. Call new audit_nf_cfg() to store table parameters for later use with syscall records. Here is a sample accompanied record: type=NETFILTER_CFG msg=audit(1494907217.558:5403): table=filter family=7 entries=0 See: https://github.com/linux-audit/audit-kernel/issues/43 Signed-off-by: Richard Guy Briggs --- net/bridge/netfilter/ebtables.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/net/bridge/netfilter/ebtables.c b/net/bridge/netfilter/ebtables.c index 57dc11c0f349..58126547b175 100644 --- a/net/bridge/netfilter/ebtables.c +++ b/net/bridge/netfilter/ebtables.c @@ -1219,6 +1219,8 @@ int ebt_register_table(struct net *net, const struct ebt_table *input_table, *res = NULL; } + if (audit_enabled) + audit_nf_cfg(repl->name, AF_BRIDGE, repl->nentries); return ret; free_unlock: mutex_unlock(&ebt_mutex); -- 1.8.3.1