Skip to content

fix: install_dangerzone.py warning should refer to correct ptrace permission#1965

Merged
EsseLowNitro merged 4 commits intosecureblue:livefrom
jherzstein:fix/ujust-install_dangerzone-ptrace-warning
Feb 23, 2026
Merged

fix: install_dangerzone.py warning should refer to correct ptrace permission#1965
EsseLowNitro merged 4 commits intosecureblue:livefrom
jherzstein:fix/ujust-install_dangerzone-ptrace-warning

Conversation

@jherzstein
Copy link
Copy Markdown
Contributor

install_dangerzone script requires and sets ptrace_scope to 2, also known as "admin-only attach" ptrace. However, the current warning message mentions restricted ptrace which refers to the permissions when ptrace_scope is set to 1. The warning message should be changed to more accurately reflect the ptrace_scope value. See this section of the ptrace(2) Linux man page:

       A process that has the CAP_SYS_PTRACE capability can update the /proc/sys/kernel/yama/ptrace_scope  file
       with one of the following values:

       0 ("classic ptrace permissions")
              No additional restrictions on operations that perform PTRACE_MODE_ATTACH checks (beyond those im‐
              posed by the commoncap and other LSMs).

              The use of PTRACE_TRACEME is unchanged.

       1 ("restricted ptrace") [default value]
              When  performing  an operation that requires a PTRACE_MODE_ATTACH check, the calling process must
              either have the CAP_SYS_PTRACE capability in the user namespace of the target process or it  must
              have  a predefined relationship with the target process.  By default, the predefined relationship
              is that the target process must be a descendant of the caller.

              A target process can employ the prctl(2) PR_SET_PTRACER operation to declare  an  additional  PID
              that  is  allowed  to perform PTRACE_MODE_ATTACH operations on the target.  See the kernel source
              file  Documentation/admin-guide/LSM/Yama.rst  (or  Documentation/security/Yama.txt  before  Linux
              4.13) for further details.

              The use of PTRACE_TRACEME is unchanged.

       2 ("admin-only attach")
              Only processes with the CAP_SYS_PTRACE capability in the user namespace of the target process may
              perform PTRACE_MODE_ATTACH operations or trace children that employ PTRACE_TRACEME.

       3 ("no attach")
              No   process   may   perform   PTRACE_MODE_ATTACH   operations  or  trace  children  that  employ
              PTRACE_TRACEME.

              Once this value has been written to the file, it cannot be changed.

@jherzstein jherzstein marked this pull request as ready for review February 23, 2026 02:08
Copy link
Copy Markdown
Collaborator

@HastD HastD left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good catch, thanks for the PR.

@EsseLowNitro EsseLowNitro enabled auto-merge (squash) February 23, 2026 18:27
@EsseLowNitro EsseLowNitro merged commit c03bfcc into secureblue:live Feb 23, 2026
12 checks passed
@HastD HastD removed the Pending CI label Feb 23, 2026
PhysicsIsAwesome pushed a commit to PhysicsIsAwesome/secureblue that referenced this pull request Mar 1, 2026
PhysicsIsAwesome pushed a commit to PhysicsIsAwesome/secureblue that referenced this pull request Mar 1, 2026
RKNF404 pushed a commit to RKNF404/secureblue that referenced this pull request Mar 1, 2026
PhysicsIsAwesome pushed a commit to PhysicsIsAwesome/secureblue that referenced this pull request Mar 1, 2026
PhysicsIsAwesome pushed a commit to PhysicsIsAwesome/secureblue that referenced this pull request Mar 4, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants