multimedia/moonshine: new port
Moonshine is a self-hosted game streaming host compatible with the Moonlight
client, an open alternative to Sunshine/GameStream.
benchmarks/imb: Fix P_Write_Shared segfault
With CHECK_RESULTS enabled, IMB-IO-openmpi P_Write_Shared crashes on
the first non-zero message size because IMB_chk_distr() uses reccnt,
while IMB_init_pointers() leaves it NULL for MPIIO builds.
Allocate the arrays needed for MPIIO builds.
PR: 296182
Reviewed by: thierry (mentor)
Approved by: thierry (mentor)
umtx: Do not make an exiting thread the owner of a PI mutex
Otherwise an assertion in umtx_thread_alloc()
(TAILQ_EMPTY(&uq->uq_pi_contested)) is violated.
This use of TDB_EXIT is hacky, but I cannot see another way to check for
an exiting thread without adding some more overhead to kern_thr_exit().
Fixes: 2a339d9e3dc1
Reported by: Maik Muench of Secfault Security
Reviewed by: kib
MFC after: 1 week
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D58447
kqueue: Add a helper macro for sleeping on in-flux knotes
Other in-flux operations are implemented by this set of macros, so we
should do the same for sleeping.
No functional change intended.
Reviewed by: kib
MFC after: 1 week
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D58443
proc: Copy the p_reapsubtree field explicitly during fork
p_reapsubtree lives in the p_startcopy/p_endcopy block of struct proc,
which is copied during fork without any synchronization. However, the
field is not stable except when the proctree lock is held, and indeed
may change if p1's reaper exits or explicitly releases its reaper
status. This state change can race with fork() and leave the child with
an incorrect p_reapsubtree field.
Close the race: explicitly copy the field under the proctree lock during
fork.
Reported by: syzkaller
Reviewed by: kib
MFC after: 2 weeks
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D58482
rpcinfo: Fix buffer overflows
Several functions were using sprintf() to write RPC server-controlled
data to a stack buffer. Adopt some minimal changes from NetBSD to avoid
the potential overflows.
Security: CVE-2026-16277
Security: CVE-2026-16461
Reviewed by: khorben
MFC after: 1 week
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D58441
libfetch: Fix handling of connection failures
After commit 848f360c8f9a, if one tries to connect to a closed port,
fetch reports "Operation now in progress", which is rather confusing.
Return a more useful error message, restoring the old behaviour.
Fixes: 848f360c8f9a ("libfetch: Apply timeout to connection attempts")
Reviewed by: des
MFC after: 3 days
Differential Revision: https://reviews.freebsd.org/D58481
sysctl(9): Booleans: Fix old value length discovery
When calling sysctl(3) with a null 'oldp', i.e., length discovery mode,
'oldix' can be equal to 'oldlen', and we should not fail.
More generally, let SYSCTL_OUT() and SYSCTL_IN() handle corner cases,
simply removing the comparisons between 'oldidx' and 'oldlen' and
'newidx' and 'newlen' done by hand as the test just after is an equality
that does not require to know if 'idx' is smaller than 'len'.
PR: 292917
Reported by: cy
Fixes: 406da392ef8d ("sysctl(9): Booleans: Accept integers to ease knob conversion")
Sponsored by: The FreeBSD Foundation
(cherry picked from commit 895e1c6567d9561c86f8d20b47e924911bce989e)
netinet: Promote IFP_TO_IA() from macro to function in_ifprimaryaddr().
in_ifprimaryaddr() exists only to support IPv4 multicast usage. Since the
adoption of epoch tracking, ifa_ref() is no longer required in its body;
that was originally introduced by rwatson in 2009.
We could not use __deprecated1() from <sys/cdefs.h> anyway, as
IFP_TO_IA() is a macro, not a function.
Approved by: glebius (2026-02-26)
Reviewed by: adrian, glebius, pouria
Differential Revision: D55344
netinet: Replace IFP_TO_IA() with in_ifprimaryaddr() completely.
IPv4 multicast currently has the big caveat that it depends on the first
assigned IPv4 address on an interface (the so-called "primary address").
in_ifprimaryaddr() only needs to be used by the following:
- the 0.0.0.0 booting node input workaround in IGMPv1;
- filtering out the node's own reports in IGMPv2;
- preserving the source IP where an IGMPv3 report has been looped back;
- inferring the default upstream IPv4 interface address for the
IP_MULTICAST_IF socket option;
- and inferring the source address during ip_output() for a multicast
datagram where an interface has been explicitly specified by that option.
All of these uses mandate the use of IPv4 source address selection, but
FreeBSD does not yet (fully) implement this functionality.
Approved by: glebius (2026-02-26)
Reviewed by: adrian, glebius, pouria
Differential Revision: D55345
net/kea-devel: Update to 3.2.0
This commit puts net/ket-devel at the same version as net/kea. Update
to 3.3.X will resume when upstream continues development.