HardenedBSD/src ecb0b85share/examples/jails jng, sys/arm/broadcom/bcm2835 bcm2835_audio.c

Merge remote-tracking branch 'rad/hardened/current/master' into hardened/current/pledge
DeltaFile
+230-113share/examples/jails/jng
+1-1sys/arm/broadcom/bcm2835/bcm2835_audio.c
+231-1142 files

HardenedBSD/src 400d4cfshare/examples/jails jng, sys/arm/broadcom/bcm2835 bcm2835_audio.c

Merge branch 'freebsd/current/main' into hardened/current/master
DeltaFile
+230-113share/examples/jails/jng
+1-1sys/arm/broadcom/bcm2835/bcm2835_audio.c
+231-1142 files

HardenedBSD/src 2bc8034sys/dev/sound/pci vibes.c csavar.h, sys/dev/sound/pcm buffer.c dsp.c

Merge branch 'freebsd/15-stable/main' into hardened/15-stable/main
DeltaFile
+22-21sys/dev/sound/pci/csapcm.c
+12-10sys/dev/sound/pci/csa.c
+6-6sys/dev/sound/pci/csavar.h
+3-3sys/dev/sound/pcm/dsp.c
+3-2sys/dev/sound/pcm/buffer.c
+3-2sys/dev/sound/pci/vibes.c
+49-4410 files not shown
+69-5416 files

HardenedBSD/src 95c04b2sys/arm/broadcom/bcm2835 bcm2835_audio.c

bcm2835_audio: Comment out vchi_service_release()

bcm2835_audio_release() calls vchi_service_close() and then
unconditionally calls vchi_service_release() with the same service
handle.

In the VCHI shim implementation, a successful vchi_service_close() calls
service_free(service). The subsequent vchi_service_release() therefore
dereferences a freed SHIM_SERVICE_T object when it reads
service->handle, resulting in a use-after-free panic.

vchi_service_release(), however, releases a reference which might block
vchi_service_close() from completing successfuly, so comment it out
instead of removing it altogether, until further testing is done.

PR:             297187
MFC after:      2 weeks
Reviewed by:    markj
Differential Revision:  https://reviews.freebsd.org/D58921
DeltaFile
+1-1sys/arm/broadcom/bcm2835/bcm2835_audio.c
+1-11 files

HardenedBSD/src 0256ea4sbin/nvmecontrol power.c, sbin/nvmecontrol/modules/wdc wdc.c

nvmecontrol: Add SPDX-License-Identifier tags

Reviewed by: emaste
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D55275

(cherry picked from commit f8517c21d57f1db005c0d15e14d16252e8e4bfd0)
DeltaFile
+2-0sbin/nvmecontrol/power.c
+2-0sbin/nvmecontrol/modules/wdc/wdc.c
+4-02 files

HardenedBSD/src 228b410usr.sbin/bhyve/amd64 atkbdc.h

bhyve: Add SPDX-License-Identifier tag

Reviewed by: emaste
Sponsored by: The FreeBSD Foundation

(cherry picked from commit 499d0f04f55e52327d624d27ead3a0d16e3b465a)
DeltaFile
+2-0usr.sbin/bhyve/amd64/atkbdc.h
+2-01 files

HardenedBSD/src ef55753sbin/decryptcore decryptcore.c

decryptcore: Add SPDX-License-Identifier tag

Reviewed by: emaste
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D55270

(cherry picked from commit 299d3e944a15cbffc8ed16a49869e1eaec1fb493)
DeltaFile
+2-0sbin/decryptcore/decryptcore.c
+2-01 files

HardenedBSD/src cd9810fsys/dev/sound/pci vibes.c csavar.h, sys/dev/sound/pcm buffer.c dsp.c

sound: Use unsigned long instead of legacy u_long

No functional change intended.

Sponsored by:   The FreeBSD Foundation
MFC after:      1 week

(cherry picked from commit afe56ee24679d6584acf02dd17f6ed52c052abe7)
DeltaFile
+22-21sys/dev/sound/pci/csapcm.c
+12-10sys/dev/sound/pci/csa.c
+6-6sys/dev/sound/pci/csavar.h
+3-3sys/dev/sound/pcm/dsp.c
+3-2sys/dev/sound/pcm/buffer.c
+3-2sys/dev/sound/pci/vibes.c
+49-446 files not shown
+61-5412 files

HardenedBSD/src 644990fshare/examples/jails jng

New version of jng (9.0)

Changes for jng 2.0 -> 9.0 include:

+ Use ng_bridge(4) uplink hooks on ng_ether(4) lower so the host
  mapping table stays small (first hook is uplink; unknown unicast
  goes only to uplink)
+ Add `jng pin [-h] {-a | NAME ...}' to plant eiface MACs with
  NGM_BRIDGE_MOVE_HOST and raise maxStaleness so they do not expire
+ Remove experimental NG_TYPE=iface / ng_tcpmss(4); ng_iface(4)
  cannot work with ng_bridge(4)
+ Add -v
+ SPDX-License-Identifier: BSD-2-Clause; bump copyright to 2026

See D58902 for the ng_bridge(4) data-path MOVE_HOST fix.

MFC after:      1 week
Reviewed by:    kfv, jlduran
Differential Revision:  https://reviews.freebsd.org/D58903
DeltaFile
+230-113share/examples/jails/jng
+230-1131 files

HardenedBSD/src 13e2fcclib/libc/tests/gen fts_capsicum_test.c, stand/libsa/zfs zfsimpl.c

Merge remote-tracking branch 'rad/hardened/current/master' into hardened/current/pledge
DeltaFile
+196-169sys/dev/virtio/network/virtio_net.h
+49-296sys/dev/virtio/network/if_vtnet.c
+210-0lib/libc/tests/gen/fts_capsicum_test.c
+48-6stand/libsa/zfs/zfsimpl.c
+19-3sys/dev/netmap/if_ptnet.c
+17-2sys/net/if_tuntap.c
+539-4766 files not shown
+557-48612 files

HardenedBSD/src 634c275lib/libc/tests/gen fts_capsicum_test.c, stand/libsa/zfs zfsimpl.c

Merge branch 'freebsd/current/main' into hardened/current/master
DeltaFile
+196-169sys/dev/virtio/network/virtio_net.h
+49-296sys/dev/virtio/network/if_vtnet.c
+210-0lib/libc/tests/gen/fts_capsicum_test.c
+48-6stand/libsa/zfs/zfsimpl.c
+19-3sys/dev/netmap/if_ptnet.c
+17-2sys/net/if_tuntap.c
+539-4766 files not shown
+557-48612 files

HardenedBSD/src 8b1c3b3share/man/man4 Makefile

Merge branch 'freebsd/15-stable/main' into hardened/15-stable/main
DeltaFile
+4-4share/man/man4/Makefile
+4-41 files

HardenedBSD/src 5e0e6a9sys/kern uipc_usrreq.c

unix: wrap comments to fit in 80 char line

Fixes:  6563dcb6b1f57e51db63854f3774b52e672232ed
DeltaFile
+4-4sys/kern/uipc_usrreq.c
+4-41 files

HardenedBSD/src b567434stand/efi/boot1 zfs_module.c, stand/libsa/zfs zfs.c zfsimpl.c

stand: set st_dev/st_ino in the loader's ZFS stat for veriexec

The loader's ZFS implementation never set st_dev or st_ino in
zfs_dnode_stat(). With an uninitialized struct stat, veriexec's device
comparison in lib/libsecureboot/veopen.c read stack garbage and skipped
the matching manifest entry, failing with a spurious "no entry" on ZFS
root under UEFI Secure Boot.

Rather than zeroing the device (which would break veriexec's ability to
tell apart the same path on different datasets), populate st_dev and
st_ino with the same intrinsic identifiers the kernel uses:

- st_dev = the dataset's ds_fsid_guid (as the kernel does via
  dmu_objset_fsid_guid()/dsl_dataset_fsid_guid()), already read in
  zfs_mount_dataset() and now propagated through struct zfsmount.
- st_ino = the object number resolved in zfs_lookup(), propagated
  through struct file (the loader's equivalent of the kernel's z_id).

dev_t and ino_t are 64-bit on FreeBSD, so both are assigned directly

    [14 lines not shown]
DeltaFile
+48-6stand/libsa/zfs/zfsimpl.c
+5-3stand/libsa/zfs/zfs.c
+3-2stand/efi/boot1/zfs_module.c
+56-113 files

HardenedBSD/src b39457bsys/dev/virtio/p9fs virtio_p9fs.c

virtio_p9fs: Disallow detach if a session is in progress

PR:             295453
Reviewed by:    markj
MFC after:      1 week
Differential Revision:  https://reviews.freebsd.org/D57500
DeltaFile
+4-0sys/dev/virtio/p9fs/virtio_p9fs.c
+4-01 files

HardenedBSD/src c08a97fsys/netpfil/ipfilter/netinet ip_nat.c

ipfilter: Fix checksum update for NAT_DIVERTOUT

When taking a snapshot of the before ip_len (s1) for comparison with the
after-translated ip_len (s2), we must convert it from network to host
byte order before we can use it. Add the missing ntohs() call.

PR:             296944
MFC after:      3 days
DeltaFile
+1-1sys/netpfil/ipfilter/netinet/ip_nat.c
+1-11 files

HardenedBSD/src fd8ca3dshare/man/man4 Makefile

share/man/man4: Move non-USB man pages out of MK_USB block

uart(4), unix(4), veriexec(4) and the gzero(4) MLINK are not USB
things, but they were in the .if ${MK_USB} != "no" block.  So if we
build with WITHOUT_USB, these man pages are lost.  Move them out of
the block.

Sponsored by:   The FreeBSD Foundation

(cherry picked from commit 1100d9eca9cb2860c58633a9176dd11a30850da4)
DeltaFile
+4-4share/man/man4/Makefile
+4-41 files

HardenedBSD/src 31f9f09lib/libc/tests/gen Makefile fts_capsicum_test.c

fts: add fts_capsicum_test.c

Add three test cases verifying fts(3) Capsicum capability mode:

- fts_dirfd_valid: verifies fts_dirfd is set for all non-root
  entries and openat(fts_dirfd, fts_name) identifies the same
  inode as fts_accpath
- fts_dirfd_capsicum: verifies complete fts traversal works in
  Capsicum capability mode using fts_openat() and fts_dirfd
- fts_dirfd_deep_tree: verifies fts_dirfd + fts_name is correct
  at all directory depths (7 non-root entries)

Sponsored by:   Google LLC (GSoC 2026)
Reviewed by:    asomers
Pull Request:   https://github.com/freebsd/freebsd-src/pull/2332
DeltaFile
+210-0lib/libc/tests/gen/fts_capsicum_test.c
+1-0lib/libc/tests/gen/Makefile
+211-02 files

HardenedBSD/src 44cddaasys/dev/netmap if_ptnet.c, sys/dev/virtio/network if_vtnet.c virtio_net.h

vtnet: move offload functions to virtio_net.h to share them

Move the functions vtnet_rxq_csum() and vtnet_txq_offload() and the
subfunctions they call from if_vtnet.c to virtio_net.h. This allows
us to call these functions from if_tuntap.c and if_ptnet.c.
virtio_net.h already contained a copy of these functions, but a copy
of an outdated version. The functions evolved in if_vtnet.c.
In if_vtnet.c, the copy has never been used because it increments
counters in their own functions.
This patch removes the outdated copy from virtio_net.h and moves the
new version of the functions from if_vtnet.c to virtio_net.h.
if_tuntap.c, if_ptnet.c, and if_vtnet.c just call these functions,
and if_vtnet.c increments its counters depending on the return value.

Reviewed by:            tuexen
MFC after:              1 month
MFC to:                 stable/15
Differential Revision:  https://reviews.freebsd.org/D57299
DeltaFile
+196-169sys/dev/virtio/network/virtio_net.h
+49-296sys/dev/virtio/network/if_vtnet.c
+19-3sys/dev/netmap/if_ptnet.c
+17-2sys/net/if_tuntap.c
+281-4704 files

HardenedBSD/src 92450d2sys/arm64/arm64 vfp.c, sys/dev/ixgbe if_ix.c

Merge remote-tracking branch 'rad/hardened/current/master' into hardened/current/pledge
DeltaFile
+19-4sys/dev/ixgbe/if_ix.c
+3-4sys/arm64/arm64/vfp.c
+22-82 files

HardenedBSD/src 6c20a03sys/arm64/arm64 vfp.c, sys/dev/ixgbe if_ix.c

Merge branch 'freebsd/current/main' into hardened/current/master
DeltaFile
+19-4sys/dev/ixgbe/if_ix.c
+3-4sys/arm64/arm64/vfp.c
+22-82 files

HardenedBSD/src c103eabusr.sbin/pmcstat pmcstat.8

Merge branch 'freebsd/15-stable/main' into hardened/15-stable/main
DeltaFile
+2-2usr.sbin/pmcstat/pmcstat.8
+2-21 files

HardenedBSD/src 3f3f452usr.sbin/pmcstat pmcstat.8

pmcstat.8: Add a missing ERRORS section header

MFC after:      3 days
Sponsored by:   fme AG

(cherry picked from commit 5729a0b45cd1a24c8b82d161de4711b4e004498d)
DeltaFile
+2-2usr.sbin/pmcstat/pmcstat.8
+2-21 files

HardenedBSD/src 33e2eacsys/dev/ixgbe if_ix.c

ix(4): Sanitize negative error codes

Due to development history FreeBSD driver error codes are reported
the same way as in Linux (as negatives) which is inconsistent
with FreeBSD standard. It may cause unexpected behavior when driver
errors are interpreted by a kernel as syscall handler return values.
This patch converts error codes from negative to positive values for
NVM access functions.

Signed-off-by: Pawel Sobczyk <pawel.sobczyk at intel.com>

Reviewed by:    kbowling, erj, milosz.linkiewicz_intel.com
Tested by:      Mateusz Moga <mateusz.moga at intel.com>
MFC after:      1 week
Sponsored by:   Intel Corporation
Differential Revision:  https://reviews.freebsd.org/D57642
DeltaFile
+19-4sys/dev/ixgbe/if_ix.c
+19-41 files

HardenedBSD/src 189ee41sys/arm64/arm64 vfp.c

arm64 vfp: eliminate nested critical sections

At two out of three call sites to vfp_restore_state_common(), the caller
must use critical_{enter,exit}() to prevent preemption between its call
to vfp_restore_state_common() and other actions, notably its call to
sve_enable().  So, it is arguably better to make
vfp_restore_state_common()'s caller responsible for performing
critical_{enter,exit}() and simply perform CRITICAL_ASSERT() inside
vfp_restore_state_common().

Reviewed by:    kib, markj
MFC after:      2 weeks
Differential Revision:  https://reviews.freebsd.org/D58859
DeltaFile
+3-4sys/arm64/arm64/vfp.c
+3-41 files

HardenedBSD/src c303c5elib/libc/gen fts.3 fts.c, lib/libc/tests/gen fts_openat_test.c

Merge remote-tracking branch 'rad/hardened/current/master' into hardened/current/pledge
DeltaFile
+250-0lib/libc/tests/gen/fts_openat_test.c
+28-70sys/dev/ufshci/ufshci_dev.c
+57-11lib/libc/gen/fts.c
+44-0sys/dev/ice/if_ice_iflib.c
+22-20sys/dev/ufshci/ufshci_req_sdb.c
+33-1lib/libc/gen/fts.3
+434-1029 files not shown
+485-12015 files

HardenedBSD/src 4404675lib/libc/gen fts.3 fts.c, lib/libc/tests/gen fts_openat_test.c

Merge branch 'freebsd/current/main' into hardened/current/master
DeltaFile
+250-0lib/libc/tests/gen/fts_openat_test.c
+28-70sys/dev/ufshci/ufshci_dev.c
+57-11lib/libc/gen/fts.c
+44-0sys/dev/ice/if_ice_iflib.c
+22-20sys/dev/ufshci/ufshci_req_sdb.c
+33-1lib/libc/gen/fts.3
+434-1029 files not shown
+485-12015 files

HardenedBSD/src 29dea9acontrib/less search.c command.c

Merge branch 'freebsd/15-stable/main' into hardened/15-stable/main
DeltaFile
+245-91contrib/less/decode.c
+213-114contrib/less/less.nro
+147-59contrib/less/regexp.c
+173-29contrib/less/optfunc.c
+132-54contrib/less/command.c
+83-55contrib/less/search.c
+993-40243 files not shown
+1,926-76649 files

HardenedBSD/src 68091ebsys/dev/ufshci ufshci_sim.c

ufshci: report the highest LUN number in the path inquiry

cpi->max_lun is an inclusive upper bound, but the driver reported the
LUN count (8 or 32), so CAM probed one nonexistent LUN past the end.

Reviewed by:            imp (mentor)
Sponsored by:           Samsung Electronics
Differential Revision:  https://reviews.freebsd.org/D58820
DeltaFile
+1-1sys/dev/ufshci/ufshci_sim.c
+1-11 files

HardenedBSD/src 3451829sys/dev/ufshci ufshci_reg.h

ufshci: correct the crypto/config register offsets and HCMID fields

The reserved array after CCAP must be 508, but it was 511.
This pushed the config, MCQ config, and ESI registers from 0x300 and
0x380 up to 0x900. None of these registers are used yet, so nothing
broke.

Also fix the HCMID bank index field. The spec places it at bits
[23:16], but it was defined on top of the manufacturer code at [15:0].

Reviewed by:            imp (mentor)
Sponsored by:           Samsung Electronics
Differential Revision:  https://reviews.freebsd.org/D58819
DeltaFile
+20-3sys/dev/ufshci/ufshci_reg.h
+20-31 files