FreeBSD VuXML: Documenting security issues in FreeBSD and the FreeBSD Ports Collection

FreeBSD -- Privilege escalation via inotify watch descriptor wraparound

Affected packages
15.1 <= FreeBSD-kernel < 15.1_7
14.5 <= FreeBSD-kernel < 14.5_4

Details

VuXML ID 35d11826-e311-11f1-a3e1-bc241121aa0a
Discovery 2026-11-17
Entry 2026-11-18

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.

Impact:

An unprivileged local user may be able to exploit the bug to escalate privileges, potentially gaining full control of the affected system.

References

CVE Name CVE-2026-101316
FreeBSD Advisory SA-26:80.vfs