HardenedBSD/src 6969c98share/examples/mdoc example.4, sys/dev/aic7xxx aic79xx.c aic7xxx.c

Merge remote-tracking branch 'origin/hardened/current/master' into hardened/current/cross-dso-cfi
DeltaFile
+61-0tests/sys/netpfil/pf/proxy.sh
+28-0tests/sys/netpfil/pf/tftpd_inetd.conf
+27-0tests/sys/netpfil/pf/tftpd_proxy_inetd.conf
+3-3sys/dev/aic7xxx/aic79xx.c
+2-2sys/dev/aic7xxx/aic7xxx.c
+3-0share/examples/mdoc/example.4
+124-55 files not shown
+130-911 files

HardenedBSD/src 3ab446fshare/examples/mdoc example.4, sys/dev/aic7xxx aic79xx.c aic7xxx.c

Merge branch 'freebsd/current/main' into hardened/current/master
DeltaFile
+61-0tests/sys/netpfil/pf/proxy.sh
+28-0tests/sys/netpfil/pf/tftpd_inetd.conf
+27-0tests/sys/netpfil/pf/tftpd_proxy_inetd.conf
+3-3sys/dev/aic7xxx/aic79xx.c
+2-2sys/dev/aic7xxx/aic7xxx.c
+3-0share/examples/mdoc/example.4
+124-55 files not shown
+130-911 files

HardenedBSD/src ebcc98fsys/arm/include ieeefp.h, sys/arm64/arm64 elf32_machdep.c

Merge branch 'freebsd/14-stable/main' into hardened/14-stable/master
DeltaFile
+10-0sys/arm/include/ieeefp.h
+1-1sys/arm64/arm64/elf32_machdep.c
+11-12 files

HardenedBSD/src c98a149sys/amd64/pt pt.c, sys/arm/include ieeefp.h

Merge branch 'freebsd/15-stable/main' into hardened/15-stable/main
DeltaFile
+125-100sys/amd64/pt/pt.c
+169-0sys/dev/random/rdseed.c
+19-50sys/dev/random/ivy.c
+29-0sys/netinet/udp_usrreq.c
+9-5sys/netinet/tcp_syncache.c
+10-0sys/arm/include/ieeefp.h
+361-15515 files not shown
+395-16821 files

HardenedBSD/src 56b4719sys/amd64/pt pt.c

pt: Switch to swi(9)

The pt hwt(4) backend uses NMIs to receive updates about the latest t
racing buffer offsets from the tracing hardware. However, it uses
taskqueue(9) to schedule the bottom-half handler. This can lead to
a panic since the taskqueue(9) code isn't aware it's being called
from an NMI context and uses the regular scheduling interfaces.

Fix this by scheduling the bottom-half handler using swi(9) and the
SWI_FROMNMI flag.

Fixes:  310162ea218a
MFC after:      3 days
Differential Revision:  https://reviews.freebsd.org/D52491

(cherry picked from commit 96d82d2d133acaf8effa2e3aee546276e39ff9f2)
DeltaFile
+125-100sys/amd64/pt/pt.c
+125-1001 files

HardenedBSD/src cb29219sys/arm64/arm64 elf32_machdep.c

sys/arm64: fix COMPAT_FREEBSD32 __syscall()

It seems like _QUAD_LOWWORD was incorrectly expanded into 1,
which is correct for big endian but not little endian.  This
means we always grab the padding word for the syscall number,
which is usually 0, causing SIGSYS to be delivered to the caller.
Reintroduce _QUAD_LOWWORD to fix the syscall.

PR:             290411
MFC after:      1 week
Discussed with: jrtc27
Reviewed by:    cognet, emaste
Approved by:    markj (mentor)
Fixes:          8c9c3144ccfa3061879b8cec015ee7d1010e4766
Differential Revision:  https://reviews.freebsd.org/D53250

(cherry picked from commit 1ca09538d94273601dac08204c1d0b3ca9115864)
DeltaFile
+1-1sys/arm64/arm64/elf32_machdep.c
+1-11 files

HardenedBSD/src 0da1b6csys/arm/include ieeefp.h

sys/arm: add fp[gs]et* prototypes to <ieeefp.h>

We have provided implementations for hard float of these for
a while now.  Add them to the header to make things official.
This is required for a bunch of legacy programs in ports.

Approved by:    markj (mentor)
MFC after:      1 week
Differential Revision: https://reviews.freebsd.org/D53156

(cherry picked from commit a8079d40ae7f3cee17c94e61e43c24780a64a010)
DeltaFile
+10-0sys/arm/include/ieeefp.h
+10-01 files

HardenedBSD/src af39e51sys/arm/include ieeefp.h

sys/arm: add fp[gs]et* prototypes to <ieeefp.h>

We have provided implementations for hard float of these for
a while now.  Add them to the header to make things official.
This is required for a bunch of legacy programs in ports.

Approved by:    markj (mentor)
MFC after:      1 week
Differential Revision: https://reviews.freebsd.org/D53156

(cherry picked from commit a8079d40ae7f3cee17c94e61e43c24780a64a010)
DeltaFile
+10-0sys/arm/include/ieeefp.h
+10-01 files

HardenedBSD/src c824960sys/arm64/arm64 elf32_machdep.c

sys/arm64: fix COMPAT_FREEBSD32 __syscall()

It seems like _QUAD_LOWWORD was incorrectly expanded into 1,
which is correct for big endian but not little endian.  This
means we always grab the padding word for the syscall number,
which is usually 0, causing SIGSYS to be delivered to the caller.
Reintroduce _QUAD_LOWWORD to fix the syscall.

PR:             290411
MFC after:      1 week
Discussed with: jrtc27
Reviewed by:    cognet, emaste
Approved by:    markj (mentor)
Fixes:          8c9c3144ccfa3061879b8cec015ee7d1010e4766
Differential Revision:  https://reviews.freebsd.org/D53250

(cherry picked from commit 1ca09538d94273601dac08204c1d0b3ca9115864)
DeltaFile
+1-1sys/arm64/arm64/elf32_machdep.c
+1-11 files

HardenedBSD/src 9611bf2sys/netinet tcp_syncache.c

tcp: improve credential handling in syncache

When adding a syncache entry, take a reference count of the
credentials while the inp is still locked.
Thanks to markj@ for providing a hint regarding the root cause.

Reported by:            David Marker
Reviewed by:            glebius
Tested by:              David Marker
Fixes:                  cbc9438f0505 ("tcp: improve ref count handling when processing SYN")
Sponsored by:           Netflix, Inc.
Differential Revision:  https://reviews.freebsd.org/D53380

(cherry picked from commit 44cb1e857f048d2326bdc1a032ccd2c04d2bcdc9)
DeltaFile
+9-5sys/netinet/tcp_syncache.c
+9-51 files

HardenedBSD/src e31ff08sys/netinet udp_usrreq.c

udp: honor IPV6_TCLASS cmsg for UDP/IPv4 packets

Honor the IPPROTO_IPV6-level cmsg of type IPV6_TCLASS when sending
an UDP/IPv4 packet on an AF_INET6 socket.

Reviewed by:            bz
Sponsored by:           Netflix, Inc.
Differential Revision:  https://reviews.freebsd.org/D53347

(cherry picked from commit d3a3854fdc6e8da3bc6c1c13aab8d371445d2914)
DeltaFile
+17-0sys/netinet/udp_usrreq.c
+17-01 files

HardenedBSD/src 8f5162fsys/netinet udp_usrreq.c

udp: honor IPV6_TCLASS socket option for UDP/IPv4 packets

Honor the IPPROTO_IPV6-level socket option IPV6_TCLASS when sending
an UDP/IPv4 packet on an AF_INET6 socket.

Reviewed by:            bz, glebius
Sponsored by:           Netflix, Inc.
Differential Revision:  https://reviews.freebsd.org/D53346

(cherry picked from commit 3535546a86846ddb0ca5fe4a0689ac635b504459)
DeltaFile
+12-0sys/netinet/udp_usrreq.c
+12-01 files

HardenedBSD/src db0d002tests/sys/netpfil/pf proxy.sh tftpd_inetd.conf

pf tests: tftp-proxy test case

Sponsored by:   Rubicon Communications, LLC ("Netgate")
DeltaFile
+61-0tests/sys/netpfil/pf/proxy.sh
+28-0tests/sys/netpfil/pf/tftpd_inetd.conf
+27-0tests/sys/netpfil/pf/tftpd_proxy_inetd.conf
+2-0tests/sys/netpfil/pf/Makefile
+118-04 files

HardenedBSD/src d1e39f3sys/dev/aic7xxx aic79xx.c aic7xxx.c

aic7xxx: Fix a couple of typos in device messages

- s/Reseting/Resetting/
- s/staus/status/
- s/referrenced/referenced/

MFC after:      1 week
DeltaFile
+3-3sys/dev/aic7xxx/aic79xx.c
+2-2sys/dev/aic7xxx/aic7xxx.c
+5-52 files

HardenedBSD/src 08a6620sys/fs/nfsclient nfs_clrpcops.c

nfsclient: Fix a typo in a panic message

- s/eroneous/erroneous/

MFC after:      1 week
DeltaFile
+1-1sys/fs/nfsclient/nfs_clrpcops.c
+1-11 files

HardenedBSD/src adfe14dsys/cam/ctl ctl.c, sys/cam/scsi scsi_enc_ses.c scsi_enc.c

cam: Fix three typos in kernel messages

- s/maximun/maximum/
- s/queing/queueing/
- s/exhausing/exhausting/

MFC after:      1 week
DeltaFile
+1-1sys/cam/scsi/scsi_enc_ses.c
+1-1sys/cam/scsi/scsi_enc.c
+1-1sys/cam/ctl/ctl.c
+3-33 files

HardenedBSD/src a3e817fshare/man/man4 Makefile, sys/amd64/conf MINIMAL GENERIC

padlock(4)/nehemiah: move i386-only entropy source to MD files

Reviewed by: khng
Differential Revision:  https://reviews.freebsd.org/D53309
(cherry picked from commit d1ca01059d5d756a4aef09d955e98aa59a284344)
(cherry picked from commit 88a53301e198b043e9b046b1c824eae5a24064f9)
DeltaFile
+7-0sys/i386/conf/NOTES
+4-1share/man/man4/Makefile
+3-1sys/modules/Makefile
+1-0sys/conf/files.i386
+0-1sys/amd64/conf/MINIMAL
+0-1sys/amd64/conf/GENERIC
+15-42 files not shown
+15-68 files

HardenedBSD/src 4b6700fshare/examples/mdoc example.4

Document the DEPRECATION NOTICE section for kernel interfaces
DeltaFile
+3-0share/examples/mdoc/example.4
+3-01 files

HardenedBSD/src 9ca8e09sys/dev/random rdseed.c ivy.c, sys/dev/random/fenestrasX fx_pool.c

random: add RDSEED as a provably unique entropy source

NIST SP800-90B allows for only a single entropy source to be claimed
in a FIPS-140-3 certificate.  In addition, only hardware sources that
have a NIST Entropy Source Validation (ESV) certificate, backed by
a SP800-90B Entropy Assessment Report, are usable.  Intel has obtained
ESV certificates for several of their processors, so RDSEED is a
FIPS-140-3 suitable entropy source.

However, even though RDRAND is seeded by RDSEED internally, RDRAND
would need a RBG certificate and CAVP testing run on the DRBG in order
to use it for FIPS-140-3 (SP800-90B) purposes.  So we need to know
down in the CSPRNG-subsystem which source the entropy came from.

In light of the potential issues surrounding AMD Zen 5 CPU's RDSEED
implementation[*], allow RDSEED to be disabled in loader.conf.
[*] https://www.phoronix.com/news/AMD-EPYC-Turin-RDSEED-Bug

Reviewed by:    cem

    [6 lines not shown]
DeltaFile
+169-0sys/dev/random/rdseed.c
+19-50sys/dev/random/ivy.c
+9-0sys/modules/rdseed_rng/Makefile
+0-5sys/modules/rdrand_rng/Makefile
+3-0sys/dev/random/fenestrasX/fx_pool.c
+2-0sys/modules/Makefile
+202-553 files not shown
+205-559 files

HardenedBSD/src a3fcb7bsys/conf NOTES

Add FENESTRASX to LINT to avoid breakage

(cherry picked from commit c1e7e8f5cb0f948abc4679dab295f1447363604d)
DeltaFile
+1-1sys/conf/NOTES
+1-11 files

HardenedBSD/src 46e3edclib/libutil login_class.c, share/man/man4 Makefile

Merge remote-tracking branch 'origin/hardened/current/master' into hardened/current/cross-dso-cfi
DeltaFile
+31-26lib/libutil/login_class.c
+4-2share/man/man4/Makefile
+1-2sys/fs/nfs/nfs_commonsubs.c
+36-303 files

HardenedBSD/src 9c66647lib/libutil login_class.c, share/man/man4 Makefile

Merge branch 'freebsd/current/main' into hardened/current/master
DeltaFile
+31-26lib/libutil/login_class.c
+4-2share/man/man4/Makefile
+1-2sys/fs/nfs/nfs_commonsubs.c
+36-303 files

HardenedBSD/src 7ffbb9bsys/dev/random random_harvestq.c, sys/dev/random/fenestrasX fx_pool.c

Merge branch 'freebsd/15-stable/main' into hardened/15-stable/main
DeltaFile
+0-3sys/dev/random/fenestrasX/fx_pool.c
+1-2sys/dev/random/random_harvestq.c
+1-2sys/sys/random.h
+2-73 files

HardenedBSD/src 98edcbclib/libutil login_class.c

libutil: defer setting the MAC label until after the login class

MAC policies, like mac_biba(4), may forbid changing the login class once
a label has been applied.  For setting up the initial login context,
this isn't really expected and in-fact may break some class-based
configuration.

Defer setting the MAC label until after the login class is set, and
remove the requirement that we have a pwd entry since the label is
pulled from the login class -- we only use pwd for syslog in this path.

Patch is largely by Kevin Barry, with some modifications and this commit
message by kevans@.

PR:             177698
Reviewed by:    des, olce
MFC after:      3 days
Co-authored-by: Kevin Barry <ta0kira gmail com>
Differential Revision:  https://reviews.freebsd.org/D53362
DeltaFile
+31-26lib/libutil/login_class.c
+31-261 files

HardenedBSD/src b3bf22dsys/dev/random random_harvestq.c, sys/dev/random/fenestrasX fx_pool.c

random: garbage collect the RANDOM_PURE_OCTEON entropy source

It was used for Octeon MIPS and all producers have been removed
from the source tree.

Reviewed by: emaste
Differential Revision:  https://reviews.freebsd.org/D53146
(cherry picked from commit 283699338c5724253f721f4d0e488113dd49bd17)
DeltaFile
+0-3sys/dev/random/fenestrasX/fx_pool.c
+1-2sys/dev/random/random_harvestq.c
+1-2sys/sys/random.h
+2-73 files

HardenedBSD/src 73551cdsys/fs/nfs nfs_commonsubs.c

nfs_commonsubs.c: Get rid of variable used as a constant

The variable ncl_mbuf_mhlen is set to MHLEN and only
used in one place.  This patch simply deletes it and
replaces it with MHLEN.

This patch should not affect semantics.

Spotted while fixing cases that could do large
NFSM_DISSECT() sizes.

MFC after:      2 weeks
DeltaFile
+1-2sys/fs/nfs/nfs_commonsubs.c
+1-21 files

HardenedBSD/src 88a5330share/man/man4 Makefile

padlock.4: only install on i386
DeltaFile
+4-1share/man/man4/Makefile
+4-11 files

HardenedBSD/src a38a42eshare/man/man4 Makefile

random: remove hifn(4)

Fixes:  685a78
DeltaFile
+0-1share/man/man4/Makefile
+0-11 files

HardenedBSD/src cbcbd57share/man/man4 hifn.4, sys/amd64/vmm vmm_mem_machdep.c

Merge remote-tracking branch 'origin/hardened/current/master' into hardened/current/cross-dso-cfi
DeltaFile
+0-2,739sys/dev/hifn/hifn7751.c
+0-542sys/dev/hifn/hifn7751reg.h
+0-346sys/dev/hifn/hifn7751var.h
+0-132share/man/man4/hifn.4
+0-63tools/tools/crypto/hifnstats.c
+35-26sys/amd64/vmm/vmm_mem_machdep.c
+35-3,84824 files not shown
+100-3,93730 files

HardenedBSD/src 10ecc72share/man/man4 hifn.4, sys/amd64/vmm vmm_mem_machdep.c

Merge branch 'freebsd/current/main' into hardened/current/master
DeltaFile
+0-2,739sys/dev/hifn/hifn7751.c
+0-542sys/dev/hifn/hifn7751reg.h
+0-346sys/dev/hifn/hifn7751var.h
+0-132share/man/man4/hifn.4
+0-63tools/tools/crypto/hifnstats.c
+35-26sys/amd64/vmm/vmm_mem_machdep.c
+35-3,84824 files not shown
+100-3,93730 files