HardenedBSD/src eefc794 — sbin/route route.8

Merge remote-tracking branch 'rad/hardened/current/master' into hardened/current/pledge
DeltaFile
+1-1sbin/route/route.8
+1-11 files

HardenedBSD/src e185bc1 — sbin/route route.8

Merge branch 'freebsd/current/main' into hardened/current/master
DeltaFile
+1-1sbin/route/route.8
+1-11 files

HardenedBSD/src 8df5184 — sbin/route route.8

route: remove reference to long-gone netiso protocol in route(8).
DeltaFile
+1-1sbin/route/route.8
+1-11 files

HardenedBSD/src de3b875 — contrib/atf FREEBSD-upgrade, sys/fs/cd9660 cd9660_rrip.c

Merge remote-tracking branch 'rad/hardened/current/master' into hardened/current/pledge
DeltaFile
+226-0tests/sys/fs/cd9660/rrip_corrupt.c
+81-32contrib/atf/FREEBSD-upgrade
+72-0tests/sys/fs/cd9660/cd9660_test.sh
+38-19sys/fs/nfsclient/nfs_clrpcops.c
+17-6sys/fs/cd9660/cd9660_rrip.c
+10-0tests/sys/fs/cd9660/Makefile
+444-575 files not shown
+455-6111 files

HardenedBSD/src 74ce9bc — contrib/atf FREEBSD-upgrade, sys/fs/cd9660 cd9660_rrip.c

Merge branch 'freebsd/current/main' into hardened/current/master
DeltaFile
+226-0tests/sys/fs/cd9660/rrip_corrupt.c
+81-32contrib/atf/FREEBSD-upgrade
+72-0tests/sys/fs/cd9660/cd9660_test.sh
+38-19sys/fs/nfsclient/nfs_clrpcops.c
+17-6sys/fs/cd9660/cd9660_rrip.c
+10-0tests/sys/fs/cd9660/Makefile
+444-575 files not shown
+455-6111 files

HardenedBSD/src 3ceacfc — contrib/atf config.h NEWS, contrib/atf/atf-c++/detail auto_array.hpp auto_array_test.cpp

Merge branch 'freebsd/15-stable/main' into hardened/15-stable/main
DeltaFile
+0-336contrib/atf/doc/atf-test-case.4
+328-0contrib/atf/doc/atf-test-case.7
+0-302contrib/atf/atf-c++/detail/auto_array_test.cpp
+147-53contrib/atf/NEWS
+0-175contrib/atf/atf-c++/detail/auto_array.hpp
+115-17contrib/atf/config.h
+590-88385 files not shown
+1,391-1,68491 files

HardenedBSD/src 1d57423 — secure/libexec Makefile, secure/libexec/ssh-sk-helper Makefile

Only build secure/libexec/ssh-sk-helper if MK_USB == no

The ssh-sk-helper utility only functions if/when MK_USB == yes.
Installing it on systems where MK_USB == no doesn't make sense.

Differential Revision:  https://reviews.freebsd.org/D58246

(cherry picked from commit 4db3872aabc33088cf180599c5eaa23b6f58e6d1)
DeltaFile
+1-4secure/libexec/ssh-sk-helper/Makefile
+3-1secure/libexec/Makefile
+2-0tools/build/mk/OptionalObsoleteFiles.inc
+6-53 files

HardenedBSD/src 5c47571 — sbin/sysctl sysctl.8

jail.8: fix a typo, sort Xr

PR:             299990 (typo part)
MFC after:      1 week

(cherry picked from commit b9585475ee627e5ea0e17b9d2d2874faaf03a762)
DeltaFile
+3-3sbin/sysctl/sysctl.8
+3-31 files

HardenedBSD/src 63302e9 — sys/fs/nfsclient nfs_clrpcops.c

nfs_clrpcops.c: Fix an mbuf leak introduced by fec497b89b1a

The calls to rpc_free_rdma_reduction() were removed, but I forgot
that newnfs_request() removes the reduction mbuf from the list
upon success, so it has to be free'd separately.
This patch does that.

The patch also disables reduction after the first loop interation.
This is necessary until nfsm_build_rdma_reduction() is patched
to handle an offset within the page array.

Reported by:    markj
MFC after:      1 month
Fixes:  884ee8d6c9b4 ("nfscl: Add some glue for client side NFS over RDMA")
DeltaFile
+38-19sys/fs/nfsclient/nfs_clrpcops.c
+38-191 files

HardenedBSD/src 1a4c2ee — etc/mtree BSD.tests.dist, sys/fs/cd9660 cd9660_vfsops.c cd9660_rrip.c

cd9660: Fix dereferencing invalid RR outlen ptr

`ISO_RRIP_ANALYZE` is constructed in four places. Two of the
initializers set the `outlen` field while the other two,
`cd9660_rrip_analyze` and `cd9660_rrip_offset`, leave it uninitialized.

The uninitialized paths can dereference an invalid pointer on error
paths which causes a kernel panic.

To fix, I zero out `ISO_RRIP_ANALYZE` in all four places where it's
initialized and check that `outlen` is non-null on the error path
in `cd9660_rrip_loop`.

While testing the above, I encountered another kernel panic due to
mounting continuing after the error branch. Evidently, the ISO continued
mounting through the normal ISO 9660 path then triggered a panic down
the line due to a very broken file system from the ISO. To fix that, I
propagate the error from the RR path then fail in the mount path.


    [11 lines not shown]
DeltaFile
+226-0tests/sys/fs/cd9660/rrip_corrupt.c
+72-0tests/sys/fs/cd9660/cd9660_test.sh
+17-6sys/fs/cd9660/cd9660_rrip.c
+10-0tests/sys/fs/cd9660/Makefile
+6-3sys/fs/cd9660/cd9660_vfsops.c
+2-0etc/mtree/BSD.tests.dist
+333-92 files not shown
+335-108 files

HardenedBSD/src 377e0cf — usr.sbin/freebsd-update freebsd-update.sh

freebsd-update: sort options alphabetically

This helps future developers when adding additional options handlers in the
surrounding blocks.

This is effectively a no-op.

MFC after:      1 month

(cherry picked from commit 0adec3d7ec96105c402ff2286e402ad63c845066)
DeltaFile
+4-4usr.sbin/freebsd-update/freebsd-update.sh
+4-41 files

HardenedBSD/src 4e17a6f — tests/sys/netinet tcp_implied_connect.c

tests/sys/netinet/tcp_socket: fix build with ATF 0.22+

Confirm that creating clients/sockets was successful by testing the
result separate from the assignment and test that the return value is
not -1 instead of testing that the value returned is non-zero.

This fixes the build with [ATF 0.22+][1].

MFC after:      2 weeks
Reported by:    clang (-Wparenthesis)
Reviewed by:    tuexen, cc
Differential Revision:  https://reviews.freebsd.org/D59284
[1]: https://github.com/freebsd/atf/pull/72

Conflicts:
        tests/sys/netinet/tcp_implied_connect.c

(cherry picked from commit 4aea6ea2eb400737837ff8d22c25688f88c7966c)
DeltaFile
+4-2tests/sys/netinet/tcp_implied_connect.c
+4-21 files

HardenedBSD/src ef7f64b — contrib/lutok Makefile.in aclocal.m4, contrib/lutok/admin config.sub ltmain.sh

contrib/lutok: remove autotools generated files

These files provide no value in the FreeBSD tree proper and change
frequently, depending on what machine I generate the release tarball on
(and what versions of autotools are on the host). Nuke the autogenerated
files to avoid bloating commit history/the tree.

MFC after:      3 days
Requested by:   Benjamin Jacobs <freebsd at dev.thsi.be>

(cherry picked from commit cfe443e1e63dd588fba7eabec553ed5e1c408d1f)
DeltaFile
+0-23,387contrib/lutok/configure
+0-11,524contrib/lutok/admin/ltmain.sh
+0-8,488contrib/lutok/m4/libtool.m4
+0-1,802contrib/lutok/admin/config.sub
+0-1,733contrib/lutok/aclocal.m4
+0-1,574contrib/lutok/Makefile.in
+0-48,5089 files not shown
+0-52,77715 files

HardenedBSD/src d6cf497 — contrib/lutok Makefile.in aclocal.m4, contrib/lutok/admin config.sub ltmain.sh

contrib/lutok: update from 0.4 to 0.6.2

More information about what's included in the new release can be found
[here](https://github.com/freebsd/lutok/compare/lutok-0.4...lutok-0.6.2).

MFC after:      1 week
Merge commit '447d4fe61d8bf55ffa21698ecee0ac51010a9a0f'

(cherry picked from commit 132f818ddbf457ee67d502cd89b5a18e0a34713d)
DeltaFile
+23,387-0contrib/lutok/configure
+11,524-0contrib/lutok/admin/ltmain.sh
+8,488-0contrib/lutok/m4/libtool.m4
+1,802-0contrib/lutok/admin/config.sub
+1,733-0contrib/lutok/aclocal.m4
+1,574-0contrib/lutok/Makefile.in
+48,508-09 files not shown
+52,777-015 files

HardenedBSD/src f5b2ad7 — lib/libsbuf/tests sbuf_core_test.c

sbuf(3): increase test coverage

This change adds additional explicit test coverage for the following
sbuf(3) APIs:
- sbuf_clear_flags
- sbuf_get_flags
- sbuf_set_flags

While here, add a missing `sbuf_delete` to `sbuf_drain_ret0_test`: while
it isn't strictly required (the library's state is cleaned up shortly
after the test process ends), tools such as Coverity and LSAN flag
issues with leaked memory. Adding the sbuf_delete(3) call to the test
quells that issue.

MFC after:      1 week
Reviewed-by:    ngie
Pull-Request:   https://github.com/freebsd/freebsd-src/pull/2367

(cherry picked from commit 642b3d965eb6ef3ecf733950e66fad565a27c967)
DeltaFile
+77-10lib/libsbuf/tests/sbuf_core_test.c
+77-101 files

HardenedBSD/src 5ab6177 — lib/libsbuf/tests sbuf_string_test.c sbuf_stdio_test.c

sbuf(3): clean up tests

- Update the copyright dates and add "Joao Bonifacio" to the top of
  `sbuf_core_test.c`.
- Use `SPDX-Identifier` instead of longform copyright tort.
- Remove `sbuf_test_common.h`: the header was originally added to help
  with the 10.x/11.x split, but is no longer needed given that those
  releases have been EOLed for multiple years now.

MFC after:      1 week

(cherry picked from commit 3593be37a49e3f5268259bcc2af58cf730b08335)
DeltaFile
+4-37lib/libsbuf/tests/sbuf_core_test.c
+0-37lib/libsbuf/tests/sbuf_test_common.h
+2-23lib/libsbuf/tests/sbuf_string_test.c
+2-23lib/libsbuf/tests/sbuf_stdio_test.c
+8-1204 files

HardenedBSD/src 889727e — contrib/atf/atf-sh integration_test.sh

integration_test: backport fix from freebsd/atf

See the related merge commit for more details.

MFC after:      28 days
Obtained from:  [freebsd/atf at 2690b04c][upstream]
Fixes:          95223108 ("contrib/atf: upgrade to 0.26")

Merge commit '8fd09407c8e64fd26d095c9b00990c545577db5a'

[upstream]: https://github.com/freebsd/atf/commit/2690b04cbc608af165a58426b7275c063b779f03

(cherry picked from commit 8d94a93d967bbb985813aa5561c823ab5f75bb73)
DeltaFile
+1-1contrib/atf/atf-sh/integration_test.sh
+1-11 files

HardenedBSD/src 040ab05 — contrib/atf config.h NEWS, contrib/atf/atf-c++/detail auto_array.hpp auto_array_test.cpp

contrib/atf: upgrade to 0.26

This new version gets contrib/atf in line with the published version of
the package up on [GitHub][github].

Please note that this release is a major update: it contains several
bugfixes and feature enhancements. Most were already present in the
FreeBSD src repo, but there were a large number of changes made in
addition to what was already present.

MFC after:      1 month

Merge commit '9c78088348bcf1059d82a62bb57a0746309d4312'

(cherry picked from commit 952231086100bed7130212b5425e44ffd732913b)

[github]: https://github.com/freebsd/atf
DeltaFile
+0-336contrib/atf/doc/atf-test-case.4
+328-0contrib/atf/doc/atf-test-case.7
+0-302contrib/atf/atf-c++/detail/auto_array_test.cpp
+147-53contrib/atf/NEWS
+0-175contrib/atf/atf-c++/detail/auto_array.hpp
+115-17contrib/atf/config.h
+590-88370 files not shown
+1,264-1,53476 files

HardenedBSD/src a4f1d26 — lib/libc/tests/sys Makefile

tests/libc: only build brk_test where libc provides sbrk

Replace the exclusion list with an allowlist of the architectures
whose libc exports brk/sbrk: amd64, i386, arm and powerpc.

On aarch64, riscv and loongarch libc does not export those symbols
and the test cannot run, so do not build it there. New architectures
now default to not building the test unless brk support is added.

MFC after:      1 week
Signed-off-by:  Xiaoqiang Zhao <zhaoxiaoqiang007 at gmail.com>
Reviewed by:    ngie
Differential Revision:  https://reviews.freebsd.org/D60357

(cherry picked from commit 8a7df6c58d549bd2eaa5cad30b2ef93c3eca3c18)
DeltaFile
+2-1lib/libc/tests/sys/Makefile
+2-11 files

HardenedBSD/src 52be6e2 — share/man/man9 acl.9

acl(9): expound on NFSv4 constants' meanings

This change adds missing documentation for various NFSv4 constants
supported by acl(9).

Bump `.Dd` for the change.

MFC after:      1 week
Reviewed by:    rmacklem
Differential Revision:  https://reviews.freebsd.org/D58736

(cherry picked from commit 7a48c3fd3e6ea097a8fa8f3ce3e25fe7c2d37d9e)
DeltaFile
+18-1share/man/man9/acl.9
+18-11 files

HardenedBSD/src e4679ca — sys/compat/linuxkpi/common/src linux_firmware.c

LinuxKPI: firmware: remove `enoentok` logic in `*firmware_request(..)`

Prior to this change, in the event that a firmware module could not be
loaded, the linux_firmware driver would return a partially initialized
structure with uninitialized/zeroed out values for certain fields. Linux
does not do this, however, so some drivers that use
`request_firmware_nowait` expecting Linux behavior, like `if_bcrmfmac`,
would crash trying to dereference a NULL pointer.

This doesn't address the load/unload situation completely as the driver
remains loaded after the "firmware crashes", but it makes a completely
unusable situation (a kernel panic) into a slightly more usable situation
(driver does not unload).

As a sidenote: the raw free(9) call was replaced with a call to
`linuxkpi_release_firmware` because the latter call [better] ensures
that all resources allocated earlier on in the function are cleaned up.

MFC after:      1 weeks

    [4 lines not shown]
DeltaFile
+7-12sys/compat/linuxkpi/common/src/linux_firmware.c
+7-121 files

HardenedBSD/src 8957a03 — contrib/netbsd-tests/lib/libc/gen t_assert.c

[tests] lib/libc/gen:assert_test: undefine `NDEBUG`

In the event `NDEBUG` was defined, `assert` would become a no-op,
breaking some of the expectations in `assert_test` around `assert(..)`
failing generating a coredump.

This is a better approach than the previous one committed in 6f3445006a
as it continues to test the `assert(..)` function instead of just
skipping it if `NDEBUG` was defined.

Suggested by:   kevans
MFC after:      4 days
MFC with:       6f3445006a
Fixes:          6f3445006a
Differential Revision: https://reviews.freebsd.org/D60253

(cherry picked from commit 9d5a33d9c294b01cead6ff65b0773b5b5ab85ccd)
DeltaFile
+6-20contrib/netbsd-tests/lib/libc/gen/t_assert.c
+6-201 files

HardenedBSD/src c88dd36 — contrib/netbsd-tests/lib/libc/gen t_assert.c

[tests] lib/libc/gen:assert_test: skip tests when NDEBUG set

In the event that NDEBUG is specified in CFLAGS--which is most likely
triggered via `MK_ASSERT_DEBUG` == "no" -- all assert(3) statements are
optimized out by design. This breaks the assert(3) tests as they
specifically rely on assert(3) actually raising a `SIGABRT` instead of
quietly succeeding.

Skip both tests if `NDEBUG` is set. There's no sense running the
`assert(true)` test if the result could instead be a false positive.

MFC after:      2 weeks

(cherry picked from commit 6f3445006aa05550f14af65b04276c3d25169941)
DeltaFile
+20-0contrib/netbsd-tests/lib/libc/gen/t_assert.c
+20-01 files

HardenedBSD/src a38180f — share/mk bsd.confs.mk

share/mk/bsd.confs.mk: fix trivial typo in message

The error message noting that the file should not be included said
"bsd.conf.mk" before this change. Now it correctly says "bsd.confs.mk".

MFC after:      3 days

(cherry picked from commit a3214d4e9b661fb173fc25b06b7ee9902b0b57e3)
DeltaFile
+1-1share/mk/bsd.confs.mk
+1-11 files

HardenedBSD/src acc5475 — sys/arm/rockchip files.rk32xx

clk: add config(5) entry for `rk_clk_mmc.c`

This is needed in order to unbreak the build on armv7.

Reported by:    Jenkins
Fixes:          e32b082ba28b ("clk: rockchip: Add the MMC phase clock")
DeltaFile
+1-0sys/arm/rockchip/files.rk32xx
+1-01 files

HardenedBSD/src 91fcc2d — contrib/atf FREEBSD-upgrade

atf/FREEBSD-upgrade: update document/rewrite in Markdown

The document does not reflect current reality with how updates/releases
should be managed with contrib/atf . Update it to a state that better
reflects current practices with git, as well as information about where
the latest version of the project can be found, etc.

This change will be used as a template for adding instructions on how to
update contrib/kyua and contrib/lutok in future commits.

MFC after:      1 month
Reviewed by:    ziaee, carlavilla
Differential Revision:  https://reviews.freebsd.org/D59879
DeltaFile
+81-32contrib/atf/FREEBSD-upgrade
+81-321 files

HardenedBSD/src 28fb1a2 — contrib/libarchive/libarchive archive_read_support_format_iso9660.c archive_read.c, contrib/libarchive/libarchive/test test_archive_write_close_callback.c test_write_format_pax_mac_meta.c

Merge remote-tracking branch 'rad/hardened/current/master' into hardened/current/pledge
DeltaFile
+170-0contrib/libarchive/libarchive/test/test_write_format_pax_mac_meta.c
+65-98contrib/libarchive/tar/creation_set.c
+98-48contrib/libarchive/libarchive/archive_read.c
+94-19contrib/tzcode/NEWS
+106-0contrib/libarchive/libarchive/test/test_archive_write_close_callback.c
+60-43contrib/libarchive/libarchive/archive_read_support_format_iso9660.c
+593-208110 files not shown
+3,019-705116 files

HardenedBSD/src a6deded — contrib/libarchive/libarchive archive_read_support_format_iso9660.c archive_read.c, contrib/libarchive/libarchive/test test_archive_write_close_callback.c test_write_format_pax_mac_meta.c

Merge branch 'freebsd/current/main' into hardened/current/master
DeltaFile
+170-0contrib/libarchive/libarchive/test/test_write_format_pax_mac_meta.c
+65-98contrib/libarchive/tar/creation_set.c
+98-48contrib/libarchive/libarchive/archive_read.c
+94-19contrib/tzcode/NEWS
+106-0contrib/libarchive/libarchive/test/test_archive_write_close_callback.c
+60-43contrib/libarchive/libarchive/archive_read_support_format_iso9660.c
+593-208110 files not shown
+3,019-705116 files

HardenedBSD/src b03e9d7 — sys/dev/e1000 if_igbv.c if_em.c, sys/dev/rge if_rge_hw.c if_rge.c

Merge branch 'freebsd/15-stable/main' into hardened/15-stable/main
DeltaFile
+10,256-0sys/dev/rge/if_rge_microcode.h
+2,700-0sys/dev/rge/if_rge.c
+2,268-0sys/dev/e1000/if_igb_iov.c
+2,232-0sys/dev/rge/if_rge_hw.c
+1,216-383sys/dev/e1000/if_em.c
+973-0sys/dev/e1000/if_igbv.c
+19,645-38396 files not shown
+26,569-686102 files

HardenedBSD/src a50d83e — sys/dev/ice ice_common.c

ice: Roll back Tx queues after scheduler setup failures

Add Tx LAN Queues commits the PQM queue and PSM leaf before returning
success.  ice_ena_vsi_txq() can subsequently fail to create the software
scheduler node or replay its saved bandwidth configuration.  Returning
at that point leaves an allocated queue that the caller does not record.
Later queue setup can fail until a function or PF reset removes it.

Issue Disable Tx LAN Queues directly from the completed Add response
before returning a post-add error.  Keep the rollback buffer on the
stack so the allocation failure being recovered cannot also prevent
cleanup.  Remove any software node and invalidate its queue context only
after firmware accepts the disable.  Preserve the queue context and any
software node when rollback fails so active hardware state is not
hidden.

This follows the Add and Disable command lifecycle documented in the
Intel E810 Datasheet, document 613875-003, section 10.5.5.8.


    [3 lines not shown]
DeltaFile
+52-1sys/dev/ice/ice_common.c
+52-11 files