Re: [PATCH ghak124 v3] audit: log nftables configuration change events

2021-02-19 Thread Richard Guy Briggs
On 2021-02-19 01:26, Richard Guy Briggs wrote: > On 2021-02-18 23:42, Florian Westphal wrote: > > Richard Guy Briggs wrote: > > > > If they appear in a batch tehy will be ignored, if the batch consists of > > > > such non-modifying ops only then nf_tables_commit() returns early > > > > because the

Re: [PATCH ghak124 v3] audit: log nftables configuration change events

2021-02-18 Thread Richard Guy Briggs
On 2021-02-18 23:42, Florian Westphal wrote: > Richard Guy Briggs wrote: > > > If they appear in a batch tehy will be ignored, if the batch consists of > > > such non-modifying ops only then nf_tables_commit() returns early > > > because the transaction list is empty (nothing to do/change). > > >

Re: [PATCH ghak124 v3] audit: log nftables configuration change events

2021-02-18 Thread Florian Westphal
Richard Guy Briggs wrote: > > If they appear in a batch tehy will be ignored, if the batch consists of > > such non-modifying ops only then nf_tables_commit() returns early > > because the transaction list is empty (nothing to do/change). > > Ok, one little inconvenient question: what about GETOB

Re: [PATCH ghak124 v3] audit: log nftables configuration change events

2021-02-18 Thread Richard Guy Briggs
On 2021-02-18 13:52, Florian Westphal wrote: > Richard Guy Briggs wrote: > > On 2021-02-18 09:22, Florian Westphal wrote: > > > > It seems I'd need to filter out the NFT_MSG_GET_* ops. > > > > > > No need, the GET ops do not cause changes and will not trigger a > > > generation id change. > > >

Re: [PATCH ghak124 v3] audit: log nftables configuration change events

2021-02-18 Thread Florian Westphal
Richard Guy Briggs wrote: > Ok, can I get one more clarification on this "hierarchy"? Is it roughly > in the order they appear in nf_tables_commit() after step 3? It appears > it might be mostly already. If it isn't already, would it be reasonable > to re-order them? Would you suggest a differ

Re: [PATCH ghak124 v3] audit: log nftables configuration change events

2021-02-18 Thread Richard Guy Briggs
On 2021-02-18 13:52, Florian Westphal wrote: > Richard Guy Briggs wrote: > > On 2021-02-18 09:22, Florian Westphal wrote: > > > No. There is a hierarchy, e.g. you can't add a chain without first > > > adding a table, BUT in case the table was already created by an earlier > > > transaction it can

Re: [PATCH ghak124 v3] audit: log nftables configuration change events

2021-02-18 Thread Florian Westphal
Richard Guy Briggs wrote: > On 2021-02-18 09:22, Florian Westphal wrote: > > No. There is a hierarchy, e.g. you can't add a chain without first > > adding a table, BUT in case the table was already created by an earlier > > transaction it can also be stand-alone. > > Ok, so there could be a stan

Re: [PATCH ghak124 v3] audit: log nftables configuration change events

2021-02-18 Thread Richard Guy Briggs
On 2021-02-18 09:22, Florian Westphal wrote: > Richard Guy Briggs wrote: > > On 2021-02-11 23:09, Florian Westphal wrote: > > > So, if just a summary is needed a single audit_log_nfcfg() > > > after 'step 3' and outside of the list_for_each_entry_safe() is all > > > that is needed. > > > > Ok, so

Re: [PATCH ghak124 v3] audit: log nftables configuration change events

2021-02-18 Thread Florian Westphal
Richard Guy Briggs wrote: > On 2021-02-11 23:09, Florian Westphal wrote: > > So, if just a summary is needed a single audit_log_nfcfg() > > after 'step 3' and outside of the list_for_each_entry_safe() is all > > that is needed. > > Ok, so it should not matter if it is before or after that > list_

Re: [PATCH ghak124 v3] audit: log nftables configuration change events

2021-02-17 Thread Richard Guy Briggs
On 2021-02-11 23:09, Florian Westphal wrote: > Richard Guy Briggs wrote: > > > > I personally would notify once per transaction. This is easy and quick. > > > > This was the goal. iptables was atomic. nftables appears to no longer > > be so. If I have this wrong, please show how that works. >

Re: [PATCH ghak124 v3] audit: log nftables configuration change events

2021-02-12 Thread Richard Guy Briggs
On 2021-02-12 13:11, Phil Sutter wrote: > Hi, > > On Thu, Feb 11, 2021 at 04:02:55PM -0500, Steve Grubb wrote: > > On Thursday, February 11, 2021 11:29:34 AM EST Paul Moore wrote: > > > > If I'm not mistaken, iptables emits a single audit log per table, ipset > > > > doesn't support audit at all.

Re: [PATCH ghak124 v3] audit: log nftables configuration change events

2021-02-12 Thread Richard Guy Briggs
On 2021-02-11 15:26, Richard Guy Briggs wrote: > On 2021-02-11 11:29, Paul Moore wrote: > > On Thu, Feb 11, 2021 at 10:16 AM Phil Sutter wrote: > > > Hi, > > > > > > On Thu, Jun 04, 2020 at 09:20:49AM -0400, Richard Guy Briggs wrote: > > > > iptables, ip6tables, arptables and ebtables table regist

Re: [PATCH ghak124 v3] audit: log nftables configuration change events

2021-02-12 Thread Phil Sutter
Hi, On Thu, Feb 11, 2021 at 04:02:55PM -0500, Steve Grubb wrote: > On Thursday, February 11, 2021 11:29:34 AM EST Paul Moore wrote: > > > If I'm not mistaken, iptables emits a single audit log per table, ipset > > > doesn't support audit at all. So I wonder how much audit logging is > > > required

Re: [PATCH ghak124 v3] audit: log nftables configuration change events

2021-02-11 Thread Florian Westphal
Richard Guy Briggs wrote: > > > I personally would notify once per transaction. This is easy and quick. > > This was the goal. iptables was atomic. nftables appears to no longer > be so. If I have this wrong, please show how that works. nftables transactions are atomic, either the entire batc

Re: [PATCH ghak124 v3] audit: log nftables configuration change events

2021-02-11 Thread Steve Grubb
On Thursday, February 11, 2021 11:29:34 AM EST Paul Moore wrote: > > If I'm not mistaken, iptables emits a single audit log per table, ipset > > doesn't support audit at all. So I wonder how much audit logging is > > required at all (for certification or whatever reason). How much > > granularity i

Re: [PATCH ghak124 v3] audit: log nftables configuration change events

2021-02-11 Thread Richard Guy Briggs
On 2021-02-11 11:29, Paul Moore wrote: > On Thu, Feb 11, 2021 at 10:16 AM Phil Sutter wrote: > > Hi, > > > > On Thu, Jun 04, 2020 at 09:20:49AM -0400, Richard Guy Briggs wrote: > > > iptables, ip6tables, arptables and ebtables table registration, > > > replacement and unregistration configuration

Re: [PATCH ghak124 v3] audit: log nftables configuration change events

2021-02-11 Thread Paul Moore
On Thu, Feb 11, 2021 at 10:16 AM Phil Sutter wrote: > Hi, > > On Thu, Jun 04, 2020 at 09:20:49AM -0400, Richard Guy Briggs wrote: > > iptables, ip6tables, arptables and ebtables table registration, > > replacement and unregistration configuration events are logged for the > > native (legacy) iptab

Re: [PATCH ghak124 v3] audit: log nftables configuration change events

2021-02-11 Thread Phil Sutter
Hi, On Thu, Jun 04, 2020 at 09:20:49AM -0400, Richard Guy Briggs wrote: > iptables, ip6tables, arptables and ebtables table registration, > replacement and unregistration configuration events are logged for the > native (legacy) iptables setsockopt api, but not for the > nftables netlink api which

Re: [PATCH ghak124 v3] audit: log nftables configuration change events

2020-06-24 Thread Richard Guy Briggs
On 2020-06-24 15:03, Pablo Neira Ayuso wrote: > On Wed, Jun 24, 2020 at 08:34:23AM -0400, Richard Guy Briggs wrote: > > On 2020-06-24 12:03, Pablo Neira Ayuso wrote: > > > On Thu, Jun 04, 2020 at 09:20:49AM -0400, Richard Guy Briggs wrote: > [...] > > > > diff --git a/net/netfilter/nf_tables_api.c

Re: [PATCH ghak124 v3] audit: log nftables configuration change events

2020-06-24 Thread Pablo Neira Ayuso
On Wed, Jun 24, 2020 at 08:34:23AM -0400, Richard Guy Briggs wrote: > On 2020-06-24 12:03, Pablo Neira Ayuso wrote: > > On Thu, Jun 04, 2020 at 09:20:49AM -0400, Richard Guy Briggs wrote: [...] > > > diff --git a/net/netfilter/nf_tables_api.c b/net/netfilter/nf_tables_api.c > > > index 3558e76e2733

Re: [PATCH ghak124 v3] audit: log nftables configuration change events

2020-06-24 Thread Richard Guy Briggs
On 2020-06-24 12:03, Pablo Neira Ayuso wrote: > On Thu, Jun 04, 2020 at 09:20:49AM -0400, Richard Guy Briggs wrote: > > iptables, ip6tables, arptables and ebtables table registration, > > replacement and unregistration configuration events are logged for the > > native (legacy) iptables setsockopt

Re: [PATCH ghak124 v3] audit: log nftables configuration change events

2020-06-24 Thread Pablo Neira Ayuso
On Thu, Jun 04, 2020 at 09:20:49AM -0400, Richard Guy Briggs wrote: > iptables, ip6tables, arptables and ebtables table registration, > replacement and unregistration configuration events are logged for the > native (legacy) iptables setsockopt api, but not for the > nftables netlink api which is u

Re: [PATCH ghak124 v3] audit: log nftables configuration change events

2020-06-23 Thread Paul Moore
On Thu, Jun 4, 2020 at 9:21 AM Richard Guy Briggs wrote: > > iptables, ip6tables, arptables and ebtables table registration, > replacement and unregistration configuration events are logged for the > native (legacy) iptables setsockopt api, but not for the > nftables netlink api which is used by t

Re: [PATCH ghak124 v3] audit: log nftables configuration change events

2020-06-04 Thread Steve Grubb
On Thursday, June 4, 2020 1:57:56 PM EDT Richard Guy Briggs wrote: > > > diff --git a/kernel/auditsc.c b/kernel/auditsc.c > > > index 468a23390457..3a9100e95fda 100644 > > > --- a/kernel/auditsc.c > > > +++ b/kernel/auditsc.c > > > @@ -75,6 +75,7 @@ > > > #include > > > #include > > > #include >

Re: [PATCH ghak124 v3] audit: log nftables configuration change events

2020-06-04 Thread Richard Guy Briggs
On 2020-06-04 13:03, Steve Grubb wrote: > On Thursday, June 4, 2020 9:20:49 AM EDT Richard Guy Briggs wrote: > > iptables, ip6tables, arptables and ebtables table registration, > > replacement and unregistration configuration events are logged for the > > native (legacy) iptables setsockopt api, bu

Re: [PATCH ghak124 v3] audit: log nftables configuration change events

2020-06-04 Thread Steve Grubb
On Thursday, June 4, 2020 9:20:49 AM EDT Richard Guy Briggs wrote: > iptables, ip6tables, arptables and ebtables table registration, > replacement and unregistration configuration events are logged for the > native (legacy) iptables setsockopt api, but not for the > nftables netlink api which is us

[PATCH ghak124 v3] audit: log nftables configuration change events

2020-06-04 Thread Richard Guy Briggs
iptables, ip6tables, arptables and ebtables table registration, replacement and unregistration configuration events are logged for the native (legacy) iptables setsockopt api, but not for the nftables netlink api which is used by the nft-variant of iptables in addition to nftables itself. Add call