HardenedBSD/src e6fee05 — sys/cam/mmc mmc_da.c, sys/dev/mmc/host dwmmc_rockchip.c dwmmc.c

Merge remote-tracking branch 'rad/hardened/current/master' into hardened/current/pledge
DeltaFile
+370-24sys/dev/mmc/host/dwmmc.c
+228-7sys/dev/mmc/host/dwmmc_rockchip.c
+134-26sys/cam/mmc/mmc_da.c
+36-123sys/net/iflib.c
+125-13sys/dev/sdhci/sdhci.c
+101-3sys/dev/sdhci/sdhci_fdt_rockchip.c
+994-19630 files not shown
+1,314-27036 files

HardenedBSD/src 8c299a2 — sys/cam/mmc mmc_da.c, sys/dev/mmc/host dwmmc_rockchip.c dwmmc.c

Merge branch 'freebsd/current/main' into hardened/current/master
DeltaFile
+370-24sys/dev/mmc/host/dwmmc.c
+228-7sys/dev/mmc/host/dwmmc_rockchip.c
+134-26sys/cam/mmc/mmc_da.c
+36-123sys/net/iflib.c
+125-13sys/dev/sdhci/sdhci.c
+101-3sys/dev/sdhci/sdhci_fdt_rockchip.c
+994-19630 files not shown
+1,314-27036 files

HardenedBSD/src 884a32e — contrib/tzcode tz-link.html zic.c, contrib/unbound/util/data msgparse.c

Merge branch 'freebsd/15-stable/main' into hardened/15-stable/main
DeltaFile
+130-17contrib/tzcode/NEWS
+50-23contrib/tzcode/localtime.c
+11-59contrib/tzcode/zic.c
+25-39contrib/tzcode/tz-link.html
+36-26lib/libfetch/http.c
+40-21contrib/unbound/util/data/msgparse.c
+292-18561 files not shown
+853-42967 files

HardenedBSD/src 843cb77 — sys/dev/etherswitch/e6000sw e6000sw.c

e6000sw: Write the value, not the register, in Clause 45 writes

e6000sw_write_xmdio() loaded the Clause 45 register address into the
SMI PHY data register a second time, where the value to write belongs,
so every Clause 45 write stored the register address.

Its only caller, e6000sw_serdes_power(), runs at attach for ports 9 and
10 of the 88E6190 and 88E6190X to power one SERDES interface up and the
other down.  It wrote 0x2000 to the SGMII control register and 0x1000
to the 10GBASE-R PCS control register instead, so neither interface was
powered down and the rest of each register was overwritten.

Fixes:          9aba06377d26 ("Add support for the Marvell 88E6190 11 ports switch.")
Sponsored by:   Rubicon Communications, LLC ("Netgate")
DeltaFile
+1-1sys/dev/etherswitch/e6000sw/e6000sw.c
+1-11 files

HardenedBSD/src 4b73245 — sys/dev/iavf if_iavf_iflib.c, sys/dev/ice if_ice_iflib.c

iflib: Use a single tx dma map

The need for a separate map for TSO and non-TSO seems to have arisen from
a misunderstanding about the DMA requirements for Intel drivers like
ice/ixl/iavf. Specifically, this Intel hardware has a quirk where no
more than N (=8) segs can be DMA'ed per packet on the wire. This limit
was enforced using a DMA map with a low segment limit for non-TSO and a
driver specific check for TSO. This led to a *lot* of complexity in
iflib (~80 extra lines of code that this change removes) when the
limit can simply be enforced via the existing EFBIG mechanisms.

This change adds a new flag, IFLIB_SPARSE_TX, that drivers for hardware
with this quirk must set.  When set, it causes non-TSO sends that
exceed isc_tx_nsegment to be treated as if bus_dmamap_load_mbuf_sg()
had returned EFBIG.

Due to the API/KABI change, I've bumped the FreeBSD version as well.

Note kgalazka suggested the flag, rather than a more awkward

    [5 lines not shown]
DeltaFile
+36-123sys/net/iflib.c
+4-1sys/net/iflib.h
+2-2sys/dev/ice/if_ice_iflib.c
+2-1sys/dev/ixl/if_ixl.c
+2-1sys/dev/iavf/if_iavf_iflib.c
+1-1sys/sys/param.h
+47-1296 files

HardenedBSD/src 2734bbb — lib/libthr/thread thr_private.h

libthr: Create landing pad in thr_once in C++ exception

In _thr_once, if init_routine fails with exception, the stack allocate
__cup will become invalid when unwinder walk back and free the stack of
thr_once. This cause cleanup linked list be dangling. In here, we give
the cleanup function a landing pad so that we td can correctly point
to previous cleanup function.

Reviewed by:    kib
MFC after:      2 weeks
Differential Revision: https://reviews.freebsd.org/D61212
DeltaFile
+15-1lib/libthr/thread/thr_private.h
+15-11 files

HardenedBSD/src 71937d8 — lib/libthr/thread thr_private.h

libthr: Predict libthr is initialized in _thr_check_init

_thr_check_init() is called on hot paths such as pthread_once(), and
the uninitialized case can only happen once. Mark it with
__predict_false so the compiler lays out the initialized case as the
fall-through path.

Reviewed by:    kib
MFC after:      2 weeks
Differential Revision: https://reviews.freebsd.org/D61213
DeltaFile
+1-1lib/libthr/thread/thr_private.h
+1-11 files

HardenedBSD/src 1e1ce1f — lib/libthr/thread thr_once.c

libthr: Fix whitespace in thr_once.c

Remove trailing whitespace and replace space indentation with a tab.

No functional change.
DeltaFile
+2-2lib/libthr/thread/thr_once.c
+2-21 files

HardenedBSD/src e3eaff9 — sbin/hastd hastd.c

hastd: Remove pidfile on exit

Make hastd remove its pidfile before exit after catching a signal or a
stop control message, not just on failure to start.

MFC after:      1 week
Reviewed by:    ngie
Differential Revision:  https://reviews.freebsd.org/D60192

(cherry picked from commit 3f2f6bb8f7b562276bffd04a9ae4c05a351b4435)
DeltaFile
+1-0sbin/hastd/hastd.c
+1-01 files

HardenedBSD/src 55b061a — sbin/hastctl hastctl.c, sbin/hastd hast.h hastd.c

hastd: Add a stop control message

Add a stop control message which causes hastd to clean up and terminate.

Reviewed by:    kevans
Differential Revision:  https://reviews.freebsd.org/D59344

(cherry picked from commit 7dfadd78ba3c4608c3631fb5008de77ea1e29e88)
DeltaFile
+17-0sbin/hastd/control.c
+14-0sbin/hastctl/hastctl.c
+8-4sbin/hastd/hastd.c
+1-0sbin/hastd/hast.h
+40-44 files

HardenedBSD/src 5ed9f98 — share/man/man4 mrsas.4

mrsas(4): Add missing Xr to mrsasutil(8)
DeltaFile
+2-1share/man/man4/mrsas.4
+2-11 files

HardenedBSD/src ae65253 — sys/dev/ice if_ice_iflib.c ice_ddp_common.c

ice(4): Do not leave device non-functional if Tx scheduler config fails

The ice_cfg_tx_topo function attempts to apply Tx scheduler topology
configuration based on NVM parameters, selecting either a 5 or 9 layer
topology. As part of this flow, the driver acquires the "Global Configuration Lock",
which is a hardware resource associated with programming the DDP package
to the device. This "lock" is implemented by firmware as a way to
guarantee that only one PF can program the DDP for a device. Unlike a
traditional lock, once a PF has acquired this lock, no other PF will be
able to acquire it again (including that PF) until a CORER of the device.
However, if configuration of the Tx topology fails, (i.e.
ice_get_set_tx_topo returns an error code), the driver exits
ice_cfg_tx_topo() immediately, and fails to trigger CORER.
While the global configuration lock is held, the firmware rejects most
AdminQ commands, as it is waiting for the DDP package download (or Tx
scheduler topology programming) to occur.
Refactor ice_cfg_tx_topo() to always trigger a CORER after acquiring the
global lock, regardless of success or failure of the topology
configuration.

    [15 lines not shown]
DeltaFile
+21-11sys/dev/ice/ice_ddp_common.c
+7-10sys/dev/ice/if_ice_iflib.c
+28-212 files

HardenedBSD/src b831d9a — sbin/hastd proto_uds.c proto_tcp.c

hastd: Use void pointers for opaque data

Use void, not char, for pointers to opaque data in our send and receive
functions.

Sponsored by:   Klara, Inc.
Reviewed by:    allanjude
Differential Revision:  https://reviews.freebsd.org/D60729

(cherry picked from commit a5e6bee5a0bff9e9c12037e0b2c76c4f2ab5e046)

hastd: Fix build failure

Fixes:          a5e6bee5a0bf ("hastd: Use void pointers for opaque data")
Reported by:    garga@

(cherry picked from commit dff56e8118985248678e1a6916cdefd708a9d85f)
DeltaFile
+4-4sbin/hastd/proto_impl.h
+3-3sbin/hastd/proto_common.c
+2-2sbin/hastd/proto_uds.c
+2-2sbin/hastd/proto_tcp.c
+2-2sbin/hastd/proto_socketpair.c
+13-135 files

HardenedBSD/src a1e5a9a — contrib/openbsm/bin/auditd audit_warn.c, contrib/openbsm/man audit_warn.5

auditd: Support logging directly to syslog

Every tenth call to auditwarnlog(), check that the audit_warn(5) script
exists and is executable by us.  If it is, execute it as previously;
otherwise, fall back to calling syslog(3) directly.

Additionally, if we choose to use the script and fail, also log the
original message to syslogd, not just the fact that we failed to log.

We could record the result of trying to execute the script, but that
would require pausing while it runs (or at least until the execve(2)
call has completed).

Retesting every tenth call is a little clunky but avoids having to
restart or signal auditd(8) to force it to notice a change in
availability, or adding a command-line option and / or modifying the
audit_control(5) syntax to let the user express a preference.

MFC after:      1 week

    [6 lines not shown]
DeltaFile
+38-1contrib/openbsm/bin/auditd/audit_warn.c
+7-1contrib/openbsm/man/audit_warn.5
+45-22 files

HardenedBSD/src 09db65a — contrib/openbsm/bin/auditdistd proto_tls.c proto_socketpair.c

auditdistd: Use fixed-length protocol names

All communication between auditdistd senders and receivers and
internally between auditdistd and its worker children passes through the
same pair of send / receive functions.  The receive function uses
recv(2) with the MSG_WAITALL flag, which in theory means we should never
get a short read.  However, when handing off a socket to a worker child,
we also pass a variable-length string identifying the type of socket
we're passing, and reading this string relies on a short read.  This
used to work because the arrival of the descriptor would interrupt the
recv(2) call, but this bug was fixed when the AF_UNIX code was rewritten
a while ago and auditdistd has been broken ever since.

Fixing the length of the protocol name to four characters including the
terminating null solves the short-read bug by never requiring a short
read (nothing else in auditdistd requires one).

PR:             296107
MFC after:      1 week

    [4 lines not shown]
DeltaFile
+4-9contrib/openbsm/bin/auditdistd/proto.c
+1-1contrib/openbsm/bin/auditdistd/proto_tls.c
+1-1contrib/openbsm/bin/auditdistd/proto_socketpair.c
+1-1contrib/openbsm/bin/auditdistd/proto_impl.h
+7-124 files

HardenedBSD/src 0a33638 — contrib/openbsm/etc audit_warn, contrib/openbsm/man audit_warn.5

audit_warn: Avoid pointless fork and path search

While here, document what the script actually does, not what it once did
on a project branch somewhere that was never merged.

MFC after:      1 week
Sponsored by:   Klara, Inc.
Sponsored by:   Qualys, Inc.
Reviewed by:    allanjude
Differential Revision:  https://reviews.freebsd.org/D60171

(cherry picked from commit 173268f3d5ede5f55a25f684d4c8c4c43749fde7)
DeltaFile
+5-6contrib/openbsm/man/audit_warn.5
+1-2contrib/openbsm/etc/audit_warn
+6-82 files

HardenedBSD/src 09c3a0f — contrib/openbsm/bin/auditdistd proto_tls.c

auditdistd: Avoid deprecated OpenSSL APIs

SSL_use_RSAPrivateKey_file() was deprecated in OpenSSL 3.0.  Use the
more generic SSL_use_PrivateKey_file() instead.

Sponsored by:   Klara, Inc.
Sponsored by:   Qualys, Inc.
Reviewed by:    emaste
Differential Revision:  https://reviews.freebsd.org/D60899

(cherry picked from commit 8133230d7e944d12108f89a15d6f4e468764dff9)
DeltaFile
+2-2contrib/openbsm/bin/auditdistd/proto_tls.c
+2-21 files

HardenedBSD/src 7a25d6d — lib/libfetch http.c

libfetch: Plug leak in 304 Not Modified case

When we get a 304 Not Modified response, we need to go through the error
path to properly free any resources we've allocated instead of just
returning NULL directly.

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

(cherry picked from commit b212f565fb1a34fdcd2f5c9530164ff4718a1a9f)
DeltaFile
+1-1lib/libfetch/http.c
+1-11 files

HardenedBSD/src 72ebe32 — contrib/openbsm/bin/auditdistd proto_uds.c proto_tls.c

auditdistd: Use void pointers for opaque data

Use void, not char, for pointers to opaque data in our send and receive
functions.

Sponsored by:   Klara, Inc.
Sponsored by:   Qualys, Inc.
Reviewed by:    emaste
Differential Revision:  https://reviews.freebsd.org/D60728

(cherry picked from commit 4f19e4aca4f4b7a3058be5d3bfc5aed66668b00f)

auditdistd: Fix build failure

Fixes:          4f19e4aca4f4 ("auditdistd: Use void pointers for opaque data")
Reported by:    garga@

(cherry picked from commit 0ce9d6e240a14d5b7cd8eb45a83d0e429f4a3edf)
DeltaFile
+4-4contrib/openbsm/bin/auditdistd/proto_impl.h
+3-3contrib/openbsm/bin/auditdistd/proto_common.c
+2-2contrib/openbsm/bin/auditdistd/proto_uds.c
+2-2contrib/openbsm/bin/auditdistd/proto_tls.c
+2-2contrib/openbsm/bin/auditdistd/proto_tcp.c
+2-2contrib/openbsm/bin/auditdistd/proto_socketpair.c
+15-156 files

HardenedBSD/src 23c8063 — lib/libfetch http.c

libfetch: Use C locale for dates

MFC after:      1 week
PR:             299084
Reviewed by:    arrowd, kevans
Differential Revision:  https://reviews.freebsd.org/D60901

(cherry picked from commit 581d5098ec2c9738db8a98bb1ef3c36ca33033b9)
DeltaFile
+19-9lib/libfetch/http.c
+19-91 files

HardenedBSD/src b147483 — lib/libfetch common.c

libfetch: Apply timeout to SSL handshake

When the SSL handshake cannot proceed because the server is slow to
respond, poll() with a timeout instead of spinning.

MFC after:      1 week
PR:             298962
Event:          Oslo Hackathon 2026
Reviewed by:    markj
Differential Revision:  https://reviews.freebsd.org/D60975

(cherry picked from commit d6678851308d3cec767f07b0712a429cdc5895de)
DeltaFile
+39-3lib/libfetch/common.c
+39-31 files

HardenedBSD/src 031f327 — lib/libfetch ftp.c

libfetch: Plug connection leaks in FTP code

When setting up an FTP transfer, we need to dereference the cached
connection before returning after a failure.

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

(cherry picked from commit 570869838f8bdaedb4c54953e80fe001a82190fd)
DeltaFile
+7-3lib/libfetch/ftp.c
+7-31 files

HardenedBSD/src cfac2ad — contrib/tzcode zic.8 theory.html

tzcode: Update to 2026f

MFC after:      1 week
Event:          Oslo Hackathon 2026

(cherry picked from commit af58db5d6efd1770c53b22e7301a039db7e04213)
DeltaFile
+94-19contrib/tzcode/NEWS
+11-59contrib/tzcode/zic.c
+47-20contrib/tzcode/localtime.c
+25-39contrib/tzcode/tz-link.html
+18-20contrib/tzcode/theory.html
+9-24contrib/tzcode/zic.8
+204-1816 files not shown
+237-20112 files

HardenedBSD/src b087101 — contrib/unbound/services mesh.c outside_network.c, contrib/unbound/util/data dname.c msgparse.c

unbound: Update to 1.26.2

Release notes at
    https://community.nlnetlabs.nl/t/unbound-1-26-2-released

Merge commit 'ce3304d97ba4861eabac759e538426a568aef0a5'

Security:       CVE-2026-35501
Security:       CVE-2026-50106
Security:       CVE-2026-96405
Security:       CVE-2026-97206
Security:       CVE-2026-109125
(cherry picked from commit c6d7a2478c9eeb38ed1284e4ee1ff64c75ca8b09)
DeltaFile
+40-21contrib/unbound/util/data/msgparse.c
+35-21contrib/unbound/services/authzone.c
+55-0contrib/unbound/util/data/dname.c
+45-0contrib/unbound/services/outside_network.c
+30-10contrib/unbound/services/mesh.c
+16-12contrib/unbound/validator/validator.c
+221-6424 files not shown
+317-11630 files

HardenedBSD/src 3bad251 — lib/libfetch common.c

libfetch: Limit response line length

When reading an FTP or HTTP response, error out if we read 64 kB before
hitting a newline.  Otherwise a runaway or malicious server could have
us spinning for quite a while allocating more and more memory before we
gave up or crashed.

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

(cherry picked from commit 64ce9daab9ee49b4647f43141a830d7518723142)
DeltaFile
+15-2lib/libfetch/common.c
+15-21 files

HardenedBSD/src 197741f — lib/libfetch http.c

libfetch: Correctly free redirect target

When processing a redirect, if we get multiple Location headers, we free
the previous one using free(new) instead of fetchFreeURL(new), which
leaks new->doc.

While here, rename new to loc since new is a reserved word in C++.

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

(cherry picked from commit cd2fca49d31d06957027dd32538511ebe2938c1f)
DeltaFile
+16-16lib/libfetch/http.c
+16-161 files

HardenedBSD/src a63630d — lib/libfetch fetch.c

libfetch: Reject control characters in credentials

If a URL contains credentials, check that neither the user name nor the
password contain control characters which might confuse the server,
especially in the FTP case.

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

(cherry picked from commit b319c3d6ac7cf408b56fe745f718de6a324ec180)
DeltaFile
+7-1lib/libfetch/fetch.c
+7-11 files

HardenedBSD/src bc5cb53 — contrib/tzcode version theory.html

tzcode: Update to 2026e

MFC after:      1 week

(cherry picked from commit 2447e7773e36bbc89e80294c1e8cb53f9f607762)
DeltaFile
+38-0contrib/tzcode/NEWS
+3-3contrib/tzcode/localtime.c
+2-2contrib/tzcode/asctime.c
+1-1contrib/tzcode/version
+1-1contrib/tzcode/theory.html
+45-75 files

HardenedBSD/src c502df9 — usr.bin/sdiotool sdiotool.c

sdiotool: Do not treat an unknown chip ID as fatal

The tool is useful for probing any SDIO card, not only the BCM4330.  Print the chip ID, report a failed backplane read, and only note when the ID is not the expected REPLY_MAGIC instead of exiting.

Differential Revision:  https://reviews.freebsd.org/D61030
DeltaFile
+6-5usr.bin/sdiotool/sdiotool.c
+6-51 files

HardenedBSD/src e5b68a6 — usr.bin/sdiotool sdiotool.c

sdiotool: Use (void) for functions taking no arguments

Use (void) instead of an empty parameter list, as required by style(9), and let the compiler diagnose calls with unexpected arguments.

Reviewed by:    oh
Differential Revision:  https://reviews.freebsd.org/D61029
DeltaFile
+2-2usr.bin/sdiotool/sdiotool.c
+2-21 files