public inbox for linux-audit@redhat.com
 help / color / mirror / Atom feed
From: Steve Grubb <sgrubb@redhat.com>
To: Frederik Bosch <f.bosch@genkgo.nl>
Cc: linux-audit@redhat.com
Subject: Re: configuration for busy docker host
Date: Thu, 23 Aug 2018 10:18:53 -0400	[thread overview]
Message-ID: <8308348.SYEr7oRNeL@x2> (raw)
In-Reply-To: <97b56ea7-442d-20e4-6a4b-e44021e2c6a1@genkgo.nl>

On Wednesday, August 22, 2018 10:49:20 AM EDT Frederik Bosch wrote:
> Hi Steve,
> 
> That was really helpful, again. My aureport looks much healthier now! I
> have one remaing question. When running auditctl -s I still have a lost
> value of 51 after boot.
> 
> enabled 2
> failure 1
> pid 779
> rate_limit 0
> backlog_limit 8192
> lost 51
> backlog 0
> backlog_wait_time 0
> loginuid_immutable 0 unlocked
> 
> What could be the cause?

By default, the audit subsystem reserves 64 slots for audit events. Systemd 
can easily overrun this before auditd starts. So, you need to boot with the 
following kernel boot options:

audit=1 audit_backlog_limit=8192

Does you have this for boot options?


> My aureport now looks like this.
> 
> sudo aureport --start boot --key --summary
> 
> Key Summary Report
> ===========================
> total  key
> ===========================
> 289  auditlog
> 120  specialfiles
> 73  docker
> 69  privileged
> 29  access
> 19  perm_mod
> 17  delete
> 12  actions
> 11  audit_rules_networkconfig_modification
> 10  cron
> 10  modules
> 10  login
> 6  apparmor_tools
> 6  audit_time_rules
> 5  systemd_tools
> 5  audit_rules_usergroup_modification
> 5  pam
> 4  power
> 3  audittools
> 3  group_modification
> 3  user_modification
> 3  init
> 3  modprobe
> 3  sshd
> 2  apparmor
> 2  systemd
> 2  export
> 2  auditconfig
> 2  mail
> 2  admin_user_home
> 1  audispconfig
> 1  MAC-policy
> 1  passwd_modification
> 1  logins
> 1  libpath
> 1  localtime
> 1  audit_time_ruleszone
> 1  sysctl
> 
> If I understand things correctly with failure set to 1, I should find a
> message in dmesg due to printk, but I have not found any that is
> related.

There may be a chance that these were lost before auditd rules were loaded.

> My auditd.conf is as follows.
> 
> local_events = yes
> write_logs = yes
> log_file = /var/log/audit/audit.log
> log_group = adm
> log_format = RAW
> flush = INCREMENTAL_ASYNC
> freq = 50
> max_log_file = 8
> num_logs = 5

Btw, these two settings only allow 40Mb of logs. Typically if you really need 
auditing you need more than this.

> priority_boost = 4
> disp_qos = lossy
> dispatcher = /sbin/audispd
> name_format = NONE
> ##name = mydomain
> max_log_file_action = keep_logs
> space_left = 75
> space_left_action = email
> verify_email = yes
> action_mail_acct = root
> admin_space_left = 50
> admin_space_left_action = halt
> disk_full_action = SUSPEND
> disk_error_action = SUSPEND
> use_libwrap = yes
> ##tcp_listen_port = 60
> tcp_listen_queue = 5
> tcp_max_per_addr = 1
> ##tcp_client_ports = 1024-65535
> tcp_client_max_idle = 0
> enable_krb5 = no
> krb5_principal = auditd
> ##krb5_key_file = /etc/audit/audit.key
> distribute_network = no
> 
> Or is it something I should not be worried about?

Maybe. Let's see what the boot options are. Also, what kernel version are you 
using?

-Steve

  reply	other threads:[~2018-08-23 14:18 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-08-20  9:56 configuration for busy docker host Frederik Bosch
2018-08-20 14:10 ` Frederik Bosch
2018-08-20 17:48 ` Steve Grubb
2018-08-22 11:40   ` Frederik Bosch
2018-08-22 12:42     ` Steve Grubb
2018-08-22 14:49       ` Frederik Bosch
2018-08-23 14:18         ` Steve Grubb [this message]
2018-08-23 16:01           ` Frederik Bosch

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=8308348.SYEr7oRNeL@x2 \
    --to=sgrubb@redhat.com \
    --cc=f.bosch@genkgo.nl \
    --cc=linux-audit@redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox