OPNSense/src 871a807. UPDATING, sys/conf newvers.sh

Add UPDATING entries and bump version

Approved by:    so
DeltaFile
+8-0UPDATING
+1-1sys/conf/newvers.sh
+9-12 files

OPNSense/src 69195c0sys/net rtsock.c

rtsock: Fix stack overflow

Approved by:    so
Security:       FreeBSD-SA-26:05.route
Security:       CVE-2026-3038
Fixes:          92be2847e845 ("rtsock: Avoid copying uninitialized padding bytes")

(cherry picked from commit cd00cd9f6ed4b6f6e6bb8ae168f2537968991b53)
(cherry picked from commit f44d771c2c6c80f3fabd11d335964e1efdf50a21)
DeltaFile
+2-2sys/net/rtsock.c
+2-21 files

OPNSense/src 33c5e0fsys/amd64/conf SYZKALLER

amd64/conf: Remove a config committed by accident

Approved by:    so
Reported by:    kib, kp
Fixes:          350ba9672a7f ("unix: Set O_RESOLVE_BENEATH on fds transferred between jails")

(cherry picked from commit 3ef39f58e5d63a78fd1c37e6c62d599bc68d5e1e)
(cherry picked from commit 302120bcb934ea150555362326c812353fb72eaa)
DeltaFile
+0-5sys/amd64/conf/SYZKALLER
+0-51 files

OPNSense/src 19e2ceetests/sys/kern unix_passfd_test.c Makefile

unix/tests: Add a regression test for fd transfer across jails

Approved by:    so
MFC after:      3 weeks

(cherry picked from commit 5843b8ee02e99527c28f579acfc1f48e10033529)
(cherry picked from commit ac2279ea57b72d688cf0af5a6fa7f5dbd1d4521b)
DeltaFile
+131-0tests/sys/kern/unix_passfd_test.c
+2-0tests/sys/kern/Makefile
+133-02 files

OPNSense/src 13f268csys/amd64/conf SYZKALLER, sys/kern uipc_usrreq.c

unix: Set O_RESOLVE_BENEATH on fds transferred between jails

If a pair of jails with different filesystem roots is able to exchange
SCM_RIGHTS messages (e.g., using a unix socket in a shared nullfs
mount), a process in one jail can open a directory outside of the root
of the second jail and then pass the fd to that second jail, allowing
the receiving process to escape the jail chroot.

Address this using the new FD_RESOLVE_BENEATH flag.  When externalizing
an SCM_RIGHTS message into the receiving process, automatically set this
flag on all new fds where a jail boundary is crossed.  This ensures that
the receiver cannot do more than access files underneath the directory;
in particular, the received fd cannot be used to access vnodes not
accessible by the sender.

Approved by:    so
Security:       FreeBSD-SA-26:04.jail
Security:       CVE-2025-15576
PR:             262179

    [6 lines not shown]
DeltaFile
+23-8sys/kern/uipc_usrreq.c
+5-0sys/amd64/conf/SYZKALLER
+28-82 files

OPNSense/src 33ec4b8sys/kern kern_descrip.c

file: Fix the !CAPABILITIES build

Approved by:    so
Reported by:    Ian FREISLICH <ianfreislich at gmail.com>
Fixes:  f35525ff2053 ("file: Add a fd flag with O_RESOLVE_BENEATH semantics")

(cherry picked from commit 6783dfb10637100067520bd6d9804e154cfee7ee)
(cherry picked from commit 8f6769b82a2a071cf07080b6d77639e919efbbcf)
DeltaFile
+1-2sys/kern/kern_descrip.c
+1-21 files

OPNSense/src 23247a9sys/fs/fdescfs fdesc_vnops.c, sys/kern kern_descrip.c vfs_syscalls.c

file: Add a fd flag with O_RESOLVE_BENEATH semantics

The O_RESOLVE_BENEATH openat(2) flag restricts name lookups such that
they remain under the directory referenced by the dirfd.  This commit
introduces an implicit version of the flag, FD_RESOLVE_BENEATH, stored
in the file descriptor entry.  When the flag is set, any lookup relative
to that fd automatically has O_RESOLVE_BENEATH semantics.  Furthermore,
the flag is sticky, meaning that it cannot be cleared, and it is copied
by dup() and openat().

File descriptors with FD_RESOLVE_BENEATH set may not be passed to
fchdir(2) or fchroot(2).  Various fd lookup routines are modified to
return fd flags to the caller.

This flag will be used to address a case where jails with different root
directories and the ability to pass SCM_RIGHTS messages across the jail
boundary can transfer directory fds in such as way as to allow a
filesystem escape.


    [8 lines not shown]
DeltaFile
+71-26sys/kern/kern_descrip.c
+15-6sys/kern/vfs_syscalls.c
+10-4sys/kern/vfs_cache.c
+4-4sys/kern/vfs_extattr.c
+6-2sys/sys/filedesc.h
+2-2sys/fs/fdescfs/fdesc_vnops.c
+108-444 files not shown
+113-4810 files

OPNSense/src 505b4a6sys/kern kern_descrip.c uipc_syscalls.c, sys/sys file.h filedesc.h

file: Qualify pointers to capsicum rights as const

File descriptor lookup routines typically take a set of capsicum rights
as input to the lookup, so that the fd's rights can be atomically
checked.  This set should be qualified with const.

No functional change intended.

Approved by:    so
Reviewed by:    olce, oshogbo, brooks, kib
MFC after:      2 weeks
Differential Revision:  https://reviews.freebsd.org/D50419

(cherry picked from commit 5319cb21610ad947c56fd0cd4f18ef5b58bc8db7)
(cherry picked from commit 2060337c0937f08d9960d629eb59ce737339640c)
DeltaFile
+29-23sys/kern/kern_descrip.c
+11-10sys/sys/file.h
+10-9sys/sys/filedesc.h
+4-3sys/kern/uipc_syscalls.c
+3-3sys/kern/uipc_sem.c
+4-2sys/sys/procdesc.h
+61-505 files not shown
+74-6011 files

OPNSense/src 6e01be6sys/net vnet.c

vnet: Ensure the space allocated by vnet_data_alloc() is sufficent aligned

Some 32-bit architectures, e.g., armv7, require strict 8-byte
alignment while doing atomic 64-bit access. Hence aligning to the
pointer type (4-byte alignment) does not meet the requirement on
those architectures.

Make the space allocated by vnet_data_alloc() sufficent aligned to
avoid unaligned access.

PR:             265639
Diagnosed by:   markj
Reviewed by:    jhb, markj
Co-authored-by: jhb
MFC after:      5 days
Differential Revision:  https://reviews.freebsd.org/D55560

(cherry picked from commit 32beb3ae71cb320dbe4190a01c036943d99083b3)
(cherry picked from commit 973d607b284ba68e63f0386af44c28bfde15add2)
DeltaFile
+11-3sys/net/vnet.c
+11-31 files

OPNSense/src 1f54b94sys/dev/e1000 if_em.c

e1000: Increase FC pause/refresh time on PCH2 and newer

This corresponds to Linux f74dc880098b4a29f76d756b888fb31d81ad9a0c

That commit does not provide any public background detail, but it's been
in use for over 5 years and corresponds to previous chip bugs w.r.t.
automatic generation of PAUSE frames.

Reviewed by:    kgalazka
Differential Revision:  https://reviews.freebsd.org/D54555

(cherry picked from commit 2bdec2ee73be7dbafce9982b0dc5c273918a5443)
DeltaFile
+2-2sys/dev/e1000/if_em.c
+2-21 files

OPNSense/src b4ddb3eusr.sbin/bsdinstall/scripts bootconfig

bsdinstall: fix EFI boot entry creation

update_uefi_bootentry assumes that the caller sets FREEBSD_BOOTNAME and
mntpt, which isn't the case anymore. The result is that there is no
"FreeBSD" boot entry created/updated after install. Most machines manage
to boot from the removable media path (if the loader is installed there
too), but some don't.

Take the loader's path as an argument and rename the variable used in
the ZFS mirror loop so mntpt can be reused below.

Also mark nentries as a local variable so it doesn't leak out of the
function.

PR:             293385
Fixes:          494de51bc0074472d1b01604f085daea0844f240
MFC after:      2 days
Reviewed by:    imp
Differential Revision:  https://reviews.freebsd.org/D55469

    [2 lines not shown]
DeltaFile
+14-11usr.sbin/bsdinstall/scripts/bootconfig
+14-111 files

OPNSense/src c2b3d1dsys/netinet ip_divert.c

divert: Use a better source identifier for netisr_queue_src() calls

These opaque IDs are used by netisr to distribute work among threads.
The mapping function is simply SourceID % numthreads, so using socket
addresses as source IDs isn't going to distribute packets well due to
alignment.

Use the divert socket's generation number instead, as that suits this
purpose much better.
DeltaFile
+4-2sys/netinet/ip_divert.c
+4-21 files

OPNSense/src f9831b4. UPDATING, sys/conf newvers.sh

Add UPDATING entries and bump version

Approved by:    so
DeltaFile
+8-0UPDATING
+1-1sys/conf/newvers.sh
+9-12 files

OPNSense/src 4ab9730sys/net rtsock.c

rtsock: Fix stack overflow

Approved by:    so
Security:       FreeBSD-SA-26:05.route
Security:       CVE-2026-3038
Fixes:          92be2847e845 ("rtsock: Avoid copying uninitialized padding bytes")

(cherry picked from commit cd00cd9f6ed4b6f6e6bb8ae168f2537968991b53)
(cherry picked from commit f44d771c2c6c80f3fabd11d335964e1efdf50a21)
DeltaFile
+2-2sys/net/rtsock.c
+2-21 files

OPNSense/src c673940sys/amd64/conf SYZKALLER

amd64/conf: Remove a config committed by accident

Approved by:    so
Reported by:    kib, kp
Fixes:          350ba9672a7f ("unix: Set O_RESOLVE_BENEATH on fds transferred between jails")

(cherry picked from commit 3ef39f58e5d63a78fd1c37e6c62d599bc68d5e1e)
(cherry picked from commit 302120bcb934ea150555362326c812353fb72eaa)
DeltaFile
+0-5sys/amd64/conf/SYZKALLER
+0-51 files

OPNSense/src 3f73e41tests/sys/kern unix_passfd_test.c Makefile

unix/tests: Add a regression test for fd transfer across jails

Approved by:    so
MFC after:      3 weeks

(cherry picked from commit 5843b8ee02e99527c28f579acfc1f48e10033529)
(cherry picked from commit ac2279ea57b72d688cf0af5a6fa7f5dbd1d4521b)
DeltaFile
+131-0tests/sys/kern/unix_passfd_test.c
+2-0tests/sys/kern/Makefile
+133-02 files

OPNSense/src 6d73caesys/amd64/conf SYZKALLER, sys/kern uipc_usrreq.c

unix: Set O_RESOLVE_BENEATH on fds transferred between jails

If a pair of jails with different filesystem roots is able to exchange
SCM_RIGHTS messages (e.g., using a unix socket in a shared nullfs
mount), a process in one jail can open a directory outside of the root
of the second jail and then pass the fd to that second jail, allowing
the receiving process to escape the jail chroot.

Address this using the new FD_RESOLVE_BENEATH flag.  When externalizing
an SCM_RIGHTS message into the receiving process, automatically set this
flag on all new fds where a jail boundary is crossed.  This ensures that
the receiver cannot do more than access files underneath the directory;
in particular, the received fd cannot be used to access vnodes not
accessible by the sender.

Approved by:    so
Security:       FreeBSD-SA-26:04.jail
Security:       CVE-2025-15576
PR:             262179

    [6 lines not shown]
DeltaFile
+23-8sys/kern/uipc_usrreq.c
+5-0sys/amd64/conf/SYZKALLER
+28-82 files

OPNSense/src 9a9303esys/kern kern_descrip.c

file: Fix the !CAPABILITIES build

Approved by:    so
Reported by:    Ian FREISLICH <ianfreislich at gmail.com>
Fixes:  f35525ff2053 ("file: Add a fd flag with O_RESOLVE_BENEATH semantics")

(cherry picked from commit 6783dfb10637100067520bd6d9804e154cfee7ee)
(cherry picked from commit 8f6769b82a2a071cf07080b6d77639e919efbbcf)
DeltaFile
+1-2sys/kern/kern_descrip.c
+1-21 files

OPNSense/src f77dc4dsys/fs/fdescfs fdesc_vnops.c, sys/kern kern_descrip.c vfs_syscalls.c

file: Add a fd flag with O_RESOLVE_BENEATH semantics

The O_RESOLVE_BENEATH openat(2) flag restricts name lookups such that
they remain under the directory referenced by the dirfd.  This commit
introduces an implicit version of the flag, FD_RESOLVE_BENEATH, stored
in the file descriptor entry.  When the flag is set, any lookup relative
to that fd automatically has O_RESOLVE_BENEATH semantics.  Furthermore,
the flag is sticky, meaning that it cannot be cleared, and it is copied
by dup() and openat().

File descriptors with FD_RESOLVE_BENEATH set may not be passed to
fchdir(2) or fchroot(2).  Various fd lookup routines are modified to
return fd flags to the caller.

This flag will be used to address a case where jails with different root
directories and the ability to pass SCM_RIGHTS messages across the jail
boundary can transfer directory fds in such as way as to allow a
filesystem escape.


    [8 lines not shown]
DeltaFile
+71-26sys/kern/kern_descrip.c
+15-6sys/kern/vfs_syscalls.c
+10-4sys/kern/vfs_cache.c
+4-4sys/kern/vfs_extattr.c
+6-2sys/sys/filedesc.h
+2-2sys/fs/fdescfs/fdesc_vnops.c
+108-444 files not shown
+113-4810 files

OPNSense/src fd926d0sys/kern kern_descrip.c uipc_syscalls.c, sys/sys file.h filedesc.h

file: Qualify pointers to capsicum rights as const

File descriptor lookup routines typically take a set of capsicum rights
as input to the lookup, so that the fd's rights can be atomically
checked.  This set should be qualified with const.

No functional change intended.

Approved by:    so
Reviewed by:    olce, oshogbo, brooks, kib
MFC after:      2 weeks
Differential Revision:  https://reviews.freebsd.org/D50419

(cherry picked from commit 5319cb21610ad947c56fd0cd4f18ef5b58bc8db7)
(cherry picked from commit 2060337c0937f08d9960d629eb59ce737339640c)
DeltaFile
+29-23sys/kern/kern_descrip.c
+11-10sys/sys/file.h
+10-9sys/sys/filedesc.h
+4-3sys/kern/uipc_syscalls.c
+4-2sys/sys/procdesc.h
+3-3sys/kern/uipc_sem.c
+61-505 files not shown
+74-6011 files

OPNSense/src d871609contrib/atf/atf-c++ check_test.cpp check.hpp, contrib/atf/atf-c++/detail process_test.cpp

atf: Switch from std::auto_ptr<> to std::unique_ptr<>

This mirrors upstream commit f053ab687f6e27aa264f599ecbfc5ef27ad4e2d3.

Reviewed by:    emaste
Differential Revision:  https://reviews.freebsd.org/D49789

(cherry picked from commit 5e6befdaca5194a8fb91b48d5f678942f22fa8f1)
DeltaFile
+11-11contrib/atf/atf-c++/check_test.cpp
+4-4contrib/atf/atf-sh/atf-check.cpp
+4-4contrib/atf/atf-c++/detail/process_test.cpp
+2-2contrib/atf/atf-c++/check.hpp
+2-2contrib/atf/atf-c++/check.cpp
+0-4libexec/atf/atf-check/Makefile
+23-274 files not shown
+23-3810 files

OPNSense/src 6431199contrib/lutok stack_cleaner.hpp, lib/liblutok Makefile

lutok: Switch from std::auto_ptr<> to std::unique_ptr<>

This mirrors upstream commit bd5904144c9778a07685f3e4efa6ef011a5480ec.

Reviewed by:    igoro, imp, emaste
Differential Revision:  https://reviews.freebsd.org/D49788

(cherry picked from commit 25f2634a1f4b27c9804b705e85bc104a2eac67b9)
DeltaFile
+0-4lib/liblutok/Makefile
+1-1contrib/lutok/stack_cleaner.hpp
+1-52 files

OPNSense/src 22336c0sys/netinet ip_divert.c

divert: Use a better source identifier for netisr_queue_src() calls

These opaque IDs are used by netisr to distribute work among threads.
The mapping function is simply SourceID % numthreads, so using socket
addresses as source IDs isn't going to distribute packets well due to
alignment.

Use the divert socket's generation number instead, as that suits this
purpose much better.
DeltaFile
+4-2sys/netinet/ip_divert.c
+4-21 files

OPNSense/src 4d43ea1sys/netinet6 icmp6.c

icmp6: clear csum_flags on mbuf reuse

When icmp6 sends an ICMPv6 message, it reuses the mbuf of the packet
that triggered the ICMPv6 message and prepends an IPv6 and ICMPv6
header. For a locally generated packet with checksum offloading, the
mbuf still has csum_flags set indicating that a SCTP/TCP/UDP checksum
has to be computed and inserted. Since this not the case anymore,
csum_flags need to be cleared.

PR:                     293227
Reviewed by:            kp, zlei, tuexen
MFC after:              3 days
Differential Revision:  https://reviews.freebsd.org/D55367

(cherry picked from commit ada4dc77577f7162353e8c2916ba5c258b6210f0)
DeltaFile
+1-0sys/netinet6/icmp6.c
+1-01 files

OPNSense/src 2e22159sys/netpfil/pf pf_ioctl.c

pf: Use proper prototype for SYSINIT functions

MFC after:      1 week

(cherry picked from commit 0ce8c20fcd44c1595b42fcb540913d3802edd438)
(cherry picked from commit 34462748d79a6e2ea8215564286f97e93670dfbb)
DeltaFile
+2-2sys/netpfil/pf/pf_ioctl.c
+2-21 files

OPNSense/src 2c6944fsys/netpfil/ipfw ip_fw2.c ip_fw_nat.c

ipfw: Use proper prototype for SYSINIT functions

The only possible return value of function ipfw_init() is 0. Make it
return void to match the prototype of SYSINIT.

MFC after:      1 week

(cherry picked from commit 1bba2194c8a960235f8eae36e7d3e96f347ce779)
(cherry picked from commit 745b6ca4ed933f9f4c1d314dc7b0aa31e8e9e0de)
DeltaFile
+3-6sys/netpfil/ipfw/ip_fw2.c
+2-2sys/netpfil/ipfw/ip_fw_nat.c
+5-82 files

OPNSense/src 77d0070usr.sbin/bsdinstall bsdinstall.8

bsdinstall.8: Minor maintenance

Replace CD-ROMs with "discs, USBs, or network boot environments"
to both modernize aesthetic and also nudge youths to think at scale.
Since I'm disrupting the flow of these lines anyway, expand the VM
acronym because I think this is one of the first manuals people will
be looking at.

Reset list alignment to seven characters. It was at 19 characters,
and that was not enough to align them all, wasting many extra lines
by crunching all the words over. Seven actually bought us some lines
from six due to avg item size. Tag SPDX.

MFC after:      3 days
Discussed with: ivy, zi

(cherry picked from commit 81d9e08a4df42079d5e163b5991d5d6f3a28d4f0)
DeltaFile
+11-8usr.sbin/bsdinstall/bsdinstall.8
+11-81 files

OPNSense/src 89058b9sys/netipsec xform_ipcomp.c

netipsec: Use proper prototype for SYSINIT functions

MFC after:      1 week

(cherry picked from commit 360bb45690d918fac5bae78ab44f45d11327067a)
(cherry picked from commit a32ee2897f8eed4a03976be65020912f03f7228e)
DeltaFile
+2-2sys/netipsec/xform_ipcomp.c
+2-21 files

OPNSense/src 9d3a11csys/netinet6 ip6_mroute.c

ip6_mroute: Fix the UPCALL_TIMING build

MFC after:      2 weeks
Sponsored by:   Stormshield
Sponsored by:   Klara, Inc.

(cherry picked from commit 5bb953b095461b488b102ab3025f42cd2ef61f9d)
DeltaFile
+1-1sys/netinet6/ip6_mroute.c
+1-11 files

OPNSense/src b2d3c64sys/netinet6 ip6_mroute.c

ip6_mroute: Remove an unhelpful comment

ifnets already track if_allmulti() calls in the if_amcount field.  That
field is older than the comment, so I'm not exactly sure what the intent
was; let's just remove it.

MFC after:      2 weeks
Sponsored by:   Stormshield
Sponsored by:   Klara, Inc.

(cherry picked from commit a45fb94801dffd414bdb1981def0e977ef0c774f)
DeltaFile
+0-4sys/netinet6/ip6_mroute.c
+0-41 files