-
Notifications
You must be signed in to change notification settings - Fork 772
Change rhcos4/moderate kernel argument checks to use coreos check #6131
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
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,44 @@ | ||
| documentation_complete: true | ||
|
|
||
| prodtype: rhcos4 | ||
|
|
||
| title: 'Extend Audit Backlog Limit for the Audit Daemon' | ||
|
|
||
| description: |- | ||
| To improve the kernel capacity to queue all log events, even those which occurred | ||
| prior to the audit daemon, add the argument <tt>audit_backlog_limit=8192</tt> to all | ||
| BLS (Boot Loader Specification) entries ('options' line) for the Linux | ||
| operating system in <tt>/boot/loader/entries/*.conf</tt>. | ||
|
|
||
| rationale: |- | ||
| audit_backlog_limit sets the queue length for audit events awaiting transfer | ||
| to the audit daemon. Until the audit daemon is up and running, all log messages | ||
| are stored in this queue. If the queue is overrun during boot process, the action | ||
| defined by audit failure flag is taken. | ||
|
|
||
| severity: medium | ||
|
|
||
| identifiers: | ||
| cce@rhcos4: CCE-82671-9 | ||
|
|
||
| references: | ||
| srg: SRG-OS-000254-GPOS-00095 | ||
| nist: CM-6(a) | ||
| cis@rhel8: 4.1.1.4 | ||
|
|
||
| ocil_clause: 'audit backlog limit is not configured' | ||
|
|
||
| ocil: |- | ||
| Inspect the form of all the BLS (Boot Loader Specification) entries | ||
| ('options' line) in <tt>/boot/loader/entries/*.conf</tt>. If they include | ||
| <tt>audit=1</tt>, then auditing is enabled at boot time. | ||
| <br /><br /> | ||
| To ensure <tt>audit_backlog_limit=8192</tt> is configured on the installed kernel, add | ||
| the kernel argument via a <pre>MachineConfig</pre> object to the appropriate | ||
| pools. | ||
|
|
||
| template: | ||
| name: coreos_kernel_option | ||
| vars: | ||
| arg_name: audit_backlog_limit | ||
| arg_value: '8192' | ||
This file was deleted.
This file was deleted.
This file was deleted.
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,42 @@ | ||
| documentation_complete: true | ||
|
|
||
| prodtype: rhcos4 | ||
|
|
||
| title: 'Enable Kernel Page-Table Isolation (KPTI)' | ||
|
|
||
| description: |- | ||
| To enable Kernel page-table isolation, add the argument <tt>pti=on</tt> to all | ||
| BLS (Boot Loader Specification) entries ('options' line) for the Linux | ||
| operating system in <tt>/boot/loader/entries/*.conf</tt>. | ||
|
|
||
| rationale: |- | ||
| Kernel page-table isolation is a kernel feature that mitigates | ||
| the Meltdown security vulnerability and hardens the kernel | ||
| against attempts to bypass kernel address space layout | ||
| randomization (KASLR). | ||
|
|
||
| severity: high | ||
|
|
||
| identifiers: | ||
| cce@rhcos4: CCE-82497-9 | ||
|
|
||
| references: | ||
| srg: SRG-OS-000433-GPOS-00193 | ||
| nist: SI-16 | ||
|
|
||
| ocil_clause: 'Kernel page-table isolation is not enabled' | ||
|
|
||
| ocil: |- | ||
| Inspect the form of all the BLS (Boot Loader Specification) entries | ||
| ('options' line) in <tt>/boot/loader/entries/*.conf</tt>. If they include | ||
| <tt>pti=on</tt>, then Kernel page-table isolation is enabled at boot time. | ||
| <br /><br /> | ||
| To ensure <tt>pti=on</tt> is configured on the installed kernel, add | ||
| the kernel argument via a <pre>MachineConfig</pre> object to the appropriate | ||
| pools. | ||
|
|
||
| template: | ||
| name: coreos_kernel_option | ||
| vars: | ||
| arg_name: pti | ||
| arg_value: 'on' |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,40 @@ | ||
| documentation_complete: true | ||
|
|
||
| prodtype: rhcos4 | ||
|
|
||
| title: 'Disable vsyscalls' | ||
|
|
||
| description: |- | ||
| To disable use of virtual syscalls, add the argument <tt>vsyscall=none</tt> to all | ||
| BLS (Boot Loader Specification) entries ('options' line) for the Linux | ||
| operating system in <tt>/boot/loader/entries/*.conf</tt>. | ||
|
|
||
| rationale: |- | ||
| Virtual Syscalls provide an opportunity of attack for a user who has control | ||
| of the return instruction pointer. | ||
|
|
||
| severity: medium | ||
|
|
||
| identifiers: | ||
| cce@rhcos4: CCE-82674-3 | ||
|
|
||
| references: | ||
| srg: SRG-OS-000480-GPOS-00227 | ||
| nist: CM-7(a) | ||
|
|
||
| ocil_clause: 'vsyscalls are enabled' | ||
|
|
||
| ocil: |- | ||
| Inspect the form of all the BLS (Boot Loader Specification) entries | ||
| ('options' line) in <tt>/boot/loader/entries/*.conf</tt>. If they include | ||
| <tt>vsyscall=none</tt>, then virtual syscalls are not enabled at boot time. | ||
| <br /><br /> | ||
| To ensure <tt>vsyscall=none</tt> is configured on the installed kernel, add | ||
| the kernel argument via a <pre>MachineConfig</pre> object to the appropriate | ||
| pools. | ||
|
|
||
| template: | ||
| name: coreos_kernel_option | ||
| vars: | ||
| arg_name: vsyscall | ||
| arg_value: none |
This file was deleted.
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,44 @@ | ||
| documentation_complete: true | ||
|
|
||
| prodtype: rhcos4 | ||
|
|
||
| title: 'Enable page allocator poisoning' | ||
|
|
||
| description: |- | ||
| To enable poisoning of free pages, add the argument <tt>page_poison=1</tt> to all | ||
| BLS (Boot Loader Specification) entries ('options' line) for the Linux | ||
| operating system in <tt>/boot/loader/entries/*.conf</tt>. | ||
|
|
||
|
|
||
| rationale: |- | ||
| Poisoning writes an arbitrary value to freed pages, so any modification or | ||
| reference to that page after being freed or before being initialized will be | ||
| detected and prevented. | ||
| This prevents many types of use-after-free vulnerabilities at little performance cost. | ||
| Also prevents leak of data and detection of corrupted memory. | ||
|
|
||
| severity: medium | ||
|
|
||
| identifiers: | ||
| cce@rhcos4: CCE-82673-5 | ||
|
|
||
| references: | ||
| srg: SRG-OS-000480-GPOS-00227 | ||
| nist: CM-6(a) | ||
|
|
||
| ocil_clause: 'page allocator poisoning is not enabled' | ||
|
|
||
| ocil: |- | ||
| Inspect the form of all the BLS (Boot Loader Specification) entries | ||
| ('options' line) in <tt>/boot/loader/entries/*.conf</tt>. If they include | ||
| <tt>page_poison=1</tt>, then page poisoning is enabled at boot time. | ||
| <br /><br /> | ||
| To ensure <tt>page_poison=1</tt> is configured on the installed kernel, add | ||
| the kernel argument via a <pre>MachineConfig</pre> object to the appropriate | ||
| pools. | ||
|
|
||
| template: | ||
| name: coreos_kernel_option | ||
| vars: | ||
| arg_name: page_poison | ||
| arg_value: '1' |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,43 @@ | ||
| documentation_complete: true | ||
|
|
||
| prodtype: rhcos4 | ||
|
|
||
| title: 'Enable SLUB/SLAB allocator poisoning' | ||
|
|
||
| description: |- | ||
| To enable poisoning of SLUB/SLAB objects, add the argument <tt>slub_debug=P</tt> to all | ||
| BLS (Boot Loader Specification) entries ('options' line) for the Linux | ||
| operating system in <tt>/boot/loader/entries/*.conf</tt>. | ||
|
|
||
| rationale: |- | ||
| Poisoning writes an arbitrary value to freed objects, so any modification or | ||
| reference to that object after being freed or before being initialized will be | ||
| detected and prevented. | ||
| This prevents many types of use-after-free vulnerabilities at little performance cost. | ||
| Also prevents leak of data and detection of corrupted memory. | ||
|
|
||
| severity: medium | ||
|
|
||
| identifiers: | ||
| cce@rhcos4: CCE-82672-7 | ||
|
|
||
| references: | ||
| srg: SRG-OS-000433-GPOS-00192 | ||
| nist: CM-6(a) | ||
|
|
||
| ocil_clause: 'SLUB/SLAB poisoning is not enabled' | ||
|
|
||
| ocil: |- | ||
| Inspect the form of all the BLS (Boot Loader Specification) entries | ||
| ('options' line) in <tt>/boot/loader/entries/*.conf</tt>. If they include | ||
| <tt>slub_debug=P</tt>, then SLUB/SLAB poisoning is enabled at boot time. | ||
| <br /><br /> | ||
| To ensure <tt>vsyscall=none</tt> is configured on the installed kernel, add | ||
| the kernel argument via a <pre>MachineConfig</pre> object to the appropriate | ||
| pools. | ||
|
|
||
| template: | ||
| name: coreos_kernel_option | ||
| vars: | ||
| arg_name: slub_debug | ||
| arg_value: P |
This file was deleted.
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,6 +1,6 @@ | ||
| documentation_complete: true | ||
|
|
||
| prodtype: fedora,rhcos4,ol7,ol8,rhel7,rhel8 | ||
| prodtype: fedora,ol7,ol8,rhel7,rhel8 | ||
|
|
||
| title: 'Enable page allocator poisoning' | ||
|
|
||
|
|
@@ -23,7 +23,6 @@ severity: medium | |
| identifiers: | ||
| cce@rhel7: CCE-82158-7 | ||
| cce@rhel8: CCE-80944-2 | ||
| cce@rhcos4: CCE-82673-5 | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
I'm not sure if this CEE migration is okay, maybe @redhatrises has thoughts on it.
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I am okay with this until we actually deliver something. Ultimately, I think that creating duplicate rules for something that is subtly unique is not a great. This is something to figure out in a separate PR. |
||
|
|
||
| references: | ||
| srg: SRG-OS-000480-GPOS-00227 | ||
|
|
||
This file was deleted.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should the rule talk about enabling audit?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What do you mean?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pointing out that the admin should inspect the kernel command line for audit=1 seems a bit redundant, because it's not the point of this rule. But the ocil rule is not super important for coreos rules and the backlog parameter is mentioned next, so it's OK.