HardenedBSD/src d32b7d3sbin/route route_netlink.c, sys/compat/linuxkpi/common/include/linux sysfs.h

Merge remote-tracking branch 'origin/hardened/current/master' into hardened/current/cross-dso-cfi
DeltaFile
+25-9sys/compat/linuxkpi/common/include/linux/sysfs.h
+4-0sys/fs/cd9660/cd9660_rrip.c
+2-1sbin/route/route_netlink.c
+1-1usr.sbin/rtadvd/config.c
+32-114 files

HardenedBSD/src 733f5e5sbin/route route_netlink.c, sys/compat/linuxkpi/common/include/linux sysfs.h

Merge branch 'freebsd/current/main' into hardened/current/master
DeltaFile
+25-9sys/compat/linuxkpi/common/include/linux/sysfs.h
+4-0sys/fs/cd9660/cd9660_rrip.c
+2-1sbin/route/route_netlink.c
+1-1usr.sbin/rtadvd/config.c
+32-114 files

HardenedBSD/src d0afeadsys/fs/cd9660 cd9660_rrip.c

cd9660: Add length checks to Rock Ridge parser

* cd9660_rrip_slink() did not check that the lengths of individual
  entries do not exceed the length of the overall record.

* cd9660_rrip_altname() did not check that the length of the record
  was at least 5 before subtracting 5 from it.

Note that in both cases, a better solution would be to check the length
of the data before calling the handler, or immediately upon entry of
the handler, but this would require significant refactoring.

MFC after:      1 week
Reported by:    Calif.io in collaboration with Claude and Anthropic Research
Reported by:    Adam Crosser, Praetorian
Reviewed by:    markj
Differential Revision:  https://reviews.freebsd.org/D56215
DeltaFile
+4-0sys/fs/cd9660/cd9660_rrip.c
+4-01 files

HardenedBSD/src 759d8a1sbin/route route_netlink.c

route(8): Show weight of nexthop in multipath routes

Reviewed by: zlei, markj
Differential Revision: https://reviews.freebsd.org/D56202
DeltaFile
+2-1sbin/route/route_netlink.c
+2-11 files

HardenedBSD/src 5bb0f63sys/compat/linuxkpi/common/include/linux sysfs.h

linuxkpi: Handle bin attributes in sysfs attribute groups

For instance, this is used by DRM drivers to declare the EDID property
of an GPU output connector:

    sysctl -b sys.device.drmn1.card0.card0-DP-1.edid | edid-decode

    ...
    Block 0, Base EDID:
      EDID Structure Version & Revision: 1.4
      Vendor & Product Identification:
        Manufacturer: SAM
        Model: 29814
        Serial Number: 810635354 (0x3051505a)
        Made in: week 15 of 2025
    ...

Reviewed by:    bz, emaste, wulf
Sponsored by:   The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D55176
DeltaFile
+25-9sys/compat/linuxkpi/common/include/linux/sysfs.h
+25-91 files

HardenedBSD/src 607f6beusr.sbin/rtadvd config.c

rtadvd: Fix validation of the MTU parameter when parsing config

MFC after:      1 week
DeltaFile
+1-1usr.sbin/rtadvd/config.c
+1-11 files

HardenedBSD/src df99d3fsys/amd64/amd64 pmap.c, sys/dev/acpica acpi_spmc.c

Merge remote-tracking branch 'origin/hardened/current/master' into hardened/current/cross-dso-cfi
DeltaFile
+25-5sys/dev/acpica/acpi_spmc.c
+11-5sys/dev/vmm/vmm_dev.c
+8-0sys/kern/kern_jail.c
+1-1sys/riscv/riscv/pmap.c
+1-1sys/powerpc/booke/pmap.c
+1-1sys/amd64/amd64/pmap.c
+47-138 files not shown
+55-2114 files

HardenedBSD/src 88c0e00sys/dev/acpica acpi_spmc.c, sys/dev/bce if_bce.c

Merge branch 'freebsd/current/main' into hardened/current/master
DeltaFile
+25-5sys/dev/acpica/acpi_spmc.c
+11-5sys/dev/vmm/vmm_dev.c
+8-0sys/kern/kern_jail.c
+1-1sys/dev/bce/if_bce.c
+1-1sys/i386/i386/pmap.c
+1-1sys/netinet6/ip6_mroute.c
+47-138 files not shown
+55-2114 files

HardenedBSD/src 683f7a8sys/dev/acpica acpi_spmc.c

acpi_spmc: Call new MS turn on display DSM

Microsoft added a new function index (turn on display, 9) to their DSM
set. This revision calls this, which fixes S0ix on certain machines,
such as the Lenovo Yoga Slim 7i Aura, who's ECs use this method as a
trigger to restore power to certain devices.

See commit 229ecbaac6b3 ("ACPI: x86: s2idle: Invoke Microsoft _DSM
Function 9 (Turn On Display)") on Linux.

Also see the following:
https://learn.microsoft.com/en-us/windows-hardware/design/device-experiences/modern-standby-firmware-notifications#turn-on-display-notification-function-9

Reviewed by:    olce
Approved by:    olce
Sponsored by:   The FreeBSD Foundation
Differential Revision:  https://reviews.freebsd.org/D56062
DeltaFile
+20-5sys/dev/acpica/acpi_spmc.c
+20-51 files

HardenedBSD/src 0307db7sys/dev/acpica acpi_spmc.c

acpi_spmc: Fail probe if acpi_spmc device already attached

We cannot have more than one SPMC device.

Reviewed by:    olce
Approved by:    olce
Sponsored by:   The FreeBSD Foundation
Differential Revision:  https://reviews.freebsd.org/D56062
DeltaFile
+5-0sys/dev/acpica/acpi_spmc.c
+5-01 files

HardenedBSD/src 0dbbed2sys/netinet6 ip6_mroute.c

ip6_mroute: Fix the type name in sysctl_mfctable()

No functional change since apparently it's fine to compute the size of
a pointer type when the base type is undefined.

Fixes:  0bb9c2b665d9 ("ip6_mroute: FIBify")
DeltaFile
+1-1sys/netinet6/ip6_mroute.c
+1-11 files

HardenedBSD/src f3c7723sys/dev/vmm vmm_dev.c, sys/kern kern_jail.c

vmm: Restore the ability to create VMs as root in a jail

The new PRIV_VMM_CREATE and DESTROY permissions should be allowed by
jails, so need to be added to the list in prison_priv_check().  Then,
modify vmmdev_create() to verify that the jail was created with the
allow.vmm flag.  This is already verified when opening /dev/vmmctl, but
checking again doesn't hurt and ensures that one can't pass the
allow.vmm policy by passing a vmmctl fd along a unix domain socket from
outside the jail.

Rename vmm_priv_check() to vmm_jail_priv_check() to make the function's
purpose more clear.

Reported by:    novel
Reviewed by:    bnovkov
Fixes:          d4c05edd410e ("vmm: Add privilege checks to vmmctl operations")
Differential Revision:  https://reviews.freebsd.org/D56119
DeltaFile
+11-5sys/dev/vmm/vmm_dev.c
+8-0sys/kern/kern_jail.c
+19-52 files

HardenedBSD/src c6a1c12sys/amd64/amd64 pmap.c, sys/arm/arm pmap-v6.c

pmap: Do not use PMAP_LOCK_INIT with kernel_pmap

The kernel_pmap lock is a bit special: it does not need the DUPOK flag,
and it really belongs to a different lock class.  If it belongs to the
same class as regular pmap locks, then witness may report warnings when
performing UMA allocations under a regular pmap lock, if the allocation
triggers a pmap_growkernel() call.

Replace instances of PMAP_LOCK_INIT(kernel_pmap) with inline mtx_init()
calls to silence some witness warnings for harmless behaviour I see with
some uncommitted test programs.

Reviewed by:    alc, kib
MFC after:      2 weeks
Differential Revision:  https://reviews.freebsd.org/D56185
DeltaFile
+1-1sys/riscv/riscv/pmap.c
+1-1sys/amd64/amd64/pmap.c
+1-1sys/arm/arm/pmap-v6.c
+1-1sys/arm64/arm64/pmap.c
+1-1sys/i386/i386/pmap.c
+1-1sys/powerpc/aim/mmu_oea.c
+6-63 files not shown
+9-99 files

HardenedBSD/src f3b59bfsys/dev/bce if_bce.c

bce: Fix SYSCTL_IN error check in bce_sysctl_nvram_write()

The condition after SYSCTL_IN was inverted: success (error == 0) returned
immediately and skipped the NVRAM write path, while failure fell through.
Return only when SYSCTL_IN fails.

Signed-off-by: Weixie Cui <cuiweixie at gmail.com>
Reviewed-by: ngie
Pull-Request: https://github.com/freebsd/freebsd-src/pull/2113
DeltaFile
+1-1sys/dev/bce/if_bce.c
+1-11 files

HardenedBSD/src 79b00a4. Makefile.inc1, contrib/xz ChangeLog

Merge remote-tracking branch 'origin/hardened/current/master' into hardened/current/cross-dso-cfi
DeltaFile
+477-0contrib/xz/ChangeLog
+347-0sys/arm/broadcom/bcm2835/raspberrypi_virtgpio.c
+21-0contrib/xz/src/liblzma/common/index.c
+9-10contrib/xz/src/common/tuklib_integer.h
+6-6Makefile.inc1
+12-0sys/arm/broadcom/bcm2835/bcm2835_firmware.h
+872-1620 files not shown
+921-3826 files

HardenedBSD/src eca6e7acontrib/xz ChangeLog, contrib/xz/src/common tuklib_integer.h

Merge branch 'freebsd/current/main' into hardened/current/master
DeltaFile
+477-0contrib/xz/ChangeLog
+347-0sys/arm/broadcom/bcm2835/raspberrypi_virtgpio.c
+21-0contrib/xz/src/liblzma/common/index.c
+9-10contrib/xz/src/common/tuklib_integer.h
+12-0sys/arm/broadcom/bcm2835/bcm2835_firmware.h
+7-3lib/liblzma/config.h
+873-1313 files not shown
+902-2319 files

HardenedBSD/src 7176f76contrib/xz ChangeLog THANKS, contrib/xz/src/common tuklib_integer.h

MFV: xz 5.8.3.

Security:       CVE-2026-34743

(cherry picked from commit f81c1f4339cd20ea89dad51c0f7d96e0e34313a9)
DeltaFile
+477-0contrib/xz/ChangeLog
+21-0contrib/xz/src/liblzma/common/index.c
+9-10contrib/xz/src/common/tuklib_integer.h
+7-3lib/liblzma/config.h
+10-0contrib/xz/src/xz/main.c
+5-0contrib/xz/THANKS
+529-139 files not shown
+541-2215 files

HardenedBSD/src f81c1f4contrib/xz ChangeLog THANKS, contrib/xz/src/common tuklib_integer.h

MFV: xz 5.8.3.

Security:       CVE-2026-34743
MFC after:      3 days
DeltaFile
+477-0contrib/xz/ChangeLog
+21-0contrib/xz/src/liblzma/common/index.c
+9-10contrib/xz/src/common/tuklib_integer.h
+7-3lib/liblzma/config.h
+10-0contrib/xz/src/xz/main.c
+5-0contrib/xz/THANKS
+529-139 files not shown
+541-2215 files

HardenedBSD/src 788f701. ChangeLog THANKS, src/common tuklib_integer.h tuklib_gettext.h

Vendor import of xz 5.8.3 (trimmed)
DeltaFile
+477-0ChangeLog
+21-0src/liblzma/common/index.c
+9-10src/common/tuklib_integer.h
+10-0src/xz/main.c
+5-0THANKS
+2-2src/common/tuklib_gettext.h
+524-129 files not shown
+535-2015 files

HardenedBSD/src 1d1bd59sys/dev/vmm vmm_ktr.h

vmm: Add an include to vmm_ktr.h for vm_name()

Required when KTR is configured.

Remove the pcpu.h include while here, as it seems to be unneeded.

Reported by:    Jenkins
Fixes:          5f13d6b60740 ("vmm: Move common accessors and vm_eventinfo into sys/dev/vmm")

(cherry picked from commit 0aaa95ae02803ba0195c5da695ffbb17a79135bc)
DeltaFile
+3-1sys/dev/vmm/vmm_ktr.h
+3-11 files

HardenedBSD/src dc46e4asys/amd64/vmm vmm.c

amd64/vmm: remove unused static function vcpu_state2str()

It is guarded by #ifdef KTR, so the warning does not show up under usual
kernel configs.

Fixes:  ed85203fb7a0334041db6da07e45ddda4caef13d
Sponsored by:   The FreeBSD Foundation
Differential revision:  https://reviews.freebsd.org/D54781

(cherry picked from commit 002c50ea23b99b415b1b392d3dd5ea6223c3a74c)
DeltaFile
+0-20sys/amd64/vmm/vmm.c
+0-201 files

HardenedBSD/src b20f0e6sys/netinet ip_divert.c

divert: unbreak the LINT-NOIP build

Only expose `dcb` when either `INET` or `INET6` is defined.

Reported by:    clang (`-Wunused`)
MFC after:      1 week
Fixes 5547a7bb39 ("divert: Use a better source identifier...")
Differential Revision: https://reviews.freebsd.org/D55548

(cherry picked from commit bd758ebac3272f720c051570e043e4bc653dcd48)
DeltaFile
+3-2sys/netinet/ip_divert.c
+3-21 files

HardenedBSD/src 7da0434. Makefile.inc1

HBSD: Resolve merge conflict

Signed-off-by:  Shawn Webb <shawn.webb at hardenedbsd.org>
DeltaFile
+2-12Makefile.inc1
+2-121 files

HardenedBSD/src fdfa095. Makefile.inc1, lib/libc/stdlib atexit.3

Merge remote-tracking branch 'origin/freebsd/current/main' into hardened/current/master

Conflicts:
        Makefile.inc1 (unresolved)
DeltaFile
+12-2Makefile.inc1
+5-4lib/libsys/_exit.2
+5-1sys/kern/kern_jail.c
+2-1lib/libc/stdlib/atexit.3
+1-1sys/conf/files
+0-1tools/build/options/WITHOUT_LLVM_BINUTILS_BOOTSTRAP
+25-101 files not shown
+25-117 files

HardenedBSD/src be79a42share/man/man9 malloc.9

malloc.9: adjust flag table indentation

The current indentation is shorter than all but one of these flags. This
renders much more nicely.

MFC after:      3 days
DeltaFile
+1-1share/man/man9/malloc.9
+1-11 files

HardenedBSD/src 84c68dbsys/arm/broadcom/bcm2835 raspberrypi_virtgpio.c bcm2835_firmware.h, sys/conf files.arm64

bcm2835_virtgpio: Add driver for virtual GPIO controller on some RPi models

This driver enables bcm2835-virtgpio GPIO controller found on RPi3B and
some CM boards. On which, the ACT (green) LED is connected to this
controller. It is essential for FreeBSD to have this driver to control
this LED.

It will be exposed via gpioled(4).

Reviewed by:    mhorne
MFC after:      2 weeks
Differential Revision:  https://reviews.freebsd.org/D51456
DeltaFile
+347-0sys/arm/broadcom/bcm2835/raspberrypi_virtgpio.c
+12-0sys/arm/broadcom/bcm2835/bcm2835_firmware.h
+1-0sys/conf/files.arm64
+360-03 files

HardenedBSD/src 6087050sys/kern kern_jail.c

Jail sysctls: deprecate generic sysctls in favour of allow-flags

- add a missing sysctl to the deprecated list
- add a comment to not add new generic sysctls and point to SYSCTL_JAIL_PARAM instead

Reviewed by:    jamie
Differential Revision:  https://reviews.freebsd.org/D51150
DeltaFile
+5-1sys/kern/kern_jail.c
+5-11 files

HardenedBSD/src 9b1f77e. Makefile.inc1, share/man/man5 src.conf.5

Makefile.inc1: Drop AS and RANLIB variables

These are not used in our world and kernel build targets.  We use the
compiler driver for assembly, and ar adds the archive index (symbol
table) automatically.

Sponsored by:   The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D55964
DeltaFile
+5-5Makefile.inc1
+0-1share/man/man5/src.conf.5
+0-1tools/build/options/WITHOUT_LLVM_BINUTILS_BOOTSTRAP
+5-73 files

HardenedBSD/src c082e56lib/libc/stdlib atexit.3, lib/libsys _exit.2

_exit.2: Cross-reference atexit(3)

atexit(3) is one of the cases when _exit(2) must be used instead of
exit(3).

MFC after:              3 days
Reviewed by:            mhorne, ziaee
Differential Revision:  https://reviews.freebsd.org/D54467
DeltaFile
+5-4lib/libsys/_exit.2
+2-1lib/libc/stdlib/atexit.3
+7-52 files

HardenedBSD/src 407b1e4sys/conf files

rss: make toeplitz.c standard part of the kernel

This will fix LINT-NOIP build.  This actually adds very little to the
kernel text, e.g. 500 bytes on amd64.  A perfect solution would be to
instead declare rss_config.c as 'optional inet | inet6', but that would
fail to build LINT-NOIP in several NIC drivers, that use RSS and
absolutely ignore that both INET and INET6 are optional.  It is very
unlikely that vendors who maintain these drivers will will ever chase the
holy grail of a build that doesn't support IPv4 and IPv6.

Fixes:  d9c55b2e8cd6b79f6926278e10a79f1bcca27a4b
DeltaFile
+1-1sys/conf/files
+1-11 files