Received: by 2002:a25:8b91:0:0:0:0:0 with SMTP id j17csp162246ybl; Thu, 30 Jan 2020 19:19:52 -0800 (PST) X-Google-Smtp-Source: APXvYqxsUBAdHNgsDsBpRdrRkwJ38oZohyyHhtrxkXFN73/kaDZc2myO4HPp9pzHgI1Y/LUMufSx X-Received: by 2002:a05:6830:11:: with SMTP id c17mr6043214otp.360.1580440792096; Thu, 30 Jan 2020 19:19:52 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1580440792; cv=none; d=google.com; s=arc-20160816; b=u+jNHrsufoHKu/VhE4z1zR+uY5DlK60/n05G8uiN9hYaSTtqahD9RGVVE6gKh4BhHP wcixrT1cWEaGr7ByI1uF+5RhvxdG/khdBR0K2RpgOU4Hdw/tQPUgTCSqVFsd87/SCFEB F1Pq+Sma6+mu2khl9dCGSjOhb6PEkdUNDlLqpXZbLyFao93m2eZU7C8OXy4use7vdfpq ZtscTmL3JtXnDZBNfZLHukFMWNWya1cbprUHFBxvPR11UeIhWrmR6qXZvzGLD7KefQ9O cwDLkkKcu1X9eypY3Qma7U4G4mKxI9TVehkp+2bTMB+UtJJ6Of+V65D5WUnCoY7t91EJ TUmA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:dkim-signature; bh=xEOcbam6lkpewzM/QAeXoI3lqiVgnug3kiCPMonrhtk=; b=slf77eZFfTGF85z5NP1wRqhx06pXwIbuTeG02yz6MeX6K9XZX7hzett+PwJJaJwpYR GRyYqwsRS/D3V2hfxtJ4v26LqpEiCsAe1DOtctDgNRzjU1FUG3D41qvb7ptUezyBK4/s DlPosLcCB9rZkY85PGCsCkO+VBcJo/AMEjlhkl8/aW0FX5IRo9reKJeaUXObmpo1U7o0 6HSrCKk0rWSAN0RGwmiuXrSMOQ9xPlEXy34udLhflONu9ydON24c9OOFd1LUwa8QG41j GzrkYmZk9sPCh2nH3ldhv8Y/V9eeL4l10D+iw0iNH5/jbidCo9j52mgDjaERPxi7uaja MTPA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@paul-moore-com.20150623.gappssmtp.com header.s=20150623 header.b=qLxxa4ib; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id d1si3909920oth.158.2020.01.30.19.19.40; Thu, 30 Jan 2020 19:19:52 -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=@paul-moore-com.20150623.gappssmtp.com header.s=20150623 header.b=qLxxa4ib; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728004AbgAaDSe (ORCPT + 99 others); Thu, 30 Jan 2020 22:18:34 -0500 Received: from mail-ed1-f67.google.com ([209.85.208.67]:41681 "EHLO mail-ed1-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727995AbgAaDSe (ORCPT ); Thu, 30 Jan 2020 22:18:34 -0500 Received: by mail-ed1-f67.google.com with SMTP id c26so6211182eds.8 for ; Thu, 30 Jan 2020 19:18:32 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=paul-moore-com.20150623.gappssmtp.com; s=20150623; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=xEOcbam6lkpewzM/QAeXoI3lqiVgnug3kiCPMonrhtk=; b=qLxxa4iblEFXTNkhpXnrUE2jEwWkTF32sgj/WripjIkzr3FN5HhP+oxWGrK5LPpeuX BdXC/ta5pWwYxoPmPnwjyLYrwwhu7PdqsdsxD3QJRTXNF9VLcur/Uj0QPrDJcKIFK8WD Inivp0E1OGD97QK5cDwi9NeziJ+2uXu9lI+OXOSAm0+8v2S6H4KOsHn8wuuNXLazSbUE J6UGrQcl0tp7vQIZZp9zz4E90wuPARtwIjqUV/+PA+6v0Iurpdm3MMtRHB40DfNWd/ee C9jmr/5Z3KydS+TdtygpRDTCkMiW2RKiaolxrMJkE9uV7rR8TdU5widouDLZI3z9nH7O LUOw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=xEOcbam6lkpewzM/QAeXoI3lqiVgnug3kiCPMonrhtk=; b=RVK4RE7iiZcwYvFrhDvWSxZhkCKNrj9FpFLyh7qBrs41nWjqsk3d1UD0mBKjl4Y4Ko 1EQ5GvByiZu/DAsgn2L3O3P9Uz3MYbhmxPZY6oNTrO3CnSB/LaZG/Wfi9lR0cE7nQuH5 W7RdrSma1UN3vgzIdcwbx1oUeCtg/HJ7bUz80eyD3IH0RD7ZBfhA7g+vrH3I3whdwk2+ 1bAn+ju7dcfj9EXNVw0peX2vOIa3VqayTR/FB0Cl2cU8u2cdzu0bJ9LaGM0forPyD0ef K209yxzqNE24/vzM/nfDtbcuo7FOWLx7YdlLC57Nkby6ZEQAW31bmEUBIIdTLRM9+mrU rBNg== X-Gm-Message-State: APjAAAUfOpLcSUQGzIiqttxQyfktNYrZSPM79pOvygOHpKpdRb2+k6d5 9sV+Tsp4y3FG+Yuh08h2qTD0Bg/t5uFc7fkUaBfg X-Received: by 2002:a17:906:f251:: with SMTP id gy17mr6798194ejb.308.1580440712079; Thu, 30 Jan 2020 19:18:32 -0800 (PST) MIME-Version: 1.0 References: <9f16dee52bac9a3068939283a0122a632ee0438d.1577830902.git.rgb@redhat.com> In-Reply-To: <9f16dee52bac9a3068939283a0122a632ee0438d.1577830902.git.rgb@redhat.com> From: Paul Moore Date: Thu, 30 Jan 2020 22:18:21 -0500 Message-ID: Subject: Re: [PATCH ghak25 v2 7/9] netfilter: ebtables audit table registration To: Richard Guy Briggs Cc: Linux-Audit Mailing List , LKML , netfilter-devel@vger.kernel.org, sgrubb@redhat.com, omosnace@redhat.com, fw@strlen.de, twoerner@redhat.com, Eric Paris , ebiederm@xmission.com, tgraf@infradead.org Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Jan 6, 2020 at 1:56 PM Richard Guy Briggs wrote: > > 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 Wait a minute ... in patch 4 you have code that explicitly checks for "entries=0" and doesn't generate a record in that case; is the example a lie or is the code a lie? ;) > 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 -- paul moore www.paul-moore.com