Skip to content

Commit

Permalink
Merge pull request #10062 from Mab879/add_package_prelink_removed
Browse files Browse the repository at this point in the history
Add package prelink removed
  • Loading branch information
jan-cerny authored Jan 17, 2023
2 parents d76ac6f + 714076b commit c688eba
Show file tree
Hide file tree
Showing 5 changed files with 64 additions and 4 deletions.
6 changes: 3 additions & 3 deletions controls/cis_rhel7.yml
Original file line number Diff line number Diff line change
Expand Up @@ -401,9 +401,9 @@ controls:
levels:
- l1_server
- l1_workstation
status: planned
notes: >-
The rule to remove prelink package is missing.
status: automated
rules:
- package_prelink_removed

- id: 1.6.1.1
title: Ensure SELinux is installed (Automated)
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
# platform = multi_platform_all
# reboot = false
# strategy = disable
# complexity = medium
# disruption = low

- name: Check If Prelinked Is Installed
ansible.builtin.stat:
path: /usr/sbin/prelink
get_checksum: no
register: prelink

- name: Restore Prelinked Binaries
ansible.builtin.shell:
cmd: prelink -ua
when: prelink.stat.exists

- name: Ensure prelink is Removed
ansible.builtin.package:
name: "prelink"
state: absent

Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
# platform = multi_platform_all
# reboot = false
# strategy = disable
# complexity = medium
# disruption = low

if [[ -f /usr/sbin/prelink ]];
then
prelink -ua
fi

{{{ bash_package_remove(package="prelink") }}}
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
documentation_complete: true

prodtype: rhel7

title: 'Package "prelink" Must not be Installed'

description: |-
{{{ describe_package_remove(package="prelink") }}}
rationale: |-
The use of the <tt>prelink</tt> package can interfere with the operation of AIDE since it binaries.
Prelinking can also increase damage caused by vulnerability in a common library like libc.
severity: medium

identifiers:
cce@rhel7: CCE-86562-6

references:
cis@rhel7: 1.5.4

template:
name: package_removed
vars:
pkgname: prelink

1 change: 0 additions & 1 deletion shared/references/cce-redhat-avail.txt
Original file line number Diff line number Diff line change
Expand Up @@ -365,7 +365,6 @@ CCE-86558-4
CCE-86559-2
CCE-86560-0
CCE-86561-8
CCE-86562-6
CCE-86563-4
CCE-86564-2
CCE-86565-9
Expand Down

0 comments on commit c688eba

Please sign in to comment.