Skip to content

BUG: error receiving audit netlink packet (No buffer space available) #154

@sulphur

Description

@sulphur

Hi,

Issue Description

I am encountering an issue with the Auditd service on my system, which is consistently generating the error message Error receiving audit netlink packet (No buffer space available). This error appears to be related to a buffer space limitation when receiving audit netlink packets.

Environment

  • Operating System: Ubuntu 20.04
  • Auditd Package Version: auditd/focal,now 1:2.8.5-2ubuntu6 amd64

Custom Audit Rules

I should also note that I have custom audit rules added by F-Secure antivirus, which may be relevant to this issue because they can generate a lot of events. Here are the custom audit rules that are loaded:

auditctl -l
-a always,exit -F arch=b64 -S clone,fork,vfork,execve -F key=atp_process
-a always,exit -F arch=b32 -S fork,execve,clone,vfork -F key=atp_process
-a always,exit -F arch=b64 -S init_module -F key=atp_syscall
-a always,exit -F arch=b32 -S init_module -F key=atp_syscall
-a always,exit -F arch=b64 -S delete_module -F key=atp_syscall
-a always,exit -F arch=b32 -S delete_module -F key=atp_syscall
-a always,exit -F arch=b64 -S chdir -F key=atp_syscall
-a always,exit -F arch=b32 -S chdir -F key=atp_syscall
-a always,exit -F arch=b64 -S finit_module -F key=atp_syscall
-a always,exit -F arch=b32 -S finit_module -F key=atp_syscall
-a always,exit -F arch=b64 -S ptrace -F a0!=0x4204 -F a0!=0x18 -F key=atp_syscall
-a always,exit -F arch=b32 -S ptrace -F a0!=0x4204 -F a0!=0x18 -F key=atp_syscall
-a always,exit -F arch=b64 -S connect,accept,bind,listen,accept4 -F key=atp_socket
-a always,exit -F arch=b32 -S socketcall -F a0=0x2 -F key=atp_socket
-a always,exit -F arch=b32 -S socketcall -F a0=0x3 -F key=atp_socket
-a always,exit -F arch=b32 -S socketcall -F a0=0x4 -F key=atp_socket
-a always,exit -F arch=b32 -S socketcall -F a0=0x5 -F key=atp_socket
-a always,exit -F arch=b32 -S socketcall -F a0=0x12 -F key=atp_socket

Audispd Configuration

I have attempted to increase the q_depth in audispd to 65536 and also increased -b to 65536 in /etc/audit/audit.rules in an attempt to address this issue. However, the error persists.

cat /etc/audit/auditd.conf
#
# Ansible managed
#
# Generated by Ansible role devsec.hardening.os_hardening

log_file = /var/log/audit/audit.log
log_format = RAW
log_group = root
priority_boost = 4
flush = INCREMENTAL
freq = 20
num_logs = 76
disp_qos = lossy
dispatcher = /sbin/audispd
name_format = NONE
max_log_file = 50
max_log_file_action = ROTATE
space_left = 75
space_left_action = SYSLOG
action_mail_acct = root
admin_space_left = 50
admin_space_left_action = SUSPEND
disk_full_action = SUSPEND
disk_error_action = SUSPEND
tcp_listen_queue = 5
tcp_max_per_addr = 1
tcp_client_max_idle = 0
enable_krb5 = no
krb5_principal = auditd

and audidspd conf :

cat /etc/audisp/audispd.conf
#
# This file controls the configuration of the audit event
# dispatcher daemon, audispd.
#

# commented by F-Secure:q_depth = 250
overflow_action = SYSLOG
# commented by F-Secure:priority_boost = 4
max_restarts = 10
name_format = HOSTNAME
#name = mydomain
plugin_dir = /etc/audisp/plugins.d/
# commented by F-Secure
#q_depth = 16384
# commented by F-Secure
#priority_boost = 10

q_depth = 32768
priority_boost = 20

Steps Taken

I have attempted to troubleshoot the issue by checking disk space, adjusting auditd configuration settings, and investigating any potential conflicts with other services or configurations. However, I have not been able to resolve the problem.

Expected Behavior

The Auditd service should operate without generating the "Error receiving audit netlink packet (No buffer space available)" error.

Thank you for your help in addressing this problem.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions