HardenedBSD/src 57e7bcasys/dev/rge if_rge_microcode.h if_rge.c

Merge remote-tracking branch 'origin/hardened/current/master' into hardened/current/cross-dso-cfi
DeltaFile
+13,401-0sys/dev/rge/if_rge_microcode.h
+2,683-0sys/dev/rge/if_rge.c
+1,935-0sys/dev/rge/if_rge_hw.c
+387-0sys/dev/rge/if_rgereg.h
+269-0sys/dev/rge/if_rgevar.h
+238-0sys/dev/rge/if_rge_sysctl.c
+18,913-011 files not shown
+19,407-017 files

HardenedBSD/src 7df2b10sys/dev/rge if_rge_microcode.h if_rge.c

Merge branch 'freebsd/current/main' into hardened/current/master
DeltaFile
+13,401-0sys/dev/rge/if_rge_microcode.h
+2,683-0sys/dev/rge/if_rge.c
+1,935-0sys/dev/rge/if_rge_hw.c
+387-0sys/dev/rge/if_rgereg.h
+269-0sys/dev/rge/if_rgevar.h
+238-0sys/dev/rge/if_rge_sysctl.c
+18,913-011 files not shown
+19,407-017 files

HardenedBSD/src 4bf8ce0sys/dev/rge if_rge_microcode.h if_rge.c

if_rge: initial import of if_rge driver from OpenBSD.

This is an initial import of the if_rge driver from OpenBSD
and adapted to FreeBSD.

Differential Revision:  https://reviews.freebsd.org/D54101
DeltaFile
+13,401-0sys/dev/rge/if_rge_microcode.h
+2,683-0sys/dev/rge/if_rge.c
+1,935-0sys/dev/rge/if_rge_hw.c
+387-0sys/dev/rge/if_rgereg.h
+269-0sys/dev/rge/if_rgevar.h
+238-0sys/dev/rge/if_rge_sysctl.c
+18,913-011 files not shown
+19,407-017 files

HardenedBSD/src 820d303share/man/man4 tty.4 uart.4, sys/compat/linuxkpi/common/src linux_80211.c linux_80211_macops.c

Merge remote-tracking branch 'origin/hardened/current/master' into hardened/current/cross-dso-cfi
DeltaFile
+13-3share/man/man4/tty.4
+12-0share/man/man4/uart.4
+11-0share/man/man4/termios.4
+2-8sys/compat/linuxkpi/common/src/linux_80211.c
+10-0usr.bin/grep/tests/grep_freebsd_test.sh
+0-3sys/compat/linuxkpi/common/src/linux_80211_macops.c
+48-142 files not shown
+50-158 files

HardenedBSD/src 8c85228share/man/man4 tty.4 uart.4, sys/compat/linuxkpi/common/src linux_80211.c linux_80211_macops.c

Merge branch 'freebsd/current/main' into hardened/current/master
DeltaFile
+13-3share/man/man4/tty.4
+12-0share/man/man4/uart.4
+11-0share/man/man4/termios.4
+10-0usr.bin/grep/tests/grep_freebsd_test.sh
+2-8sys/compat/linuxkpi/common/src/linux_80211.c
+0-3sys/compat/linuxkpi/common/src/linux_80211_macops.c
+48-142 files not shown
+50-158 files

HardenedBSD/src edd982bshare/man/man4 tty.4 uart.4

Cross-reference all of uart(4), tty(4) and termios(4)

Add a BUGS subsection about why, in the vain hope that somebody
improves the situation.
DeltaFile
+13-3share/man/man4/tty.4
+12-0share/man/man4/uart.4
+11-0share/man/man4/termios.4
+1-0share/man/man4/Makefile
+37-34 files

HardenedBSD/src 80726c2usr.bin/grep zgrep.sh, usr.bin/grep/tests grep_freebsd_test.sh

Fix zgrep(1) wrapper regression, add test

@bdrewery reported D48873 broke "bzgrep -q '1 2' /var/log/messages.0.bz2"
The mistake was in using $* instead of "$@" (I suspect $* is never right).

Reported by:    bdrewery
Reviewed by:    markj
Approved by:    markj
Fixes:          1070477cc8b7 ("Fix remaining zgrep(1) wrapper script regressions")
MFC after:      1 week
Differential Revision:  https://reviews.freebsd.org/D54217
DeltaFile
+10-0usr.bin/grep/tests/grep_freebsd_test.sh
+1-1usr.bin/grep/zgrep.sh
+11-12 files

HardenedBSD/src f943454sys/compat/linuxkpi/common/src linux_80211.c linux_80211_macops.c

LinuxKPI: 802.11: rework MC/configure_filter

(*prepare_multicast)(), for the drivers we support, is iwlwifi(4)-specific.
If it is not available do not let us stop from calling (*configure_filter)()
at least as well.
In addition to the interface setting mc_all_multi, if we have no way to
prepare the multicast filter list this way, set FIF_ALLMULTI for now.
This seems to help some with rtw89 but does not help me with other drivers
yet to get IPv6 link-local (e.g., ff02::1%wlan0) going.
This should also help in case we are scanning and are setting
FIF_BCN_PRBRESP_PROMISC .  We should go and review the full FIF_ list and
start adding conditional support for the other options too.

Sponsored by:   The FreeBSD Foundation
PR:             281982
MFC after:      3 days
DeltaFile
+2-8sys/compat/linuxkpi/common/src/linux_80211.c
+0-3sys/compat/linuxkpi/common/src/linux_80211_macops.c
+2-112 files

HardenedBSD/src 9cf6a47. RELNOTES, lib/libc/tests/string stpncpy_test.c

Merge remote-tracking branch 'origin/hardened/current/master' into hardened/current/cross-dso-cfi
DeltaFile
+39-16lib/libc/tests/string/stpncpy_test.c
+50-0RELNOTES
+19-15sys/dev/netmap/netmap_mem2.c
+27-6sys/netpfil/pf/pf_ioctl.c
+9-6sys/netpfil/pf/if_pfsync.c
+4-4sys/kern/kern_proc.c
+148-479 files not shown
+169-6315 files

HardenedBSD/src a75e764. RELNOTES, lib/libc/tests/string stpncpy_test.c

Merge branch 'freebsd/current/main' into hardened/current/master
DeltaFile
+39-16lib/libc/tests/string/stpncpy_test.c
+50-0RELNOTES
+19-15sys/dev/netmap/netmap_mem2.c
+27-6sys/netpfil/pf/pf_ioctl.c
+9-6sys/netpfil/pf/if_pfsync.c
+4-4sys/kern/kern_proc.c
+148-479 files not shown
+169-6315 files

HardenedBSD/src 2d626c3contrib/tzdata theory.html Makefile

Merge branch 'freebsd/14-stable/main' into hardened/14-stable/master
DeltaFile
+186-181contrib/tzdata/theory.html
+138-58contrib/tzdata/Makefile
+135-0contrib/tzdata/NEWS
+47-47contrib/tzdata/zonenow.tab
+36-16contrib/tzdata/europe
+41-10contrib/tzdata/northamerica
+583-31216 files not shown
+682-40822 files

HardenedBSD/src fa259d1sys/contrib/openzfs/module/os/freebsd/zfs zfs_vnops_os.c

zfs: Merge commit 86b064469dc9c2 from OpenZFS

  FreeBSD: Fix a potential null dereference in zfs_freebsd_fsync()

  In general it's possible for a vnode to not have an associated VM
  object.  This happens in particular with named pipes, which have
  some distinct VOPs, defined in zfs_fifoops.  Thus, this chunk of
  zfs_freebsd_fsync() needs to check for the FIFO case, like other
  vm_object_mightbedirty() callers do.

  (Note that vn_flush_cached_data() calls are predicated on
  zn_has_cached_data() returning true, and it checks for a NULL v_object
  pointer already.)

  Fixes: ef4058fcdc01838117dd93a654228bac7487a37c
  Reported-by: Collin Funk <collin.funk1 at gmail.com>
  Reviewed-by: Sean Eric Fagan <sef at FreeBSD.org>
  Reviewed-by: Brian Behlendorf <behlendorf1 at llnl.gov>
  Reviewed-by: Alexander Motin <alexander.motin at TrueNAS.com>

    [4 lines not shown]
DeltaFile
+1-1sys/contrib/openzfs/module/os/freebsd/zfs/zfs_vnops_os.c
+1-11 files

HardenedBSD/src 8be8642lib/libc/tests/string stpncpy_test.c

libc/test: fix typo

I misapplied ngie's recommended correction.

Fixes:  123c086200491819595abc271d360e605288fd18
Differential Revision:  https://reviews.freebsd.org/D54169
DeltaFile
+1-1lib/libc/tests/string/stpncpy_test.c
+1-11 files

HardenedBSD/src 5917f95usr.bin/login login.1

login.1: Remove mention of login copyright display

PR:             291649
Fixes: 905571c03119 ("Remove copyright strings printed at login time via login(1) or sshd(8).")
DeltaFile
+2-2usr.bin/login/login.1
+2-21 files

HardenedBSD/src 66eb783lib/libc/amd64/string stpncpy.S

libc/amd64: fix overread conditions in stpncpy()

Due to incorrect unit test design, two overread conditions went
undetected in the amd64 baseline stpncpy() implementation.
For buffers of 1--16 and 32 bytes that do not contain nul bytes
and end exactly at a page boundary, the code would incorrectly
read 16 bytes from the next page, possibly crossing into an
unmapped page and crashing the program.  If the next page was
mapped, the code would then proceed with the expected behaviour
of the stpncpy() function.

Three changes were made to fix the bug:

 - an off-by-one error is fixed in the code deciding whether to
   enter the runt case or not, entering it for 0<n<=32 bytes
   instead of 0<n<32 bytes as it was before.
 - in the runt case, the logic to skip reading a second 16-byte
   chunk if the buffer ends in the first chunk was fixed to
   account for buffers that end at a 16-byte boundary but do not

    [16 lines not shown]
DeltaFile
+4-3lib/libc/amd64/string/stpncpy.S
+4-31 files

HardenedBSD/src 123c086lib/libc/tests/string stpncpy_test.c

libc/tests/string: improve stpncpy() "bounds" unit test

The test is extended the same way I previously extended the memccpy()
test to fix what is probably the same kind of bug.

PR:             291359
Reported by:    Collin Funk <collin.funk1 at gmail.com>
Reviewed by:    ngie
Approved by:    markj (mentor)
Fixes:          6fa9e7d8737548ef93c573387ce62402c368d486 (D42519)
See also:       61ed5748e4e9c7397fcb2638b442f46ac5c9e7c5 (D46051)
MFC after:      1 week
Differential Revision:  https://reviews.freebsd.org/D54169

lib/libc/tests/string/stpncpy_test.c: apply ngie's fixes
DeltaFile
+39-16lib/libc/tests/string/stpncpy_test.c
+39-161 files

HardenedBSD/src 796abcasys/net pfvar.h, sys/netpfil/pf pf_ioctl.c if_pfsync.c

pfsync: Avoid zeroing the state export union

pfsync_state_export() takes a pointer to a union that is in reality a
pointer to one of the three state formats (1301, 1400, 1500), and zeros
the union.  The three formats do not have the same size, so zeroing is
wrong when the format isn't that which has the largest size.

Refactor a bit so that the zeroing happens at the layer where we know
which format we're dealing with.

Reported by:    CHERI
Reviewed by:    kp
MFC after:      1 week
Sponsored by:   CHERI Research Centre (EPSRC grant UKRI3001)
Differential Revision:  https://reviews.freebsd.org/D54163
DeltaFile
+27-6sys/netpfil/pf/pf_ioctl.c
+9-6sys/netpfil/pf/if_pfsync.c
+6-2sys/net/pfvar.h
+42-143 files

HardenedBSD/src c694122sys/dev/netmap netmap_mem2.c

netmap: Let memory allocator parameters be settable via loader.conf

This is useful when dev.netmap.port_numa_affinity is set to 1.  When
interfaces attach, they get a memory allocator that is copied from
nm_mem.  Parameters in nm_mem can be set using sysctls, but this happens
after their values are copied.

To work around this, we can make it possible to set these memory
parameters as tunables.

Reviewed by:    vmaffione
MFC after:      1 week
Sponsored by:   Klara, Inc.
Differential Revision:  https://reviews.freebsd.org/D54178
DeltaFile
+19-15sys/dev/netmap/netmap_mem2.c
+19-151 files

HardenedBSD/src a0d6079sys/kern uipc_socket.c

socket: Fix the name of a parameter in a comment

Reported by:    des
Fixes:          0a68f644dca1 ("socket: Split up soreceive_generic()")
MFC after:      1 week
DeltaFile
+1-1sys/kern/uipc_socket.c
+1-11 files

HardenedBSD/src 9dda51flibexec/rc rc.subr

rc.subr: Use the variable we defined to invoke setaudit(8)

Reported by:    gtetlow
Fixes:          39ee24182b92 ("rc.subr: Support setting the audit user when starting services")
MFC after:      1 week
DeltaFile
+1-1libexec/rc/rc.subr
+1-11 files

HardenedBSD/src 9734ca0. RELNOTES

RELNOTES: Add entries from this week's scan of the commit logs

Reviewed by:    emaste, imp
Differential Revision:  https://reviews.freebsd.org/D54197
DeltaFile
+50-0RELNOTES
+50-01 files

HardenedBSD/src d4f25d0sys/kern vfs_syscalls.c kern_jail.c

vfs: Let prison_enforce_statfs zero the fsid

Currently, we unconditionally zero the fsid before returning a struct
statfs to a jailed process.  Move this into prison_enforce_statfs() so
it only happens if enforce_statfs is greater than 1, or enforce_statfs
is 1 but the mountpoint is outside the jail.

PR:             291301
MFC after:      1 week
Reviewed by:    kib
Differential Revision:  https://reviews.freebsd.org/D54214
DeltaFile
+1-4sys/kern/vfs_syscalls.c
+3-0sys/kern/kern_jail.c
+4-42 files

HardenedBSD/src 026d962sys/kern kern_proc.c kern_fork.c

proc: Fix proc_init / proc_dtor ordering issues

* Move the initialization of p_ktr into proc_init() and make the check
  in proc_dtor() unconditional.  Prior to this, it was possible to fail
  and invoke proc_dtor() after the first thread had been created (which
  was the condition for checking p_ktr in proc_dtor()) but before p_ktr
  had been initialized.

* Move the p_klist initialization in fork1() past the last possible
  failure point so we don't have to free it on failure.  We didn't,
  which meant we were leaking a knlist every time we failed to fork
  due to hitting the resource limit.

PR:             291470
MFC after:      1 week
Reviewed by:    kib
Differential Revision:  https://reviews.freebsd.org/D54215
DeltaFile
+4-4sys/kern/kern_proc.c
+2-2sys/kern/kern_fork.c
+6-62 files

HardenedBSD/src f3f0029contrib/tzdata theory.html Makefile

Merge branch 'freebsd/15-stable/main' into hardened/15-stable/main
DeltaFile
+186-181contrib/tzdata/theory.html
+138-58contrib/tzdata/Makefile
+135-0contrib/tzdata/NEWS
+47-47contrib/tzdata/zonenow.tab
+36-16contrib/tzdata/europe
+41-10contrib/tzdata/northamerica
+583-31216 files not shown
+682-40822 files

HardenedBSD/src 68e2f4ccontrib/tzdata theory.html Makefile

contrib/tzdata: import tzdata 2025c

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

(cherry picked from commit a86dc94b84d177da8f00d1c9420ef0860576e4c4)
DeltaFile
+186-181contrib/tzdata/theory.html
+138-58contrib/tzdata/Makefile
+135-0contrib/tzdata/NEWS
+47-47contrib/tzdata/zonenow.tab
+36-16contrib/tzdata/europe
+41-10contrib/tzdata/northamerica
+583-31216 files not shown
+682-40822 files

HardenedBSD/src b94c971contrib/tzdata theory.html Makefile

contrib/tzdata: import tzdata 2025c

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

(cherry picked from commit a86dc94b84d177da8f00d1c9420ef0860576e4c4)
DeltaFile
+186-181contrib/tzdata/theory.html
+138-58contrib/tzdata/Makefile
+135-0contrib/tzdata/NEWS
+47-47contrib/tzdata/zonenow.tab
+36-16contrib/tzdata/europe
+41-10contrib/tzdata/northamerica
+583-31216 files not shown
+682-40822 files

HardenedBSD/src 6dabc1dsbin/pfctl pf_print_state.c, sys/conf newvers.sh

Merge remote-tracking branch 'origin/hardened/current/master' into hardened/current/cross-dso-cfi
DeltaFile
+0-5sbin/pfctl/pf_print_state.c
+1-2sys/conf/newvers.sh
+1-72 files

HardenedBSD/src 5e00129sbin/pfctl pf_print_state.c

Merge branch 'freebsd/current/main' into hardened/current/master
DeltaFile
+0-5sbin/pfctl/pf_print_state.c
+0-51 files

HardenedBSD/src 7836f0clibexec/rc/rc.d FILESYSTEMS noshutdown, sbin/reboot nextboot.sh

Merge branch 'freebsd/14-stable/main' into hardened/14-stable/master
DeltaFile
+4-0sbin/reboot/nextboot.sh
+1-1libexec/rc/rc.d/FILESYSTEMS
+1-1libexec/rc/rc.d/noshutdown
+1-1sys/sys/bus.h
+1-1usr.bin/fsync/fsync.c
+1-0libexec/rc/rc.d/cleanvar
+9-46 files

HardenedBSD/src 4e323b8libexec/rc/rc.d noshutdown FILESYSTEMS, sbin/reboot reboot.c nextboot.8

Merge branch 'freebsd/15-stable/main' into hardened/15-stable/main
DeltaFile
+34-10sbin/reboot/reboot.c
+2-2sbin/reboot/nextboot.8
+1-1libexec/rc/rc.d/noshutdown
+1-1libexec/rc/rc.d/FILESYSTEMS
+1-1sys/sys/bus.h
+1-1usr.bin/fsync/fsync.c
+40-162 files not shown
+42-178 files