]> git.proxmox.com Git - mirror_ubuntu-focal-kernel.git/commit
audit: log AUDIT_TIME_* records only from rules
authorRichard Guy Briggs <rgb@redhat.com>
Tue, 22 Feb 2022 16:44:51 +0000 (11:44 -0500)
committerStefan Bader <stefan.bader@canonical.com>
Fri, 20 May 2022 13:18:33 +0000 (15:18 +0200)
commit38499809b7400967fb1a63d91752d4b21f155c01
tree67703f6f3fe961b51fa98283325197e1a11d7c73
parent6674205bce222381e08bf83ce1042832c0752805
audit: log AUDIT_TIME_* records only from rules

BugLink: https://bugs.launchpad.net/bugs/1971497
[ Upstream commit 272ceeaea355214b301530e262a0df8600bfca95 ]

AUDIT_TIME_* events are generated when there are syscall rules present
that are not related to time keeping.  This will produce noisy log
entries that could flood the logs and hide events we really care about.

Rather than immediately produce the AUDIT_TIME_* records, store the data
in the context and log it at syscall exit time respecting the filter
rules.

Note: This eats the audit_buffer, unlike any others in show_special().

Please see https://bugzilla.redhat.com/show_bug.cgi?id=1991919

Fixes: 7e8eda734d30 ("ntp: Audit NTP parameters adjustment")
Fixes: 2d87a0674bd6 ("timekeeping: Audit clock adjustments")
Signed-off-by: Richard Guy Briggs <rgb@redhat.com>
[PM: fixed style/whitespace issues]
Signed-off-by: Paul Moore <paul@paul-moore.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
Signed-off-by: Kamal Mostafa <kamal@canonical.com>
Signed-off-by: Stefan Bader <stefan.bader@canonical.com>
kernel/audit.h
kernel/auditsc.c