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 UBTU-20-010461 to ensure kernel module usb-storage is blacklisted… #11062

Merged
merged 1 commit into from
Sep 12, 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
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,7 @@ references:
stigid@rhel8: RHEL-08-040080
stigid@sle12: SLES-12-010580
stigid@sle15: SLES-15-010480
stigid@ubuntu2004: UBTU-20-010461

{{{ complete_ocil_entry_module_disable(module="usb-storage") }}}

Expand Down
3 changes: 3 additions & 0 deletions products/ubuntu2004/profiles/stig.profile
Original file line number Diff line number Diff line change
Expand Up @@ -593,3 +593,6 @@ selections:

# UBTU-20-010462 The Ubuntu operating system must not have accounts configured with blank or null passwords.
- no_empty_passwords_etc_shadow

# UBTU-20-010461 The Ubuntu operating system must disable automatic mounting of Universal Serial Bus (USB) mass storage driver.
- kernel_module_usb-storage_disabled
2 changes: 1 addition & 1 deletion shared/templates/kernel_module_disabled/ansible.template
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
dest: "/etc/modprobe.d/{{{ KERNMODULE }}}.conf"
regexp: 'install\s+{{{ KERNMODULE }}}'
line: "install {{{ KERNMODULE }}} /bin/true"
{{% if product in ["sle12", "sle15"] or 'ol' in product or 'rhel' in product %}}
{{% if product in ["sle12", "sle15"] or 'ol' in product or 'rhel' in product or 'ubuntu' in product %}}
dexterle marked this conversation as resolved.
Show resolved Hide resolved
- name: Ensure kernel module '{{{ KERNMODULE }}}' is blacklisted
lineinfile:
create: yes
Expand Down
2 changes: 1 addition & 1 deletion shared/templates/kernel_module_disabled/bash.template
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ else
echo -e "\n# Disable per security requirements" >> /etc/modprobe.d/{{{ KERNMODULE }}}.conf
echo "install {{{ KERNMODULE }}} /bin/true" >> /etc/modprobe.d/{{{ KERNMODULE }}}.conf
fi
{{% if product in ["sle12", "sle15"] or 'ol' in product or 'rhel' in product %}}
{{% if product in ["sle12", "sle15"] or 'ol' in product or 'rhel' in product or 'ubuntu' in product %}}
if ! LC_ALL=C grep -q -m 1 "^blacklist {{{ KERNMODULE }}}$" /etc/modprobe.d/{{{ KERNMODULE }}}.conf ; then
echo "blacklist {{{ KERNMODULE }}}" >> /etc/modprobe.d/{{{ KERNMODULE }}}.conf
fi
Expand Down
Loading