Under "Ptrace access mode checking", the documentation states: "1. If the calling thread and the target thread are in the same thread group, access is always allowed." This is incorrect. A thread may never attach to another in the same group. Reference, ptrace_attach() https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/tree/kernel/ptrace.c?h=v5.9.14#n380