FreeBSD/src 3f386easys/conf files.arm64, sys/modules/vmm Makefile

vmm/arm64: Compile vmm_nvhe.c without SSP

This file implements a set of EL2 hypercall handlers and is used to
switch between guests and the host kernel when VHE is not in use.  There
is no SSP runtime available there.

Reported by:    Jenkins
Fixes:          8deebce931fa ("kernel: Enable -fstack-protector-strong by default")

(cherry picked from commit bed77cf7c213c3f93a0dc099e4b46c078495a328)
DeltaFile
+1-1sys/conf/files.arm64
+1-1sys/modules/vmm/Makefile
+2-22 files

FreeBSD/src 6bef2a0sys/sys elf_common.h

elf_common.h: Add SHT_LLVM_ADDRSIG

Reported by:    bz
Sponsored by:   The FreeBSD Foundation

(cherry picked from commit 22c054c4cce719662d503685138433eb27d40001)
(cherry picked from commit 115256f288dcfcb09e11fe08485b01cc9609ead9)
DeltaFile
+1-0sys/sys/elf_common.h
+1-01 files

FreeBSD/src def7daesys/net if_stf.c

if_stf: Free entire mbuf chain on failure

Reported by:     Yuxiang Yang, Yizhou Zhao, Ao Wang, Xuewei Feng, Qi Li, and Ke Xu from Tsinghua University using GLM-5.1 from Z.ai
Reviewed by:    markj, bz, kp
Sponsored by:   The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D57476

(cherry picked from commit 5a7f41e94b6d47e60e5d76dfb3a61ee2746700ca)
DeltaFile
+2-2sys/net/if_stf.c
+2-21 files

FreeBSD/src 874316blib/libc/iconv iconv.3

iconv.3: Fix formatting of the error section

MFC after:      1 week

(cherry picked from commit c491c2db2f37399eba7a356c4bfa298d64012101)
DeltaFile
+1-0lib/libc/iconv/iconv.3
+1-01 files

FreeBSD/src 3cf9ba0sys/netinet/libalias alias_db.c

libalias: Serialize updates to the global instance list

libalias maintains a global list of all libalias handles.  The list was
updated without any locking, but nothing prevents updates from running
concurrently.

MFC after:      1 week

(cherry picked from commit 2ff705f32a2033201a8f83f1ade5ddbc0460387d)
DeltaFile
+17-0sys/netinet/libalias/alias_db.c
+17-01 files

FreeBSD/src 7dc01desys/conf kern.mk

kernel: Enable -fstack-protector-strong by default

This extends stack canary use to all functions which define arrays on
the stack, not just those which operate on byte buffers.  This option
would have made it harder to exploit SA-26:18.setcred and
SA-26:08.rpcsec_gss.

The change bloats the amd64 kernel text by about 350KB and increases the
number of covered functions from ~1500 to ~9000 (within the kernel
itself, i.e., not counting kernel modules).

Reviewed by:    olce, olivier, emaste
MFC after:      2 weeks
Differential Revision:  https://reviews.freebsd.org/D56870

(cherry picked from commit 8deebce931fa9b469cf28a082038a64caf972602)
DeltaFile
+1-1sys/conf/kern.mk
+1-11 files

FreeBSD/src 8da837bsys/net if.c if_private.h

net: Fix handling of unmapped user pages in if_getgroup()

We cannot call copyout() while in a net epoch section, unless the user
memory is wired.  Use the global ifnet lock to synchronize the accesses
instead.

Reported by:    emaste
Reviewed by:    zlei
MFC after:      2 weeks
Differential Revision:  https://reviews.freebsd.org/D57154

(cherry picked from commit 68004e56fdc22c11b4ec680e83309b4ea2bfe13a)
DeltaFile
+23-33sys/net/if.c
+1-1sys/net/if_private.h
+24-342 files

FreeBSD/src 1cea6bfsys/x86/x86 ucode.c

ucode: ucode_error can be defined with static

MFC after:      1 week

(cherry picked from commit 96256587b06cfcdbeb1789145f5e427831b3d732)
DeltaFile
+1-1sys/x86/x86/ucode.c
+1-11 files

FreeBSD/src cb64a09tests/sys/kern procdesc.c Makefile

tests/procdesc: Use a more efficient mechanism to block

Reviewed by:    kib
MFC after:      2 weeks
Differential Revision:  https://reviews.freebsd.org/D57149

(cherry picked from commit c9546bb61910d40f4cb0dfb9716ba6eba44d1a0d)
DeltaFile
+37-4tests/sys/kern/procdesc.c
+1-1tests/sys/kern/Makefile
+38-52 files

FreeBSD/src c511c9esys/net if_lagg.c

lagg: Handle a port count of zero

The sc_count check in lagg_transmit_ethernet() and
lagg_transmit_infiniband() is racy, as the lagg protocol handlers are
only synchronized by net_epoch.  Handle a count of 0 in each protocol
handler where it's needed, namely in the RR and LB handlers.

Reported by:    Yuxiang Yang, Yizhou Zhao, Xuewei Feng, Qi Li, and Ke Xu from Tsinghua University using GLM5.1 from Z.ai
Reviewed by:    pouria, zlei
MFC after:      2 weeks
Differential Revision:  https://reviews.freebsd.org/D56942

(cherry picked from commit 49d90d9ddfc1ecda9ad9b6cb5565e5fbdcc14964)
DeltaFile
+23-17sys/net/if_lagg.c
+23-171 files

FreeBSD/src 192c2a8sys/i386/linux linux_ptrace_machdep.c

linux: Drop unneeded PHOLDs

There's no point in acquiring a hold if the proc lock isn't going to be
dropped.

Reviewed by:    kib
MFC after:      1 week
Differential Revision:  https://reviews.freebsd.org/D57468

(cherry picked from commit 2404d8d741f281e445233f86b0734d6dcf02c173)
DeltaFile
+0-4sys/i386/linux/linux_ptrace_machdep.c
+0-41 files

FreeBSD/src 2a1eaafsys/x86/x86 ucode.c

ucode: Fix validation on Intel platforms

The check for the extended signature table was backwards, so we always
ignored it.

We should verify that the extended signature table fits within the total
image size.

Reviewed by:    jrm, kib
MFC after:      1 week
Differential Revision:  https://reviews.freebsd.org/D57209

(cherry picked from commit 0beb172898499fff51eed4df3d9284cd1094afbb)
DeltaFile
+24-8sys/x86/x86/ucode.c
+24-81 files

FreeBSD/src a649759sys/kern kern_fork.c

fork: Drop an uneeded PHOLD/PRELE pair

Support for swapping out kernel stacks was removed, so the PHOLD has no
purpose.  (And even before that, it's not clear why a swapout here would
have been problematic.)

Reviewed by:    kib
MFC after:      1 week
Differential Revision:  https://reviews.freebsd.org/D57486

(cherry picked from commit 1ee4b5fd824aa93f9a20df6bd5dad50c7e32fe05)
DeltaFile
+0-9sys/kern/kern_fork.c
+0-91 files

FreeBSD/src 24575bdtests/sys/netipsec/tunnel Makefile

tests/ipsec: Run in parallel

Use execenv=jail to enable this.

MFC after:      1 week

(cherry picked from commit f048a1a1decb9140ec779951e886ec41ae34cec4)
DeltaFile
+2-2tests/sys/netipsec/tunnel/Makefile
+2-21 files

FreeBSD/src 3b69c72sys/netinet udp_usrreq.c

udp: Wrap a long line in udp_send()

No functional change intended.

MFC after:      1 week
DeltaFile
+2-1sys/netinet/udp_usrreq.c
+2-11 files

FreeBSD/src fc7993csys/rpc/rpcsec_tls rpctls_impl.c

rpcsec_tls: Avoid a socket reference underflow in rpctls_server()

The upcall_sockets tree owns a ref on any resident socket.  When a
socket is removed after a TLS handshake failure, rpctls_rpc_failed()
thus calls soclose().

rpctls_server() does not acquire an extra ref to compensate for this.
So, if the upcall fails, e.g., because rpc.tlsservd is not running,
we'll call soclose() to drop the reference, but this effectively
releases the xprt layer's reference.

Fix the problem by explicitly acquiring a socket reference when adding
a socket to the upcall tree.

PR:             289734
Reviewed by:    rmacklem, glebius
MFC after:      1 week
Sponsored by:   The FreeBSD Foundation
Differential Revision:  https://reviews.freebsd.org/D57555
DeltaFile
+20-3sys/rpc/rpcsec_tls/rpctls_impl.c
+20-31 files

FreeBSD/src 52a2b4btests/sys/kern/tty test_sti.c

tests: Fix build if TIOCSTI is not defined

Some downstream projects (e.g. ElectroBSD) have removed the TIOCSTI

We already have some components (such as mail and tcsh) that build
without TIOCSTI defined.  This is (existing portability support in those
projects.

Simplify things for downstreams by extending this approach to this
additional TIOCSTI user.

Reviewed by:    markj
Differential Revision: https://reviews.freebsd.org/D50614
DeltaFile
+6-0tests/sys/kern/tty/test_sti.c
+6-01 files

FreeBSD/src 7f2d790share/man/man7 groups.7

groups.7: Document audio group

Sponsored by:   The FreeBSD Foundation
MFC after:      1 week
Reviewed by:    emaste
Pull-Request:   https://ron-dev.freebsd.org/FreeBSD/src/pulls/35
DeltaFile
+6-1share/man/man7/groups.7
+6-11 files

FreeBSD/src a6aa95e. UPDATING, share/man/man4 pcm.4

sound: Create all device nodes with GID_AUDIO

Commit 6024e3f99a1e ("Add audio group") introduced GID_AUDIO, initially
for virtual_oss(8) loopback devices. Now make all of them with
GID_AUDIO.

Relnotes:       yes
Sponsored by:   The FreeBSD Foundation
Reviewed by:    emaste
Pull-Request:   https://ron-dev.freebsd.org/FreeBSD/src/pulls/35
DeltaFile
+13-21usr.sbin/virtual_oss/virtual_oss/main.c
+9-2share/man/man4/pcm.4
+3-5usr.sbin/virtual_oss/virtual_oss/virtual_oss.8
+2-2sys/dev/sound/pcm/dsp.c
+3-0UPDATING
+1-1sys/dev/sound/pci/emu10kx.c
+31-314 files not shown
+35-3510 files

FreeBSD/src 9931dc5sys/dev/bnxt/bnxt_en bnxt_log.c bnxt_coredump.c

if_bnxt: add few source files to version control

Commits- f85e66e655c9 ("if_bnxt/bnxt_re: add support for driver snapdump")
and 03839879a2dd ("if_bnxt: Add Firmware crashdump collection support")
missed to add few files under version control, those files are
added now:

sys/dev/bnxt/bnxt_en/bnxt_log.c
sys/dev/bnxt/bnxt_en/bnxt_log.h
sys/dev/bnxt/bnxt_en/bnxt_log_data.c
sys/dev/bnxt/bnxt_en/bnxt_log_data.h
sys/dev/bnxt/bnxt_en/bnxt_coredump.c
sys/dev/bnxt/bnxt_en/bnxt_coredump.h

bnxt_coredump.c entry is added in sys/conf/files as well.

Fixes: f85e66e655c9 ("if_bnxt/bnxt_re: add support for driver snapdump")
Fixes: 03839879a2dd ("if_bnxt: Add Firmware crashdump collection support")
DeltaFile
+318-0sys/dev/bnxt/bnxt_en/bnxt_log.c
+186-0sys/dev/bnxt/bnxt_en/bnxt_coredump.c
+123-0sys/dev/bnxt/bnxt_en/bnxt_log.h
+78-0sys/dev/bnxt/bnxt_en/bnxt_log_data.c
+50-0sys/dev/bnxt/bnxt_en/bnxt_coredump.h
+35-0sys/dev/bnxt/bnxt_en/bnxt_log_data.h
+790-01 files not shown
+791-07 files

FreeBSD/src 39e2fe2sys/dev/tsec if_tsec.c

if_tsec: Free entire mbuf chain on failure

Reviewed by:    bz
Sponsored by:   The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D57478
DeltaFile
+1-1sys/dev/tsec/if_tsec.c
+1-11 files

FreeBSD/src c5d6e20sys/compat/linuxkpi/common/include/linux kernel.h

LinuxKPI: add KERNEL_VERSION() macro

Add a KERNEL_VERSION() macro which normally would be in linux/version.h.
On Linux that file is auto-generated and we are supporting more than
one Linux version in LinuxKPI anyway so any further defines in there
would likely be wrong.

Adding the macro helps to support (vendor/out of tree) drivers more
easily which are supporting multiple Linux versions.

MFC after:      3 days
Reviewed by:    dumbbell
Differential Revision: https://reviews.freebsd.org/D57590
DeltaFile
+3-0sys/compat/linuxkpi/common/include/linux/kernel.h
+3-01 files

FreeBSD/src 3d0b6c6sys/compat/linuxkpi/common/include/linux scatterlist.h

LinuxKPI: scatterlist.h: implement sg_init_marker()

Add sg_init_marker() which is needed by mt76 drivers USB attachment.

Sponosored by:  The FreeBSD Foundation
MFC after:      3 days
Reviewed by:    emaste, dumbbell
Differential Revision: https://reviews.freebsd.org/D57594
DeltaFile
+6-0sys/compat/linuxkpi/common/include/linux/scatterlist.h
+6-01 files

FreeBSD/src e26c010sys/compat/linux linux_file.c

linuxulator: Return EINVAL for invalid inotify flags

We implement all of the currently-defined Linux inotify mask bits and
flags, with the same values as Linux.  Return EINVAL for unknown bits,
as Linux does.

This also moves the translation inline into linux_inotify_add_watch.

Reviewed by:    markj
Sponsored by:   The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D57387

(cherry picked from commit f77d37cffdf3951b7f28b97005467241aa27c183)
DeltaFile
+6-12sys/compat/linux/linux_file.c
+6-121 files

FreeBSD/src 586a5bcbin/pwd pwd.1

pwd.1: Fix a typo in the .dD

- s/Februrary/February/

MFC after:      1 week
DeltaFile
+1-1bin/pwd/pwd.1
+1-11 files

FreeBSD/src 56b6809sys/netpfil/ipfilter/netinet ip_pptp_pxy.c

ipfilter: Fix ip_pptp_pxy (PPTP proxy) length underflow

A PPTP client sending a specially crafted PPTP message with a length
smaller than the already processed fixed header can panic the system.
This resultes in a negative remaining length (a large unsigned 16-bit
number).

Reported by:    Yuxiang Yang, Yizhou Zhao, Ao Wang, Xuewei Feng, Qi Li,
                and Ke Xu from Tsinghua University using GLM-5.1 from
                Z.ai
Differential Revision:  https://reviews.freebsd.org/D57383

(cherry picked from commit 37e9d3641ba0e0da0d2bbaa26a59ee56a8cf3ee6)
DeltaFile
+6-2sys/netpfil/ipfilter/netinet/ip_pptp_pxy.c
+6-21 files

FreeBSD/src 120881bcrypto/krb5/src/lib/gssapi/spnego spnego_mech.c

krb5: Fix null dereference in SPNEGO token processing

krb5 1.22.1 erroneously removed a check from get_negTokenResp() for
successful decoding of the mechListMIC field.  Restore the check to
prevent a null pointer dereference.

Commit message details obtained from upstream commit.
Obtained from:  Upstream commit 4ae75cded

(cherry picked from commit efb5c07f91c5c11fb9bd32227ac74c2d08adf3cf)
DeltaFile
+2-0crypto/krb5/src/lib/gssapi/spnego/spnego_mech.c
+2-01 files

FreeBSD/src 4c3fde8sys/netpfil/ipfilter/netinet ip_pptp_pxy.c

ipfilter: Fix ip_pptp_pxy (PPTP proxy) length underflow

A PPTP client sending a specially crafted PPTP message with a length
smaller than the already processed fixed header can panic the system.
This resultes in a negative remaining length (a large unsigned 16-bit
number).

Reported by:    Yuxiang Yang, Yizhou Zhao, Ao Wang, Xuewei Feng, Qi Li,
                and Ke Xu from Tsinghua University using GLM-5.1 from
                Z.ai
Differential Revision:  https://reviews.freebsd.org/D57383

(cherry picked from commit 37e9d3641ba0e0da0d2bbaa26a59ee56a8cf3ee6)
DeltaFile
+6-2sys/netpfil/ipfilter/netinet/ip_pptp_pxy.c
+6-21 files

FreeBSD/src 27691b8crypto/krb5/src/lib/gssapi/krb5 import_name.c

krb5: Fix reachable assert when importing krb5 names

If a name token contains trailing garbage, error out from
krb5_gss_import_name() instead of crashing the process with an
assertion failure.

Commit message details obtained from upstream commit.
Obtained from:  upstream commit 07818f1fd
Reported by:    Aisle Research (Ze Sheng, Dmitrijs Trizna,
                Luigino Camastra, Guido Vranken) to krb5-bugs
MFC after:      3 days

(cherry picked from commit fce16f60de9718be6b789f00e86141a84cd920d3)
DeltaFile
+2-1crypto/krb5/src/lib/gssapi/krb5/import_name.c
+2-11 files

FreeBSD/src 1491ab3sys/dev/ntsync ntsync.c

ntsync(9): do not double-free obj when finstall() failed

Reported by:    Alex S <iwtcex at gmail.com>
Sponsored by:   The FreeBSD Foundation
MFC after:      3 days
DeltaFile
+1-0sys/dev/ntsync/ntsync.c
+1-01 files