Skip to content

Commit

Permalink
kernel: Enable Yama security module.
Browse files Browse the repository at this point in the history
Enable the Yama LSM and set kernel.yama.ptrace_scope to 1; restricting
how processes can use ptrace.
For more information see
https://www.kernel.org/doc/Documentation/security/Yama.txt

Signed-off-by: Samuel Mendoza-Jonas <[email protected]>
  • Loading branch information
sam-aws committed Oct 18, 2019
1 parent 0508365 commit b1f222f
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
3 changes: 3 additions & 0 deletions packages/kernel/config-thar
Original file line number Diff line number Diff line change
Expand Up @@ -21,3 +21,6 @@ CONFIG_BLK_DEV_DM=y
CONFIG_DAX=y
CONFIG_DM_INIT=y
CONFIG_DM_VERITY=y

# yama LSM for ptrace restrictions
CONFIG_SECURITY_YAMA=y
3 changes: 3 additions & 0 deletions packages/release/release-sysctl.conf
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,9 @@ kernel.dmesg_restrict = 1
# Turn off kexec, even if it's built in.
kernel.kexec_load_disabled = 1

# Avoid non-ancestor ptrace access to running processes and their credentials.
kernel.yama.ptrace_scope = 1

# Disable User Namespaces, as it opens up a large attack surface to unprivileged users.
user.max_user_namespaces = 0

Expand Down

0 comments on commit b1f222f

Please sign in to comment.