OPNSense/src fc4b5c9 — . UPDATING, sys/conf newvers.sh

Add UPDATING entries and bump version

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

OPNSense/src 42a023a — sys/kern kern_prot.c kern_thread.c, sys/sys proc.h

proc: Make the COW generation counter a saturating counter

A sleeping thread can hold on to a COW counter value indefinitely while
a sibling thread forces the process generation counter to wrap around.
This can cause us to free a limit set while it's still in use.  This can
be exploited to obtain root privileges.

Fix this by making p_cowgen a saturating counter: once it reaches
UINT_MAX, the value is fixed, and we always take the slow path through
thread_cow_update().  The per-process counter is reset at fork time, and
I suspect it's quite unlikely that a process will hit the limit
organically.

Simplify the optimization in setrlimit which proactively syncs the
thread's limit structure: now that the counter is saturating, we cannot
infer from PROC_COW_CHANGECOUNT(td, p) == 1 that the thread and proc are
in sync.

Approved by:    so

    [6 lines not shown]
DeltaFile
+11-6sys/sys/proc.h
+9-1sys/kern/kern_resource.c
+3-3sys/kern/kern_thread.c
+1-0sys/kern/kern_prot.c
+24-104 files

OPNSense/src 74d729d — sys/kern kern_thread.c subr_syscall.c, sys/sys proc.h

ptrace: Fix interactions between remote requests and signal handling

The debugger may have invoked execve in the debugee via PT_SC_REMOTE, in
which case the sigacts structure may have been replaced and freed.
Then, sigprocess() can operate on the freed structure.  This can be
exploited to obtain privileges.  Further, we could have nested
ptracestop() calls if the debugger requests a blocking syscall while a
signal is pending.  It is very hard to reason about the correctness of
such calls.

Make sigprocess() reload the process signal handler state after handing
control to the debugger, this might change due to execve().

Set TDB_BOUNDARY in ptracestop() rather than in the AST handler and
syscallret().  Plumb a flag through to achieve this.  This also ensures
that nested ptracestop() calls do not try to handle remote requests.

Add a TDB_INREMOTEREQ flag, use it to ensure that we don't pause or
consume signals while executing a remote request.  Factor out the

    [11 lines not shown]
DeltaFile
+222-0tests/sys/kern/ptrace_test.c
+78-32sys/kern/kern_sig.c
+19-16sys/kern/sys_process.c
+2-5sys/kern/subr_syscall.c
+2-0sys/sys/proc.h
+2-0sys/kern/kern_thread.c
+325-531 files not shown
+327-537 files

OPNSense/src 41a4bb5 — sys/kern uipc_socket.c

socket: Disallow listen on SS_ISDISCONNECTED sockets

tcp_usr_shutdown() can race with listen(): it calls tcp_output after
marking the socket disconnected.  This can lead to corruption of the
socket union.

Simply disallow listen() on disconnected data sockets.  This is not a
portable feature and it seems unlikely that anything relies on it.

Remove a recently added regression test which documents the old
behaviour.

Approved by:    so
Security:       FreeBSD-SA-26:102.socket
Security:       CVE-2026-127762
Reported by:    Laam Alif at Ibteda Digital Library
Reviewed by:    emaste
Sponsored by:   The FreeBSD Foundation
Differential Revision:  https://reviews.freebsd.org/D62220
DeltaFile
+7-2sys/kern/uipc_socket.c
+7-21 files

OPNSense/src c5acc0e — sys/sys proc.h

proc: assert td belongs to p in PROC_COW_CHANGECOUNT

PROC_COW_CHANGECOUNT(td, p) evaluates p->p_cowgen - td->td_cowgen, which
is only meaningful when td is a thread of p.  Otherwise it subtracts two
unrelated copy-on-write generations, as the kern.proc.rlimit remote
update path did before it was fixed.  Assert td->td_proc == p to catch
such a caller on INVARIANTS kernels.

Approved by:    so
Security:       FreeBSD-SA-26:101.setrlimit
Suggested by:   mjg
MFC after:      2 weeks
Assisted-by:    Claude Opus 4.8
Reviewed by:    olce, mjg
Differential Revision:  https://reviews.freebsd.org/D62162
DeltaFile
+1-0sys/sys/proc.h
+1-01 files

OPNSense/src 0df02a1 — sys/kern kern_resource.c

kern_proc_setrlimit: take the fast path only for curproc

When a thread changes its own process' resource limits,
kern_proc_setrlimit() syncs the thread to the new plimit and releases
two references on the old one, the process' and the thread's, rather
than letting the thread sync itself on its next kernel entry.  It
takes this path whenever the target process' copy-on-write generation
is one ahead of the current thread's, but never checks that the
target is the thread's own process.

Another process' limits can be set through the kern.proc.rlimit
sysctl (used by limits -P), Linux prlimit64(2) and the Linux fork
path.  On such a remote update the generations can still line up;
lim_cowsync() then syncs and releases the calling thread's reference,
yet both references are dropped from the target's old plimit.  A
thread of the target still points at that plimit through td_limit, so
it is freed while live -- a use-after-free.

Guard the fast path with the target being the calling thread's own

    [12 lines not shown]
DeltaFile
+2-1sys/kern/kern_resource.c
+2-11 files

OPNSense/src a482ad1 — sys/kern uipc_usrreq.c, tests/sys/kern unix_passfd_test.c

unix: fix use-after-free in SCM_RIGHTS GC after MSG_PEEK

uipc_soreceive_dgram() removes a datagram from the receive queue with
STAILQ_REMOVE_HEAD() before pinning it in so_rcv.uxdg_peeked for a
MSG_PEEK receive.  STAILQ_REMOVE_HEAD() does not clear the removed
element's link field, and m_stailqpkt is a union with m_nextpkt, so the
pinned datagram keeps pointing at the datagram that used to follow it in
the queue.  That datagram is no longer referenced from here and can be
freed independently, for example by unp_disconnect() when the sending
peer closes.

unp_scan_socket() passes so_rcv.uxdg_peeked to unp_scan(), which walks a
record list through m_nextpkt while collecting SCM_RIGHTS garbage.  It
therefore followed the stale link into the freed datagram.  On an
INVARIANTS or KASAN kernel this is a panic in unp_remove_dead_ref(); on
a release kernel it double-counts the rights in that record and lets the
collector reclaim a socket that is still reachable.

Clear m_nextpkt when the datagram is pinned so the scan stops at the

    [17 lines not shown]
DeltaFile
+85-0tests/sys/kern/unix_passfd_test.c
+5-0sys/kern/uipc_usrreq.c
+90-02 files

OPNSense/src 14d1754 — sys/amd64/linux linux_sysvec.c, sys/amd64/linux32 linux32_sysvec.c

linux: Release futexes and clear tids earlier during execve

During execve, other threads in the process are terminated.  As a part
of this, they invoke the sv_thread_detach handler, which modifies user
memory.  This handler is invoked only after the new process image has
been loaded, in which case they can modify memory in a setuid or setgid
image process.

Fix this by implementing sv_onexec_old, which explicitly runs before the
new image is loaded.  This is how native executables release robust
mutexes.

Approved by:    so
Security:       FreeBSD-SA-26:99.linux
Security:       CVE-2026-127757
Reported by:    mmacy, kbowling
Reviewed by:    kib
Sponsored by:   The FreeBSD Foundation
Differential Revision:  https://reviews.freebsd.org/D62207
DeltaFile
+50-12sys/compat/linux/linux_fork.c
+1-1sys/compat/linux/linux_futex.c
+2-0sys/i386/linux/linux_sysvec.c
+1-0sys/arm64/linux/linux_sysvec.c
+1-0sys/amd64/linux32/linux32_sysvec.c
+1-0sys/amd64/linux/linux_sysvec.c
+56-131 files not shown
+57-137 files

OPNSense/src b401a05 — contrib/bsnmp/lib snmp.c, contrib/bsnmp/snmpd main.c

bsnmp: drop messages with an unsupported SNMP version

snmp_pdu_decode_header() returned SNMP_CODE_BADENC for an unknown
version.  snmp_input_start() treats BADENC as a bad value in a SET and
carries on, so its version check, which runs only for SNMP_CODE_OK, was
skipped.  The message then reached snmp_pdu_auth_access(), which with
snmp_vacm loaded switched on pdu->version and called abort() for
SNMP_Verr.  A single unauthenticated packet could stop bsnmpd.

Return SNMP_CODE_BADVERS instead, as bsnmplib(3) documents, so the
message is counted in snmpInBadVersions and dropped.  Remove the
mapping in snmp_pdu_decode() that tried to do this but was never
reached, and have snmp_pdu_auth_access() deny an unknown version
rather than abort.

Approved by:    so
Security:       FreeBSD-SA-26:98.bsnmp
Security:       CVE-2026-127756
Reported by:    Hila Cohen, Apiiro (hillalee on github)

    [5 lines not shown]
DeltaFile
+1-5contrib/bsnmp/lib/snmp.c
+1-1contrib/bsnmp/snmpd/main.c
+2-62 files

OPNSense/src 2806990 — lib/libpam/modules/pam_xdg pam_xdg.8 pam_xdg.c

pam_xdg: Do not follow symbolic links when removing the runtime directory

When the last session of a user ends, the runtime directory is removed by
root.  The user owns the directory and can still have processes (always
without the linger option), so its content can change while it is removed.

remove_dir() took the type of each entry from readdir() and opened the
directories with openat(fd, name, 0).  An entry replaced by a symbolic link
between the two was followed and the content of its target was removed
as root.

Open every entry relative to its parent with O_DIRECTORY | O_NOFOLLOW and
unlink what is not a directory at that moment, never what it points to.
Also stay on the filesystem of the runtime directory, do not enter a
directory that belongs to neither the user nor root, and limit the depth
of the recursion.  remove_dir() now always consumes the descriptor it is
given, the callers closed it a second time.

Looking for the last session file also opened a user-controlled entry

    [16 lines not shown]
DeltaFile
+53-17lib/libpam/modules/pam_xdg/pam_xdg.c
+12-2lib/libpam/modules/pam_xdg/pam_xdg.8
+65-192 files

OPNSense/src ada9e69 — crypto/krb5 README, crypto/krb5/src/lib/kadm5 kadm_rpc_xdr.c

krb5: Import MIT 1.22.3

Major changes in 1.22.3 (2026-11-09)
====================================

This is a bug fix release, with a focus on security issues discovered
with the aid of large language models.  See
https://web.mit.edu/kerberos/advisories/MITKRB5-SA-2026-001.txt for
information on the risks of continuing to use unpatched releases.

* Fix a logic error when checking PAC server checksums
   [CVE-2026-111423].

* Check for unkeyed checksums when validating CAMMAC verifiers
   [CVE-2026-71199].

* Fix a loophole in the KDC's client authdata filtering which could
   allow clients to include fake PAC and CAMMAC authdata values when
   requesting service tickets.  These fake values would be rejected by

    [53 lines not shown]
DeltaFile
+215-215crypto/krb5/src/po/mit-krb5.pot
+182-0crypto/krb5/README
+77-32crypto/krb5/src/plugins/preauth/pkinit/pkinit_crypto_openssl.c
+69-29crypto/krb5/src/lib/rpc/svc_auth_gss.c
+97-0crypto/krb5/src/lib/krb5/krb/t_init_creds_step.c
+59-34crypto/krb5/src/lib/kadm5/kadm_rpc_xdr.c
+699-310133 files not shown
+1,800-901139 files

OPNSense/src 1938513 — crypto/krb5/src/lib/gssapi/krb5 import_name.c

krb5: Fix reachable assert when importing krb5 names

If a name token contains trailing garbage, error out from
krb5_gss_import_name() instead of crashing the process with an
assertion failure.

Commit message details obtained from upstream commit.

Approved by:    so
Security:       FreeBSD-SA-26:96.krb5
Obtained from:  upstream commit 07818f1fd
Reported by:    Aisle Research (Ze Sheng, Dmitrijs Trizna,
                Luigino Camastra, Guido Vranken) to krb5-bugs
MFC after:      3 days

(cherry picked from commit fce16f60de9718be6b789f00e86141a84cd920d3)
(cherry picked from commit 27691b8b9303c6fec89a6dcb9c56f8c8f0f5e69c)
DeltaFile
+2-1crypto/krb5/src/lib/gssapi/krb5/import_name.c
+2-11 files

OPNSense/src 4fc0ed8 — sys/arm64/arm64 sys_machdep.c

arm64: Apply boundary checking to ranges in the ARM64_GUARD_PAGE handler

Otherwise pmap_bti_set() may end up partially operating on a largepage
mapping.  In the case of a L2 block mapping, it'll demote the mapping.
Then, a subsequent fault will cause pmap_enter_largepage() to remap the
whole large page, but without a break-before-make sequence, so we could
end up with 4KB TLB entries pointing into the large page.  If the
largepage object is subsequently destroyed, those TLB entries won't be
invalidated, and would allow userspace to access freed memory.

Fix this using the vm_map_check_boundary() helper.  Don't bother
checking for non-canonical addresses, as pmap_bti_set() handles that.

Approved by:    so
Security:       FreeBSD-SA-26:95.arm64
Security:       CVE-2026-127755
Reviewed by:    alc, kib
Sponsored by:   The FreeBSD Foundation
Differential Revision:  https://reviews.freebsd.org/D61956
DeltaFile
+20-23sys/arm64/arm64/sys_machdep.c
+20-231 files

OPNSense/src ba6c9c7 — sys/netinet/tcp_stacks bbr.c

tcp bbr: improve handling of retransmissions in LAST-ACK

When performing a timer based retransmission, clear the
BBR_RWND_COLLAPSED flag. If it sticks, t_rxtshift is never incremented
resulting in unlimited retransmissions in the LAST-ACK state.

Approved by:            so
Security:               FreeBSD-EN-26:33.tcp
Reported by:            Illia Vynohradov
Reviewed by:            Peter Lei
Sponsored by:           Netflix, Inc.
Differential Revision:  https://reviews.freebsd.org/D61586

(cherry picked from commit 3c6fd437b1824caeddb5f0d4570d43cf0c999c14)
(cherry picked from commit cbd17b66e64e9bdf025200c4993b8aeae6a0ebe9)
DeltaFile
+1-1sys/netinet/tcp_stacks/bbr.c
+1-11 files

OPNSense/src 16043d4 — sys/netinet/tcp_stacks bbr.c

tcp bbr: improve persits timeout computation

t_srtt and t_rttvar use different lengths of fractions, therefore use
the appropriate shift value.

Approved by:            so
Security:               FreeBSD-EN-26:33.tcp
Reviewed by:            Peter Lei
Sponsored by:           Netflix, Inc.
Differential Revision:  https://reviews.freebsd.org/D61600

(cherry picked from commit 751882926dc0bb1f7a4834c4b5e8d951cee61c7c)
(cherry picked from commit 3e74519d5136d4eb0fee56148ff30c66607a3eac)
DeltaFile
+1-1sys/netinet/tcp_stacks/bbr.c
+1-11 files

OPNSense/src 3b649ab — sys/netinet/tcp_stacks bbr.c

tcp bbr: improve retransmit timout calculation

The retransmission timeout should the srtt + 4 * rttvar.
The srtt is using 5 bits of fractions and rttvar is using 4 bits of
fractions, some specific shifting is required.

Approved by:            so
Security:               FreeBSD-EN-26:33.tcp
Reviewed by:            Peter Lei
Sponsored by:           Netflix, Inc.
Differential Revision:  https://reviews.freebsd.org/D61581

(cherry picked from commit 2f98793a13fe3e69cf6b698fa469550b4ba0fea1)
(cherry picked from commit ccf8e3762c3948446263ae3ef0dd98391ef9f97e)
DeltaFile
+1-2sys/netinet/tcp_stacks/bbr.c
+1-21 files

OPNSense/src 232de2b — sys/netinet/tcp_stacks bbr.c

tcp bbr: improve invalidating rtt

Invalidate the rtt based on t_rxtshift instead of resetting t_srtt to 0,
because using the latter also affects the retransmission timeout.

Approved by:            so
Security:               FreeBSD-EN-26:33.tcp
Reviewed by:            Peter Lei
Sponsored by:           Netflix, Inc.
Differential Revision:  https://reviews.freebsd.org/D61585

(cherry picked from commit 8018d75601dfe804a8d70f4f08bdb0e4e3a8c5c9)
(cherry picked from commit 158dcb8e415d84caf6ebc30841ed4bfc3148bc32)
DeltaFile
+2-4sys/netinet/tcp_stacks/bbr.c
+2-41 files

OPNSense/src b8de519 — sys/netinet/tcp_stacks bbr.c

tcp bbr: cleanup

No functional change intended.

Approved by:    so
Security:       FreeBSD-EN-26:33.tcp
Sponsored by:   Netflix, Inc.

(cherry picked from commit 34436bb7cf971dba1c0dcdb1d45f22fff1a4b6c1)
(cherry picked from commit c8ca5fa512fbbd04c69438cde86e6e2dd1c4597b)
DeltaFile
+3-4sys/netinet/tcp_stacks/bbr.c
+3-41 files

OPNSense/ports 1d075c8 — www/phalcon Makefile distinfo

www/phalcon: bump to 5.24.2
DeltaFile
+3-3www/phalcon/distinfo
+1-1www/phalcon/Makefile
+4-42 files

LLVM/project ef95ce3 — llvm/lib/Transforms/Vectorize SLPVectorizer.cpp, llvm/test/CodeGen/RISCV atomic-cmpxchg.ll

[spr] update

Created using spr 2.0.0-beta.2
DeltaFile
+761-286llvm/lib/Transforms/Vectorize/SLPVectorizer.cpp
+336-504llvm/test/CodeGen/RISCV/GlobalISel/atomic-cmpxchg.ll
+256-384llvm/test/CodeGen/RISCV/atomic-cmpxchg.ll
+519-0mlir/lib/Dialect/OpenACC/Transforms/ACCPartitionKernelLoops.cpp
+244-244llvm/test/CodeGen/X86/vector-interleaved-store-i8-stride-7.ll
+465-0llvm/test/MC/RISCV/rvy/rvyc-valid-load-store.s
+2,581-1,418631 files not shown
+15,918-7,263637 files

LLVM/project 46b0aa5 — clang/test/CodeGen/AArch64 fmv-resolver-emission.c, clang/test/CodeGenCXX likely-module-local.cpp

[spr] update

Created using spr 2.0.0-beta.2
DeltaFile
+30-30clang/test/OpenMP/threadprivate_codegen.cpp
+25-25clang/test/OpenMP/parallel_private_codegen.cpp
+11-2clang/test/CodeGenCXX/likely-module-local.cpp
+6-6clang/test/OpenMP/parallel_firstprivate_codegen.cpp
+6-6clang/test/CodeGen/AArch64/fmv-resolver-emission.c
+5-5clang/test/OpenMP/for_lastprivate_codegen.cpp
+83-744 files not shown
+90-8110 files

LLVM/project b7d3925 — clang/test/CodeGen inline-builtin-attrs.c

[spr] update

Created using spr 2.0.0-beta.2
DeltaFile
+91-13clang/test/CodeGen/inline-builtin-attrs.c
+91-131 files

LLVM/project d1f7d22 — clang/test/CodeGen strlen-inline-builtin.c inline-builtin-attrs.c

[spr] update

Created using spr 2.0.0-beta.2
DeltaFile
+0-25clang/test/CodeGen/strlen-inline-builtin.c
+25-0clang/test/CodeGen/inline-builtin-attrs.c
+25-252 files

OPNSense/core 7ab7031 — src/opnsense/mvc/app/controllers/OPNsense/Firewall/Api AliasController.php, src/opnsense/mvc/app/views/OPNsense/Firewall alias.volt

Lets just scope the standard setAction cause its only used for GeoIP anyway
DeltaFile
+1-1src/opnsense/mvc/app/views/OPNsense/Firewall/alias.volt
+1-1src/opnsense/mvc/app/controllers/OPNsense/Firewall/Api/AliasController.php
+2-22 files

LLVM/project 0e23837 — llvm/lib/Target/LoongArch LoongArchISelDAGToDAG.cpp, llvm/test/CodeGen/LoongArch mul-zext-i32-const.ll

Reuse the multi-use zext constant for MULW_D_WU
DeltaFile
+3-5llvm/lib/Target/LoongArch/LoongArchISelDAGToDAG.cpp
+1-2llvm/test/CodeGen/LoongArch/mul-zext-i32-const.ll
+4-72 files

OPNSense/core 9cb50a1 — src/opnsense/mvc/app/controllers/OPNsense/Firewall/Api DNatController.php

Firewall: NAT: Port Forward - leave the legacy created/updated stamps out of the rule export (#11393)

(cherry picked from commit 54749ed021812542b9f8ced6477b8d34dd4ba3dd)
(cherry picked from commit 501341ecb1eee5553e099a04fee8ed82214fe4c0)
DeltaFile
+4-3src/opnsense/mvc/app/controllers/OPNsense/Firewall/Api/DNatController.php
+4-31 files

OPNSense/core 501341e — src/opnsense/mvc/app/controllers/OPNsense/Firewall/Api DNatController.php

firmware: sort array in previous
DeltaFile
+3-3src/opnsense/mvc/app/controllers/OPNsense/Firewall/Api/DNatController.php
+3-31 files

LLVM/project 222992b — orc-rt/include/orc-rt/support IntervalMap.h, orc-rt/test/unit/support IntervalMapTest.cpp

[orc-rt] Fix UB in IntervalMap::erase before first range. (#248813)

If KS preceded every range in a non-empty map then upper_bound returned
begin(), and erase called std::prev on it. Bail out in that case
instead. This check subsumes the existing empty-map check, which is
removed.

The new unit test detects the original bug when built with
AddressSanitizer (stack-buffer-overflow).
DeltaFile
+12-0orc-rt/test/unit/support/IntervalMapTest.cpp
+5-1orc-rt/include/orc-rt/support/IntervalMap.h
+17-12 files

OPNSense/core 7bc8485 — src/opnsense/mvc/app/controllers/OPNsense/OpenVPN/Api ExportController.php

VPN: OpenVPN: Client Export - let a read-only user download when the presets are unchanged (#11392)

(cherry picked from commit 7682aafb0b7cd4146e4ee20cf4da8eb17575b973)
DeltaFile
+1-1src/opnsense/mvc/app/controllers/OPNsense/OpenVPN/Api/ExportController.php
+1-11 files

OPNSense/core 7682aaf — src/opnsense/mvc/app/controllers/OPNsense/OpenVPN/Api ExportController.php

VPN: OpenVPN: Client Export - let a read-only user download when the presets are unchanged (#11392)
DeltaFile
+1-1src/opnsense/mvc/app/controllers/OPNsense/OpenVPN/Api/ExportController.php
+1-11 files