Home / mailingsPDF  

FreeBSD Security Advisory FreeBSD-SA-26:24.cap_net

Posted on 21 May 2026
FreeBSD security notificat

=============================================================================FreeBSD-SA-26:24.cap_net Security Advisory
The FreeBSD Project

Topic: Incorrect libcap_net limitation list manipulation

Category: core
Module: libcap_net
Announced: 2026-05-20
Credits: Joshua Rogers of AISLE Research Team
Affects: All supported versions of FreeBSD.
Corrected: 2026-05-19 23:03:59 UTC (stable/15, 15.0-STABLE)
2026-05-20 19:39:38 UTC (releng/15.0, 15.0-RELEASE-p9)
2026-05-19 23:04:13 UTC (stable/14, 14.4-STABLE)
2026-05-20 19:40:03 UTC (releng/14.4, 14.4-RELEASE-p5)
2026-05-20 19:40:41 UTC (releng/14.3, 14.3-RELEASE-p14)
CVE Name: CVE-2026-45254

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

libcasper(3) allows Capsicum-sandboxed applications to define and use system
interfaces which are otherwise not available in a capability sandbox, through
implementing special services. One of these services, libcap_net, enables
networking capabilities within the restricted environment.

Casper services allow the application to define fine-grained limits on each
operation handled by the service. Each service maintains a specific list of
permitted operations. Certain operations can be further restricted by
specifying an explicit list of allowed names. For example, libcap_net allows
the application to limit the addresses to which the application may bind or
connect. If it attempts to use libcap_net to bind or connect to addresses
outside the allowed list, the operation will fail.

In keeping with Capsicum's capability model, once a set of limits is applied,
subsequent adjustments may only narrow the set of permitted operations to a
subset of the current one.

II. Problem Description

In the case of the cap_net service, when a key present in the old limit was
omitted from the new limit, the missing key was treated as "allow any"
instead of being rejected.

III. Impact

In certain scenarios, an application that had previously restricted a subset
of network operations could ask for a new limit that extended the permissions
of the process.

IV. Workaround

No workaround is available. Note that no FreeBSD base system software is
affected by this issue.

V. Solution

Upgrade your vulnerable system to a supported FreeBSD stable or
release / security branch (releng) dated after the correction date.

Perform one of the following:

1) To update your vulnerable system installed from base system packages:

Systems running a 15.0-RELEASE 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:24/cap_net.patch
# fetch https://security.FreeBSD.org/patches/SA-26:24/cap_net.patch.asc
# gpg --verify cap_net.patch.asc

b) Apply the patch. Execute the following commands as root:

# cd /usr/src
# patch < /path/to/patch

c) Recompile the operating system using buildworld and installworld as
described in <URL:https://www.FreeBSD.org/handbook/makeworld.html>.

Restart all daemons that use the library, or 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/ 7eb3fd691d64 stable/15-n283630
releng/15.0/ f69df16fcc20 releng/15.0-n281047
stable/14/ b79faca1c596 stable/14-n274156
releng/14.4/ f977328c7277 releng/14.4-n273710
releng/14.3/ b3baecf08405 releng/14.3-n271510
- -------------------------------------------------------------------------

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

The latest revision of this advisory is available at
<URL:https://security.FreeBSD.org/advisories/FreeBSD-SA-26:24.cap_net.asc>

 

TOP