The branch stable/15 has been updated by kib: URL: https://cgit.FreeBSD.org/src/commit/?id=fe56ee28349cbc8e35c898864077aa844a155e61
commit fe56ee28349cbc8e35c898864077aa844a155e61 Author: Konstantin Belousov <[email protected]> AuthorDate: 2026-09-01 22:14:58 +0000 Commit: Konstantin Belousov <[email protected]> CommitDate: 2026-09-05 00:33:43 +0000 ptrace(2): allow ptrace(PT_TRACE_ME) in cap mode (cherry picked from commit c8f8d00c2422bf7eca71b7b41e9d586ca25c4b8a) --- sys/kern/sys_process.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/sys/kern/sys_process.c b/sys/kern/sys_process.c index af8a7dafaf3e..56c5eebc8a85 100644 --- a/sys/kern/sys_process.c +++ b/sys/kern/sys_process.c @@ -686,6 +686,8 @@ ptrace_check_allowed(struct thread *td, int req, bool pd_mode, pid_t pid) return (ECAPMODE); if (pd_mode) return (0); + if (req == PT_TRACE_ME) + return (0); if (req == PT_GET_CHILDREN && pid == td->td_proc->p_pid) return (0); if (req == PT_CLEARSTEP && pid == td->td_tid)
