-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA512

=============================================================================
FreeBSD-SA-26:92.vfs                                        Security Advisory
                                                          The FreeBSD Project

Topic:          Directory permission bypass via open(2)

Category:       core
Module:         vfs
Announced:      2026-11-17
Credits:        Kevin Day
Affects:        All supported versions of FreeBSD.
Corrected:      2026-11-17 17:06:18 UTC (stable/15, 15.2-STABLE)
                2026-11-17 17:08:35 UTC (releng/15.1, 15.1-RELEASE-p7)
                2026-11-17 17:03:05 UTC (stable/14, 14.5-STABLE)
                2026-11-17 17:05:27 UTC (releng/14.5, 14.5-RELEASE-p4)
                2026-11-17 17:04:30 UTC (releng/14.4, 14.4-RELEASE-p13)
CVE Name:       CVE-2026-127746

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

Read permission on a directory is needed to list its contents, and search
(execute) permission is needed to access files within it.  open(2) checks
these permissions when a directory is opened for reading or searching.

II.  Problem Description

open(2) omits permission checks when it has just created the file being
opened.  When called with both O_CREAT and O_DIRECTORY on an existing
directory, open(2) did not create anything, but still omitted the checks.
As a result, a user could open a directory for reading or searching
without the corresponding permission.

III. Impact

An unprivileged local user can list the contents of directories they are
not permitted to read, and access files within directories they are not
permitted to search, subject to the permissions of those files and of the
directory's ancestors.

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:92/vfs.patch
# fetch https://security.FreeBSD.org/patches/SA-26:92/vfs.patch.asc
# gpg --verify vfs.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/                              564d62460956    stable/15-n286888
releng/15.1/                            9e96c93d3411  releng/15.1-n283692
stable/14/                              3fbcafc683f1    stable/14-n275593
releng/14.5/                            c77be7373ca6  releng/14.5-n274928
releng/14.4/                            a855ef4061f5  releng/14.4-n273829
- -------------------------------------------------------------------------

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

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

iQJPBAEBCgA5FiEEthUnfoEIffdcgYM7bljekB8AGu8FAmr82mIbFIAAAAAABAAO
bWFudTIsMi41KzEuMTIsMCwzAAoJEG5Y3pAfABrvTNIP/AyCe+Wy5vA9LxJpwK3n
B2DncVtApN/GaKIVB5Pxj7mbOTJrzOUST+mx+GsMK4jGxUZ36SsosQWL3njFe5un
SUm8O2xiNJSzr0FfiSgaAIph7Mx1rhnNK8ktXg0FMiRqBdwssmcdCcuYTzpmWb1X
U4Ac8EnYwmRi7ei7WWoy0E/C3Oc/BOTCr6qUDDFXHx85tLIANGcLM3Lqc5T+AXgr
xZeYhbhI2E/UrM9luats421niYwrBdBuwp8LYNGxrHEXYPHnawEiJRKAqe0cnrNq
eX06xrZtp/GNKtu+mLVNIJjZ7kOG5+smzq3A4oLgCiocudgB4Y+x07aAx4v4rPqI
o4d1kl1NOTQZC/t4rD23mMxs2yrXzwTiAeCUTQ2S+k8fwG9L3mdoDeGK9GNyOZDs
tGz0QSgtIV7qzMOBTY5qIxij9MjYeooXapijAFS3muefBfgU7czaHgEs/2CWztnH
l1RTiSjvBNZ384NbkuuyA5el4X7MkCcV+VFb3T7PpycaZDtMwiwLPb83wgPQ/vnh
eHrUbliHSylkRSWbwSeT+HFOyqSSK0MmuCcqh+lZ3IPZjLoMZXLCyxImYriDcaqD
QtJSg2BbvOT6imh62bYQ7V8OlioYOitkHSBtVmbOwSeo/qSenQUgysuJ1SWXOKQN
WXFuOULy0QgR5ss2M1zMVLXd
=wIFl
-----END PGP SIGNATURE-----