Project

General

Profile

Actions

Bug #27357

open

CIS RHEL 8 Section 1.1.1.1 compliant code is reversed

Added by Michel BOUISSOU 3 days ago. Updated 1 day ago.

Status:
Pending release
Priority:
N/A
Target version:
Severity:
UX impact:
User visibility:
Effort required:
Priority:
0
Name check:
To do
Fix check:
To do
Regression:
No

Description

In CIS RHEL 8 Section 1.1.1.1 we have :

1.1.1.1 - Audit cramfs module is /bin/false

cis/kcl/tasks/kernel_module_disable.k

- executes : /usr/bin/env bash /var/rudder/cfengine-community/inputs/cis_rhel8/1.0/resources/is_kernel_module_disabled.sh cramfs
- With : compliant_codes = "0"

After careful analysis, the is_kernel_module_disabled.sh will actually :

- Exit 0 if the modprobe command FAILS (rc != 0)
- Also exit 0 if the modprobe command succeeded (rc = 0) AND we find “insmod” in the output (which means the module is actually insertable)

The only case where it would exit 1 is if both modprobe retuns 0 but the module is not inserted.

Which is the precise case where the module is aliased to /bin/false.

So by calling the script with “compliant_codes = "0"” we do the opposite of what we want, for this call we should have “compliant_codes = "1"”

Actions #1

Updated by Michel BOUISSOU 3 days ago

  • Assignee set to Michel BOUISSOU
Actions #2

Updated by Michel BOUISSOU 3 days ago

  • Target version set to 8.3
Actions #3

Updated by Michel BOUISSOU 3 days ago

  • Status changed from New to In progress
Actions #4

Updated by Michel BOUISSOU 3 days ago

  • Status changed from In progress to Pending technical review
  • Assignee changed from Michel BOUISSOU to Nicolas CHARLES
  • Pull Request set to https://github.com/Normation/rudder-plugins-private/pull/1105
Actions #5

Updated by Michel BOUISSOU 1 day ago

  • Status changed from Pending technical review to Pending release

Applied in changeset rudder-plugins-private:commit:rudder-plugins-private|666ca6da323038bc6fb56879638ba9f2e1753de2.

Actions

Also available in: Atom PDF