-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA512
=============================================================================
FreeBSD-SA-26:103.ptrace Security Advisory
The FreeBSD Project
Topic: Use-after-free via ptrace(PT_SC_REMOTE) and execve(2)
Category: core
Module: ptrace
Announced: 2026-12-02
Credits: Albert E. of Metnir
Affects: All supported versions of FreeBSD.
Corrected: 2026-12-02 19:25:58 UTC (stable/15, 15.2-STABLE)
2026-12-02 19:27:37 UTC (releng/15.2, 15.2-RC1-p1)
2026-12-02 19:26:34 UTC (releng/15.1, 15.1-RELEASE-p8)
2026-12-02 19:28:22 UTC (stable/14, 14.5-STABLE)
2026-12-02 19:29:23 UTC (releng/14.5, 14.5-RELEASE-p5)
2026-12-02 19:28:54 UTC (releng/14.4, 14.4-RELEASE-p14)
CVE Name: CVE-2026-127758
For general information regarding FreeBSD Security Advisories,
including descriptions of the fields above, security branches, and the
following sections, please visit .
I. Background
The ptrace(2) system call provides facilities for a debugger to control the
execution of a target process and to obtain status information about it.
Among other capabilities, it permits a debugger to execute arbitrary system
calls in the target process via the PT_SC_REMOTE operation.
II. Problem Description
While a traced process was stopped to report a signal, the debugger could
use PT_SC_REMOTE to make it call execve(2), which may replace the process's
signal handling state and allow the old state to be freed. The kernel's
signal processing code did not account for this and continued to use the
old state once the process resumed.
III. Impact
An unprivileged local user may be able to exploit the resulting
use-after-free to escalate privileges.
IV. Workaround
Unprivileged users can be prevented from using ptrace(2) by disabling
unprivileged process debugging:
# sysctl security.bsd.unprivileged_proc_debug=0
To make this change persistent across reboots, add it to /etc/sysctl.conf.
This also prevents unprivileged users from using debugging tools such as
truss(1). It does not prevent exploitation by root within a jail.
V. Solution
Upgrade your vulnerable system to a supported FreeBSD stable or
release / security branch (releng) dated after the correction date,
and reboot the system.
Perform one of the following:
1) To update your vulnerable system installed from base system packages:
Systems running a 15.0-RELEASE or later version of FreeBSD on the amd64 or
arm64 platforms, which were installed using base system packages, can be
updated via the pkg(8) utility:
# pkg upgrade -r FreeBSD-base
# shutdown -r +10min "Rebooting for a security update"
2) To update your vulnerable system installed from binary distribution sets:
Systems running a RELEASE version of FreeBSD on the amd64 or arm64 platforms
which were not installed using base system packages can be updated via the
freebsd-update(8) utility:
# freebsd-update fetch
# freebsd-update install
# shutdown -r +10min "Rebooting for a security update"
3) To update your vulnerable system via a source code patch:
The following patches have been verified to apply to the applicable
FreeBSD release branches.
a) Download the relevant patch from the location below, and verify the
detached PGP signature using your PGP utility.
[FreeBSD 15.2]
# fetch https://security.FreeBSD.org/patches/SA-26:103/ptrace-15.2.patch
# fetch https://security.FreeBSD.org/patches/SA-26:103/ptrace-15.2.patch.asc
# gpg --verify ptrace-15.2.patch.asc
[FreeBSD 15.1]
# fetch https://security.FreeBSD.org/patches/SA-26:103/ptrace-15.1.patch
# fetch https://security.FreeBSD.org/patches/SA-26:103/ptrace-15.1.patch.asc
# gpg --verify ptrace-15.1.patch.asc
[FreeBSD 14.x]
# fetch https://security.FreeBSD.org/patches/SA-26:103/ptrace-14.patch
# fetch https://security.FreeBSD.org/patches/SA-26:103/ptrace-14.patch.asc
# gpg --verify ptrace-14.patch.asc
b) Apply the patch. Execute the following commands as root:
# cd /usr/src
# patch -E -p0 < /path/to/patch
c) Recompile your kernel as described in
and reboot the
system.
VI. Correction details
This issue is corrected as of the corresponding Git commit hash in the
following stable and release branches:
Branch/path Hash Revision
- -------------------------------------------------------------------------
stable/15/ 913ba4afd290 stable/15-n287082
releng/15.2/ 7bfcd42887dc releng/15.2-n286789
releng/15.1/ 5717bad84331 releng/15.1-n283712
stable/14/ 5c1ab983f924 stable/14-n275708
releng/14.5/ e7f9a1aaf5fb releng/14.5-n274944
releng/14.4/ 478f0611695d releng/14.4-n273845
- -------------------------------------------------------------------------
Run the following command to see which files were modified by a
particular commit:
# git show --stat
Or visit the following URL, replacing NNNNNN with the hash:
To determine the commit count in a working tree (for comparison against
nNNNNNN in the table above), run:
# git rev-list --count --first-parent HEAD
VII. References
The latest revision of this advisory is available at
-----BEGIN PGP SIGNATURE-----
iQJPBAEBCgA5FiEEthUnfoEIffdcgYM7bljekB8AGu8FAmsQj14bFIAAAAAABAAO
bWFudTIsMi41KzEuMTIsMCwzAAoJEG5Y3pAfABrvUSIP/3DOCje/817dd6h1zRvo
IcLszcZdKYxN8FA++njCyHWlpXVex9JXdjb8LGVa1OelUKHp21eTzX88ZxIbMHMt
pYlH4GXdqpj8KztsIwO4BiK4tNm0w4ap78r0P+7Ks6kCaI4TBAMRxVfuORZ6Dm9E
e3rwGY29wy4jhbFBKV8ikT95/3yC0zzUYzPk8a3VEG9lMdrP82+qMfbkWkYz8QVm
/1K0ymn0kcRK3ytCueKQ9D83Zao7a0VBnnDAQe+f5DWA76yr0iYtFtjNaNGp1yNl
W3OOv/jDpimwTztGyrkNa++3zK0OtOSHms/HJ9r9/fWWoU1nvpY49Y9QlsYKhimp
204YhQuCBP+pHKL35+RHm2eW9HlhSbG2h26cXIA/YgWxdZUm2FThbMFlBTgEH5ah
jc2GR+QMmv3QO3j7LTSgkrDY0yAUCXdsBLcNHqReZx0i+iozpKBH8EC6oBNSQ8Rp
WIFYbHkTkqDLAqCV06u61clRXxU6byUHWABiA5+warOWCsV1GsU/CPi0whKEaq39
GH/kFsTbmIwNfqjlHU9aCSagXmZU1KF4M2UhP2+/Ju8PZ9mb39EGEbGua5NN6u4i
1p0T9a9A3qBsmoZf6zELkQ74/Xpvi4K+hw03EKK4I94N1ggWKWG6VNzBA0AaFnkt
2sA+NJb54mgW9vM5m2+jJSvz
=LsSS
-----END PGP SIGNATURE-----