HardenedBSD/src 2624aad — lib/libpledge/tests libpledge_test.rb

HBSD: update libpledge_test.rb
DeltaFile
+22-19lib/libpledge/tests/libpledge_test.rb
+22-191 files

HardenedBSD/src ff51f97 — lib/libc/gen getcap.3, lib/libthr/tests pthread_tryjoin_test.c

Merge remote-tracking branch 'rad/hardened/current/master' into hardened/current/pledge
DeltaFile
+74-21libexec/rtld-elf/rtld.c
+29-38lib/libthr/thread/thr_rwlock.c
+24-5lib/libthr/tests/pthread_tryjoin_test.c
+18-2lib/libc/gen/getcap.3
+14-5libexec/rtld-elf/rtld.h
+17-2libexec/rtld-elf/rtld_lock.c
+176-7311 files not shown
+207-8817 files

HardenedBSD/src 96df931 — lib/libc/gen getcap.3, lib/libthr/tests pthread_tryjoin_test.c

Merge branch 'freebsd/current/main' into hardened/current/master
DeltaFile
+74-21libexec/rtld-elf/rtld.c
+29-38lib/libthr/thread/thr_rwlock.c
+24-5lib/libthr/tests/pthread_tryjoin_test.c
+18-2lib/libc/gen/getcap.3
+14-5libexec/rtld-elf/rtld.h
+17-2libexec/rtld-elf/rtld_lock.c
+176-7311 files not shown
+207-8817 files

HardenedBSD/src 36c4912 — lib/atf/libatf-c++/tests/detail Makefile, lib/atf/libatf-c/tests/detail Makefile

atf: refer to `common.mk` using `SRCTOP`

This helps make the dependent Makefile (and the values contained within)
easier to catch when upgrading atf in the future.

MFC after:      1 week
DeltaFile
+1-1libexec/atf/atf-sh/Makefile
+1-1lib/atf/libatf-c/tests/detail/Makefile
+1-1lib/atf/libatf-c++/tests/detail/Makefile
+3-33 files

HardenedBSD/src 4347ad3 — usr.sbin/bluetooth/hccontrol hccontrol.8

Change invalid reference LE_Set_Scan_Parameters to LE_Set_Scan_Param

hccontrol(8) lists "LE_Set_Scan_Parameters" as a subcommand, but it does
not work on recent releases. Use the LE_Set_Scan_Param instead as that
seems to be the new name according to the source file. Update the man
page accordingly.

PR:     300178
Event:  Oslo Hackathon 2026
DeltaFile
+2-2usr.sbin/bluetooth/hccontrol/hccontrol.8
+2-21 files

HardenedBSD/src 8e3a6d7 — lib/libthr/thread thr_rwlock.c

libthr: Deduplicate some rwlock code

1. abstime calculation
2. rdlock flags judgement

Reviewed by:    kib
MFC after:      2 weeks
Differential Revision: https://reviews.freebsd.org/D60958
DeltaFile
+29-38lib/libthr/thread/thr_rwlock.c
+29-381 files

HardenedBSD/src 56a490f — lib/libthr/tests Makefile pthread_tryjoin_test.c

libthr: Robust tryjoin test

We cannot actually rely on a status (finish) before thr_exit. The
thread needs the kernel signal status=1 to userspace. Before that,
any tryjoin fails. The previous one works as we sleep 1 and should be
enough for normal case.

Reviewed by:    kib, markj
MFC after:      2 weeks
Differential Revision: https://reviews.freebsd.org/D60832
DeltaFile
+24-5lib/libthr/tests/pthread_tryjoin_test.c
+1-0lib/libthr/tests/Makefile
+25-52 files

HardenedBSD/src 710a12b — sys/vm vm_kern.c

vm_kern: wrap around in kmem_back() when the last domain is empty

kmem_back() picks the domain from the address and, when that domain has
no memory, steps forward until it finds one that does:

domain = (addr >> KVA_QUANTUM_SHIFT) % vm_ndomains;
while (VM_DOMAIN_EMPTY(domain))
        domain++;

Nothing stops the walk at vm_ndomains.  When the empty domain is the
last one, the loop runs through the unused tail of vm_dom[] (all empty)
and on into whatever follows vm_dom[MAXMEMDOM] in memory, until a word
there happens to look like a non-zero page count; kmem_back_domain()
then allocates from that garbage domain.  Ordinary allocations never
get here, because the per-domain arenas and the domainset iterators
skip empty domains.  Only the direct callers of kmem_back() do: kinst
(one trampoline per thread, allocated when the module loads) and
memguard.


    [6 lines not shown]
DeltaFile
+1-1sys/vm/vm_kern.c
+1-11 files

HardenedBSD/src 7b23b63 — . UPDATING, sys/netinet udp_usrreq.c tcp_input.c

Revert "bind_all_fibs: Disable bind_all_fibs by default"

This reverts commit 714433a6772b346723341735ef9547f672d9d2a3.

There were issues reported by markj
I will hold this commit until those are fixed.
DeltaFile
+0-10UPDATING
+1-1sys/netinet/udp_usrreq.c
+1-1sys/netinet/tcp_input.c
+1-1sys/netinet/raw_ip.c
+3-134 files

HardenedBSD/src 3a2528a — sys/arm64/rockchip rk_pinctrl.c

rk_pinctrl: Fix the drive strength of the pins on the older SoCs

rk_pinctrl_parse_drive(), used for every Rockchip SoC but the RK3568, could
never succeed and so the drive-strength of the pins was never programmed:

- OF_getencprop() returns the size of the property, but the result was
  tested against 0.  A present property made the function return an error.
- The register offset of the matching table entry was never returned, so
  the caller used whatever was left in reg (the pull register or an
  uninitialized value).  Fixing only the first problem would have written
  the drive value in the wrong register.
- The table lookup skipped an entry only if both the bank and the subbank
  differed, so an entry matching only one of them could be used.

Test the size of the property, skip an entry if either the bank or the
subbank differs and return the offset of the entry.

Tested on a Rock64 (RK3328) by clearing the drive strength of the gmac pins
in U-Boot: without this change they stay at 2mA, with it they get the 4mA

    [8 lines not shown]
DeltaFile
+3-2sys/arm64/rockchip/rk_pinctrl.c
+3-21 files

HardenedBSD/src e8f8b17 — sys/arm64/rockchip rk_pinctrl.c

rk_pinctrl: Fix the drive strength of the RK3568 pins

The drive strength of the RK3568 pins was never programmed.  The drive-strength
property was tested with OF_getencprop() == 0 but that function returns the
size of the property on success, so the branch was dead code and the pins kept
whatever the previous stage of the boot left in the registers.

The register layout was also wrong: each pin has an 8 bits wide drive field
and a register holds two pins, but the value was shifted by pin % 2 bits
instead of (pin % 2) * 8 and the mask only covered six bits.  An odd pin would
have overwritten part of the field of the even pin next to it.

Test the size of the property, put the field at (pin % 2) * 8 and write the
whole 8 bits, like Linux does.

Tested on a Quartz64 Model A and on a NanoPi R5S.

Reviewed by:    mmel
DeltaFile
+5-4sys/arm64/rockchip/rk_pinctrl.c
+5-41 files

HardenedBSD/src 500924a — libexec/rtld-elf rtld_lock.h rtld_lock.c

rtld: add RtldLockState initializer

Sponsored by:   The FreeBSD Foundation
MFC after:      1 week
DeltaFile
+17-0libexec/rtld-elf/rtld.c
+10-2libexec/rtld-elf/rtld_lock.c
+1-0libexec/rtld-elf/rtld_lock.h
+28-23 files

HardenedBSD/src ed059db — libexec/rtld-elf rtld_lock.c rtld.h

rtld: free heap donelists abandoned by the lookup restart

A symbol lookup done under the read-locked rtld_bind_lock is restarted
with the write lock when it needs to load filtees.  The restart is done
by siglongjmp() from lock_restart_for_upgrade(), which skips
donelist_free() for the heap donelists of the unwound frames.  Only
do_dlsym() freed one such donelist, tracked by SymLook.donelist_mem.
The donelist of symlook_default() called from _rtld_bind(), the
donelist of get_program_var_addr() called for dlopen(RTLD_TRACE), and
the donelists of nested symlook_obj_load_filtees() calls were leaked.

Link the heap donelists allocated under the read lock into the list
owned by RtldLockState, which also owns the sigjmp_buf, instead of the
symlook request.

Fixes:  1e370f038778 ("rtld: stop using unbound alloca()")
Sponsored by:   The FreeBSD Foundation
MFC after:      1 week
DeltaFile
+52-21libexec/rtld-elf/rtld.c
+14-5libexec/rtld-elf/rtld.h
+1-0libexec/rtld-elf/rtld_lock.c
+67-263 files

HardenedBSD/src 53cbd14 — libexec/rtld-elf rtld.c

rtld: extract donelist heap allocation into donelist_alloc()

Sponsored by:   The FreeBSD Foundation
MFC after:      1 week
DeltaFile
+11-6libexec/rtld-elf/rtld.c
+11-61 files

HardenedBSD/src 87a7419 — libexec/rtld-elf rtld_lock.h rtld_lock.c

rtld: add lockstate_rlocked()

Sponsored by:   The FreeBSD Foundation
MFC after:      1 week
DeltaFile
+6-0libexec/rtld-elf/rtld_lock.c
+1-0libexec/rtld-elf/rtld_lock.h
+7-02 files

HardenedBSD/src 714433a — . UPDATING, sys/netinet udp_usrreq.c tcp_input.c

bind_all_fibs: Disable bind_all_fibs by default

net.inet.{tcp,udp,raw}.bind_all_fibs was set to 1 for backward
compatibility. Set to 0 by default to drop them all unless an inpcb
bound to the same FIB exists.

While here, Add an UPDATING entry for behaviour change.

Relnotes:       yes
Reviewed by:    markj
Pull Request:   https://ron-dev.freebsd.org/FreeBSD/src/pulls/73
DeltaFile
+10-0UPDATING
+1-1sys/netinet/udp_usrreq.c
+1-1sys/netinet/tcp_input.c
+1-1sys/netinet/raw_ip.c
+13-34 files

HardenedBSD/src 3479ee8 — lib/libc/string memset.3

memset.3: Fix .Fn usage and too many commas

Fix wrong usage of .Fn macro in paragraph for `memset_explicit' that
caused too many commas improperly emitted into rendered manual page.

Approved by:    des
MFC after:      1 week
DeltaFile
+3-2lib/libc/string/memset.3
+3-21 files

HardenedBSD/src f1992af — sys/hardenedbsd hbsd_pledge.c

HBSD: fix off-by-one
DeltaFile
+1-1sys/hardenedbsd/hbsd_pledge.c
+1-11 files

HardenedBSD/src 1ca30cd — lib/libpledge/tests libpledge_test.rb

HBSD: assert on exit status
DeltaFile
+7-1lib/libpledge/tests/libpledge_test.rb
+7-11 files

HardenedBSD/src e9a05ab — sys/hardenedbsd hbsd_pledge.c

HBSD: fix static assert in hbsd_pledge.c
DeltaFile
+1-1sys/hardenedbsd/hbsd_pledge.c
+1-11 files

HardenedBSD/src 983cb64 — . Makefile.inc1

Makefile.inc1: Make bootstrap mandoc's bootstrap libz dependency conditional

We bootstrap libz unconditionally on macOS and Linux, and conditionally
on FreeBSD if pre-1600029 or DISK_IMAGE_TOOLS_BOOTSTRAP is enabled, but
if building on new enough -CURRENT without DISK_IMAGE_TOOLS_BOOTSTRAP
then libz is not bootstrapped and so this libz dependency does not
exist. Add the dependency whenever we are bootstrapping libz but not
otherwise, and do so without duplicating the condition.

Fixes:          1dbcc7ee92c4 ("Makefile.inc1: Make sure mandoc bootstrap tool depends on libz")
MFC after:      1 week
DeltaFile
+6-1Makefile.inc1
+6-11 files

HardenedBSD/src 0d84860 — contrib/libarchive/libarchive archive_read_support_filter_uu.c archive_read_support_format_7zip.c, contrib/libarchive/libarchive/test test_read_format_7zip.c test_read_format_7zip_deflate_arm64_large.7z.uu

Merge branch 'hardened/15-stable/pledge' of rad://z2HLHXgL1xevBNQsf8BmQW7MpJmtm into hardened/15-stable/pledge
DeltaFile
+1,448-239sys/dev/ice/ice_iov.c
+1,580-0contrib/libarchive/libarchive/test/test_read_format_7zip_deflate_arm64_large.7z.uu
+1,257-310sys/net/iflib.c
+556-132contrib/libarchive/libarchive/archive_read_support_format_7zip.c
+521-3contrib/libarchive/libarchive/test/test_read_format_7zip.c
+186-324contrib/libarchive/libarchive/archive_read_support_filter_uu.c
+5,548-1,008393 files not shown
+18,804-4,293399 files

HardenedBSD/src 610ae68 — sys/hardenedbsd hbsd_pledge.c

HBSD: include new syscalls in hbsd_pledge.c
DeltaFile
+9-0sys/hardenedbsd/hbsd_pledge.c
+9-01 files

HardenedBSD/src 13bcc9a — lib/libc/gen getcap.c getcap.3

libc: Fix stack buffer overflow in cgetnext()

`cgetnext()` copies a capability record's name field into a fixed
1024 byte on-stack buffer (`nbuf[BSIZE]`) one character at a time,
but never checks that the write pointer stays within the buffer.
Therefore, a record name that is longer than `BSIZE` (either on a
single line, or accumulated across several `\`-continued lines as
the pointer is not reset amidst continuation) writes past the end
of `nbuf` and smashes the stack.

The name field is read directly from the capability file, so any
consumer of `cgetnext()`/`cgetfirst()` that processes an untrusted
`termcap(5)`- or `printcap(5)`-style database (e.g. `cap_mkdb(1)`,
`lpr(1)`, or any third-party caller) can be exposed and hence made
to corrupt the stack.

Reviewed by:    fuz, dteske
Approved by:    fuz (mentor), dteske (mentor)
MFC after:      1 week
Pull Request:   https://github.com/freebsd/freebsd-src/pull/2309
DeltaFile
+18-2lib/libc/gen/getcap.3
+5-0lib/libc/gen/getcap.c
+23-22 files

HardenedBSD/src fa87b19 — lib/libarchive config_freebsd.h

Merge remote-tracking branch 'rad/hardened/current/master' into hardened/current/pledge
DeltaFile
+4-0lib/libarchive/config_freebsd.h
+4-01 files

HardenedBSD/src ea5831e — contrib/libarchive/libarchive archive_read_support_filter_uu.c archive_read_support_format_7zip.c, contrib/libarchive/libarchive/test test_read_format_7zip.c test_read_format_7zip_deflate_arm64_large.7z.uu

Merge remote-tracking branch 'rad/hardened/15-stable/main' into hardened/15-stable/pledge
DeltaFile
+1,448-239sys/dev/ice/ice_iov.c
+1,580-0contrib/libarchive/libarchive/test/test_read_format_7zip_deflate_arm64_large.7z.uu
+1,257-310sys/net/iflib.c
+556-132contrib/libarchive/libarchive/archive_read_support_format_7zip.c
+521-3contrib/libarchive/libarchive/test/test_read_format_7zip.c
+186-324contrib/libarchive/libarchive/archive_read_support_filter_uu.c
+5,548-1,008393 files not shown
+18,804-4,293399 files

HardenedBSD/src 8c1f4bc — lib/libarchive config_freebsd.h

Merge branch 'freebsd/current/main' into hardened/current/master
DeltaFile
+4-0lib/libarchive/config_freebsd.h
+4-01 files

HardenedBSD/src 4021a48 — contrib/libarchive/libarchive archive_read_support_filter_uu.c archive_read_support_format_7zip.c, contrib/libarchive/libarchive/test test_read_format_7zip.c test_read_format_7zip_deflate_arm64_large.7z.uu

Merge branch 'freebsd/15-stable/main' into hardened/15-stable/main
DeltaFile
+1,448-239sys/dev/ice/ice_iov.c
+1,580-0contrib/libarchive/libarchive/test/test_read_format_7zip_deflate_arm64_large.7z.uu
+1,257-310sys/net/iflib.c
+556-132contrib/libarchive/libarchive/archive_read_support_format_7zip.c
+521-3contrib/libarchive/libarchive/test/test_read_format_7zip.c
+186-324contrib/libarchive/libarchive/archive_read_support_filter_uu.c
+5,548-1,008393 files not shown
+18,804-4,293399 files

HardenedBSD/src 0b120e0 — lib/libarchive config_freebsd.h

libarchive: update config_freebsd.h

Fixes: use of external filter programs, tests

(cherry picked from commit d48b93e5e97593b3052684abf3e043a3a1c7822f)
DeltaFile
+4-0lib/libarchive/config_freebsd.h
+4-01 files

HardenedBSD/src e8a8ef3 — contrib/libarchive/libarchive archive_read_support_format_rar5.c archive_read.c, contrib/libarchive/libarchive/test test_read_format_7zip.c test_read_format_7zip_deflate_arm64_large.7z.uu

libarchive: merge from vendor branch

libarchive 3.8.10

ChangeLog:
https://github.com/libarchive/libarchive/compare/v3.8.9...v3.8.10

Obtained from:  libarchive
Vendor commit:  0c48412be2d94afe1859a807ea7896a18d8900bd

(cherry picked from commit 61c70dc16a79efcb9db732d37706cd311f555d9a)
DeltaFile
+1,580-0contrib/libarchive/libarchive/test/test_read_format_7zip_deflate_arm64_large.7z.uu
+556-132contrib/libarchive/libarchive/archive_read_support_format_7zip.c
+521-3contrib/libarchive/libarchive/test/test_read_format_7zip.c
+186-324contrib/libarchive/libarchive/archive_read_support_filter_uu.c
+269-234contrib/libarchive/libarchive/archive_read.c
+339-150contrib/libarchive/libarchive/archive_read_support_format_rar5.c
+3,451-843284 files not shown
+14,057-2,764290 files