revert: 1320a4052ea1 ("audit: trigger accompanying records when no rules present")
authorPaul Moore <paul@paul-moore.com>
Tue, 28 Jul 2020 19:33:21 +0000 (15:33 -0400)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 5 Aug 2020 07:58:36 +0000 (09:58 +0200)
commita5e79834a5cd304ba114fa4b05d75f10a4dce80e
tree7db60dcde85dd34530e4500c9ef8297694b63a48
parentbeab956bdc0add5371e52d29c0d6f840c1f55609
revert: 1320a4052ea1 ("audit: trigger accompanying records when no rules present")

commit 8ac68dc455d9d18241d44b96800d73229029ed34 upstream.

Unfortunately the commit listed in the subject line above failed
to ensure that the task's audit_context was properly initialized/set
before enabling the "accompanying records".  Depending on the
situation, the resulting audit_context could have invalid values in
some of it's fields which could cause a kernel panic/oops when the
task/syscall exists and the audit records are generated.

We will revisit the original patch, with the necessary fixes, in a
future kernel but right now we just want to fix the kernel panic
with the least amount of added risk.

Cc: stable@vger.kernel.org
Fixes: 1320a4052ea1 ("audit: trigger accompanying records when no rules present")
Reported-by: j2468h@googlemail.com
Signed-off-by: Paul Moore <paul@paul-moore.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
kernel/audit.c
kernel/audit.h
kernel/auditsc.c