HardenedBSD/src 71ba188lib/libsys mq_open.2, release/packages/ucl kyua-all.ucl ncurses-all.ucl

Merge remote-tracking branch 'origin/hardened/current/master' into hardened/current/cross-dso-cfi
DeltaFile
+29-31release/packages/ucl/kyua-all.ucl
+24-2release/packages/ucl/ncurses-all.ucl
+22-1lib/libsys/mq_open.2
+1-1sbin/tunefs/tunefs.c
+76-354 files

HardenedBSD/src 615e1f5lib/libsys mq_open.2, release/packages/ucl kyua-all.ucl ncurses-all.ucl

Merge branch 'freebsd/current/main' into hardened/current/master
DeltaFile
+29-31release/packages/ucl/kyua-all.ucl
+24-2release/packages/ucl/ncurses-all.ucl
+22-1lib/libsys/mq_open.2
+1-1sbin/tunefs/tunefs.c
+76-354 files

HardenedBSD/src 16cf93fetc/mtree BSD.usr.dist, sys/dev/ena ena_netmap.c ena.c

Merge branch 'freebsd/15-stable/main' into hardened/15-stable/main
DeltaFile
+5-3sys/dev/ena/ena_netmap.c
+2-3sys/dev/ena/ena.c
+1-2sys/dev/ena/ena_rss.h
+0-2etc/mtree/BSD.usr.dist
+1-1sys/dev/ena/ena.h
+9-115 files

HardenedBSD/src 3e9f4fdlib/libsys mq_open.2

mq_open(2): document sysctl limit EINVAL and ENFILE conditions

Document two missing error conditions for mq_open(2):

- EINVAL: returned when mq_maxmsg exceeds kern.mqueue.maxmsg or
  mq_msgsize exceeds kern.mqueue.maxmsgsize.
- ENFILE: add kern.mqueue.maxmq sysctl name to the existing entry.

PR:             243209
Reviewed by:    mhorne
MFC after:      1 week
Signed-off-by:  Kit Dallege <xaum.io at gmail.com>
Pull Request:   https://github.com/freebsd/freebsd-src/pull/2098
DeltaFile
+22-1lib/libsys/mq_open.2
+22-11 files

HardenedBSD/src 1059899sys/dev/ena ena_netmap.c

ena: Verify that an ENA ring is in netmap only in native mode

netmap operates in two modes:
1) Emulated - netmap handling is done by the network stack, the
NIC driver operates transparently to netmap.
2) Native - netmap management is done by the NIC driver.

When checking whether a specific ENA ring is running in netmap
mode, only the following checks were done:
1. IFCAP_NETMAP - Check whether netmap capability is enabled on
the device.
2. NKR_NETMAP_ON - Check whether netmap is actively using this
ring.

The above checks implied that the netmap mode is native and the
ENA driver needs to handle the netmap logic.
The code was missing an explicit check on whether native mode
is actually on (NAF_NATIVE).
This led to a case where though emulated mode was used and

    [19 lines not shown]
DeltaFile
+5-3sys/dev/ena/ena_netmap.c
+5-31 files

HardenedBSD/src 3a01651sys/dev/ena ena.c ena_rss.h

ena: Minor changes

1. Move parenthesis to correct place in switch and fix include order
2. Add comment at the end of an ifdef for clarity
3. Change include order.

Reviewed by: cperciva
Differential Revision: https://reviews.freebsd.org/D55696
Sponsored by: Amazon, Inc.

(cherry picked from commit 2667a8454cff5896c7b467c78cd4ace5ad40f5eb)
DeltaFile
+2-3sys/dev/ena/ena.c
+1-2sys/dev/ena/ena_rss.h
+3-52 files

HardenedBSD/src 332708asys/dev/ena ena.h

ena: Update driver version to v2.8.2

Bug Fixes:
* Verify that an ENA ring is in netmap only in native mode

Minor Changes:
* Move parenthesis to correct place in switch
* Add comment
* Reorder define

Reviewed by: cperciva
Differential Revision: https://reviews.freebsd.org/D55698
Sponsored by: Amazon, Inc.

(cherry picked from commit 96c5eaf0ac6b98d0832e1037d672064de43a7e00)
DeltaFile
+1-1sys/dev/ena/ena.h
+1-11 files

HardenedBSD/src bee397aetc/mtree BSD.usr.dist

mtree: stop creating /usr/share/doc/ncurses

In base 68ad2b0d7af2a the ncurses html documentation was removed, and
entries added to ObsoleteFiles.inc to get rid of /usr/share/doc/ncurses,
but the directory was still being re-created via BSD.usr.dist. Remove it
from there too.

Fixes:          68ad2b0d7af2a
MFC after:      1 month

(cherry picked from commit 212272a43767c3d7be3ddb87605612f6164774c1)
DeltaFile
+0-2etc/mtree/BSD.usr.dist
+0-21 files

HardenedBSD/src d725929release/packages/ucl kyua-all.ucl ncurses-all.ucl

release: Restore licenses for kyua and ncurses

These were modified to avoid triggering a libucl bug which is now fixed.

MFC after:      1 week
Reviewed by:    ivy, kevans
Differential Revision:  https://reviews.freebsd.org/D52824
DeltaFile
+29-31release/packages/ucl/kyua-all.ucl
+24-2release/packages/ucl/ncurses-all.ucl
+53-332 files

HardenedBSD/src 616f47fsbin/tunefs tunefs.c

tunefs: Fix alignment warning on arm64

MFC after:      1 week
Fixes:          c5e79c7e93dd ("tunefs: Don't lower WARNS")
Reviewed by:    bakul
Differential Revision:  https://reviews.freebsd.org/D56229
DeltaFile
+1-1sbin/tunefs/tunefs.c
+1-11 files

HardenedBSD/src 15f6966share/man/man5 src.conf.5, share/mk src.opts.mk

Merge remote-tracking branch 'origin/hardened/current/master' into hardened/current/cross-dso-cfi
DeltaFile
+3-1share/man/man5/src.conf.5
+1-0share/mk/src.opts.mk
+1-0sys/kern/kern_event.c
+5-13 files

HardenedBSD/src 3bb9143share/man/man5 src.conf.5, share/mk src.opts.mk

Merge branch 'freebsd/current/main' into hardened/current/master
DeltaFile
+3-1share/man/man5/src.conf.5
+1-0share/mk/src.opts.mk
+1-0sys/kern/kern_event.c
+5-13 files

HardenedBSD/src aab1ef4sys/kern kern_event.c

kqueue_fork_copy_knote(): zero kn_knlist for the copy before calling knlist_add()

Reported by:    pho, dhw
Fixes:  306c9049c642da6a59a5dc088589605a9aa38b87
Sponsored by:   The FreeBSD Foundation
MFC after:      1 week
DeltaFile
+1-0sys/kern/kern_event.c
+1-01 files

HardenedBSD/src 8f34b6bshare/man/man5 src.conf.5

src.conf.5: Regen after MK_CROSS_COMPILER=no change
DeltaFile
+3-1share/man/man5/src.conf.5
+3-11 files

HardenedBSD/src 7d82731share/mk src.opts.mk

src.opts.mk: !CROSS_COMPILER implies !LLVM_BINUTILS_BOOTSTRAP

This fixes the build when WITHOUT_CROSS_COMPILER is set.

Reported by: fuz, vishwin
Fixes: 17494c6e6b7d ("build: Boostrap LLVM_BINUTILS for cross-tools")
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D56219
DeltaFile
+1-0share/mk/src.opts.mk
+1-01 files

HardenedBSD/src bd1016esbin/tunefs tunefs.c Makefile, sbin/tunefs/tests tunefs_test.sh Makefile

Merge remote-tracking branch 'origin/hardened/current/master' into hardened/current/cross-dso-cfi
DeltaFile
+189-0sbin/tunefs/tests/tunefs_test.sh
+52-20sys/netinet6/nd6_nbr.c
+3-3sbin/tunefs/tunefs.c
+4-1sbin/tunefs/Makefile
+2-2sys/netpfil/ipfw/nptv6/nptv6.c
+4-0sbin/tunefs/tests/Makefile
+254-263 files not shown
+258-279 files

HardenedBSD/src 830ba50sbin/tunefs tunefs.c Makefile, sbin/tunefs/tests tunefs_test.sh Makefile

Merge branch 'freebsd/current/main' into hardened/current/master
DeltaFile
+189-0sbin/tunefs/tests/tunefs_test.sh
+52-20sys/netinet6/nd6_nbr.c
+3-3sbin/tunefs/tunefs.c
+4-1sbin/tunefs/Makefile
+2-2sys/netpfil/ipfw/nptv6/nptv6.c
+4-0sbin/tunefs/tests/Makefile
+254-263 files not shown
+258-279 files

HardenedBSD/src 889a647contrib/tzcode localtime.c zic.c

Merge branch 'freebsd/15-stable/main' into hardened/15-stable/main
DeltaFile
+1,044-709contrib/tzcode/localtime.c
+470-313contrib/tzcode/zic.c
+224-199contrib/tzcode/tz-art.html
+206-192contrib/tzcode/tz-link.html
+195-188contrib/tzcode/theory.html
+224-156contrib/tzcode/private.h
+2,363-1,75735 files not shown
+3,393-2,49341 files

HardenedBSD/src c5e79c7sbin/tunefs tunefs.c Makefile

tunefs: Don't lower WARNS

Use casts to silence the alignment warnings instead of potentially
suppressing other legitimate warnings.

MFC after:      1 week
Differential Revision:  https://reviews.freebsd.org/D56033
DeltaFile
+3-3sbin/tunefs/tunefs.c
+0-2sbin/tunefs/Makefile
+3-52 files

HardenedBSD/src 6630c3aetc/mtree BSD.tests.dist, sbin/tunefs Makefile

tunefs: Add tests

MFC after:      1 week
Reviewed by:    ngie
Differential Revision:  https://reviews.freebsd.org/D56034
DeltaFile
+189-0sbin/tunefs/tests/tunefs_test.sh
+5-0sbin/tunefs/Makefile
+4-0sbin/tunefs/tests/Makefile
+2-0etc/mtree/BSD.tests.dist
+200-04 files

HardenedBSD/src 9b019b4contrib/tzcode localtime.c zic.c

tzcode: Update to 2026a

Many thanks to Paul Eggert for adopting most of our adaptations as
optional features upstream in the previous release (2025c).

MFC after:      1 week
Reviewed by:    philip
Differential Revision:  https://reviews.freebsd.org/D55741

(cherry picked from commit ff2c98b30b57b9763e2a6575f729bab676e6c025)
DeltaFile
+1,044-709contrib/tzcode/localtime.c
+470-313contrib/tzcode/zic.c
+224-199contrib/tzcode/tz-art.html
+206-192contrib/tzcode/tz-link.html
+195-188contrib/tzcode/theory.html
+224-156contrib/tzcode/private.h
+2,363-1,75722 files not shown
+3,153-2,23028 files

HardenedBSD/src cf27580sys/netinet6 nd6_nbr.c nd6.h

nd6: Fix delayed NA for proxy addresses

Delayed proxy addresses need special handling, since
they can use link-local ifa as their source address and
have different link-layer data in their response.

Fixes:          f37fbe30f559
Reviewed by:    glebius, markj
Differential Revision: https://reviews.freebsd.org/D55850
DeltaFile
+52-20sys/netinet6/nd6_nbr.c
+1-0sys/netinet6/nd6.h
+53-202 files

HardenedBSD/src d9d7b59sys/netpfil/ipfw/nptv6 nptv6.c

ipfw_nptv6: fix handling the ifaddr removal event

The result of IN6_ARE_MASKED_ADDR_EQUAL() macro is not an integer, so
threat it as a boolean value.

PR:             294114
Reported by:    Peter Much <pmc citylink dinoex sub org>
MFC after:      1 week
DeltaFile
+2-2sys/netpfil/ipfw/nptv6/nptv6.c
+2-21 files

HardenedBSD/src 436f7fc.github/workflows cross-bootstrap-tools.yml

.github: support all stable branches

If this eventually poses a problem for unsupported branches we can fix
them directly.

Sponsored by:   Innovate UK

Reviewed by:    emaste
Differential Revision:  https://reviews.freebsd.org/D53838

(cherry picked from commit 1e189279576497498cafad6f8c0a36a377b786a3)
DeltaFile
+1-1.github/workflows/cross-bootstrap-tools.yml
+1-11 files

HardenedBSD/src 0602b91tools/build Makefile, tools/build/cross-build/include/mac string.h

cross-build: Provide mempcpy when building on macOS

We could patch the tzcode config to not use it, but it's simple to
provide an implementation of it and avoid spreading cross-build
bootstrapping special cases.

Fixes:          ff2c98b30b57 ("tzcode: Update to 2026a")
MFC after:      1 week

(cherry picked from commit 47402c9422ec6c9ba76d96414f5a08bd35a9e1fd)
DeltaFile
+3-0tools/build/Makefile
+2-0tools/build/cross-build/include/mac/string.h
+5-02 files

HardenedBSD/src 25b35dcusr.sbin/syslogd syslogd.c

syslogd: Allow killing when in foreground

Normally, syslogd reacts only to SIGTERM, and ignores SIGINT and SIGQUIT
unless in debug mode.  Extend that to also apply when running in the
foreground.  Take this opportunity to comment the event loop.

MFC after:      1 week
Reviewed by:    jfree
Differential Revision:  https://reviews.freebsd.org/D55886

(cherry picked from commit 828de702ada854b5f09f447ba06e4e08e976ba07)
DeltaFile
+8-2usr.sbin/syslogd/syslogd.c
+8-21 files

HardenedBSD/src 3ef2921usr.bin/m4 eval.c look.c

m4: Misc style fixes

MFC after:      1 week

Reviewed by:    fuz
Differential Revision:  https://reviews.freebsd.org/D55794

(cherry picked from commit 41474e78c493184f023723d1f86539e07bb01b92)
DeltaFile
+9-9usr.bin/m4/eval.c
+9-8usr.bin/m4/look.c
+5-7usr.bin/m4/misc.c
+2-3usr.bin/m4/main.c
+1-1usr.bin/m4/expr.c
+1-1usr.bin/m4/mdef.h
+27-296 files

HardenedBSD/src b195333usr.bin/m4 eval.c mdef.h

m4: Stop abbreviating builtin names

* Stop abbreviating macro names half-randomly to 8 chars, this is no
  longer 1990.

* Likewise for function names (in particular use doindex for a function
  that is notably different from the classic index function).

* Rename a few things for more fidelity: eval is the builtin name, not
  expr and your maketemp/mkstemp conform to mkstemp semantics for better
  security.

* Rewrap a few comments that were ludicrously short.

No functional changes except improved accuracy of some error messages.

MFC after:      1 week
Differential Revision:  https://reviews.freebsd.org/D55793

(cherry picked from commit f8f6f1cbd576ab5f15cef178cc05251365652f74)
DeltaFile
+86-98usr.bin/m4/eval.c
+44-44usr.bin/m4/mdef.h
+33-32usr.bin/m4/main.c
+3-3usr.bin/m4/look.c
+1-1usr.bin/m4/extern.h
+1-1usr.bin/m4/misc.c
+168-1796 files

HardenedBSD/src 0d2454fcontrib/file/magic/Magdir filesystems

file: Parse some UFS2 flags

This allows libmagic to recognize the FS_DOSOFTDEP, FS_SUJ, FS_GJOURNAL,
FS_ACLS, and FS_NFS4ACLS flags on a UFS2 file system.

Accepted upstream as 482259e5e952.

MFC after:      1 week
Differential Revision:  https://reviews.freebsd.org/D56010

(cherry picked from commit fa03f93e8829a7689101303fbe9fb06654ca14ed)
DeltaFile
+5-0contrib/file/magic/Magdir/filesystems
+5-01 files

HardenedBSD/src 81114fflib/libc/amd64/string strrchr.S

libc/amd64/strrchr.S: rewrite and fix scalar implementation

The original scalar implementation of strrchr() had incorrect
logic that failed if the character searched for was the NUL
character.  It was also possibly affected by the issue fixed
in 3d8ef251a for strchrnul().

Rewrite the function with logic that actually works.  We defer
checking for the character until after we have checked for NUL.
When we encounter the final NUL byte, we mask out the characters
beyond the tail before checking for a match.

This bug only affects users running on amd64 with ARCHLEVEL=scalar
(cf. simd(7)).  The default configuration is not affected.

The bug was unfortunately not caught by the unit test inherited
from NetBSD.  An extended unit test catching the issue is proposed
in D56037.


    [9 lines not shown]
DeltaFile
+26-52lib/libc/amd64/string/strrchr.S
+26-521 files