🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: muc.lists.freebsd.announce
Article #44

FreeBSD Security Advisory FreeBSD-SA-26:103.ptrace

#44
From: FreeBSD Security Advisories
Date: Wed, 02 Dec 2026 22:33
174 lines
8581 bytes
-----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 <URL:https://security.FreeBSD.org/>.

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
<URL:https://www.FreeBSD.org/handbook/kernelconfig.html> 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 <commit hash>

Or visit the following URL, replacing NNNNNN with the hash:

<URL:https://cgit.freebsd.org/src/commit/?id=NNNNNN>

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

<URL:https://www.cve.org/CVERecord?id=CVE-2026-127758>

The latest revision of this advisory is available at
<URL:https://security.FreeBSD.org/advisories/FreeBSD-SA-26:103.ptrace.asc>
-----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-----


--
Posted automagically by a mail2news gateway at muc.de e.V.
Please direct questions, flames, donations, etc. to news-admin@muc.de
Technical Details
Message-ID: <20261202223307.478F1B442@freefall.freebsd.org>
Path: mbox-mo1.pugleaf.net!srv.newsdeef.eu.MISMATCH!feed-us-txt.newsdeef.eu!feed-us-ny.newsdeef.eu!srv.newsdeef.eu!newsfeed.bofh.team!weretis.net!feeder8.news.weretis.net!3.eu.feeder.erje.net!feeder.erje.net!news2.arglkargh.de!news.karotte.org!news.muc.de!.POSTED.news.muc.de!not-for-mail

Show Full Headers
Complete Article Headers
Path: mbox-mo1.pugleaf.net!srv.newsdeef.eu.MISMATCH!feed-us-txt.newsdeef.eu!feed-us-ny.newsdeef.eu!srv.newsdeef.eu!newsfeed.bofh.team!weretis.net!feeder8.news.weretis.net!3.eu.feeder.erje.net!feeder.erje.net!news2.arglkargh.de!news.karotte.org!news.muc.de!.POSTED.news.muc.de!not-for-mail
From: FreeBSD Security Advisories <security-advisories@freebsd.org>
Newsgroups: muc.lists.freebsd.announce
Subject: FreeBSD Security Advisory FreeBSD-SA-26:103.ptrace
Date: Wed, 02 Dec 2026 22:33:07 +0000 (UTC)
Organization: Newsgate at muc.de e.V.
Approved: news-admin@muc.de
Distribution: world
Message-ID: <20261202223307.478F1B442@freefall.freebsd.org>
Reply-To: freebsd-security@freebsd.org
Injection-Info: news.muc.de; posting-host="news.muc.de:193.149.48.2";
	logging-data="64794"; mail-complaints-to="news-admin@muc.de"
X-Original-To: freebsd-announce@mlmmj.nyi.freebsd.org
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim;
	t=1796250787; h=from:from:reply-to:reply-to:subject:subject:date:date:
	 message-id:message-id:to:to:cc; bh=x2eHbhlewgJvDhaRko6USVkXKUyuU4llxPLfUStORsg=;
	b=CUkRMaripC18ijsQS0nYXbb2LwticXy92KLDhgvguKJp4xntaR6oI4M8Ij62YBVPA03Z5S
	LfjWGi1E7s1+9DErs8kQ+tvNmqbsvY1Nizgket6jGp2xD4j1nNqqawgXa3VoBTCtM7Dvfi
	V/njglAsYBEAG1yozjh7Z49PLuGqlO42DsIRsgFRAARRcIWW9anZBHnEdfgSYrjsuacnYM
	VDx2HK1+PmtVELkfTWyxLWbFFolsWbBD/9FhmUtNQigxfUnDh+Svrom6Rm5ls+BcTYiaUl
	me7+JAbsJ4fwst2sWmUf/26BZiF/ZOPxWuj3GNcA67j4RLchiXy4UFqbQd4XXw==
Precedence: bulk
X-BeenThere: freebsd-announce@freebsd.org
Precedence: list
X-Newsgate-Id: f02c70b8849f+
X-No-Archive: Yes