Bug 1918013 - NETFILTER_CFG spam in logs
Summary: NETFILTER_CFG spam in logs
Keywords:
Status: CLOSED NEXTRELEASE
Alias: None
Product: Fedora
Classification: Fedora
Component: kernel
Version: 33
Hardware: Unspecified
OS: Unspecified
unspecified
high
Target Milestone: ---
Assignee: Steve Grubb
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2021-01-19 20:24 UTC by Artem S. Tashkinov
Modified: 2021-11-04 17:42 UTC (History)
23 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2021-11-04 17:42:02 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)
1MB of logs for ~30 hours (15.06 KB, application/x-xz)
2021-01-19 20:24 UTC, Artem S. Tashkinov
no flags Details

Description Artem S. Tashkinov 2021-01-19 20:24:37 UTC
Created attachment 1748829 [details]
1MB of logs for ~30 hours

I see tons of messages like this in the journalctl log:

NETFILTER_CFG table=filter family=7 entries=0 op=xt_unregister pid=325361 subj=system_u:system_r:kernel_t:s0 comm="kworker/u8:5"
NETFILTER_CFG table=filter family=7 entries=0 op=xt_unregister pid=325361 subj=system_u:system_r:kernel_t:s0 comm="kworker/u8:5"
NETFILTER_CFG table=filter family=7 entries=0 op=xt_unregister pid=325361 subj=system_u:system_r:kernel_t:s0 comm="kworker/u8:5"
NETFILTER_CFG table=filter family=7 entries=0 op=xt_register pid=330825 subj=unconfined_u:unconfined_r:unconfined_t:s0-s0:c0.c1023 comm="chrome"
NETFILTER_CFG table=broute family=7 entries=0 op=xt_register pid=330825 subj=unconfined_u:unconfined_r:unconfined_t:s0-s0:c0.c1023 comm="chrome"
NETFILTER_CFG table=nat family=7 entries=0 op=xt_register pid=330825 subj=unconfined_u:unconfined_r:unconfined_t:s0-s0:c0.c1023 comm="chrome"
NETFILTER_CFG table=filter family=7 entries=0 op=xt_register pid=330835 subj=unconfined_u:unconfined_r:unconfined_t:s0-s0:c0.c1023 comm="chrome"
NETFILTER_CFG table=broute family=7 entries=0 op=xt_register pid=330835 subj=unconfined_u:unconfined_r:unconfined_t:s0-s0:c0.c1023 comm="chrome"
NETFILTER_CFG table=nat family=7 entries=0 op=xt_register pid=330835 subj=unconfined_u:unconfined_r:unconfined_t:s0-s0:c0.c1023 comm="chrome"
NETFILTER_CFG table=filter family=7 entries=0 op=xt_register pid=326630 subj=unconfined_u:unconfined_r:unconfined_t:s0-s0:c0.c1023 comm=495043204C61756E6368
NETFILTER_CFG table=broute family=7 entries=0 op=xt_register pid=326630 subj=unconfined_u:unconfined_r:unconfined_t:s0-s0:c0.c1023 comm=495043204C61756E6368
NETFILTER_CFG table=nat family=7 entries=0 op=xt_register pid=326630 subj=unconfined_u:unconfined_r:unconfined_t:s0-s0:c0.c1023 comm=495043204C61756E6368
NETFILTER_CFG table=filter family=7 entries=0 op=xt_register pid=326630 subj=unconfined_u:unconfined_r:unconfined_t:s0-s0:c0.c1023 comm=495043204C61756E6368
NETFILTER_CFG table=broute family=7 entries=0 op=xt_register pid=326630 subj=unconfined_u:unconfined_r:unconfined_t:s0-s0:c0.c1023 comm=495043204C61756E6368
NETFILTER_CFG table=nat family=7 entries=0 op=xt_register pid=326630 subj=unconfined_u:unconfined_r:unconfined_t:s0-s0:c0.c1023 comm=495043204C61756E6368


This doesn't seem right and these messages look absolutely redundant.

Please fix.

linux-5.10.7-200.fc33.x86_64
audit-3.0-1.fc33.x86_64
nftables-0.9.3-6.fc33.x86_64
iptables-1.8.5-4.fc33.x86_64

Comment 1 Artem S. Tashkinov 2021-01-19 20:27:25 UTC
I really don't know what the component is.

It might be even the kernel itself.

Please change if necessary.

As far as I understand no such messages were logged with kernels < 5.10

Comment 2 Artem S. Tashkinov 2021-01-19 20:28:41 UTC
Let's blame the kernel actually.

Comment 3 Steve Grubb 2021-01-19 20:37:46 UTC
The kernel is the source of this. But systemd enables the audit system unless it's booted with audit=0. If you wanted to suppress this one type of event, you can load the following audit rule:

-a always,exclude -F msgtype=NETFILTER_CFG

and that should make it go away.

Comment 4 Richard Guy Briggs 2021-01-19 20:56:47 UTC
What Steve said.

These are intentional, logging all changes to the configuration of the audit system which are required for security certifications.  Unfortunately, there are more with nftables compared with iptables due to their calling method.

Upstream: https://github.com/linux-audit/audit-kernel/issues/124

Comment 5 Artem S. Tashkinov 2021-01-19 21:04:21 UTC
(In reply to Steve Grubb from comment #3)

Again, these messages seem not to have any meaning or importance and I'd love them to be disabled by default without (re)configuring anything. Again, they were not present in earlier kernel versions.

(In reply to Richard Guy Briggs from comment #4)

I haven't changed anything in regard to my firewall rules since forever. I'm not against auditing, I'm against meaningless auditing.

Comment 6 Richard Guy Briggs 2021-01-21 20:45:20 UTC
(In reply to Artem S. Tashkinov from comment #5)
> (In reply to Steve Grubb from comment #3)
> Again, these messages seem not to have any meaning or importance and I'd love them to be disabled by default without (re)configuring anything. Again, they were not present in earlier kernel versions.

They were already present for iptables, just not as numerous [2011-01-16 fbabf31e4d48 ("netfilter: create audit records for x_tables replaces")].  Part of the reason they seem repetetive is because there is missing network namespace identification (which is planned) which was already an issue for iptables.

> (In reply to Richard Guy Briggs from comment #4)
> I haven't changed anything in regard to my firewall rules since forever. I'm not against auditing, I'm against meaningless auditing.

There was consultation with the netfilter-devs to be sure to catch all changes with a consistent format that accommodates all varieties of possible information while minimizing the number of messages to do so.  There is willingness to revisit it without breaking backward compatibility.

If you don't want any messages, set the kernel command line to audit=0.

Comment 7 Artem S. Tashkinov 2021-01-21 22:35:11 UTC
(In reply to Richard Guy Briggs from comment #6)

> If you don't want any messages, set the kernel command line to audit=0.

I'm OK with security audit messages.

What I'm seeing is plain SPAM, e.g.:

NETFILTER_CFG table=filter family=7 entries=0 op=xt_unregister pid=325361 subj=system_u:system_r:kernel_t:s0 comm="kworker/u8:5"
NETFILTER_CFG table=filter family=7 entries=0 op=xt_unregister pid=325361 subj=system_u:system_r:kernel_t:s0 comm="kworker/u8:5"
NETFILTER_CFG table=filter family=7 entries=0 op=xt_unregister pid=325361 subj=system_u:system_r:kernel_t:s0 comm="kworker/u8:5"

Three identical messages being logged.

Comment 8 Richard Guy Briggs 2021-01-21 23:47:35 UTC
(In reply to Artem S. Tashkinov from comment #7)
> What I'm seeing is plain SPAM, e.g.:
> 
> NETFILTER_CFG table=filter family=7 entries=0 op=xt_unregister pid=325361 subj=system_u:system_r:kernel_t:s0 comm="kworker/u8:5"
> NETFILTER_CFG table=filter family=7 entries=0 op=xt_unregister pid=325361 subj=system_u:system_r:kernel_t:s0 comm="kworker/u8:5"
> NETFILTER_CFG table=filter family=7 entries=0 op=xt_unregister pid=325361 subj=system_u:system_r:kernel_t:s0 comm="kworker/u8:5"
> 
> Three identical messages being logged.

They aren't identical if we add the network namspace identifiers (dev/inode).  I already have a patch for that, but is waiting for other work to go upstream.

Comment 9 Richard Guy Briggs 2021-01-21 23:49:41 UTC
(In reply to Richard Guy Briggs from comment #8)
> (In reply to Artem S. Tashkinov from comment #7)
> > What I'm seeing is plain SPAM, e.g.:
> > 
> > NETFILTER_CFG table=filter family=7 entries=0 op=xt_unregister pid=325361 subj=system_u:system_r:kernel_t:s0 comm="kworker/u8:5"
> > NETFILTER_CFG table=filter family=7 entries=0 op=xt_unregister pid=325361 subj=system_u:system_r:kernel_t:s0 comm="kworker/u8:5"
> > NETFILTER_CFG table=filter family=7 entries=0 op=xt_unregister pid=325361 subj=system_u:system_r:kernel_t:s0 comm="kworker/u8:5"
> > 
> > Three identical messages being logged.
> 
> They aren't identical if we add the network namspace identifiers (dev/inode).  I already have a patch for that, but is waiting for other work to go upstream.

https://github.com/linux-audit/audit-kernel/issues/79

Comment 10 Richard Guy Briggs 2021-01-29 15:55:35 UTC
Artem: A performance issue has been raised in rhel about this same feature, so we'll look at how we can reduce some of the output without losing essential information.  https://bugzilla.redhat.com/show_bug.cgi?id=1921624

Comment 11 Phil Sutter 2021-02-01 14:13:27 UTC
Richard,

(In reply to Richard Guy Briggs from comment #8)
> (In reply to Artem S. Tashkinov from comment #7)
> > What I'm seeing is plain SPAM, e.g.:
> > 
> > NETFILTER_CFG table=filter family=7 entries=0 op=xt_unregister pid=325361 subj=system_u:system_r:kernel_t:s0 comm="kworker/u8:5"
> > NETFILTER_CFG table=filter family=7 entries=0 op=xt_unregister pid=325361 subj=system_u:system_r:kernel_t:s0 comm="kworker/u8:5"
> > NETFILTER_CFG table=filter family=7 entries=0 op=xt_unregister pid=325361 subj=system_u:system_r:kernel_t:s0 comm="kworker/u8:5"
> > 
> > Three identical messages being logged.
> 
> They aren't identical if we add the network namspace identifiers
> (dev/inode).  I already have a patch for that, but is waiting for other work
> to go upstream.

Are you sure about that? I see one log message for each element added to a set.
All happening inside the same netns.

Cheers, Phil

Comment 12 Richard Guy Briggs 2021-02-01 14:23:14 UTC
(In reply to Phil Sutter from comment #11)
> (In reply to Richard Guy Briggs from comment #8)
> > They aren't identical if we add the network namspace identifiers (dev/inode).  I already have a patch for that, but is waiting for other work to go upstream.
> 
> Are you sure about that? I see one log message for each element added to a set. All happening inside the same netns.

I'm not absolutely sure, but the evidence that some of them definitely are is in the ghak79 link in comment 9.  That said, I would like to work with you to reduce the number of element reports.

Comment 13 Richard Guy Briggs 2021-03-22 21:05:23 UTC
2021-03-18 v1 patch posted upstream https://listman.redhat.com/archives/linux-audit/2021-March/msg00109.html
2021-03-22 v2 patch posted upstream https://listman.redhat.com/archives/linux-audit/2021-March/msg00149.html

Comment 14 Richard Guy Briggs 2021-03-23 20:07:59 UTC
2021-03-23 v3 patch posted upstream https://listman.redhat.com/archives/linux-audit/2021-March/msg00152.html

Comment 15 Richard Guy Briggs 2021-03-25 04:10:43 UTC
v4 posted upstream https://listman.redhat.com/archives/linux-audit/2021-March/msg00157.html

Comment 16 Richard Guy Briggs 2021-03-26 18:00:23 UTC
v5 posted upstream  https://listman.redhat.com/archives/linux-audit/2021-March/msg00159.html

Comment 17 Richard Guy Briggs 2021-03-31 20:50:46 UTC
2021-03-31 v5 merged upstream in nf-next bb4052e57b5b ("audit: log nftables configuration change events once per table")
2021-03-31 FW found UAF: nf-next fix e4d272948d25 <pablo> ("netfilter: nf_tables: use-after-free")

Comment 18 Richard Guy Briggs 2021-03-31 21:33:04 UTC
2021-03-31 v5 merged upstream in nf-next forced update c520292f29b8 ("audit: log nftables configuration change events once per table")

Comment 19 Richard Guy Briggs 2021-04-15 01:21:24 UTC
2021-04-02 07:45 Dan Carpenter dadf33c9f6b5 ("netfilter: nftables: fix a warning message in nf_tables_commit_audit_collect()")

Comment 20 Ben Cotton 2021-11-04 14:42:28 UTC
This message is a reminder that Fedora 33 is nearing its end of life.
Fedora will stop maintaining and issuing updates for Fedora 33 on 2021-11-30.
It is Fedora's policy to close all bug reports from releases that are no longer
maintained. At that time this bug will be closed as EOL if it remains open with a
Fedora 'version' of '33'.

Package Maintainer: If you wish for this bug to remain open because you
plan to fix it in a currently maintained version, simply change the 'version' 
to a later Fedora version.

Thank you for reporting this issue and we are sorry that we were not 
able to fix it before Fedora 33 is end of life. If you would still like 
to see this bug fixed and are able to reproduce it against a later version 
of Fedora, you are encouraged  change the 'version' to a later Fedora 
version prior this bug is closed as described in the policy above.

Although we aim to fix as many bugs as possible during every release's 
lifetime, sometimes those efforts are overtaken by events. Often a 
more recent Fedora release includes newer upstream software that fixes 
bugs or makes them obsolete.

Comment 21 Ben Cotton 2021-11-04 15:40:35 UTC
This message is a reminder that Fedora 33 is nearing its end of life.
Fedora will stop maintaining and issuing updates for Fedora 33 on 2021-11-30.
It is Fedora's policy to close all bug reports from releases that are no longer
maintained. At that time this bug will be closed as EOL if it remains open with a
Fedora 'version' of '33'.

Package Maintainer: If you wish for this bug to remain open because you
plan to fix it in a currently maintained version, simply change the 'version' 
to a later Fedora version.

Thank you for reporting this issue and we are sorry that we were not 
able to fix it before Fedora 33 is end of life. If you would still like 
to see this bug fixed and are able to reproduce it against a later version 
of Fedora, you are encouraged  change the 'version' to a later Fedora 
version prior this bug is closed as described in the policy above.

Although we aim to fix as many bugs as possible during every release's 
lifetime, sometimes those efforts are overtaken by events. Often a 
more recent Fedora release includes newer upstream software that fixes 
bugs or makes them obsolete.


Note You need to log in before you can comment on or make changes to this bug.