Skip to content

xccdf_org.ssgproject.content_rule_audit_backlog_limit resets backlog limit even if set to valid value #13923

@abertolli

Description

@abertolli

Description of problem:

On RHEL 9, we set audit_backlog_limit=32768. However, when running xccdf_org.ssgproject.content_rule_audit_backlog_limit it fails and remediation resets this back to audit_backlog_limit=8192. The logic behind the rule seems to indicate that any value higher than 8192 should satisfy the check.

SCAP Security Guide Version:

scap-security-guide-0.1.77-3.el9.noarch

Operating System Version:

Red Hat Enterprise Linux release 9.6 (Plow)

Steps to Reproduce:

  1. Set kernel args to audit_backlog_limit=32768, in /etc/default/grub, grubby, and /boot/grub2/grub.cfg
#!/bin/bash

[ $(id -u) -ne 0 ] && echo "You need to be root" && exit 1

arg="$1"
[ -z "$arg" ] && echo "$(basename $0) ARG=VALUE" && exit 1
key="${arg%%=*}"

# Update /etc/default/grub
if ! grep -wq "$arg" /etc/default/grub
then
	cp /etc/default/grub /etc/default/grub.bk
	if grep -q "GRUB_CMDLINE_LINUX=.*${key}=" /etc/default/grub
	then
		sed -i -e "s/\(GRUB_CMDLINE_LINUX=\".*\)${key}=[^ ]\+\(.*\"\)/\1$arg\2/" /etc/default/grub
	else
		sed -i -e "s/\(GRUB_CMDLINE_LINUX=\".*\)\"/\1 $arg\"/" /etc/default/grub
	fi
fi

# Apply to all installed kernels via grubby
if ! grubby --info=ALL | grep -qw "$arg"
then
	grubby --update-kernel=ALL --args="$arg"
fi

grub_cfg="/boot/grub2/grub.cfg"
if ! grep -qw "$arg" "$grub_cfg" 2>/dev/null
then
	grub2-mkconfig -o "$grub_cfg"
fi
  1. Check these are set correctly, e.g.
  • grep 32768 /etc/default/grub
  • grubby --info=ALL | grep args
  • grep 32768 /boot/grub2/grub.cfg
  • (And cat /proc/cmdline after reboot)
  1. Run oscap remediation and check for rule xccdf_org.ssgproject.content_rule_audit_backlog_limit using /usr/share/xml/scap/ssg/content/ssg-rhel9-ds.xml and profile xccdf_org.ssgproject.content_profile_stig

Actual Results:

  • Rule result fails, and remediation runs
  • /etc/default/grub and grubby show audit_backlog_limit=8192
  • /boot/grub2/grub.cfg shows audit_backlog_limit=32768

Expected Results:

  • Rule result passes and does not remediate
  • /etc/default/grub, grubby, and /boot/grub2/grub.cfg all show audit_backlog_limit=32768

Additional Information/Debugging Steps:

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