🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.unix.bsd.freebsd.announce
Article #44

FreeBSD Security Advisory FreeBSD-SA-26:101.setrlimit

#44
From: FreeBSD Security Advisories
Date: Thu, 03 Dec 2026 00:00
156 lines
7116 bytes
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA512

=============================================================================
FreeBSD-SA-26:101.setrlimit                                 Security Advisory
                                                          The FreeBSD Project

Topic:          Use-after-free when changing another process's limits

Category:       core
Module:         kern
Announced:      2026-12-02
Credits:        tsune of GMO Cybersecurity by Ierae, Inc.
                working with TrendAI Zero Day Initiative
Credits:        OpenAI Security Research Team
Affects:        All supported versions of FreeBSD.
Corrected:      2026-12-02 19:25:56 UTC (stable/15, 15.2-STABLE)
                2026-12-02 19:27:35 UTC (releng/15.2, 15.2-RC1-p1)
                2026-12-02 19:26:32 UTC (releng/15.1, 15.1-RELEASE-p8)
                2026-12-02 19:28:21 UTC (stable/14, 14.5-STABLE)
                2026-12-02 19:29:21 UTC (releng/14.5, 14.5-RELEASE-p5)
                2026-12-02 19:28:52 UTC (releng/14.4, 14.4-RELEASE-p14)
CVE Name:       CVE-2026-127760

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

Each process has a set of resource limits which it can change using
setrlimit(2).  The limits of another process can be changed using the
kern.proc.rlimit sysctl, as limits(1) does, or the prlimit64(2) system
call of the Linux compatibility layer.  Each thread of a process holds a
reference to the process's limits.

II.  Problem Description

When a process changed its own limits, the kernel switched the calling
thread to the new limits immediately and released two references to the
old ones: the process's and the calling thread's.  The kernel did not
check that the target was the calling thread's own process, so this path
could also be taken when changing another process's limits.  The target's
old limits could then be freed while one of its threads still referenced
them.

III. Impact

An unprivileged local user may be able to exploit the resulting
use-after-free to escalate privileges.

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:101/setrlimit.patch
# fetch https://security.FreeBSD.org/patches/SA-26:101/setrlimit.patch.asc
# gpg --verify setrlimit.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/                              c6d700e1b71f    stable/15-n287080
releng/15.2/                            a1cdef373b51  releng/15.2-n286787
releng/15.1/                            3e0441faf662  releng/15.1-n283710
stable/14/                              04faf79ca495    stable/14-n275707
releng/14.5/                            f5faac5b496c  releng/14.5-n274942
releng/14.4/                            7dfdb5554535  releng/14.4-n273843
- -------------------------------------------------------------------------

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-127760>

The latest revision of this advisory is available at
<URL:https://security.FreeBSD.org/advisories/FreeBSD-SA-26:101.setrlimit.asc>
-----BEGIN PGP SIGNATURE-----

iQJPBAEBCgA5FiEEthUnfoEIffdcgYM7bljekB8AGu8FAmsQj1obFIAAAAAABAAO
bWFudTIsMi41KzEuMTIsMCwzAAoJEG5Y3pAfABrv1mMP/itdb/fVJPQtczCoj/op
W+KMCeE0iiW8j1gUuuQUMtuWkaZM2cvhKbBDh4QMixmewKwkrHacReNsOLzoQFc1
C8TMosd+U0HBpRwtvl+sz09EwHywxkwhCmm+1cS+4bJxUcVVFSC02DhHBt8Jul7t
t5zTTurh9J7DrpZj8qPNGRQeLfj8LmfpOUet5Exnll0kDciJEIpgSgdOohaeNu8J
anA/ZdCOEChfQQqRUfscrUGbeYKDpL4jkuTTZ6uPEKFOA9FNhGum4NjotVqwcqx/
SRZi0URRwvoPFQEmCTmLF2wi0aawx4eKguyomleoEPNSZC4sr4YZSoSMuSj9BV7X
/6MbWYBU/cc/cAh914IPcBGaeLMro6YJ6KOQgBnGaHmVHVJ3bDpVPqubvHYzqHTS
MlGxDSqIZHLEX+E7p38oWcduflk7U3sQeaBvbwpSoJ9nwzid66PP/+AidisX+uV6
EtLH9eNaEEq8rETEb7+d5535JUYLu7+l6EbgF/ESwsmphe/KHNBNs5mARebif3pb
oc4R+59DEqHE64tBqgxxgWDeCb8PryGByvPut0/gaCrevcP2gYp+YjD8yPp18C9p
Rce1o26yQcjJr/qBK0eL5WnJoPRvvW6JuN5+6NOY0xIe9qlZoF/ZpV+Dp/++YZXH
xegKH67kkxpnE/v2eJb7TY62
=qfV7
-----END PGP SIGNATURE-----
Technical Details
Message-ID: <179625600570.13811.16072495437799657301@rincewind.trouble.is>
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!fu-berlin.de!uni-berlin.de!individual.net!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!fu-berlin.de!uni-berlin.de!individual.net!not-for-mail
From: FreeBSD Security Advisories <security-advisories@freebsd.org>
Newsgroups: comp.unix.bsd.freebsd.announce
Subject: FreeBSD Security Advisory FreeBSD-SA-26:101.setrlimit
Date: 3 Dec 2026 00:00:07 GMT
Lines: 156
Sender: Philip Paeps <philip@freebsd.org>
Approved: Philip Paeps <philip@trouble.is>
Message-ID: <179625600570.13811.16072495437799657301@rincewind.trouble.is>
X-Trace: individual.net O1dXKwI6RUANjSeL12jgKQE+wI+mavIYAdUJEvGLkRY+xxY6V5
Cancel-Lock: sha1:iBqY7CSR9EyMgdE+hnLcWofB8bU= sha256:s5Psef75qoqQ2r4ubo/4VxVbztWGoK2MMbJvmR1G41Q=