-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA512 ============================================================================= FreeBSD-SA-26:81.vfs Security Advisory The FreeBSD Project Topic: Capsicum and O_RESOLVE_BENEATH bypass at mount roots Category: core Module: vfs Announced: 2026-11-17 Credits: Pawel Dawidek Credits: Lexi Winter Affects: FreeBSD 15.1 Corrected: 2026-11-17 17:06:00 UTC (stable/15, 15.2-STABLE) 2026-11-17 17:08:16 UTC (releng/15.1, 15.1-RELEASE-p7) CVE Name: CVE-2026-101312 For general information regarding FreeBSD Security Advisories, including descriptions of the fields above, security branches, and the following sections, please visit . I. Background Capsicum is a capability and sandbox framework. A process in capability mode can only access files through paths relative to directory descriptors it already holds, using openat(2) and the other *at() system calls. The kernel confines such lookups beneath the starting directory, failing any ".." component that would leave the starting directory with ENOTCAPABLE. The same confinement applies outside capability mode to directory descriptors limited with cap_rights_limit(2), and to lookups using the O_RESOLVE_BENEATH or AT_RESOLVE_BENEATH flags. By default, all such lookups can use a ".." component that stays beneath the starting directory, for example "sub/..". The vfs.lookup_cap_dotdot sysctl controls this behavior in capability mode and for capability-limited directory descriptors. II. Problem Description To resolve ".." from the root of a mounted file system, the kernel first steps to the directory on which that file system is mounted, then looks up ".." there. The check for leaving the starting directory compared against the mount point rather than the root of the mounted file system. If the starting directory was itself the root of a mounted file system, the check never matched, and the lookup escaped to the parent of the mount point. III. Impact A sandboxed process, or a program relying on O_RESOLVE_BENEATH or AT_RESOLVE_BENEATH, whose starting directory is the root of a mounted file system can access any file under its root directory. The descriptor's rights and normal file system permissions still apply. Lookups that start in any other directory are not affected. IV. Workaround No complete workaround is available. Setting the vfs.lookup_cap_dotdot sysctl to 0 refuses all ".." components in capability mode and for capability-limited descriptors: # sysctl vfs.lookup_cap_dotdot=0 This also refuses components that stay beneath the starting directory, such as "sub/..", which some applications need, and has no effect on O_RESOLVE_BENEATH or AT_RESOLVE_BENEATH lookups outside capability mode. 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:81/vfs.patch # fetch https://security.FreeBSD.org/patches/SA-26:81/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/ 9b7c7bcebd4d stable/15-n286871 releng/15.1/ c0de320f18f0 releng/15.1-n283674 - ------------------------------------------------------------------------- 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 commit that introduced the problem: The latest revision of this advisory is available at -----BEGIN PGP SIGNATURE----- iQJPBAEBCgA5FiEEthUnfoEIffdcgYM7bljekB8AGu8FAmr82kAbFIAAAAAABAAO bWFudTIsMi41KzEuMTIsMCwzAAoJEG5Y3pAfABrvUjcP/iQMlVcXu5GlErg7MYj4 w6yK3wFAxocm3JQDBhzNk7Waawo/z86kvQZxrLOgzor5XMHyeSPQmrxYAkvcl3ZD XEB3EDY7WMiQUTanozvG3VzGfrfXc4kkeC3jClU8ZzCyeCHGPlqqfcaObBGnDeYq CCWSGTKR6SaQ+8X90DOseZP2BqoUUZYo6u+ZowVviXMEVCGBjSP5M0w75lQVvCjt N9crxiShd7q9GpYBOLF9mZzt1Keqt2UPwzAtD9vKX7hRoTujeK9x4Hu7oJTSxtlI TqapeUGz1G+iZwjsx9hjzTgWEhqfkqtjmTuxT4YSkPxXw6i62dqiEqm/a+QbsoDS +1hKVc1Mi9CJ5K5AKq6Di3glEYxkrsbUf+o5Tcsqf6PTt0Prmc8UNZsrrIXSlgeS K2X+pygOP/pOwvuJPUxdaighqFAMrOQJPuPFpVDfizZhQQDYN+yScyxMzBo7xJZ5 gAVdRBm/M65KWnOss51y6r6BdQP75ket+bNgleKlfJ9m7AQpJlYxsjrg5aEg3Lyt FJGDIC5xRf0SL1VQSCfgC2Mm7wByODfq1HHjbDxoOHs5CdSQXBw6gdFEjUqnJGF4 Kq3c3tkGaO4v2w7jClDQK9GRNVBYupdqzZfcICy2wZ1UIULcMgEW52z6jbt7+F1s cXlnnaXTdjUoSCh50C8klCsw =Ohwp -----END PGP SIGNATURE-----