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

Fixes for kernel_config_security rules #11259

Merged
merged 2 commits into from
Nov 16, 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 @@ -5,7 +5,7 @@ title: 'Restrict unprivileged access to the kernel syslog'
description: |-
Enforce restrictions on unprivileged users reading the kernel syslog via dmesg(8).

{{{ describe_kernel_build_config("CONFIG_SECURITY_DMESG_RESTRICT", "n") | indent(4) }}}
{{{ describe_kernel_build_config("CONFIG_SECURITY_DMESG_RESTRICT", "y") | indent(4) }}}

rationale: |-
Prevents unprivileged users from retrieving kernel addresses with dmesg.
Expand All @@ -26,11 +26,11 @@ references:
ocil_clause: 'the kernel was not built with the required value'

ocil: |-
{{{ ocil_kernel_build_config("CONFIG_SECURITY_DMESG_RESTRICT", "n") | indent(4) }}}
{{{ ocil_kernel_build_config("CONFIG_SECURITY_DMESG_RESTRICT", "y") | indent(4) }}}

template:
name: kernel_build_config
vars:
config: CONFIG_SECURITY_DMESG_RESTRICT
value: 'n'
value: 'y'

Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ title: 'Disable mutable hooks'
description: |-
Ensure kernel structures associated with LSMs are always mapped as read-only after system boot.

{{{ describe_kernel_build_config("CONFIG_SECURITY_WRITABLE_HOOKS", "y") | indent(4) }}}
{{{ describe_kernel_build_config("CONFIG_SECURITY_WRITABLE_HOOKS", "n") | indent(4) }}}

rationale: |-
If CONFIG_SECURITY_WRITABLE_HOOKS is enabled, then hooks can be loaded at runtime and
Expand All @@ -27,11 +27,11 @@ references:
ocil_clause: 'the kernel was not built with the required value'

ocil: |-
{{{ ocil_kernel_build_config("CONFIG_SECURITY_WRITABLE_HOOKS", "y") | indent(4) }}}
{{{ ocil_kernel_build_config("CONFIG_SECURITY_WRITABLE_HOOKS", "n") | indent(4) }}}

template:
name: kernel_build_config
vars:
config: CONFIG_SECURITY_WRITABLE_HOOKS
value: 'y'
value: 'n'