Skip to content

Force disable usage of ptrace() until reboot / Increase kernel.yama.ptrace_scope: 23 #321

@raja-grewal

Description

@raja-grewal

Given the large amounts of new security hardening settings that are being incorporated into the upcoming Debian 13 port, there is another sysctl setting we should consider revisiting for two reasons, one to reopen the discussion, and two in order to adhere to KSPP requirements.

This is again regarding the use use of process trace ptrace() which is currently set to kernel.yama.ptrace_scope=2 inside the configs.

As per the kernel docs I previously proposed increasing this to the KSPP recommenced kernel.yama.ptrace_scope=3 in #242 but we decided to keep it as is since it was at the time considered outside the scope of security-misc.

The question is whether the same logic still hold now over 15 months later?

Note that several other projects focused on security hardening such as Brace, nix-mineral, and secureblue all utilise the strictest setting by default.

Just like we decided in #313 to enable kernel.panic=-1 forcing instant reboots when previously we allowed the system to hang forever, maybe we should also consider tightening up this loose bolt?

I am happy to submit a draft PR if there are no objections.

@adrelanos @ArrayBolt3

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions