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

From: Richard Guy Briggs
Date: Thu Feb 18 2021 - 11:14:17 EST


On 2021-02-18 13:52, Florian Westphal wrote:
> Richard Guy Briggs <rgb@xxxxxxxxxx> 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 stand-alone chain mod with one table, then a
> > table add of a different one with a "higher ranking" op...
>
> Yes, that can happen.

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 different order?

(snip GET bits, that's now clear, thank you)

> > such that it would be desirable to filter them out
> > to reduce noise in that single log line if it is attempted to list all
> > the change ops? It almost sounds like it would be better to do one
> > audit log line for each table for each family, and possibly for each op
> > to avoid the need to change userspace. This would already be a
> > significant improvement picking the highest ranking op.
>
> I think i understand what you'd like to do. Yes, that would reduce
> the log output a lot.

Would the generation change id be useful outside the kernel? What
exactly does it look like? I don't quite understand the genmask purpose.

- RGB

--
Richard Guy Briggs <rgb@xxxxxxxxxx>
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