Skip to content

Commit

Permalink
Merge pull request #9984 from rumch-se/partition_for_dev_shm
Browse files Browse the repository at this point in the history
Added rule partition_for_dev_shm
  • Loading branch information
marcusburghardt committed Feb 6, 2023
2 parents 2a66e62 + 4e1bb28 commit a42c7d0
Show file tree
Hide file tree
Showing 5 changed files with 47 additions and 4 deletions.
4 changes: 3 additions & 1 deletion controls/cis_sle12.yml
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,9 @@ controls:
levels:
- l1_server
- l1_workstation
status: manual # rule is missing
status: automated
rules:
- partition_for_dev_shm

- id: 1.1.7
title: Ensure noexec option set on /dev/shm partition (Automated)
Expand Down
4 changes: 3 additions & 1 deletion controls/cis_sle15.yml
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,9 @@ controls:
levels:
- l1_server
- l1_workstation
status: manual # rule is missing
status: automated
rules:
- partition_for_dev_shm

- id: 1.1.7
title: Ensure noexec option set on /dev/shm partition (Automated)
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
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,
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
could continue to exploit the known flaw.
severity: low

identifiers:
cce@sle12: CCE-92319-3
cce@sle15: CCE-92477-9

references:
cis@sle12: 1.1.6
cis@sle15: 1.1.6

{{{ complete_ocil_entry_separate_partition(part="/dev/shm") }}}

fixtext: '{{{ fixtext_separate_partition(part="/dev/shm") }}}'

platform: machine

template:
name: mount
vars:
mountpoint: /dev/shm
min_size: 2147483648
1 change: 0 additions & 1 deletion shared/references/cce-sle12-avail.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
CCE-92319-3
CCE-92321-9
CCE-92324-3
CCE-92326-8
Expand Down
1 change: 0 additions & 1 deletion shared/references/cce-sle15-avail.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
CCE-92477-9
CCE-92479-5
CCE-92481-1
CCE-92483-7
Expand Down

0 comments on commit a42c7d0

Please sign in to comment.