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

Turn off remedations for /dev/shm #11364

Merged
merged 2 commits into from
Dec 8, 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 @@ -66,6 +66,7 @@ template:
type@sle12: ''
backends:
anaconda: 'off'
blueprint: 'off'


fixtext: |-
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -73,3 +73,4 @@ template:
type@sle12: ''
backends:
anaconda: 'off'
blueprint: 'off'
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,7 @@ template:
type@sle12: ''
backends:
anaconda: 'off'
blueprint: 'off'

fixtext: |-
{{{ fixtext_mount_option("/dev/shm", "nosuid") }}}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,19 +3,19 @@ documentation_complete: true
title: 'Ensure /dev/shm is configured'

description: |-
The <tt>/dev/shm</tt> is a traditional shared memory concept.
One program will create a memory portion, which other processes
(if permitted) can access. If <tt>/dev/shm</tt> is not configured,
The <tt>/dev/shm</tt> is a traditional shared memory concept.
One program will create a memory portion, which other processes
(if permitted) can access. If <tt>/dev/shm</tt> is not configured,
tmpfs will be mounted to /dev/shm by systemd.

rationale: |-
Any user can upload and execute files inside the <tt>/dev/shm</tt> similar to
the <tt>/tmp</tt> partition. Configuring <tt>/dev/shm</tt> allows an administrator
to set the noexec option on the mount, making /dev/shm useless for an attacker to
install executable code. It would also prevent an attacker from establishing a
hardlink to a system setuid program and wait for it to be updated. Once the program
was updated, the hardlink would be broken and the attacker would have his own copy
of the program. If the program happened to have a security vulnerability, the attacker
Any user can upload and execute files inside the <tt>/dev/shm</tt> similar to
the <tt>/tmp</tt> partition. Configuring <tt>/dev/shm</tt> allows an administrator
to set the noexec option on the mount, making /dev/shm useless for an attacker to
install executable code. It would also prevent an attacker from establishing a
hardlink to a system setuid program and wait for it to be updated. Once the program
was updated, the hardlink would be broken and the attacker would have his own copy
of the program. If the program happened to have a security vulnerability, the attacker
could continue to exploit the known flaw.

severity: low
Expand All @@ -39,8 +39,15 @@ fixtext: '{{{ fixtext_separate_partition(part="/dev/shm") }}}'

platform: machine

warnings:
- general: |-
This rule does not have a remedation.
It is expected that this will be managed by systemd and will be a tmpfs partition.

template:
name: mount
vars:
mountpoint: /dev/shm
min_size: 2147483648
backends:
blueprint: 'off'
anaconda: 'off'
Loading