From: Richard Guy Briggs <rgb@redhat.com>
To: Florian Westphal <fw@strlen.de>
Cc: LKML <linux-kernel@vger.kernel.org>,
Linux-Audit Mailing List <linux-audit@redhat.com>,
netfilter-devel@vger.kernel.org, ebiederm@xmission.com,
twoerner@redhat.com, eparis@parisplace.org, tgraf@infradead.org
Subject: Re: [PATCH ghak25 v2 8/9] netfilter: add audit operation field
Date: Thu, 13 Feb 2020 09:29:43 -0500 [thread overview]
Message-ID: <20200213142943.zxa6vwvl45q36zu6@madcap2.tricolour.ca> (raw)
In-Reply-To: <20200213123457.GO2991@breakpoint.cc>
On 2020-02-13 13:34, Florian Westphal wrote:
> Richard Guy Briggs <rgb@redhat.com> wrote:
> > The default policy is NF_ACCEPT (because Rusty didn't want
> > more email, go figure...). It occurred to me later that some table
> > loads took a command line parameter to be able to change the default
> > policy verdict from NF_ACCEPT to NF_DROP. In particular, filter FORWARD
> > hook tables. Is there a straightforward way to be able to detect this
> > in all the audit_nf_cfg() callers to be able to log it? In particular,
> > in:
> > net/bridge/netfilter/ebtables.c: ebt_register_table()
> > net/bridge/netfilter/ebtables.c: do_replace_finish()
> > net/bridge/netfilter/ebtables.c: __ebt_unregister_table()
> > net/netfilter/x_tables.c: xt_replace_table()
> > net/netfilter/x_tables.c: xt_unregister_table()
>
> The module parameter or the policy?
>
> The poliy can be changed via the xtables tools.
> Given you can have:
>
> *filter
> :INPUT ACCEPT [0:0]
> :FORWARD DROP [0:0]
> :OUTPUT ACCEPT [0:0]
> -A FORWARD -j ACCEPT
> COMMIT
>
> ... which effectily gives a FORWARD ACCEPT policy I'm not sure logging
> the policy is useful.
>
> Furthermore, ebtables has polices even for user-defined chains.
>
> > Both potential solutions are awkward, adding a parameter to pass that
> > value in, but also trying to reach into the protocol-specific entry
> > table to find that value. Would you have a recommendation? This
> > assumes that reporting that default policy value is even desired or
> > required.
>
> See above, I don't think its useful. If it is needed, its probably best
> to define an informational struct containing the policy (accept/drop)
> value for the each hook points (prerouting to postrouting), fill
> that from the backend specific code (as thats the only place that
> exposes the backend specific structs ...) and then pass that to
> the audit logging functions.
Ok, for this set, I'll drop the idea. If it becomes apparent later than
it is necessary, it can be added as a field at the end of the record.
Thanks for looking at this.
- RGB
--
Richard Guy Briggs <rgb@redhat.com>
Sr. S/W Engineer, Kernel Security, Base Operating Systems
Remote, Ottawa, Red Hat Canada
IRC: rgb, SunRaycer
Voice: +1.647.777.2635, Internal: (81) 32635
next prev parent reply other threads:[~2020-02-13 14:29 UTC|newest]
Thread overview: 32+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-01-06 18:54 [PATCH ghak25 v2 0/9] Address NETFILTER_CFG issues Richard Guy Briggs
2020-01-06 18:54 ` [PATCH ghak25 v2 1/9] netfilter: normalize x_table function declarations Richard Guy Briggs
2020-01-06 20:23 ` Florian Westphal
2020-01-08 16:47 ` Nicolas Dichtel
2020-01-16 21:29 ` Richard Guy Briggs
2020-01-31 3:17 ` Paul Moore
2020-02-10 19:13 ` Richard Guy Briggs
2020-01-06 18:54 ` [PATCH ghak25 v2 2/9] netfilter: normalize ebtables " Richard Guy Briggs
2020-01-06 20:30 ` Florian Westphal
2020-01-31 3:17 ` Paul Moore
2020-01-06 18:54 ` [PATCH ghak25 v2 3/9] netfilter: normalize ebtables function declarations II Richard Guy Briggs
2020-01-06 20:31 ` Florian Westphal
2020-01-31 3:17 ` Paul Moore
2020-01-06 18:54 ` [PATCH ghak25 v2 4/9] audit: record nfcfg params Richard Guy Briggs
2020-01-31 3:18 ` Paul Moore
2020-02-18 22:47 ` Richard Guy Briggs
2020-01-06 18:54 ` [PATCH ghak25 v2 5/9] netfilter: x_tables audit only on syscall rule Richard Guy Briggs
2020-01-06 18:54 ` [PATCH ghak25 v2 6/9] netfilter: ebtables " Richard Guy Briggs
2020-01-06 18:54 ` [PATCH ghak25 v2 7/9] netfilter: ebtables audit table registration Richard Guy Briggs
2020-01-31 3:18 ` Paul Moore
2020-02-18 22:35 ` Richard Guy Briggs
2020-01-06 18:54 ` [PATCH ghak25 v2 8/9] netfilter: add audit operation field Richard Guy Briggs
2020-01-06 20:23 ` Florian Westphal
2020-01-31 3:18 ` Paul Moore
2020-02-13 12:14 ` Richard Guy Briggs
2020-02-13 12:34 ` Florian Westphal
2020-02-13 14:29 ` Richard Guy Briggs [this message]
2020-01-06 18:54 ` [PATCH ghak25 v2 9/9] netfilter: audit table unregister actions Richard Guy Briggs
2020-01-31 3:18 ` Paul Moore
2020-01-16 15:05 ` [PATCH ghak25 v2 0/9] Address NETFILTER_CFG issues Pablo Neira Ayuso
2020-01-16 19:07 ` Paul Moore
2020-01-16 21:20 ` Richard Guy Briggs
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20200213142943.zxa6vwvl45q36zu6@madcap2.tricolour.ca \
--to=rgb@redhat.com \
--cc=ebiederm@xmission.com \
--cc=eparis@parisplace.org \
--cc=fw@strlen.de \
--cc=linux-audit@redhat.com \
--cc=linux-kernel@vger.kernel.org \
--cc=netfilter-devel@vger.kernel.org \
--cc=tgraf@infradead.org \
--cc=twoerner@redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).