]> git.baikalelectronics.ru Git - kernel.git/commit
seccomp: Don't special case audited processes when logging
authorTyler Hicks <tyhicks@canonical.com>
Fri, 4 May 2018 01:08:15 +0000 (01:08 +0000)
committerPaul Moore <paul@paul-moore.com>
Tue, 8 May 2018 06:04:23 +0000 (02:04 -0400)
commit789018423d1ec99d54a34738324af658cb45183f
treef1eb4381cc90194fe772decba3168e578981993e
parent588788e2affa1a0676e36d99d740001e91933d02
seccomp: Don't special case audited processes when logging

Seccomp logging for "handled" actions such as RET_TRAP, RET_TRACE, or
RET_ERRNO can be very noisy for processes that are being audited. This
patch modifies the seccomp logging behavior to treat processes that are
being inspected via the audit subsystem the same as processes that
aren't under inspection. Handled actions will no longer be logged just
because the process is being inspected. Since v4.14, applications have
the ability to request logging of handled actions by using the
SECCOMP_FILTER_FLAG_LOG flag when loading seccomp filters.

With this patch, the logic for deciding if an action will be logged is:

  if action == RET_ALLOW:
    do not log
  else if action not in actions_logged:
    do not log
  else if action == RET_KILL:
    log
  else if action == RET_LOG:
    log
  else if filter-requests-logging:
    log
  else:
    do not log

Reported-by: Steve Grubb <sgrubb@redhat.com>
Signed-off-by: Tyler Hicks <tyhicks@canonical.com>
Acked-by: Kees Cook <keescook@chromium.org>
Signed-off-by: Paul Moore <paul@paul-moore.com>
Documentation/userspace-api/seccomp_filter.rst
include/linux/audit.h
kernel/auditsc.c
kernel/seccomp.c