Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add package prelink removed #10062

Merged
merged 3 commits into from
Jan 17, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Mab879 marked this conversation as resolved.
Show resolved Hide resolved
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