HardenedBSD/src b90da9flib/libc/tests/net link_addr_test.cc, sys/fs/nfs nfs_commonsubs.c

Merge remote-tracking branch 'origin/hardened/current/master' into hardened/current/cross-dso-cfi
DeltaFile
+1,320-380sys/kern/uipc_usrreq.c
+880-0usr.sbin/traceroute/tests/traceroute_test.sh
+249-89sys/fs/nfsclient/nfs_clvnops.c
+269-0lib/libc/tests/net/link_addr_test.cc
+27-73sys/fs/nfs/nfs_commonsubs.c
+80-15sys/fs/nfsserver/nfs_nfsdserv.c
+2,825-55739 files not shown
+3,200-62445 files

HardenedBSD/src 3f257bblib/libc/tests/net link_addr_test.cc, sys/fs/nfs nfs_commonsubs.c

Merge branch 'freebsd/current/main' into hardened/current/master
DeltaFile
+1,320-380sys/kern/uipc_usrreq.c
+880-0usr.sbin/traceroute/tests/traceroute_test.sh
+249-89sys/fs/nfsclient/nfs_clvnops.c
+269-0lib/libc/tests/net/link_addr_test.cc
+27-73sys/fs/nfs/nfs_commonsubs.c
+80-15sys/fs/nfsserver/nfs_nfsdserv.c
+2,825-55739 files not shown
+3,200-62445 files

HardenedBSD/src e4c7b2bsys/fs/nfs nfs_commonsubs.c, sys/fs/nfsclient nfs_clvnops.c nfs_clrpcops.c

nfsv4: Add support to NFSv4 for named attributes

NFSv4 supports a feature called named attributes, that are
essentially Solaris style extended attributes.
Commits starting with 2ec2ba7e232d added Solaris style extended
attribute support.

This patch uses the Solaris style extended attribute
support to provide support for NFSv4.
Since nfsv4_loadattr() needed an additional argument,
many file are affected, although many in a trivial way.

For the NFSv4 server to support named attributes, ZFS must
be patched and only ZFS file systems support these Solaris
style extended attributes.
DeltaFile
+249-89sys/fs/nfsclient/nfs_clvnops.c
+27-73sys/fs/nfs/nfs_commonsubs.c
+80-15sys/fs/nfsserver/nfs_nfsdserv.c
+65-15sys/fs/nfsclient/nfs_clrpcops.c
+46-10sys/fs/nfsserver/nfs_nfsdport.c
+11-5sys/fs/nfsclient/nfs_clvfsops.c
+478-2077 files not shown
+500-21413 files

HardenedBSD/src fd03d57libexec/rc/rc.d Makefile, usr.bin/showmount Makefile

mountd, showmount: move to the nfs package

while here, alphabetise ${NFS}.

Reviewed by:    des, emaste, rmacklem
Approved by:    des (mentor)
Differential Revision:  https://reviews.freebsd.org/D50169
DeltaFile
+4-4libexec/rc/rc.d/Makefile
+1-0usr.bin/showmount/Makefile
+1-0usr.sbin/mountd/Makefile
+6-43 files

HardenedBSD/src c853409secure/lib/libcrypto/engines Makefile.inc, secure/lib/libcrypto/modules Makefile.inc

libcrypto: move engines and modules to openssl-lib

currently, some OpenSSL-related files end up in the utilities package:

        /usr/lib/engines-3/capi.so
        /usr/lib/engines-3/devcrypto.so
        /usr/lib/engines-3/loader_attic.so
        /usr/lib/engines-3/padlock.so
        /usr/lib/ossl-modules/legacy.so

since these are part of OpenSSL and are not useful without it, move them
to the openssl-lib package.

Reviewed by:    manu, des, emaste
Approved by:    des (mentor)
Differential Revision:  https://reviews.freebsd.org/D50144
DeltaFile
+2-0secure/lib/libcrypto/engines/Makefile.inc
+1-0secure/lib/libcrypto/modules/Makefile.inc
+3-02 files

HardenedBSD/src ff8200fetc/mtree BSD.tests.dist, usr.sbin/traceroute Makefile

traceroute: add tests

add some basic tests for traceroute.  this covers most of the flags we
can easily test; in some cases we use tcpdump to ensure the correct
packets are actually being sent.

to run the tests, we create three jails: one for the source host, one
for the destination host, and one to route packets betweem them.  this
ensures we're actually testing traceroute across a routed network and
not just sending probe packets to a directly connected host.

no tests for traceroute6 are in this commit since the traceroute6 merge
into traceroute is in progress elsewhere.

Reviewed by:    des, adrian
Approved by:    des (mentor)
Differential Revision:  https://reviews.freebsd.org/D49838
DeltaFile
+880-0usr.sbin/traceroute/tests/traceroute_test.sh
+7-0usr.sbin/traceroute/tests/Makefile
+3-0usr.sbin/traceroute/Makefile
+2-0etc/mtree/BSD.tests.dist
+892-04 files

HardenedBSD/src 0a1294fshare/man/man4 bridge.4, sys/net if_bridge.c if_bridgevar.h

bridge: allow IP addresses on members to be disabled

add a new sysctl, net.link.bridge.member_ifaddrs, which defaults to 1.

if it is set to 1, bridge behaviour is unchanged.

if it is set to 0:

- an interface which has AF_INET6 or AF_INET addresses assigned cannot
  be added to a bridge.
- an interface in a bridge cannot have an AF_INET6 or AF_INET address
  assigned to it.
- the bridge will no longer consider the lladdrs on bridge members to be
  local addresses, i.e. frames sent to member lladdrs will not be
  processed by the host.

update bridge.4 to document this behaviour, as well as the existing
recommendation that IP addresses should not be configured on bridge
members anyway, even if it currently partially works.

    [8 lines not shown]
DeltaFile
+78-0tests/sys/net/if_bridge_test.sh
+52-9sys/net/if_bridge.c
+14-1share/man/man4/bridge.4
+8-0sys/netinet/in.c
+8-0sys/netinet6/in6.c
+1-0sys/net/if_bridgevar.h
+161-101 files not shown
+162-107 files

HardenedBSD/src 4ca1395sys/netinet sctp_bsd_addr.c

sctp: ensure correct sctp_gather_internal_ifa_flags usage

sctp_gather_internal_ifa_flags() expects an IPv6 address.

MFC after:      3 days
DeltaFile
+3-0sys/netinet/sctp_bsd_addr.c
+3-01 files

HardenedBSD/src 99c58adsys/netinet sctp_pcb.c

sctp: compute address flags only for IPv6 addresses

Only call sctp_gather_internal_ifa_flags() for IPv6 addresses and
also compile this code only, when IPv6 is supported.
This fixes the compilation of IPv4 only kernels.

Reported by:    bz@
Fixes:          6ab4b0c0df57 ("sctp: initilize local address flags correctly")
MFC after:      3 days
DeltaFile
+16-3sys/netinet/sctp_pcb.c
+16-31 files

HardenedBSD/src 9ab96b3tests/sys/kern unix_seqpacket_test.c

tests/unix_seqpacket: re-enable stress test for unix/seqpacket
DeltaFile
+0-2tests/sys/kern/unix_seqpacket_test.c
+0-21 files

HardenedBSD/src d157927sys/kern uipc_usrreq.c, sys/sys sockbuf.h

unix: new implementation of unix/stream & unix/seqpacket

[this is an updated version of d80a97def9a1, that had been reverted]

Provide protocol specific pr_sosend and pr_soreceive for PF_UNIX
SOCK_STREAM sockets and implement SOCK_SEQPACKET sockets as an extension
of SOCK_STREAM.  The change meets three goals: get rid of unix(4) specific
stuff in the generic socket code, provide a faster and robust unix/stream
sockets and bring unix/seqpacket much closer to specification.  Highlights
follow:

- The send buffer now is truly bypassed.  Previously it was always empty,
but the send(2) still needed to acquire its lock and do a variety of
tricks to be woken up in the right time while sleeping on it.  Now the
only two things we care about in the send buffer is the I/O sx(9) lock
that serializes operations and value of so_snd.sb_hiwat, which we can read
without obtaining a lock.  The sleep of a send(2) happens on the mutex of
the receive buffer of the peer.  A bulk send/recv of data with large
socket buffers will make both syscalls just bounce between owning the

    [29 lines not shown]
DeltaFile
+1,320-380sys/kern/uipc_usrreq.c
+12-0sys/sys/sockbuf.h
+1,332-3802 files

HardenedBSD/src fbd7087share/man/man5 src.conf.5, tools/build/options WITH_LLVM_BINUTILS WITHOUT_LLVM_BINUTILS

strings: Unconditionally install ELF Tool Chain's strings

llvm-strings may consume a large amount of memory while reading the
input file before producing any output.

ELF Tool Chain's strings is small and lightweight, and we always install
strings regardless of WITH_/WITHOUT_TOOLCHAIN settings (as it is useful
in many contexts).  Return to always installing ELF Tool Chain's version
of strings.

This reverts commit 81fa5c4a828bec9f1ead280c59c31bd423e6eeea.
This reverts commit 7ca3db1999cd967f9d6d7b259aa7af54aae14a5f.

PR:             286605
Reported by:    olivier
Reviewed by:    olivier, brooks
Sponsored by:   The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D50084
DeltaFile
+1-7usr.bin/Makefile
+0-7usr.bin/clang/llvm-strings/Makefile
+3-1share/man/man5/src.conf.5
+2-0tools/build/options/WITH_LLVM_BINUTILS
+2-0tools/build/options/WITHOUT_LLVM_BINUTILS
+8-155 files

HardenedBSD/src 330787c. ObsoleteFiles.inc

ObsoleteFiles.inc: Remove audio(8) files after rename to sndctl(8)

Reported by:    eduardo
Reviewed by:    kevans
Fixes:          9a37f1024ceb ("Rename audio(8) to sndctl(8)")
Sponsored by:   The FreeBSD Foundation
DeltaFile
+4-0ObsoleteFiles.inc
+4-01 files

HardenedBSD/src b8a4057share/man/man5 src.conf.5, tools/build/options WITH_LLVM_BINUTILS

Merge branch 'freebsd/14-stable/pieo-conflict' into hardened/14-stable/master
DeltaFile
+11-1share/man/man5/src.conf.5
+0-2tools/build/options/WITH_LLVM_BINUTILS
+11-32 files

HardenedBSD/src 223cfdeshare/mk bsd.prog.mk bsd.progs.mk, tests/sys/fs/fusefs Makefile

HBSD: Revert "Use .pieo extension for WITH_PIE bsd.prog.mk output"

This reverts commit 4939a4a9cd14a2a746a689f7b26fc9fff615326d. We do not
use the .pieo extension.

Signed-off-by: Shawn Webb <shawn.webb at hardenedbsd.org>
DeltaFile
+7-8share/mk/bsd.prog.mk
+1-7tests/sys/fs/fusefs/Makefile
+1-1share/mk/bsd.progs.mk
+9-163 files

HardenedBSD/src 01a5f31share/keys/pkg/trusted pkg.freebsd.org.2013102301

Remove leftover blank line from pkg key file

$FreeBSD$ removal (commit d0b2dbfa0ecf) left a blank line at the
beginning of this file.  Remove it now.

Sponsored by:   The FreeBSD Foundation
DeltaFile
+0-1share/keys/pkg/trusted/pkg.freebsd.org.2013102301
+0-11 files

HardenedBSD/src eb60bf2. RELNOTES

RELNOTES: Fix typo

Reported by:    rpokala
Fixes:          3ab34225af39 ("RELNOTES: Mention sndctl(8)")
Sponsored by:   The FreeBSD Foundation
DeltaFile
+1-1RELNOTES
+1-11 files

HardenedBSD/src 23de29btools/tools/git/ghpr ghpr-push.sh

ghpr-push: Better auotmated closing message

Make it clear this is an automated message and that the change isn't on
the mirror yet, but will be soon. Also, be polite and thank the
contributor for this submission, because the project really does
appreciate it.

Reviewed by:    emaste
Sponsored by:   Netflix
DeltaFile
+1-1tools/tools/git/ghpr/ghpr-push.sh
+1-11 files

HardenedBSD/src 757e973lib/libc/tests/net link_addr_test.cc Makefile

libc tests: add tests for link_addr(3) and link_ntoa(3)

for now, since link_addr() has no way to indicate an error, these are
only positive tests which check the outcome of valid inputs.

Reviewed by:    ngie, des, adrian
Approved by:    des (mentor)
Differential Revision:  https://reviews.freebsd.org/D50062
DeltaFile
+269-0lib/libc/tests/net/link_addr_test.cc
+3-0lib/libc/tests/net/Makefile
+272-02 files

HardenedBSD/src 10df6delibexec/rc/rc.d Makefile, share/man/man4 puc.4

Merge remote-tracking branch 'origin/hardened/current/master' into hardened/current/cross-dso-cfi
DeltaFile
+0-987usr.sbin/audio/audio.c
+987-0usr.sbin/sndctl/sndctl.c
+60-232share/man/man4/puc.4
+0-187usr.sbin/audio/audio.8
+187-0usr.sbin/sndctl/sndctl.8
+105-57libexec/rc/rc.d/Makefile
+1,339-1,46336 files not shown
+1,500-1,51142 files

HardenedBSD/src ab28bd3libexec/rc/rc.d Makefile, share/man/man4 puc.4

Merge branch 'freebsd/current/main' into hardened/current/master
DeltaFile
+0-987usr.sbin/audio/audio.c
+987-0usr.sbin/sndctl/sndctl.c
+60-232share/man/man4/puc.4
+187-0usr.sbin/sndctl/sndctl.8
+0-187usr.sbin/audio/audio.8
+105-57libexec/rc/rc.d/Makefile
+1,339-1,46336 files not shown
+1,500-1,51142 files

HardenedBSD/src 3ab3422. RELNOTES

RELNOTES: Mention sndctl(8)

Sponsored by:   The FreeBSD Foundation
DeltaFile
+5-0RELNOTES
+5-01 files

HardenedBSD/src 9a37f10usr.sbin/audio audio.c audio.8, usr.sbin/sndctl sndctl.c sndctl.8

Rename audio(8) to sndctl(8)

Sponsored by:   The FreeBSD Foundation
MFC after:      1 week
Reviewed by:    adrian
Differential Revision:  https://reviews.freebsd.org/D50167
DeltaFile
+0-987usr.sbin/audio/audio.c
+987-0usr.sbin/sndctl/sndctl.c
+187-0usr.sbin/sndctl/sndctl.8
+0-187usr.sbin/audio/audio.8
+0-8usr.sbin/audio/Makefile
+8-0usr.sbin/sndctl/Makefile
+1,182-1,1821 files not shown
+1,183-1,1837 files

HardenedBSD/src ca9131b. UPDATING

UPDATING: Strengthen recommendations

Strengthen recommendations for ports_modules by adding a separate note.
Use the unused [2] to add a note about creating backups.

MFC after:              3 days
Reviewed by:            brooks, mhorne
Approved by:            mhorne (mentor)
Differential Revision:  https://reviews.freebsd.org/D50126
DeltaFile
+11-4UPDATING
+11-41 files

HardenedBSD/src 3ab24f2share/man/man5 src.conf.5, tools/build/options WITH_LLVM_BINUTILS

src.conf.5: Correct LLVM_BINUTILS comment about strings(1)

Reported by:    olivier
Fixes: 81fa5c4a828b ("llvm-strings: Install as strings when WITH_LLVM_BINUTILS=YES")
Sponsored by:   The FreeBSD Foundation

(cherry picked from commit 7ca3db1999cd967f9d6d7b259aa7af54aae14a5f)
DeltaFile
+1-3share/man/man5/src.conf.5
+0-2tools/build/options/WITH_LLVM_BINUTILS
+1-52 files

HardenedBSD/src 384d976libexec/rc rc.conf, libexec/rc/rc.d noshutdown Makefile

rc.d: Add precious_machine rc.conf knob to create /var/run/noshutdown

Reviewed by:    bapt, kevans, olce
Sponsored by:   The FreeBSD Foundation
MFC after:      1 week
Differential revision:  https://reviews.freebsd.org/D50166
DeltaFile
+31-0libexec/rc/rc.d/noshutdown
+2-0libexec/rc/rc.conf
+1-0libexec/rc/rc.d/Makefile
+34-03 files

HardenedBSD/src 7fb88c2sbin/shutdown shutdown.8 shutdown.c

shutdown(8): refuse to run if /var/run/noshutdown is present

Reviewed by:    bapt, kevans, olce
Sponsored by:   The FreeBSD Foundation
MFC after:      1 week
Differential revision:  https://reviews.freebsd.org/D50166
DeltaFile
+21-2sbin/shutdown/shutdown.8
+15-3sbin/shutdown/shutdown.c
+36-52 files

HardenedBSD/src 5ab9061include paths.h

include/paths.h: add _PATH_NOSHUTDOWN

Reviewed by:    bapt, kevans, olce
Sponsored by:   The FreeBSD Foundation
MFC after:      1 week
Differential revision:  https://reviews.freebsd.org/D50166
DeltaFile
+1-0include/paths.h
+1-01 files

HardenedBSD/src 73ba568usr.sbin/pkg pkg.c

pkg: suppress error on unknown options

pkg(7) does not understand all the options that pkg(8) understands and
should never log errors about unknown options that it will pass on to
pkg(8) without touching.

PR:             286510
Reviewed by:    bapt
Fixes:          be61deae0aa2 ("pkg: clarify argument parsing")
Sponsored by:   The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D50163
DeltaFile
+1-1usr.sbin/pkg/pkg.c
+1-11 files

HardenedBSD/src f5fb3d4share/man/man4 puc.4

puc(4): Tighten expression of supported modules

Since we have a huge number of supported device here, try to consolodate
entries that make sense and do other formatting tweaks to reduce the raw
number of lines needed to express the supported models.  Also, the
oxford semi blur the line between chip support and board support, so
simplify that entry.  Simplify the SIIG stuff somewhat (while the
pucdata has per-chip entries, we don't need that here since we support
virtually all SIIG cards). Place several entries on the same line where
(I think) it makes sense.

This could likely stand to be put into alphabetical order.

Sponsored by:           Netflix
DeltaFile
+60-232share/man/man4/puc.4
+60-2321 files