HardenedBSD/src 4158b51sys/dev/wg if_wg.c wg_cookie.c, sys/fs/udf udf_vfsops.c

Merge branch 'freebsd/14-stable/main' into hardened/14-stable/master
DeltaFile
+0-11sys/fs/udf/udf_vfsops.c
+9-1sys/kern/kern_kthread.c
+3-3sys/dev/wg/if_wg.c
+2-3sys/dev/wg/wg_cookie.c
+0-4sys/kern/kern_khelp.c
+0-4sys/kern/subr_busdma_bufalloc.c
+14-261 files not shown
+14-307 files

HardenedBSD/src 4510f2cshare/man/man5 src.conf.5, share/mk bsd.opts.mk

Make WITHOUT_UNDEFINED_VERSION the default

Link with --no-undefined-version by default.  Will detect and prevent
the accidental removal of symbols from versioned libraries.

Reviewed by:    arichardson, kib, dim, emaste
Differential Revision:  https://reviews.freebsd.org/D44216
DeltaFile
+6-4share/man/man5/src.conf.5
+2-2share/mk/bsd.opts.mk
+4-0tools/build/options/WITH_UNDEFINED_VERSION
+0-2tools/build/options/WITHOUT_UNDEFINED_VERSION
+12-84 files

HardenedBSD/src 723e60alib/libcompiler_rt Makefile.inc, lib/libgcc_s Symbol.map

libgcc_s: __extendxftf2 and __trunctfxf2 are amd64-only

__extendxftf2 and __trunctfxf2 build on amd64 not aarch64 and riscv.

Reviewed by:    emaste
Differential Revision:  https://reviews.freebsd.org/D45052
DeltaFile
+6-4lib/libgcc_s/Symbol.map
+6-2lib/libcompiler_rt/Makefile.inc
+12-62 files

HardenedBSD/src afd0c20usr.sbin/ctladm ctladm.c

ctladm: Use nitems() in a few more places

Sponsored by:   Chelsio Communications

Differential Revision:  https://reviews.freebsd.org/D45017
DeltaFile
+3-6usr.sbin/ctladm/ctladm.c
+3-61 files

HardenedBSD/src eb3dbf2sys/netinet6 in6.h

in6.h: expose s6_addr* definitions to user level

The only element of of in6_addr that is specified in RFC 3493 or
in POSIX.1-2017 is s6_addr, implemented via a #define to a union
member.  However, FreeBSD and other BSD systems have additional
definitions for the other union members, s6_addr{8,16,32} which
are defined for the kernel and loader.  Some Linux applications
also use them, and they seem to be allowed by the RFC and POSIX.
Remove the current ifdefs, exposing the additional fields to user
level, and replace with #if __BSD_VISIBLE.  Add an explanatory
comment expanding on the previous "nonstandard" comment.

MFC after:      1 week
Reviewed by:    bz
Differential Revision:  https://reviews.freebsd.org/D44979
DeltaFile
+7-1sys/netinet6/in6.h
+7-11 files

HardenedBSD/src 19e3355sys/kern kern_kthread.c

kthread: Set *tdptr earlier in kproc_kthread_add()

See commit ae77041e0714 ("kthread: Set *newtdp earlier in
kthread_add1()") for details.  That commit was incomplete since
g_init()'s first call to kproc_kthread_add() will cause
kproc_kthread_add() to take the `*procptr == NULL` branch, which avoids
kthread_create().

To ensure that the thread pointer is initialized before the thread
starts running, we have to start the kernel process with RFSTOPPED.
We could perhaps go further and use RFSTOPPED only when tdptr != NULL,
but it's probably better to have consistent behaviour.

Reviewed by:    olce, kib
Reported by:    syzbot+e91e798f3c088215ace6 at syzkaller.appspotmail.com
MFC after:      1 week
Differential Revision:  https://reviews.freebsd.org/D44927

(cherry picked from commit d66399326cb4f89d1565fb62c1c07974886893c5)
DeltaFile
+9-1sys/kern/kern_kthread.c
+9-11 files

HardenedBSD/src b6a2ce7sys/fs/udf udf_vfsops.c

udf: uma_zcreate() does not fail

While here remove an old comment regarding preallocation; it appears to
refer to an optimization that is almost certainly irrelevant at this
point.

No functional change intended.

MFC after:      1 week

(cherry picked from commit 78c51db3c4927db2437ec616b33ba1faf73f08ee)
DeltaFile
+0-11sys/fs/udf/udf_vfsops.c
+0-111 files

HardenedBSD/src fa1d1e8sys/kern kern_khelp.c

khelp: uma_zcreate() does not fail

No functional change intended.

MFC after:      1 week

(cherry picked from commit 1e607a0753ff93847926a46003fe74087426b580)
DeltaFile
+0-4sys/kern/kern_khelp.c
+0-41 files

HardenedBSD/src 7a8b490sys/kern subr_busdma_bufalloc.c

busdma: uma_zcreate() does not fail

No functional change intended.

MFC after:      1 week

(cherry picked from commit 8ef2c021822f59a334e3926e8505c8a8e8a3475f)
DeltaFile
+0-4sys/kern/subr_busdma_bufalloc.c
+0-41 files

HardenedBSD/src bff26fesys/dev/wg if_wg.c wg_cookie.c

wg: uma_zcreate() does not fail

No functional change intended.

MFC after:      1 week

(cherry picked from commit b6a0ed7c78dd45937e404706620467bef61c308d)
DeltaFile
+3-3sys/dev/wg/if_wg.c
+2-3sys/dev/wg/wg_cookie.c
+5-62 files

HardenedBSD/src 4ee7b8esys/dev/dpaa if_dtsec_rm.c

dpaa: uma_zcreate() does not fail

No functional change intended.

MFC after:      1 week

(cherry picked from commit 964064937ea04519bd400668dc1ce38848d50901)
DeltaFile
+0-4sys/dev/dpaa/if_dtsec_rm.c
+0-41 files

HardenedBSD/src eee88eflib/libc/net sctp_recvmsg.3

sctp: document sctp_recvmsg as implemented

PR:             275990
MFC after:      3 days
DeltaFile
+3-3lib/libc/net/sctp_recvmsg.3
+3-31 files

HardenedBSD/src d2434f9sys/netinet in_pcb.c

Merge remote-tracking branch 'origin/hardened/current/master' into hardened/current/cross-dso-cfi
DeltaFile
+4-0sys/netinet/in_pcb.c
+4-01 files

HardenedBSD/src 756c14csys/netinet in_pcb.c

Merge branch 'freebsd/current/main' into hardened/current/master
DeltaFile
+4-0sys/netinet/in_pcb.c
+4-01 files

HardenedBSD/src 0568667lib/libulog ulog_login.c, libexec/tftpd tftpd.c

Merge branch 'freebsd/14-stable/main' into hardened/14-stable/master
DeltaFile
+212-140libexec/tftpd/tests/functional.c
+18-12libexec/tftpd/tftpd.c
+15-3sys/arm64/include/vmparam.h
+2-7sys/arm64/arm64/efirt_machdep.c
+4-3sys/arm64/arm64/minidump_machdep.c
+3-3lib/libulog/ulog_login.c
+254-1684 files not shown
+259-17310 files

HardenedBSD/src 10a88e8lib/libulog ulog_login.c

Merge branch 'freebsd/13-stable/main' into hardened/13-stable/master
DeltaFile
+3-3lib/libulog/ulog_login.c
+3-31 files

HardenedBSD/src 3f59eb3lib/libulog ulog_login.c

libulog: Make sure ut_line, ut_user, ut_host are terminated.

MFC after:      3 days
Reviewed by:    bapt
Differential Revision:  https://reviews.freebsd.org/D45004

(cherry picked from commit c28253ecde333c9908b7160664805acc3a92e2b0)
DeltaFile
+3-3lib/libulog/ulog_login.c
+3-31 files

HardenedBSD/src 2bdfc29lib/libulog ulog_login.c

libulog: Make sure ut_line, ut_user, ut_host are terminated.

MFC after:      3 days
Reviewed by:    bapt
Differential Revision:  https://reviews.freebsd.org/D45004

(cherry picked from commit c28253ecde333c9908b7160664805acc3a92e2b0)
DeltaFile
+3-3lib/libulog/ulog_login.c
+3-31 files

HardenedBSD/src 986ccedlibexec/tftpd tftpd.c tftp-utils.c, libexec/tftpd/tests functional.c

tftpd: Use `size_t` where appropriate.

* Limit the use of `ssize_t` to only where it's needed.
* Correct one case of `int` being used for a length.

MFC after:      1 week
Sponsored by:   Klara, Inc.
Reviewed by:    kevans
Differential Revision:  https://reviews.freebsd.org/D44954

(cherry picked from commit 1ed44fcc44b2c04db330663589541608135402f4)

tftpd: Clean up the tests.

MFC after:      1 week
Sponsored by:   Klara, Inc.
Reviewed by:    kevans
Differential Revision:  https://reviews.freebsd.org/D44955


    [38 lines not shown]
DeltaFile
+212-140libexec/tftpd/tests/functional.c
+18-12libexec/tftpd/tftpd.c
+2-2libexec/tftpd/tftp-utils.c
+1-1libexec/tftpd/tftp-utils.h
+233-1554 files

HardenedBSD/src c3a3b23sys/arm64/arm64 efirt_machdep.c minidump_machdep.c, sys/arm64/include vmparam.h

arm64: Check DMAP address is valid in PHYS_IN_DMAP

When checking if a physical address is in the DMAP region we assume
all physical addresses between DMAP_MIN_PHYSADDR and DMAP_MAX_PHYSADDR
are able to be accesses through the DMAP. It may be the case that
there is device memory in this range that shouldn't be accessed through
the DMAP mappings.

Add a check to PHYS_IN_DMAP that the translated virtual address is a
valid kernel address. To support code that already checks the address
is valid add PHYS_IN_DMAP_RANGE.

PR:             278233
Reviewed by:    alc, markj
Sponsored by:   Arm Ltd
Differential Revision:  https://reviews.freebsd.org/D44677

(cherry picked from commit 9d40492efa467095340cf3dca5860880aa441472)
DeltaFile
+15-3sys/arm64/include/vmparam.h
+2-7sys/arm64/arm64/efirt_machdep.c
+4-3sys/arm64/arm64/minidump_machdep.c
+1-1sys/arm64/arm64/machdep.c
+22-144 files

HardenedBSD/src 93b11felibexec/rc/rc.d nuageinit

nuageinit: start the script after zfs

It prevents the home directory for the new users to be hidden
by late mount of the home directory

(cherry picked from commit b6a4776008519bb4a1d5abfe63c46d5f009ce102)
DeltaFile
+1-1libexec/rc/rc.d/nuageinit
+1-11 files

HardenedBSD/src cdac82fsys/rpc clnt_vc.c

Merge branch 'freebsd/14-stable/main' into hardened/14-stable/master
DeltaFile
+8-2sys/rpc/clnt_vc.c
+8-21 files

HardenedBSD/src 2b86979sys/rpc clnt_vc.c

Merge branch 'freebsd/13-stable/main' into hardened/13-stable/master
DeltaFile
+8-2sys/rpc/clnt_vc.c
+8-21 files

HardenedBSD/src f8575d4sys/rpc clnt_vc.c

krpc: Ref cnt the client structures for TLS upcalls

A crash occurred during testing, where the client structures had
already been free'd when the upcall thread tried to lock them.

This patch acquires a reference count on both of the structures
and these are released when the upcall is done, so that the
structures cannot be free'd prematurely.  This happened because
the testing is done over a very slow vpn.

Found during a IETF bakeathon testing event this week.

(cherry picked from commit 4ba444de708bada46a88ecac17b2f6c1dc912234)
DeltaFile
+8-2sys/rpc/clnt_vc.c
+8-21 files

HardenedBSD/src f6b902asys/rpc clnt_vc.c

krpc: Ref cnt the client structures for TLS upcalls

A crash occurred during testing, where the client structures had
already been free'd when the upcall thread tried to lock them.

This patch acquires a reference count on both of the structures
and these are released when the upcall is done, so that the
structures cannot be free'd prematurely.  This happened because
the testing is done over a very slow vpn.

Found during a IETF bakeathon testing event this week.

(cherry picked from commit 4ba444de708bada46a88ecac17b2f6c1dc912234)
DeltaFile
+8-2sys/rpc/clnt_vc.c
+8-21 files

HardenedBSD/src cb3af7eshare/examples/bhyve vmrun.sh, sys/x86/x86 vmware_guestrpc.c

Merge remote-tracking branch 'origin/hardened/current/master' into hardened/current/cross-dso-cfi
DeltaFile
+1,888-0usr.sbin/bhyvectl/amd64/bhyvectl_machdep.c
+31-1,807usr.sbin/bhyvectl/bhyvectl.c
+337-0sys/x86/x86/vmware_guestrpc.c
+81-52share/examples/bhyve/vmrun.sh
+82-0usr.sbin/bhyvectl/aarch64/bhyvectl_machdep.c
+53-0usr.sbin/bhyvectl/bhyvectl.h
+2,472-1,85922 files not shown
+2,624-1,94128 files

HardenedBSD/src 2f5fb2elib/libgcc_s Symbol.map, release Makefile.mirrors

Merge branch 'freebsd/current/main' into hardened/current/master
DeltaFile
+337-0sys/x86/x86/vmware_guestrpc.c
+37-0sys/x86/include/vmware_guestrpc.h
+13-9lib/libgcc_s/Symbol.map
+1-14tools/build/beinstall.sh
+3-12share/man/man8/beinstall.8
+14-0release/Makefile.mirrors
+405-356 files not shown
+422-4012 files

HardenedBSD/src 542456a. ObsoleteFiles.inc, etc/mtree BSD.usr.dist

Merge branch 'freebsd/14-stable/main' into hardened/14-stable/master
DeltaFile
+487-130share/man/man7/hier.7
+3-0ObsoleteFiles.inc
+0-2etc/mtree/BSD.usr.dist
+1-1share/man/man9/ieee80211_vap.9
+491-1334 files

HardenedBSD/src b07689dshare/man/man8 beinstall.8, tools/build beinstall.sh

beinstall: retire mergemaster support

Mergemaster has been deprecated for some time, and will be retired.

Reviewed by:    kevans
Sponsored by:   The FreeBSD Foundation
Differential Revision:  https://reviews.freebsd.org/D41799
DeltaFile
+3-12share/man/man8/beinstall.8
+1-14tools/build/beinstall.sh
+4-262 files

HardenedBSD/src 98c8caalib/libgcc_s Symbol.map

libgcc_s: 80-bit long double function are x86-only

Don't try to expose them on other architectures.

Reviewed by:    arichardson
Differential Revision:  https://reviews.freebsd.org/D45028
DeltaFile
+13-9lib/libgcc_s/Symbol.map
+13-91 files