-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA512 ============================================================================= FreeBSD-SA-26:80.vfs Security Advisory The FreeBSD Project Topic: Privilege escalation via inotify watch descriptor wraparound Category: core Module: vfs Announced: 2026-11-17 Credits: OpenAI Security Research Team Affects: FreeBSD 15.1 and 14.5 Corrected: 2026-11-17 17:05:54 UTC (stable/15, 15.2-STABLE) 2026-11-17 17:08:10 UTC (releng/15.1, 15.1-RELEASE-p7) 2026-11-17 17:02:47 UTC (stable/14, 14.5-STABLE) 2026-11-17 17:05:09 UTC (releng/14.5, 14.5-RELEASE-p4) CVE Name: CVE-2026-101316 For general information regarding FreeBSD Security Advisories, including descriptions of the fields above, security branches, and the following sections, please visit . I. Background The inotify(2) interface allows applications to monitor file system activity. A process adds "watches" on files and directories to an inotify descriptor, and each watch is identified by an integer watch descriptor. The kernel removes some watches automatically, for example, a one-shot watch is removed after its first event is published. II. Problem Description When automatically removing a watch, inotify_log_one() checked only that a watch with the same watch descriptor was still registered, not that it was the same watch. Watch descriptors are allocated from a 32-bit counter, so by forcing the counter to wrap around, a user could cause a new watch to reuse the descriptor of one being removed concurrently. The kernel could then free a watch which was still in use, resulting in a use-after-free. III. Impact An unprivileged local user may be able to exploit the bug to escalate privileges, potentially gaining full control of the affected system. 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:80/vfs.patch # fetch https://security.FreeBSD.org/patches/SA-26:80/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 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/ 70a1a5a088ab stable/15-n286865 releng/15.1/ 63606856baec releng/15.1-n283668 stable/14/ 8bca0acd376d stable/14-n275576 releng/14.5/ 0a039d79a3ba releng/14.5-n274911 - ------------------------------------------------------------------------- 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----- iQJPBAEBCgA5FiEEthUnfoEIffdcgYM7bljekB8AGu8FAmr82j4bFIAAAAAABAAO bWFudTIsMi41KzEuMTIsMCwzAAoJEG5Y3pAfABrv0SYP/2cxwVWEfDLtjGBA8Zu5 /hURSum96WCmooFQeyJRNzl4i2II7WiGI+TxL06ciB1k0wC1Uc4Q0XkLTpklSiPk VoYRZDs5lZmART50kALeBAeBs1pouhz5o2OIkpPyGVT5luyoA1YzOXwena67iTD/ dQvBHKtTTS8E237z3QvOHNBXg4urBObRGrONb8b/rWSJOUyeskwm5Rdcm8HMrjt0 keOsh7Ae5RobVTzOXurokAcqW02CYK+mWTEBT70u1Xltox/qEjEwR/rGMjsDHc4a KGjMHxcQHJ0ZzXda3sTlu82dhX1qnZj6r/mMdU1lR0U6eym/Lu7dLfGMVGZ3gyNm 9YyOiEvFKJQsMsm7dVMdZwakqvUoBwgyp00Bc8Kmdk/nQDs+/LflAfNSZZmi8rY3 w0bvrUeu+yMqkbUVVoJJje7cbl0c5DuD+iTGpieLlPHQ16bTOq8pFG3CkM8vlAkE 1q2Oh/0epqaDvRHEkfkiiPYfTWWnkzP9XzbTynNVQE4I/Nc9K8mB4lW7csNtiEij YF/xe3WnUgitfai3zPhDMnZ7cSwFlcLVhXY/idlQ/ndCBLxeVt9CAJDs5au/fHSy uHf8Hn1rdCYnlnJS5w1A0xWCwY7RHlMpO0d6VFfW+Igzw6ESKTXSU6IgP2FNG8Ay H7C5u4oDWFxCIOgyZprEAcjd =0R0/ -----END PGP SIGNATURE-----