-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA512
=============================================================================
FreeBSD-SA-26:53.ktrace Security Advisory
The FreeBSD Project
Topic: ktrace(2) privilege incorrectly validated in jails
Category: core
Module: ktrace
Announced: 2026-07-29
Credits: Alexander Leidinger
Affects: FreeBSD 15.1 and 15.0
Corrected: 2026-07-29 17:48:42 UTC (stable/15, 15.1-STABLE)
2026-07-29 17:50:35 UTC (releng/15.1, 15.1-RELEASE-p2)
2026-07-29 17:50:09 UTC (releng/15.0, 15.0-RELEASE-p12)
CVE Name: CVE-2026-58086
For general information regarding FreeBSD Security Advisories, including
descriptions of the fields above, security branches, and the following
sections, please visit .
I. Background
The ktrace(2) facility allows tracing of kernel operations performed by a
process. When ktrace(2) tracing is configured on a target process by a user
that has the PRIV_KTRACE privilege (typically just the root user), the
process is flagged such that an unprivileged user cannot modify the tracing
flags, even if that user would otherwise be able to invoke ktrace(2) on the
process.
II. Problem Description
As an inadvertent side effect of an unrelated code change, PRIV_KTRACE was
always denied to a jailed root user. Tracing configured by a jailed root
user was therefore not flagged as privileged.
III. Impact
An unprivileged user in a jail that has permission to debug the target
process can modify the jailed root user's ktrace(2) flags, or disable tracing
outright. A jailed root user therefore cannot reliably trace unprivileged
processes.
IV. Workaround
No workaround is available.
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.
# fetch https://security.FreeBSD.org/patches/SA-26:53/ktrace.patch
# fetch https://security.FreeBSD.org/patches/SA-26:53/ktrace.patch.asc
# gpg --verify ktrace.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/ fb432f55a7b8 stable/15-n284646
releng/15.1/ 00effd2ab0bf releng/15.1-n283593
releng/15.0/ 8250729075f1 releng/15.0-n281096
- -------------------------------------------------------------------------
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-----
iQJPBAEBCgA5FiEEthUnfoEIffdcgYM7bljekB8AGu8FAmpqbk0bFIAAAAAABAAO
bWFudTIsMi41KzEuMTIsMCwzAAoJEG5Y3pAfABrvw3cQAM5ev1bKBd6741KJdhDx
FliNSgWTmJkGF6Ys0JcYURSpSM+pSDLt96kskISUsSeifo1g4F9tJD619SddSPzt
cSXzhlRAe74gtNA0P3N56Z1rqkRZxRMgPEAjOPZ3bhQ6o+bXtBUVWbDzVwbw+efs
astReBuhQSPj7793YEPlOewwEIdQlauVkinfAPeUrHtcecL4ucjiKbkrxici1iWW
nV9+O6wy6jGamTiLf7fGghLcZy71XkQE9Dy5U7hTmhiBftI9FsZdCJSTuc46jtDP
NQ5D4DGtJE4RTquVW7OUpiPgDLgLX+RjKU5n6ElMW2/ZmwScG0V4+kj1EzpLVEXA
7q58DvXfjZP8RAyQ3Ugrh6EQojdOAxYHYNHq+0iqLkk+gnsI7ePATL5u+QLU6nsX
eYaj+wuNS7hfmI0+AZN3FqYp3+ccnqx/zlKS/aCqQA6cYOptspGvPUKa2pZF6VyO
iLcscLRO6BfRgDCkU9vQB4dndHnhlRXBLeIrYtCwL5GIrYWEpXfTfPLFXOTZczyX
utGg4J0F6rGzeoCefcZDXhBMRf+R8/8NtkeAH9UdjhupLiUVQAGTiDiFnPqIiRIz
HuJDE1ncLEcb0Ey2gjxIG5RUyrtLxCr4jOcUHXyJ8pM9TKfFfnhVBAKVkp+iewQ3
xD+U3+UO7cpUcFDeRLhGGtya
=55wC
-----END PGP SIGNATURE-----