Security fixes from the audit:
- V8 caam: the HMAC raw key (up to 128 bytes) was copied into a buffer
of the split key's size (32 bytes for MD5, 48 for SHA-1), reachable
through /dev/crypto. The buffer now fits both. caam_dma_free() zeroes
every buffer itself, which also fixes the QI path clearing twice the
split key buffer's size at each session teardown.
- V6 mwifiex: the uap_passphrase sysctl, readable by every local user,
is write-only; mwifiex_uap says to keep the passphrase in a 0600
/etc/rc.conf.d/mwifiex_uap.
- V9 dpaa_wifi: hardware frame lengths were copied into a 4 KB cluster
unchecked, and scatter/gather frames read as one buffer. One helper
now takes only contiguous frames within the buffer, at any length.
- V11: cdx frees IPsec keys and shared descriptors with zfree(); fmc's
state file moves from /tmp (symlink attack by any local user) to
/var/run.
- The firmware object pcieuart9098_combo_v1.bin.fwo is a build output
and no longer tracked.
caam, ina2xx and lp5812 were ported from Linux and relabelled BSD-2 by
the vendor (8f9b3bf, 84e318c, ac81eea). They are GPL-2.0-only again,
with the Linux sources' copyright holders; LICENSING.md lists them.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- caam: the bus activate, deactivate and release resource methods take
no type and rid in FreeBSD 15.
- cdx: sys/cdefs.h defines __maybe_unused now; define it only if missing.
- 26.1 is end of life and no longer built: remove patches/26.1 and
make-26.1.conf, default to 26.7 and FreeBSD 15.1 throughout, and move
the build examples in README.md and RELEASE.md to 26.7.9. The 26.1
tree on the mirror stays, for gateways that still have to upgrade.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
drivers/mwifiex/Makefile links the vendor mlan sources and the firmware
from _vendor/ into its directory when building, and removes them on clean.
Those links were committed by accident (absolute /usr/deps/_vendor paths,
dangling everywhere else), and Portainer refuses to clone a repository
that contains symlinks. They are ignored now; the modules build the same.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The FreeBSD moal shim layer links directly against NXP's GPL-2.0
mlan core (~127K lines). Relicense the 4 moal files and Makefile
from BSD-2-Clause to GPL-2.0 and add NXP copyright, consistent
with the mlan source they are compiled against.
Add CAAM_ prefix to all 253 descriptor command constants (CMD_* ->
CAAM_CMD_*, HDR_* -> CAAM_HDR_*, KEY_* -> CAAM_KEY_*, OP_ALG_* ->
CAAM_OP_ALG_*, LDST_*, FIFOLD_*, FIFOST_*, JUMP_*, MATH_*, MOVE_*)
to differentiate from Linux drivers/crypto/caam/desc.h naming.
Replace all 30+ Linux references in comments with NXP SEC reference
manual citations. Change "ported from" and "matches exactly" language
to hardware-specification references.
No functional changes — purely mechanical renames and comment rewording
for licensing clarity. Build verified clean with -Werror.
Rename register macros (INA2XX_* -> INA_REG_*), config struct
(ina2xx_config -> ina_chip_params with new field names), and LSB
calculation variable to remove 1:1 naming correspondence with the
Linux hwmon/ina2xx.c GPL driver. Change "Based on" to "Inspired by"
and remove explicit Linux function reference from comments.
No functional changes — purely mechanical renames for licensing clarity.
The driver attaches via config_intrhook, which runs after the kernel's
inittodr() has already failed with ENXIO. Re-invoke inittodr() after
clock_register_flags() so the system time is set from the RTC.
The dtsec driver now owns the SFP GPIO pins (mod-def0, LOS,
TX-disable). FreeBSD gpiobus only allows one consumer per pin,
so sfpled can no longer acquire them. Remove all SFP GPIO and
I2C EEPROM access from sfpled — derive module presence and link
state purely from the dtsec ifnet link state:
LINK_STATE_UNKNOWN → no module → LEDs off
LINK_STATE_DOWN → module present, no link → orange solid
LINK_STATE_UP → link up → green on, orange blinks on traffic
Replace custom /build/ layout with standard OPNsense /usr/ hierarchy.
Add DEPSDIR variable to GATEWAY.conf. Make git pull non-fatal for NFS
setups. Update all Makefile paths, symlinks, and README instructions.
- Pass SYSROOT and KSRCDIR from top-level Makefile to all Makefile.cross
invocations so SRCTOP override flows through to sub-makes
- Add .ORDER directives to prevent "make -j clean all" race where clean
deletes .ko files while modules target tries to copy them
- Remove redundant dist target (modules/userspace already copy to dist/)
- Fix package target depending on clean (raced with its own dist dep)
- Make IMAGESDIR/SETSDIR overridable with ?=
- Update mk-kernel-img.sh defaults from legacy /mnt/vision paths
- Replace MONO-GATEWAY with GATEWAY in all Makefile comments
- Remove stale patches/ from README directory tree
- Document SRCTOP override and make image shortcut in README
- Fix WPA3-SAE authentication failure by injecting custom RSN IE with
PMF capability bits (MFPC/MFPR) via MLAN_OID_MISC_CUSTOM_IE. Without
PMF advertised in beacons, WPA3 clients reject the connection.
- Use PROTOCOL_WPA2 + KEY_MGMT_SAE instead of PROTOCOL_WPA3_SAE so
mlan TLV builder emits AKMP/cipher/passphrase TLVs correctly.
- Add SAE password field population for WPA3 and WPA2+WPA3 modes.
- Add UAP sysctls: country code, beacon interval, DTIM period.
- Add mwifiex_uap rc.d service script for rc.conf-based AP config.
- Load dpaa_wifi module before mwifiex in early syshook script.
- Fix CMM route offload logging thousands of errors for loopback input
device — skip lo0 in cmm_fe_route_register() since CDX can't use it.
- Remove uninformative debug printk from CDX control_wifi.c.
dpaa_wifi: Add per-VAP distribution FQs (64 per VAP, hash across CPUs)
for CDX→WiFi download, with fallback to OH default FQ. Add SG inject
path for oversized frames. Add TX backpressure via BMan pool threshold.
Add sysctl tree (dev.dpaa_wifi.*) for runtime stats and tuning. Switch
RX paths to copy-then-free model to prevent dtsec BMan pool drain.
Add enqueue retry loop and per-VAP/global counters.
mwifiex: Route debug prints through log() instead of printf() so they
go to syslog, not console. MFATAL still goes to console, MERROR to
syslog, everything else suppressed unless dev.mwifiex.0.debug=1.
Add TX backpressure (IFF_DRV_OACTIVE) with configurable watermark.
Fix UAP 5 GHz rate table, HT capabilities, and MLAN_STATUS_PENDING
reschedule in main_task.
cdx: Use per-VAP distribution FQs for WiFi TX routing with OH fallback.
Add dist fallback callback for dtsec-BPID frames on OH port dist FQs.
pf_notify: Keep PF state alive while CDX offloads the flow by updating
expire on counter sync, preventing premature state purge.
- Miss action fixup: Ethernet/PPPoE tables → PLCR policer (rate-limits
exception traffic), all other tables → KG scheme with CC_EN (re-enters
CC tree). Replaces previous ENQ_FRAME-to-default-FQID approach.
- Distribution FQRs now use per-CPU SW portal channels instead of pool
channel, preventing TCP reordering on miss path.
- BMan buffer refill: cdx_dist_fq_rx_callback now calls
dtsec_rm_pool_rx_refill_bpid() and frees buffers via
dtsec_rm_buf_free_external() (per-port UMA zone) instead of direct
bman_put_buffer().
- Clean kldunload: cdx_destroy_port_fqs() retires all dist FQRs,
qman_portal_quiesce() drains in-flight portal polls.
FM_PORT_DeletePCD() called on all dtsec RX + OH ports before hash
table deletion, preventing FMan PCD exceptions after unload.