OPNSense/src 49721cdlib/libpfctl libpfctl.c, sbin/pfctl pf_print_state.c

pf: rule label patch was merged from a wrong version

PR: https://forum.opnsense.org/index.php?topic=52351.0
DeltaFile
+1-1sbin/pfctl/pf_print_state.c
+1-1lib/libpfctl/libpfctl.c
+2-22 files

OPNSense/src af06394lib/libifconfig libifconfig_internal.c libifconfig.c, sys/net rtsock.c

Revert "sys/socket.h: Fix AF_MAX"

This reverts commit 33a943ef85e73fd1c881cd3cf49471a6acf4dd6d.

PR: https://forum.opnsense.org/index.php?topic=52691.0

Causes reports of kernel panics the likes of:

 Fatal trap 12: page fault while in kernel mode
 cpuid = 1; apic id = 01
 fault virtual address  = 0x218361fa00
 fault code             = supervisor read data, page not present
 instruction pointer    = 0x20:0xffffffff80c4d7a7
 stack pointer          = 0x28:0xfffffe00d3332ab0
 frame pointer          = 0x28:0xfffffe00d3332ab0
 code segment           = base 0x0, limit 0xfffff, type 0x1b
                        = DPL 0, pres 1, long 1, def32 0, gran 1
 processor eflags       = interrupt enabled, resume, IOPL = 0
 current process                = 0 (netlink_socket (PID)

    [29 lines not shown]
DeltaFile
+3-3sys/netlink/route/rt.c
+1-3sys/sys/socket.h
+2-2sys/net/rtsock.c
+2-2sys/net/route/route_helpers.c
+2-2lib/libifconfig/libifconfig.c
+1-1lib/libifconfig/libifconfig_internal.c
+11-133 files not shown
+14-169 files

OPNSense/src 7067fa3sys/netpfil/pf pf.c

Revert "pf: mark non-port packets to require IP checksumming #312"

This reverts commit f331124d5c4a0b772e299901354360529b5cf4d6.
DeltaFile
+1-4sys/netpfil/pf/pf.c
+1-41 files

OPNSense/src b3c4c1asys/dev/igc if_igc.c

igc: additionally disable PCIe ASPM for I226

Always disable PCIe ASPM for i226 type cards to improve stability
and wire sysctl calls to iflib_request_reset instead of igc_if_init
as this will stall the drivers RX path.
DeltaFile
+33-3sys/dev/igc/if_igc.c
+33-31 files

OPNSense/src 41c9ba3sys/dev/igc igc_base.h igc_base.c

igc: Disable PCIe L1.2 on I225

I225 devices can incorrectly enter L1 substates while CLKREQ# is
asserted, both while idle and in D3.  Disable ASPM and PCI-PM L1.2 on
I225 to prevent the resulting packet loss.

Keep the I226 workaround ASPM-only because it addresses a separate
traffic exit latency observation.

PR:             265714

(cherry picked from commit 4a28d390f5fbae2483e88805559881b04ccf9a80)
DeltaFile
+22-20sys/dev/igc/if_igc.c
+29-0sys/dev/igc/igc_base.c
+1-0sys/dev/igc/igc_base.h
+52-203 files

OPNSense/src c7231b5sys/dev/igc igc_base.c

igc: Apply ASPM L1.2 workaround to all I226 devices

Classify I226_LMVP and I226_BLANK_NVM as I226 silicon so they
receive the I226-specific ASPM L1.2 workaround.

PR:             279245
Pull-Request:   https://github.com/freebsd/freebsd-src/pull/2318

(cherry picked from commit cecb0f45cb83349c60514da38fddce83ad042468)
DeltaFile
+5-0sys/dev/igc/igc_base.c
+5-01 files

OPNSense/src 664705bsys/dev/igc igc_base.h igc_base.c

igc: Disable ASPM L1.2 on I226 to prevent RX stalls

I226 parts advertise support for the PCIe L1.2 link substate, but a
hardware erratum makes the exit latency from that low-power state
longer than the packet buffer can absorb under load. This stalls the
inbound packet stream. Disabling ASPM system-wide (BIOS or OS ASPM
policy) does not fix it. The L1.2 enable bit must be cleared directly
in the device's own PCIe L1 PM extended capability.

Add igc_is_device_id_i226() to identify affected parts and
igc_disable_broken_aspm_l1_2() to clear the ASPM L1.2 enable bit
on attach and after resume, since PCIe config space can be
reset across a suspend/resume cycle.

Adapted from the Linux igc driver:

  0325143b59c6 igc: disable L1.2 PCI-E link substate to avoid
               performance issue
  1468c1f97cf3 igc: fix disabling L1.2 PCI-E link substate on I226

    [9 lines not shown]
DeltaFile
+44-0sys/dev/igc/if_igc.c
+21-0sys/dev/igc/igc_base.c
+1-0sys/dev/igc/igc_base.h
+66-03 files

OPNSense/src 7ce4c58sys/dev/pci pcireg.h

pci: Add L1 PM definitions

Add register/bit definitions for the L1 PM substates capability
(PCIZ_L1PM) to pcireg.h.

Signed-off-by: Michael Adler <madler at tapil.com>

Pull-Request:   https://github.com/freebsd/freebsd-src/pull/2318

(cherry picked from commit 04f8a6aeeba5cbaa48be7134765ee49d5b1b9857)
DeltaFile
+14-0sys/dev/pci/pcireg.h
+14-01 files

OPNSense/src 680be42. UPDATING, sys/conf newvers.sh

Add UPDATING entries and bump version

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

OPNSense/src 693c51dsys/kern imgact_elf.c

coredump: Don't assume that the number of ELF segments is consistent

In an ELF coredump, each dumped vm_map_entry is represented by a
segment.  __elfN(coredump) first computes the number of segments by
looping over the vm_map entries (in each_dumpable_segment()), then
allocates a buffer to hold the ELF header and program headers, then
loops over the entries again to populate the program headers.

each_dumpable_segment() holds the vm_map read lock, but that lock is
dropped between the two calls.  If the map is shared with another
process, via rfork(), then the map can change.  cb_put_phdr() did not
account for this, and so could write out of bounds.

Add a check to prevent this; simply do not write out excess segments.

Approved by:    so
Security:       FreeBSD-SA-26:55.elf
Security:       CVE-2026-58088
Reported by:    Maik Muench of Secfault Security

    [3 lines not shown]
DeltaFile
+19-3sys/kern/imgact_elf.c
+19-31 files

OPNSense/src 0e492bcsys/kern sysv_sem.c

sysvsem: Fix a TOCTOU race in semctl({GET,SET}ALL)

These commands take a snapshot of the size of a semaphore set, then drop
the lock and malloc an appropriately sized array before reacquiring the
lock.  A comment explains why this is (probably) safe.  Unfortunately,
it's wrong; it is indeed possible for a malicious userspace to create
and destroy 2^{15} sets in the window where the lock is dropped.  This
race can lead to out-of-bounds reads and writes, and that can be
exploited to elevate privileges.

Replace the assertions with runtime checks.

Approved by:    so
Security:       FreeBSD-SA-26:54.sysvsem
Security:       CVE-2026-58087
Reported by:    Maik Muench of Secfault Security
Reviewed by:    kib
Sponsored by:   The FreeBSD Foundation
Differential Revision:  https://reviews.freebsd.org/D58421
DeltaFile
+16-20sys/kern/sysv_sem.c
+16-201 files

OPNSense/src bf65e6detc/mtree BSD.tests.dist, tests/sys/net Makefile

wg(4): Add a test that the driver handles a decryption failure

The test uses a fail point to inject a decryption error in OCF while
sending a ping across the tunnel.  The driver should then fail to
respond to the ping and increment the input error counter on the
interface.

Approved by:    so
Security:       FreeBSD-SA-26:52.if_wg
Security:       CVE-2026-58085
Reviewed by:    markj
Sponsored by:   Chelsio Communications
DeltaFile
+111-0tests/sys/net/wg/if_wg_nojail.sh
+10-0tests/sys/net/wg/Makefile
+2-0etc/mtree/BSD.tests.dist
+1-0tests/sys/net/Makefile
+124-04 files

OPNSense/src ffde0b3sys/dev/wg wg_crypto.c

wg(4): Check for crypto operation errors

In particular, handle authentication errors due to bad MACs when
decrypting packets.

Since the current dispatch code assumes synchronous OCF sessions by
design, explicitly reject any created OCF session that is not
synchronous.  Software sessions are always synchronous in practice, so
this should be a nop.

Approved by:    so
Security:       FreeBSD-SA-26:52.if_wg
Security:       CVE-2026-58085
Reviewed by:    markj
Sponsored by:   Chelsio Communications
DeltaFile
+10-1sys/dev/wg/wg_crypto.c
+10-11 files

OPNSense/src 10ab0e4sys/opencrypto crypto.c

OCF: Add a fail point to inject EBADMSG decryption errors

Approved by:    so
Security:       FreeBSD-SA-26:52.if_wg
Security:       CVE-2026-58085
Reviewed by:    markj
Sponsored by:   Chelsio Communications
DeltaFile
+16-0sys/opencrypto/crypto.c
+16-01 files

OPNSense/src 0ae5cebcontrib/tzdata theory.html europe

contrib/tzdata: import tzdata 2026c

Changes: https://github.com/eggert/tz/blob/2026c/NEWS

Approved by:    so
Security:       FreeBSD-EN-26:18.tzdata

(cherry picked from commit 665bb2d9a440d33e2ec2f9151e45b8cda93433ae)
(cherry picked from commit 819af80de8e8854f5767c20d03cb7362624b0085)
DeltaFile
+32-159contrib/tzdata/africa
+107-14contrib/tzdata/northamerica
+71-8contrib/tzdata/NEWS
+17-28contrib/tzdata/Makefile
+14-7contrib/tzdata/europe
+9-9contrib/tzdata/theory.html
+250-2258 files not shown
+272-24414 files

OPNSense/src 94e4581. UPDATING

Add a missing UPDATING entry

Approved by:    so
DeltaFile
+2-0UPDATING
+2-01 files

OPNSense/src f331124sys/netpfil/pf pf.c

pf: mark non-port packets to require IP checksumming #312

Instead of recomputing on the spot let's try to use this instead.
DeltaFile
+4-1sys/netpfil/pf/pf.c
+4-11 files

OPNSense/src dd064f2sys/dev/pci pcireg.h

pci: Add L1 PM definitions

Add register/bit definitions for the L1 PM substates capability
(PCIZ_L1PM) to pcireg.h.

Signed-off-by: Michael Adler <madler at tapil.com>

Pull-Request:   https://github.com/freebsd/freebsd-src/pull/2318

(cherry picked from commit 04f8a6aeeba5cbaa48be7134765ee49d5b1b9857)
DeltaFile
+14-0sys/dev/pci/pcireg.h
+14-01 files

OPNSense/src d9d7a8ausr.sbin/daemon daemon.c

Revert "daemon: replace memchr with memrchr"

This reverts commit 5745a5841413da5c2e002ba65c60d7b9d594bc52.
DeltaFile
+4-8usr.sbin/daemon/daemon.c
+4-81 files

OPNSense/src 5ae8c89sys/netipsec ipsec.c

ipsec: Fix a lock leak in ipsec_chkreplay()

Reported by:    Chris Jarrett-Davies of the OpenAI Codex Security Team
Reviewed by:    pouria, kp
Fixes:          0361f165f219 ("ipsec: replace SECASVAR  mtx by rmlock")
MFC after:      1 week
Sponsored by:   The FreeBSD Foundation
Differential Revision:  https://reviews.freebsd.org/D58521

(cherry picked from commit b6823a973737f06ea6cf0ea5a3083383af2ba5a4)
DeltaFile
+3-1sys/netipsec/ipsec.c
+3-11 files

OPNSense/src 72cec63usr.sbin/bsdinstall/scripts netconfig

bsdinstall/netconfig: use a better heuristic for wlan dev desc

For devices like the rtw88, they will show up in `ifconfig -l` as
rtw880, rtw881, etc. We want to query the rtw88.0 and rtw88.1 sysctl
respectively, not rtw.880.

Chances are that there aren't more than 9 wlan devices using the same
driver. Use a better heuristic to get the device description.

Reviewed by:    bz
MFC after:      3 days
Sponsored by:   The FreeBSD Foundation

(cherry picked from commit c4b0b13cadac46b7c2cdfeeedeffa596c62568fa)
DeltaFile
+1-1usr.sbin/bsdinstall/scripts/netconfig
+1-11 files

OPNSense/src dae4735sys/netinet6 nd6_rtr.c

netinet6/nd6: Sprinkle missing prefix refcounting

When we drop the prefix lock to call nd6_prefix_offlink() or
nd6_prefix_onlink(), make sure to keep the correpsonding prefix
structure alive.  It is possible for a concurrent nd6_timer() to expire
the prefix while the lock is dropped.

Reported by:    Maik Muench of Secfault Security
Reviewed by:    pouria, zlei
MFC after:      1 week
Sponsored by:   The FreeBSD Foundation
Differential Revision:  https://reviews.freebsd.org/D58423

(cherry picked from commit 76ca489e0f147e9bd90408ea562087e84ed6f479)
DeltaFile
+4-0sys/netinet6/nd6_rtr.c
+4-01 files

OPNSense/src 0c4c75csys/netinet/libalias alias_db.c

libalias: Serialize updates to the global instance list

libalias maintains a global list of all libalias handles.  The list was
updated without any locking, but nothing prevents updates from running
concurrently.

MFC after:      1 week

(cherry picked from commit 2ff705f32a2033201a8f83f1ade5ddbc0460387d)
DeltaFile
+17-0sys/netinet/libalias/alias_db.c
+17-01 files

OPNSense/src ae2617bsbin/ipf/ippool ippool.5, sys/netinet/libalias libalias.3

man: Fix RFC 1918 network prefix lengths

According to RFC 1918, the following IP prefixes are reserved for
private internets:

    10.0.0.0/8
    172.16.0.0/12
    192.168.0.0/16

This PR fixes the prefix lengths in references to private networks
("RFC 1918 networks", "the standard private IP address ranges").
The changes are limited to man pages.

Signed-off-by:  Yusuke Ichiki <public at yusuke.pub>
Pull Request:   https://github.com/freebsd/freebsd-src/pull/2328

(cherry picked from commit 1403ca10189c47ad1de3915eeb030deddc114685)
DeltaFile
+2-2sys/netinet/libalias/libalias.3
+1-1sbin/ipf/ippool/ippool.5
+3-32 files

OPNSense/src 9f4ef3dsys/net pfvar.h

pf: switch to getmicro(up)time()

It is reported that micro(up)time() performs poorly in certain
virtualisation scenarios. Absolute accuracy isn't required here, so
switch to the slightly less accurate (as per the man page) get-variants.

PR:             295043
MFC after:      3 weeks
Sponsored by:   Rubicon Communications, LLC ("Netgate")

(cherry picked from commit e4130ac13d2fe9c17b8f8e86d39a7b5223fe7b79)
DeltaFile
+2-2sys/net/pfvar.h
+2-21 files

OPNSense/src 0652cf1sys/net if_ovpn.c

if_ovpn: Fix memory leak in VNET during unload

Unloading if_ovpn while it's in use by other vnets causes
memory leaks and panics.
Fix this by reverting VNET_SYSUNINIT and adjusting the SI_SUB
initialization order.

Reviewed by:    markj
MFC after:      1 week
Differential Revision: https://reviews.freebsd.org/D54175

(cherry picked from commit bf142ea4760bd4391092d9cc0038a0870cf7e0b2)
DeltaFile
+12-8sys/net/if_ovpn.c
+12-81 files

OPNSense/src fc44dd1sys/dev/netmap netmap_bdg.c

netmap: Don't assume that user-provided strings are nul-terminated

MFC after:      1 week
Sponsored by:   The FreeBSD Foundation

(cherry picked from commit e1ab35148dd425340a88a2acaf10b972cb119f8f)
DeltaFile
+4-0sys/dev/netmap/netmap_bdg.c
+4-01 files

OPNSense/src 4a1cb71lib/libpfctl libpfctl.c

pf: Add missing PF_TS_CNT Netlink attribute

There is no parser entry for PF_TS_CNT, therefore PF_TS_REFCNT
is written starting at pfrts_cnt, causing the refcount
to be wrongly shown in the "Addresses:" section of print_tstats().

Issue: https://github.com/opnsense/src/issues/300
DeltaFile
+2-1lib/libpfctl/libpfctl.c
+2-11 files

OPNSense/src f23370bsys/dev/igc if_igc.c

igc: additionally disable PCIe ASPM for I226

Always disable PCIe ASPM for i226 type cards to improve stability
and wire sysctl calls to iflib_request_reset instead of igc_if_init
as this will stall the drivers RX path.
DeltaFile
+33-3sys/dev/igc/if_igc.c
+33-31 files

OPNSense/src 4742e7esys/dev/igc igc_base.h igc_base.c

igc: Disable PCIe L1.2 on I225

I225 devices can incorrectly enter L1 substates while CLKREQ# is
asserted, both while idle and in D3.  Disable ASPM and PCI-PM L1.2 on
I225 to prevent the resulting packet loss.

Keep the I226 workaround ASPM-only because it addresses a separate
traffic exit latency observation.

PR:             265714

(cherry picked from commit 4a28d390f5fbae2483e88805559881b04ccf9a80)
DeltaFile
+22-20sys/dev/igc/if_igc.c
+29-0sys/dev/igc/igc_base.c
+1-0sys/dev/igc/igc_base.h
+52-203 files