HardenedBSD/src aeda7dasys/dev/mlx5/mlx5_en mlx5_en_main.c

Merge branch 'freebsd/current/main' into hardened/current/master
DeltaFile
+3-0sys/dev/mlx5/mlx5_en/mlx5_en_main.c
+3-01 files

HardenedBSD/src e595342libexec/rtld-elf rtld.c rtld.1

Merge branch 'freebsd/14-stable/main' into hardened/14-stable/master
DeltaFile
+34-1libexec/rtld-elf/rtld.c
+22-2libexec/rtld-elf/rtld.1
+56-32 files

HardenedBSD/src 0d47501libexec/rtld-elf rtld.1

rtld.1: clarify interaction between -u and -o

(cherry picked from commit 6a7819e43f938992304472054c83f4a6602a9e19)
DeltaFile
+3-1libexec/rtld-elf/rtld.1
+3-11 files

HardenedBSD/src d63c680libexec/rtld-elf rtld.c rtld.1

rtld: add direct-exec option -o

(cherry picked from commit d1cd0cc32b53c09e72e33116b94a5b0b9781a183)
DeltaFile
+30-0libexec/rtld-elf/rtld.c
+19-1libexec/rtld-elf/rtld.1
+49-12 files

HardenedBSD/src 6c85003libexec/rtld-elf rtld.c

rtld direct exec: make -u behavior match the description

(cherry picked from commit ef2694f368cee5957ee44b0298da88ff8360d561)
DeltaFile
+4-1libexec/rtld-elf/rtld.c
+4-11 files

HardenedBSD/src c097967sys/dev/mlx5/mlx5_en mlx5_en_main.c

mlx5en: add diagnostic in one more case of failed eeprom read preparation

Sponsored by:   Nvidia Networking
MFC after:      1 week
DeltaFile
+3-0sys/dev/mlx5/mlx5_en/mlx5_en_main.c
+3-01 files

HardenedBSD/src d0267bcshare/misc bsd-family-tree

Merge branch 'freebsd/14-stable/main' into hardened/14-stable/master
DeltaFile
+19-6share/misc/bsd-family-tree
+19-61 files

HardenedBSD/src 613633cshare/misc bsd-family-tree

Add OpenBSD 7.5 to bsd-family-tree

Summary: Add OpenBSD 7.5 to bsd-family-tree

Subscribers: imp

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

(cherry picked from commit bb4e55242ecb03b3f6876114b0708b0efa85044a)
DeltaFile
+3-0share/misc/bsd-family-tree
+3-01 files

HardenedBSD/src 5c060d9share/misc bsd-family-tree

bsd-family-tree: add NetBSD 10.0

(cherry picked from commit 07b17a1692a3c067e8f3e2dad31441ae441c5387)
DeltaFile
+3-0share/misc/bsd-family-tree
+3-01 files

HardenedBSD/src 0cff58eshare/misc bsd-family-tree

bsd-family-tree: add FreeBSD 13.3

MFC after:      3 days

(cherry picked from commit 885590b4f1ad218995df0fc127601e0f59bcc57f)
DeltaFile
+11-5share/misc/bsd-family-tree
+11-51 files

HardenedBSD/src 22b231ashare/misc bsd-family-tree

bsd-family-tree: QCU: ISBN and EAN numbers

ISBN 0201547775 and International Article Number (EAN) 9780201547771 for
'A Quarter Century of UNIX' by Peter H. Salus.

Reviewed by: imp
Pull Request: https://github.com/freebsd/freebsd-src/pull/812

(cherry picked from commit 3dfb39ef1d66e8370c302b158173ed8065887c2a)
DeltaFile
+2-1share/misc/bsd-family-tree
+2-11 files

HardenedBSD/src 5806cd1sys/netinet tcp_input.c tcp_subr.c, sys/netinet/tcp_stacks sack_filter.c sack_filter.h

Merge branch 'freebsd/current/main' into hardened/current/master
DeltaFile
+266-150sys/netinet/tcp_stacks/sack_filter.c
+78-13sys/netinet/tcp_stacks/sack_filter.h
+29-2sys/netinet/tcp_stacks/bbr.c
+29-1sys/netinet/tcp_input.c
+25-2sys/netinet/tcp_subr.c
+20-3sys/netinet/tcp_stacks/rack.c
+447-1713 files not shown
+470-1739 files

HardenedBSD/src 3b62f6fcontrib/libarchive/libarchive archive_openssl_evp_private.h

HBSD: Resolve merge conflict

Signed-off-by:  Shawn Webb <shawn.webb at hardenedbsd.org>
DeltaFile
+0-4contrib/libarchive/libarchive/archive_openssl_evp_private.h
+0-41 files

HardenedBSD/src c974604contrib/libarchive/libarchive archive_read_support_format_zip.c, contrib/libarchive/libarchive/test test_compat_lzip_4.tlz.uu test_compat_lzip_3.lz.uu

Merge remote-tracking branch 'internal/freebsd/13-stable/main' into hardened/13-stable/master

Conflicts:
        contrib/libarchive/libarchive/archive_openssl_evp_private.h (unresolved)
DeltaFile
+1,474-0contrib/libarchive/libarchive/test/test_compat_lzip_4.tlz.uu
+1,461-0contrib/libarchive/libarchive/test/test_compat_lzip_3.lz.uu
+1,290-0contrib/libarchive/unzip/bsdunzip.c
+0-1,132usr.bin/unzip/unzip.c
+840-0contrib/libarchive/unzip/la_queue.h
+340-178contrib/libarchive/libarchive/archive_read_support_format_zip.c
+5,405-1,310777 files not shown
+11,820-3,622783 files

HardenedBSD/src fce03f8sys/netinet tcp_input.c tcp_subr.c, sys/netinet/tcp_stacks sack_filter.c sack_filter.h

TCP can be subject to Sack Attacks lets fix this issue.

There is a type of attack that a TCP peer can launch on a connection. This is for sure in Rack or BBR and probably even the default stack if it uses lists in sack processing. The idea of the attack is that the attacker is driving you to look at 100's of sack blocks that only update 1 byte. So for example if you have 1 - 10,000 bytes outstanding the attacker sends in something like:

ACK 0 SACK(1-512) SACK(1024 - 1536), SACK(2048-2536), SACK(4096 - 4608), SACK(8192-8704)
This first sack looks fine but then the attacker sends

ACK 0 SACK(1-512) SACK(1025 - 1537), SACK(2049-2537), SACK(4097 - 4609), SACK(8193-8705)
ACK 0 SACK(1-512) SACK(1027 - 1539), SACK(2051-2539), SACK(4099 - 4611), SACK(8195-8707)
...
These blocks are making you hunt across your linked list and split things up so that you have an entry for every other byte. Has your list grows you spend more and more CPU running through the lists. The idea here is the attacker chooses entries as far apart as possible that make you run through the list. This example is small but in theory if the window is open to say 1Meg you could end up with 100's of thousands link list entries.

To combat this we introduce three things.

when the peer requests a very small MSS we stop processing SACK's from them. This prevents a malicious peer from just using a small MSS to do the same thing.
Any time we get a sack block, we use the sack-filter to remove sacks that are smaller than the smallest v4 mss (minus 40 for max TCP options) unless it ties up to snd_max (since that is legal). All other sacks in theory should be at least an MSS. If we get such an attacker that means we basically start skipping all but MSS sized Sacked blocks.
The sack filter used to throw away data when its bounds were exceeded, instead now we increase its size to 15 and then throw away sack's if the filter gets over-run to prevent the malicious attacker from over-running the sack filter and thus we start to process things anyway.
The default stack will need to start using the sack-filter which we have talked about in past conference calls to take full advantage of the protections offered by it (and reduce cpu consumption when processing sacks).


    [4 lines not shown]
DeltaFile
+266-150sys/netinet/tcp_stacks/sack_filter.c
+78-13sys/netinet/tcp_stacks/sack_filter.h
+29-2sys/netinet/tcp_stacks/bbr.c
+29-1sys/netinet/tcp_input.c
+25-2sys/netinet/tcp_subr.c
+20-3sys/netinet/tcp_stacks/rack.c
+447-1713 files not shown
+470-1739 files

HardenedBSD/src d71a87frelease Makefile.vm

Merge branch 'freebsd/current/main' into hardened/current/master
DeltaFile
+2-1release/Makefile.vm
+2-11 files

HardenedBSD/src baa30bdsys/netinet in_pcb.c

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

HardenedBSD/src 9287d18release Makefile.vm

release: Use qemu when cross-building vm images

For a bit over 5 years, we have used qemu when cross-building cloudware
images; in particular, it's necessary when installing packages which
might include post-install scripts.

Use qemu in the vm-images target too; while "generic" vm images don't
install packages, they still run newaliases and /etc/rc.d/ldconfig,
both of which fail without appropriate emulation.

MFC after:      1 week
DeltaFile
+2-1release/Makefile.vm
+2-11 files

HardenedBSD/src 0dd05e9contrib/one-true-awk run.c awk.1

Merge branch 'freebsd/current/main' into hardened/current/master
DeltaFile
+4-240contrib/one-true-awk/run.c
+0-52contrib/one-true-awk/awk.1
+20-14contrib/one-true-awk/b.c
+0-24contrib/one-true-awk/ChangeLog
+0-23contrib/one-true-awk/parse.c
+1-19contrib/one-true-awk/awkgram.y
+25-37212 files not shown
+63-40518 files

HardenedBSD/src 1023317contrib/one-true-awk run.c awk.1

ota: Merge one true awk 20240422 (a3b68e649d2d)

Apr 22, 2024:
        fixed regex engine gototab reallocation issue that was
        introduced during the Nov 24 rewrite. Thanks to Arnold Robbins.
        Fixed a scan bug in split in the case the separator is a single
        character. thanks to Oguz Ismail for spotting the issue.

Mar 10, 2024:
        fixed use-after-free bug in fnematch due to adjbuf invalidating
        the pointers to buf. thanks to github user caffe3 for spotting
        the issue and providing a fix, and to Miguel Pineiro Jr.
        for the alternative fix.
        MAX_UTF_BYTES in fnematch has been replaced with awk_mb_cur_max.
        thanks to Miguel Pineiro Jr.

Sponsored by:           Netflix
DeltaFile
+4-240contrib/one-true-awk/run.c
+0-52contrib/one-true-awk/awk.1
+20-14contrib/one-true-awk/b.c
+0-24contrib/one-true-awk/ChangeLog
+0-23contrib/one-true-awk/parse.c
+1-19contrib/one-true-awk/awkgram.y
+25-3728 files not shown
+44-39514 files

HardenedBSD/src 4fc5f32share/man/man5 rc.conf.5

rc.conf.5: Fix translation from netmask to cdir

These two should have been 30 bit masks, not 32, as the original
netmasks were 255.255.255.252.

Fixes: cb808de400c7
Noticed by: Kelly Hays
DeltaFile
+2-2share/man/man5/rc.conf.5
+2-21 files

HardenedBSD/src 3f65000sys/fs/nfs nfs_var.h, sys/fs/nfsserver nfs_nfsdport.c nfs_nfsdserv.c

nfsd: Fix Link conformance with RFC8881 for delegations

RFC8881 specifies that, when a Link operation occurs on an
NFSv4, that file delegations issued to other clients must
be recalled.  Discovered during a recent discussion on nfsv4 at ietf.org.

Although I have not observed a problem caused by not doing
the required delegation recall, it is definitely required
by the RFC, so this patch makes the server do the recall.

Tested during a recent NFSv4 IETF Bakeathon event.

MFC after:      1 week
DeltaFile
+7-5sys/fs/nfsserver/nfs_nfsdport.c
+9-2sys/fs/nfsserver/nfs_nfsdserv.c
+1-1sys/fs/nfs/nfs_var.h
+17-83 files

HardenedBSD/src 41f7fa0contrib/libfido2/.actions build-bsd fuzz-linux, contrib/libfido2/.github/ISSUE_TEMPLATE bug_report.md

Merge branch 'freebsd/current/main' into hardened/current/master
DeltaFile
+168-9contrib/libfido2/src/webauthn.h
+97-0contrib/libfido2/.actions/build-bsd
+93-0contrib/libfido2/.actions/fuzz-linux
+80-0contrib/libfido2/.github/ISSUE_TEMPLATE/bug_report.md
+39-29share/man/man4/ahc.4
+67-1contrib/libfido2/src/assert.c
+544-39128 files not shown
+2,052-365134 files

HardenedBSD/src 518d2e1lib/libc/sys gettimeofday.2, share/man/man4 vmm.4

Merge branch 'freebsd/14-stable/main' into hardened/14-stable/master
DeltaFile
+22-1lib/libc/sys/gettimeofday.2
+14-1share/man/man4/vmm.4
+5-1share/man/man9/style.9
+41-33 files

HardenedBSD/src 6f44401lib/clang/include/llvm/Config llvm-config.h AsmParsers.def

lib/clang: clean out old llvm/clang Sparc target remnants

The WITH_LLVM_TARGET_ENABLE_SPARC option was removed a long time ago,
but some ifdefs were still laying around, so clean them up.

PR:             276104
MFC after:      3 days
DeltaFile
+0-4lib/clang/include/llvm/Config/llvm-config.h
+0-3lib/clang/include/llvm/Config/AsmParsers.def
+0-3lib/clang/include/llvm/Config/AsmPrinters.def
+0-3lib/clang/include/llvm/Config/Disassemblers.def
+0-3lib/clang/include/llvm/Config/Targets.def
+0-165 files

HardenedBSD/src 1c25f3f. run.c awk.1

ota: Import One True Awk 20240422 (a3b68e649d2d)

Apr 22, 2024:
        fixed regex engine gototab reallocation issue that was
        introduced during the Nov 24 rewrite. Thanks to Arnold Robbins.
        Fixed a scan bug in split in the case the separator is a single
        character. thanks to Oguz Ismail for spotting the issue.

Mar 10, 2024:
        fixed use-after-free bug in fnematch due to adjbuf invalidating
        the pointers to buf. thanks to github user caffe3 for spotting
        the issue and providing a fix, and to Miguel Pineiro Jr.
        for the alternative fix.
        MAX_UTF_BYTES in fnematch has been replaced with awk_mb_cur_max.
        thanks to Miguel Pineiro Jr.

Note: This brings in the matchop-deref.* files that were missing (but in
FreeBSD already) and adds system-stauts.ok2. The latter has been deleted
in FreeBSD since it does not fit ATF well. Care must be taken to remove it

    [3 lines not shown]
DeltaFile
+4-240run.c
+0-52awk.1
+20-14b.c
+0-24ChangeLog
+0-23parse.c
+1-19awkgram.y
+25-37212 files not shown
+60-39518 files

HardenedBSD/src 60a517bcontrib/libfido2/.actions build-bsd fuzz-linux, contrib/libfido2/.github/ISSUE_TEMPLATE bug_report.md

libfido2: update to 1.14.0

Sponsored by:   The FreeBSD Foundation
DeltaFile
+168-9contrib/libfido2/src/webauthn.h
+97-0contrib/libfido2/.actions/build-bsd
+93-0contrib/libfido2/.actions/fuzz-linux
+80-0contrib/libfido2/.github/ISSUE_TEMPLATE/bug_report.md
+67-1contrib/libfido2/src/assert.c
+34-29contrib/libfido2/fuzz/functions.txt
+539-3957 files not shown
+1,646-12463 files

HardenedBSD/src cb808deshare/man/man5 rc.conf.5

rc.conf.5: modernise network_interfaces

It's not 1996 anymore, and we use CIDR nowadays.  Update the various
ifconfig_ examples to use CIDR notation instead of netmasks, and also
add an example of a basic ifconfig_ entry that most users will be
interested in.

Reviewed by: imp
Pull Request: https://github.com/freebsd/freebsd-src/pull/1217
DeltaFile
+37-20share/man/man5/rc.conf.5
+37-201 files

HardenedBSD/src 894cb08lib/clang/include VCSVersion.inc, lib/clang/include/clang/Basic Version.inc

Fixup: Merge llvm-project release/18.x llvmorg-18.1.5-0-g617a15a9eac9

Update version numbers, config headers, etc. Git tricked me into losing
these before pushing.

PR:             276104
Fixes:          d67fc74b9249
MFC after:      3 days
DeltaFile
+3-3lib/clang/include/lldb/Version/Version.inc
+3-3lib/clang/include/clang/Basic/Version.inc
+3-3lib/clang/include/VCSVersion.inc
+2-2lib/clang/include/llvm/Config/config.h
+2-2lib/clang/include/llvm/Config/llvm-config.h
+1-1lib/clang/include/lld/Common/Version.inc
+14-141 files not shown
+15-157 files

HardenedBSD/src 5678d1dcontrib/llvm-project/clang/lib/CodeGen CGObjCGNU.cpp CGBuiltin.cpp, contrib/llvm-project/clang/lib/Format UnwrappedLineParser.cpp

Merge llvm-project release/18.x llvmorg-18.1.5-0-g617a15a9eac9

This updates llvm, clang, compiler-rt, libc++, libunwind, lld, lldb and
openmp to llvm-project release/18.x llvmorg-18.1.5-0-g617a15a9eac9.

PR:             276104
MFC after:      3 days
DeltaFile
+28-20contrib/llvm-project/llvm/lib/CodeGen/GlobalISel/LoadStoreOpt.cpp
+23-17contrib/llvm-project/clang/lib/Format/UnwrappedLineParser.cpp
+20-14contrib/llvm-project/clang/lib/CodeGen/CGObjCGNU.cpp
+16-13contrib/llvm-project/llvm/lib/Target/X86/X86ISelLowering.cpp
+14-11contrib/llvm-project/clang/lib/CodeGen/CGBuiltin.cpp
+16-4contrib/llvm-project/llvm/include/llvm/CodeGen/GlobalISel/LoadStoreOpt.h
+117-7921 files not shown
+200-12827 files