opnsense-src/lib
Mark Johnston 93d226e6e4 vfs: Disallow renameat() with FD_RESOLVE_BENEATH descriptors
The FD_RESOLVE_BENEATH flag was intended to try to resolve bugzilla PR
262179 without entirely disallowing fd passing between jails.  However,
one can use renameat() to bypass the restriction: upon receiving a
directory fd with FD_RESOLVE_BENEATH set, a jailed process can still
move its CWD or one of its ancestors to the directory, and just cd
out of its jail root.

So disallow renameat() when either the source or destination directory
fds has FD_RESOLVE_BENEATH set, like we do with fchdir() and fchroot()
to prevent similar escapes.

Approved by:	so
Security:	FreeBSD-SA-26:66.jail
Security:	CVE-2026-101305
PR:		262179
Reported by:	firk@cantconnect.ru
Reviewed by:	olce, kib
Differential Revision:	https://reviews.freebsd.org/D59875
2026-09-30 11:46:48 +02:00
..
atf atf: Move the tests back to the tests package 2025-11-07 05:15:54 +00:00
clang src.conf: Add WITH_LLVM_LINK_STATIC_LIBRARIES build knob 2026-01-02 21:40:18 +01:00
csu Update in preparation for 15.1-RELEASE 2026-06-11 17:37:58 -07:00
geom geom_part: Restore the human readable format of size 2026-04-30 13:05:12 +08:00
googletest Remove residual blank line at start of Makefile 2024-07-15 16:43:39 -06:00
lib9p Remove residual blank line at start of Makefile 2024-07-15 16:43:39 -06:00
lib80211 net80211: regdomain: ETSI: add missing 11a and 11na entries 2025-07-07 06:49:02 +00:00
libalias Remove residual blank line at start of Makefile 2024-07-15 16:43:39 -06:00
libarchive libarchive: Update configuration 2026-04-22 15:43:33 +02:00
libauditd package: move OpenBSM auditing into its own package 2024-04-28 22:33:06 -06:00
libbe manpages: Fix author e-mail address formatting 2026-09-23 09:07:21 +02:00
libbearssl Remove residual blank line at start of Makefile 2024-07-15 16:43:39 -06:00
libbegemot Remove residual blank line at start of Makefile 2024-07-15 16:43:39 -06:00
libblacklist blacklist: Avoid duplicate manual pages in METALOG 2025-10-14 00:54:07 +00:00
libblocklist blocklist: Rename blacklist to blocklist 2025-10-14 00:53:16 +00:00
libblocksruntime Remove residual blank line at start of Makefile 2024-07-15 16:43:39 -06:00
libbluetooth libbluetooth: Move to the bluetooth-lib package 2025-10-13 07:32:57 +01:00
libbsddialog Update Makefile.depend files 2024-10-14 10:26:17 -07:00
libbsdstat wlanstat(8): Follow-ups after moving to /usr/sbin and renaming 2025-10-03 01:19:06 +08:00
libbsm libbsm: Rename package to audit-lib 2025-10-01 11:36:37 +01:00
libbsnmp libbsnmp: make binding of client UNIX socket optional and configurable 2025-07-25 13:10:17 -07:00
libbz2 MFC: libbz2: add pkg-config file (bzip2.pc) 2025-10-12 23:08:29 -07:00
libc file: Add filecaps_intersect() and cap_rights_intersect() 2026-09-30 11:46:45 +02:00
libc++ Merge llvm-project release/19.x llvmorg-19.1.3-0-gab51eccf88f5 2024-11-08 17:45:31 +01:00
libc++experimental Retire MK_PROFILE infrastructure 2024-11-12 12:11:51 -05:00
libc_nonshared Retire MK_PROFILE infrastructure 2024-11-12 12:11:51 -05:00
libcalendar Remove residual blank line at start of Makefile 2024-07-15 16:43:39 -06:00
libcam libcam: Include nvme opcode and status code routines from nvme_util.c 2025-06-05 21:28:38 -04:00
libcapsicum manuals: Fix "skipping end of block" .Ed errors 2024-10-03 14:49:23 -03:00
libcasper cap_net: do not allow new limits to drop keys from the old ones 2026-05-20 13:52:39 +00:00
libcbor Update Makefile.depend files 2024-10-14 10:26:17 -07:00
libclang_rt Partially revert 6527682ab7 for llvm-based projects 2025-04-24 16:36:40 +02:00
libcom_err kerberos5: Fix the Heimdal pkgbase build 2025-09-04 14:53:02 +01:00
libcompat Remove residual blank line at start of Makefile 2024-07-15 16:43:39 -06:00
libcompiler_rt libgcc_s: export integer and floating point __aeabi_ symbols 2025-05-04 13:48:32 +02:00
libcrypt packages: Improve handling of -lib packages 2025-08-23 01:57:23 +01:00
libcuse cuse(3): annotate cuse_init() to suppress thread safety analysis 2025-12-29 03:06:47 +01:00
libcxxrt src: Use gnu++17 as the default C++ standard 2025-04-11 09:53:50 -04:00
libder lib: hook libder up to the build 2025-01-01 15:11:06 -06:00
libdevctl Do not fail 'devctl clear driver' if another driver is not found 2026-04-24 11:43:30 -04:00
libdevdctl Remove residual blank line at start of Makefile 2024-07-15 16:43:39 -06:00
libdevinfo libdevinfo: Avoid false positives for the root0 sentinel value 2025-01-29 10:03:59 -05:00
libdevstat Remove residual blank line at start of Makefile 2024-07-15 16:43:39 -06:00
libdiff libdiff: Simplify truncation detection 2026-02-10 14:24:07 +00:00
libdl _dl_iterate_phdr_locked(): fix libc and libdl 2024-11-14 06:14:05 +02:00
libdpv Remove residual blank line at start of Makefile 2024-07-15 16:43:39 -06:00
libdwarf Remove $FreeBSD$: one-line sh pattern 2023-08-16 11:55:03 -06:00
libedit packages: Install development manpages in the -dev package 2025-10-30 12:34:29 +00:00
libefivar efivar: Kill needless sys/cdefs.h 2025-05-25 07:49:32 -06:00
libelf Remove residual blank line at start of Makefile 2024-07-15 16:43:39 -06:00
libelftc libelftc: Move to toolchain package 2025-08-23 01:57:23 +01:00
libevent1 Remove residual blank line at start of Makefile 2024-07-15 16:43:39 -06:00
libexecinfo libexecinfo: tests: Expect failure on aarch64 2026-01-21 01:50:39 +00:00
libexpat contrib/expat: import expat 2.7.5 2026-04-05 10:58:54 +08:00
libfdt libfdt: Make an internal FDT library available 2024-03-21 01:05:05 -04:00
libfetch libfetch: allow use of SSL_CRL_VERIFY 2026-06-19 09:47:29 +02:00
libfido2 */*: remove recallocarray() compat shims following import into libc 2025-12-12 11:37:07 +01:00
libfigpar Refactor error handling in lseek operations 2024-09-21 05:25:15 -06:00
libgcc_eh src: Use gnu++17 as the default C++ standard 2025-04-11 09:53:50 -04:00
libgcc_s Reapply "Merge commit e24f90190c77 from llvm git (by Brad Smith):" 2025-11-26 07:05:48 +01:00
libgeom libgeom: Fix 32-bit gcc build 2026-01-12 17:18:22 +00:00
libgpio libgpio: Add and document gpio interrupt utility functions 2025-09-03 21:01:05 +03:00
libgssapi Remove residual blank line at start of Makefile 2024-07-15 16:43:39 -06:00
libiconv_modules iconv: Fix a stack buffer overflow in _ISO2022_sputwchar() 2026-07-06 10:29:47 +02:00
libifconfig Revert "sys/socket.h: Fix AF_MAX" 2026-08-12 19:25:57 +02:00
libipsec libipsec: decode SADB_X_EXT_IF_HW_OFFL 2024-07-12 06:29:31 +03:00
libipt Update Makefile.depend files 2024-10-14 10:26:17 -07:00
libiscsiutil libiscsiutil: Record dependency on libmd 2026-03-05 08:06:04 +00:00
libjail jaildesc: remove desc from the sysctl parameter list 2025-09-14 20:34:00 -07:00
libkiconv Remove residual blank line at start of Makefile 2024-07-15 16:43:39 -06:00
libkldelf mips: remove mips leftovers 2026-01-12 14:09:14 -05:00
libkvm kern/proc: expose reaper PID and subtree root in struct kinfo_proc 2026-04-27 04:28:59 +03:00
libldns Remove residual blank line at start of Makefile 2024-07-15 16:43:39 -06:00
liblua Remove residual blank line at start of Makefile 2024-07-15 16:43:39 -06:00
liblutok lutok: Switch from std::auto_ptr<> to std::unique_ptr<> 2025-04-16 10:09:18 -04:00
liblzma MFV: xz 5.8.3. 2026-03-31 19:13:55 -07:00
libmagic packages: Install development manpages in the -dev package 2025-10-30 12:34:29 +00:00
libmd libmd aarch64: Use ands instead of bics to round down the length 2026-04-24 11:32:43 -04:00
libmemstat Remove residual blank line at start of Makefile 2024-07-15 16:43:39 -06:00
libmilter sendmail: Move libmilter to its own package 2025-08-16 21:07:57 +01:00
libmixer mixer(3): Rename _mixer_readvol() to mixer_readvol() 2026-04-25 23:51:18 +02:00
libmp Remove residual blank line at start of Makefile 2024-07-15 16:43:39 -06:00
libmt manpages: Fix author e-mail address formatting 2026-09-23 09:07:21 +02:00
libnetbsd libnetbsd: import __CTASSERT(..) macros 2026-04-25 09:32:11 -07:00
libnetgraph lib: Automated cleanup of cdefs and other formatting 2023-11-26 22:23:59 -07:00
libnetmap libnetmap: fix extra indirection in nmreq_remove_option 2026-08-11 07:48:20 +02:00
libnv libnv: fix heap overflow in nvlist_recv() 2026-04-29 14:40:57 +00:00
libnvmf libnvmf: Fix a typo in a source code comment 2025-08-25 10:33:32 +02:00
libomp Partially revert 6527682ab7 for llvm-based projects 2025-04-24 16:36:40 +02:00
libopenbsd lib/libc: add recallocarray() 2025-12-12 11:32:37 +01:00
libopencsd lib: Move libopencsd to /usr/lib and make private 2025-07-30 11:11:38 +01:00
libpam libpam: Move to a new "pam" package 2026-04-07 12:01:39 +01:00
libpathconv manpages: Fix author e-mail address formatting 2026-09-23 09:07:21 +02:00
libpcap libpcap: Update to 1.10.6 2026-04-06 16:41:40 -03:00
libpe Remove $FreeBSD$: one-line sh pattern 2023-08-16 11:55:03 -06:00
libpfctl libpfctl: fix tstats address count 2026-08-27 12:52:38 +02:00
libpjdlog lib: Automated cleanup of cdefs and other formatting 2023-11-26 22:23:59 -07:00
libpmc manpages: Fix author e-mail address formatting 2026-09-23 09:07:21 +02:00
libpmcstat Remove redundant PACKAGE for INTERNALLIB libraries 2025-08-23 01:57:23 +01:00
libproc Fix proc_signame() to use sig2str() 2025-06-11 17:16:22 -06:00
libprocstat libprocstat: procstat_getgroups_kvm(): Output again the effective GID 2025-09-23 14:02:40 +02:00
libradius packages: Install development manpages in the -dev package 2025-10-30 12:34:29 +00:00
libregex libregex: fix our mapping for \w 2025-08-08 13:27:26 -05:00
librpcsec_gss librpcsec_gss: Fix a typo in a source code comment 2026-04-22 11:21:01 +02:00
librpcsvc Revert "Remove Secure RPC DES authentication" 2025-08-15 17:59:18 +01:00
librss manuals: Misc syntax fixes 2024-10-08 16:13:39 -03:00
librt librt/mq_getfd_np.3: Initial manual page 2026-01-01 13:05:04 -05:00
librtld_db Remove "All Rights Reserved" from FreeBSD Foundation copyrights 2024-07-30 12:16:36 -04:00
libsamplerate libsamplerate: Define as PRIVATELIB 2025-10-08 14:54:56 +02:00
libsbuf lib/libsbuf/tests: reformat with clang-format 2024-12-01 20:39:52 -08:00
libsdp libsdp: Move to bluetooth-lib package 2025-10-01 11:36:25 +01:00
libsecureboot Add DEBUG_PRINTF to stand.h 2025-07-17 16:36:17 -07:00
libsm Remove redundant PACKAGE for INTERNALLIB libraries 2025-08-23 01:57:23 +01:00
libsmb Remove residual blank line at start of Makefile 2024-07-15 16:43:39 -06:00
libsmdb Remove redundant PACKAGE for INTERNALLIB libraries 2025-08-23 01:57:23 +01:00
libsmutil Remove redundant PACKAGE for INTERNALLIB libraries 2025-08-23 01:57:23 +01:00
libsqlite3 Remove residual blank line at start of Makefile 2024-07-15 16:43:39 -06:00
libssp Update Makefile.depend files 2024-10-14 10:26:17 -07:00
libssp_nonshared Retire MK_PROFILE infrastructure 2024-11-12 12:11:51 -05:00
libstats Remove residual blank line at start of Makefile 2024-07-15 16:43:39 -06:00
libstdbuf libstdbuf: Move to the utilities package 2025-10-01 11:36:49 +01:00
libstdthreads libstdthreads: Move to the runtime package 2025-10-01 11:36:07 +01:00
libsys vfs: Disallow renameat() with FD_RESOLVE_BENEATH descriptors 2026-09-30 11:46:48 +02:00
libsysdecode rtld: silence clang's unterminated-string-initialization warning 2026-04-24 11:26:39 -04:00
libtacplus packages: Install development manpages in the -dev package 2025-10-30 12:34:29 +00:00
libtelnet Remove redundant PACKAGE for INTERNALLIB libraries 2025-08-23 01:57:23 +01:00
libthr libthr: fix -Wunterminated-string-initialization 2026-04-24 11:26:39 -04:00
libthread_db Remove "All Rights Reserved" from FreeBSD Foundation copyrights 2024-07-30 12:16:36 -04:00
libucl Remove residual blank line at start of Makefile 2024-07-15 16:43:39 -06:00
libufs ufs_disk_close.3: Correct include header macro 2026-04-10 14:27:33 -04:00
libugidfw Remove residual blank line at start of Makefile 2024-07-15 16:43:39 -06:00
libulog Retire MK_PROFILE infrastructure 2024-11-12 12:11:51 -05:00
libunbound unbound: Update to 1.25.1 2026-05-28 15:15:27 -07:00
libusb libusb20: Add dev_open + be_device_foreach manuals 2026-04-10 14:26:40 -04:00
libusbhid libusbhid: add missing include guards 2024-06-06 10:09:05 -04:00
libutil libutil: avoid an out-of-bounds read in trimdomain(3) 2026-04-23 08:48:43 -05:00
libutil++ libutil++: Rename manpage source files to avoid colons 2025-08-26 16:44:38 -04:00
libuvmem libuvmem: provide man page mostly as a pointer to vmem(9) 2025-12-09 02:24:55 +02:00
libveriexec manuals: Fix "unusual .Xr" warnings with a script 2024-10-15 17:18:14 -03:00
libvgl lib/libvgl/main.c: remove an extra semicolon 2024-02-02 18:35:01 -07:00
libvmmapi libvmmapi: Add support for setting up and configuring guest NUMA domains 2025-07-27 18:31:48 +02:00
libwrap packages: Install development manpages in the -dev package 2025-10-30 12:34:29 +00:00
libxo packages: Install development manpages in the -dev package 2025-10-30 12:34:29 +00:00
liby liby: Move to toolchain package 2025-10-01 11:35:57 +01:00
libyaml libyaml: import libyaml vendor version 0.2.5 2025-06-26 09:02:31 +02:00
libypclnt Remove residual blank line at start of Makefile 2024-07-15 16:43:39 -06:00
libz MFC: MFV: zlib 1.3.2. 2026-03-26 23:22:02 -07:00
libzstd MFV: zstd 1.5.7. 2026-05-07 10:24:49 -07:00
msun lib/msun: centralize addition of the arch-specific symbol map files 2026-04-15 02:31:30 +03:00
ncurses ncurses: fix cross build on MacOS 2026-02-19 09:54:31 +01:00
nss_tacplus packages: Install development manpages in the -dev package 2025-10-30 12:34:29 +00:00
ofed ofed: Define SUBDIR_DEPEND_libbnxtre 2026-02-27 12:04:39 +00:00
tests Remove residual blank line at start of Makefile 2024-07-15 16:43:39 -06:00
virtual_oss lib/virtual_oss: don't (over)link to libsamplerate 2026-01-30 18:30:06 +02:00
Makefile libsamplerate: Only build when virtual_oss is built 2026-04-07 11:49:10 +01:00
Makefile.inc Remove $FreeBSD$: one-line sh pattern 2023-08-16 11:55:03 -06:00