FreeBSD/src cba191etests/sys/mac Makefile, tests/sys/mac/do valid_configs.sh invalid_configs.sh

MAC/do: Add basic tests on setting rules

MFC after:      1 minute
Sponsored by:   The FreeBSD Foundation
DeltaFile
+135-0tests/sys/mac/do/valid_configs.sh
+86-0tests/sys/mac/do/invalid_configs.sh
+72-0tests/sys/mac/do/common.sh
+14-0tests/sys/mac/do/Makefile
+1-0tests/sys/mac/Makefile
+308-05 files

FreeBSD/src 21df76dshare/man/man4 mac_do.4

mac_do.4: Jail parameter takes 'new', not 'enable'; uid_t/gid_t are 32-bit

MFC after:      1 minute
Sponsored by:   The FreeBSD Foundation
DeltaFile
+4-4share/man/man4/mac_do.4
+4-41 files

FreeBSD/src 8532b4alibexec/rc/rc.d virtual_oss

rc: virtual_oss: Create a loopback device in the default configuration

The loopback device allows us to record desktop sound by reading from
it, or even use it as an input device, for example during a call.

Sponsored by:   The FreeBSD Foundation
MFC after:      1 week
Reviewed by:    emaste
Pull-Request:   https://ron-dev.freebsd.org/FreeBSD/src/pulls/16
DeltaFile
+1-0libexec/rc/rc.d/virtual_oss
+1-01 files

FreeBSD/src 5f904cbusr.sbin/virtual_oss/virtual_oss main.c virtual_oss.8

virtual_oss(8): Create loopback devices with GID_AUDIO

Make sure the user is part of the audio group to avoid unintended
snooping of loopback audio by unprivileged users.

While here, retire voss_dsp_perm, since we don't use the same value
everywhere now.

Sponsored by:   The FreeBSD Foundation
MFC after:      1 week
Reviewed by:    emaste
Pull-Request:   https://ron-dev.freebsd.org/FreeBSD/src/pulls/26
DeltaFile
+22-5usr.sbin/virtual_oss/virtual_oss/main.c
+3-1usr.sbin/virtual_oss/virtual_oss/virtual_oss.8
+25-62 files

FreeBSD/src 6024e3fetc group, sys/sys conf.h

Add audio group

To be initially used by virtual_oss(8) loopback devices.

Sponsored by:   The FreeBSD Foundation
MFC after:      1 week
Reviewed by:    emaste
Pull-Request:   https://ron-dev.freebsd.org/FreeBSD/src/pulls/26
DeltaFile
+1-0etc/group
+1-0sys/sys/conf.h
+2-02 files

FreeBSD/src 8c90d1eshare/man/man4 p9fs.4 Makefile

p9fs.4: MLINK to virtio_p9fs.4

Technically, virtio_p9fs is an emulated device that masquerades
as a p9fs mount, but it does not make sense to have two separate manual
pages.

Reviewed by:    bnovkov, dfr
MFC after:      3 days
Differential Revision:  https://reviews.freebsd.org/D57013

(cherry picked from commit 30f500e97b57d36ebb8483cb8b8921507350cd0f)
DeltaFile
+3-2share/man/man4/p9fs.4
+1-0share/man/man4/Makefile
+4-22 files

FreeBSD/src a8c74d6tests/sys/netinet6 ndp.sh

tests/ndp: fix ndp_routeinfo_option testcase flakiness

Since we are sleeping for an indefinite period of time waiting
for the default route to appear, the expire times may be gone
past 1+ seconds, causing the Expire column to show <1800 or <600.

Fixes:  f6bcc0925f0ea838da5183dc503f847e56d15cc8

Reviewed by:    pouria
Approved by:    lwhsu (mentor)
MFC after:      3 days
Differential Revision:  https://reviews.freebsd.org/D56712
DeltaFile
+10-5tests/sys/netinet6/ndp.sh
+10-51 files

FreeBSD/src c170a96. Makefile

universe: emit warning instead of error for bad/missing KERNCONF

When doing a large `make universe` build with multiple KERNCONFS,
it should not be an error when a particular target has a missing
KERNCONF.

In this example,

```
$ make universe TARGETS='arm64 riscv' KERNCONFS='QEMU VIRT'
```

Currently, arm64 does not have a QEMU conf, and riscv
does not have a VIRT conf. However, this command should still
succeed instead of failing with the following message:

```
make[2]: /usr/src/Makefile:767: Target architecture for riscv/conf/VIRT unknown.  config(8) likely too old.
        in .for loop from /usr/src/Makefile:761 with kernel = VIRT

    [13 lines not shown]
DeltaFile
+5-1Makefile
+5-11 files

FreeBSD/src 02ef0b6. Makefile, share/man/man7 build.7

universe: allow moving build logs to UNIVERSE_LOGDIR

This allows `make universe` or `make tinderbox`
to build from a read-only src tree.

Reviewed by:    ziaee, imp, delphij
Approved by:    lwhsu (mentor), emaste (mentor)
MFC after:      3 days
Differential Revision:  https://reviews.freebsd.org/D55566
DeltaFile
+8-9Makefile
+6-1share/man/man7/build.7
+14-102 files

FreeBSD/src d7cde43sys/net if_loop.c

Revert "loopback: Clear hash unconditionally."

This reverts commit 2fe37927d41990abe8d1c336e75fd75873285e90.

This turns out to have been misguided.  First, clearing the
hash results in all loopback ip/ip6 traffic being hashed
to the netisr queue associated with the if_index of the loopback
interface.  Eg, it bottlenecks loopback traffic. When the
hash is kept, traffic is spread evenly among netisrs.

Also, it is safe to keep the hash here.  The clearing was only
needed when RSS core selection is enabled; we only enabled the
consistent hashing parts of RSS globally, not the cpuid mapping
stuff.  So there is no need to clear it.

Reviewed by: glebius
Sponsored by: Netflix
DeltaFile
+2-0sys/net/if_loop.c
+2-01 files

FreeBSD/src 198379dsys/netpfil/ipfw ip_fw_nat.c

ipfw: fix checksum after NAT

When checksum offloading is used, IPFW needs to fix the checksum
after libalias has done NAT. The ipfw_nat() function does so, but
only for mbufs without a receiving interface. However, if, for example,
the packet was sent inside a jail that used checksum offloading over
an epair, ipfw still needs to fix the checksum even though the mbuf
has set a receiving interface (epair).
This patch just removes the check whether a receiving interface is set.

PR:                     295057
Reviewed by:            tuexen
Differential Revision:  https://reviews.freebsd.org/D57091

(cherry picked from commit 81b47a7c604f1d563283759572fa7a1f9d4dc56f)
DeltaFile
+7-8sys/netpfil/ipfw/ip_fw_nat.c
+7-81 files

FreeBSD/src 81b47a7sys/netpfil/ipfw ip_fw_nat.c

ipfw: fix checksum after NAT

When checksum offloading is used, IPFW needs to fix the checksum
after libalias has done NAT. The ipfw_nat() function does so, but
only for mbufs without a receiving interface. However, if, for example,
the packet was sent inside a jail that used checksum offloading over
an epair, ipfw still needs to fix the checksum even though the mbuf
has set a receiving interface (epair).
This patch just removes the check whether a receiving interface is set.

PR:                     295057
Reviewed by:            tuexen
MFC after:              immediately
Differential Revision:  https://reviews.freebsd.org/D57091
DeltaFile
+7-8sys/netpfil/ipfw/ip_fw_nat.c
+7-81 files

FreeBSD/src e9cbbf0lib/libc/gen nlist.c

nlist: Decrement nent on match

PR:             295336
MFC after:      1 week
Fixes:          4617a6cb82a6 ("nlist: Handle multiple symbol tables")
DeltaFile
+3-1lib/libc/gen/nlist.c
+3-11 files

FreeBSD/src 151d5f6sys/netpfil/ipfw ip_fw_nat.c

ipfw: fix checksum after NAT

When checksum offloading is used, IPFW needs to fix the checksum
after libalias has done NAT. The ipfw_nat() function does so, but
only for mbufs without a receiving interface. However, if, for example,
the packet was sent inside a jail that used checksum offloading over
an epair, ipfw still needs to fix the checksum even though the mbuf
has set a receiving interface (epair).
This patch just removes the check whether a receiving interface is set.

PR:                     295057
Reviewed by:            tuexen
Differential Revision:  https://reviews.freebsd.org/D57091

(cherry picked from commit 81b47a7c604f1d563283759572fa7a1f9d4dc56f)
DeltaFile
+7-8sys/netpfil/ipfw/ip_fw_nat.c
+7-81 files

FreeBSD/src 6eba055sbin/ipfw nat.c ipfw.8, tests/sys/netpfil/common nat.sh

ipfw: fix parsing error in nat config port_range

Also fix the corresponding tests.

PR:             263240
MFC after:      1 week
Differential Revision:  https://reviews.freebsd.org/D57010
DeltaFile
+16-13sbin/ipfw/nat.c
+14-12tests/sys/netpfil/common/nat.sh
+2-1sbin/ipfw/ipfw.8
+32-263 files

FreeBSD/src 1d0410fsbin/ping ping6.c

ping6: convert receive loop from pselect(2) to ppoll(2)

pselect(2) might overflow if the desciptor number is above
FD_SETSIZE and silently corrupt the stack. Switch to ppoll(2) so
the receive socket fd is no longer constrained by FD_SETSIZE.

Reported by:    Joshua Rogers of AISLE Research Team
Reviewed by:    markj
MFC after:      7 days
Differential Revision:  https://reviews.freebsd.org/D56721
DeltaFile
+6-4sbin/ping/ping6.c
+6-41 files

FreeBSD/src 8759a34sys/conf newvers.sh

15.1: Bump version to BETA3-p1

Since we had a conveniently timed batch of security issues, I'm going
to use this opportunity to test pkgbase update tooling.

Approved by:    re (cperciva)
DeltaFile
+1-1sys/conf/newvers.sh
+1-11 files

FreeBSD/src 8f715c6crypto/openssh freebsd-configure.sh

openssh: Fix SIZEOF_TIME_T in freebsd-configure.sh

Sponsored by:   The FreeBSD Foundation
Reviewed by:    jlduran
Differential Revision: https://reviews.freebsd.org/D57053

(cherry picked from commit 0b0e5daf4333a0faf93133f7d2c7b3743eead9d8)
(cherry picked from commit b718f7d88157f4d5827e3639c1e0ba7e5383ed04)
DeltaFile
+7-0crypto/openssh/freebsd-configure.sh
+7-01 files

FreeBSD/src bc301fetests/sys/net/routing test_routing.sh Makefile

routing: Add tests for metric

Add tests to make sure:
* Default metric is enforced.
* Lowest metric wins.
* Deleting routes by specifying gateway/metric works.

Reviewed by:    markj
Differential Revision: https://reviews.freebsd.org/D57016
DeltaFile
+231-0tests/sys/net/routing/test_routing.sh
+3-0tests/sys/net/routing/Makefile
+234-02 files

FreeBSD/src 1f03c62usr.bin/netstat route.c route_netlink.c

netstat(1): Show metric value for routes

Add metric support and show its value in wide flag and
libxo output.
Also, add metric to the description of wide flag (`-w`) in
routing display (`-r`) section of manual page.

Reviewed by:    markj (manpage)
Discussed with: markj
Differential Revision: https://reviews.freebsd.org/D57011
DeltaFile
+8-4usr.bin/netstat/route.c
+6-3usr.bin/netstat/route_netlink.c
+2-2usr.bin/netstat/netstat.1
+1-0usr.bin/netstat/common.h
+17-94 files

FreeBSD/src d87e5b2sbin/route route.8

route.8: Describe metric modifier

Describe `-metric` argument in the route manual.

Discussed with: ziaee
Differential Revision: https://reviews.freebsd.org/D57025
DeltaFile
+21-1sbin/route/route.8
+21-11 files

FreeBSD/src 2e2d402sbin/route route.c route_netlink.c

route(8): Add metric argument

Add support for metric in route command.

Differential Revision: https://reviews.freebsd.org/D56335
DeltaFile
+4-0sbin/route/route.c
+2-0sbin/route/route_netlink.c
+1-0sbin/route/keywords
+7-03 files

FreeBSD/src f15b8a8sbin/route route_netlink.c

route(8): Show metric value in monitor route

Reviewed by:    glebius
Differential Revision: https://reviews.freebsd.org/D56326
DeltaFile
+1-0sbin/route/route_netlink.c
+1-01 files

FreeBSD/src 6dd429asbin/route route_netlink.c

route(8): Show metric value in get route

Reviewed by:    glebius
Differential Revision: https://reviews.freebsd.org/D56325
DeltaFile
+5-2sbin/route/route_netlink.c
+5-21 files

FreeBSD/src b9a246ashare/man/man4 rtnetlink.4

rtnetlink.4: Add RTA_PRIORITY

Add metric implementation of netlink to manual.

Reviewed by:    markj
Differential Revision: https://reviews.freebsd.org/D56324
DeltaFile
+3-1share/man/man4/rtnetlink.4
+3-11 files

FreeBSD/src 73acfc5sys/netlink netlink_snl_route_parsers.h, sys/netlink/route rt.c route.h

netlink: Add RTA_PRIORITY support (metric)

* Use our new 32-bit metric for RTA_PRIORITY support.
* Update snl library for new RTA_PRIORITY support.
* return RTA_PRIORITY for both MPATH and non-MPATH routes.

Reviewed by:    glebius (previous version)
Discussed with: markj
Differential Revision: https://reviews.freebsd.org/D56323
DeltaFile
+15-2sys/netlink/route/rt.c
+4-0sys/netlink/netlink_snl_route_parsers.h
+1-1sys/netlink/route/route.h
+20-33 files

FreeBSD/src c0256b3sys/net route.h, sys/net/route nhgrp_ctl.c nhop_ctl.c

routing: Add support for metric

In our routing stack implementation, metric is an attribute
of the nexthop, not the route itself.
Store metric in nhop_priv which is control-plane data of
nexthop, filter the nexthops by metric and populate the mpath
slots in nexthop group with only the lowest metric nexthops
for use in the forwarding path.

`cmp_priv()` compares nhops based on priv hash.
Add metric compare logic to it and only return nexthops
with different metrics if the input nexthop's metric is
zero (wildcard).
Also, add support for metric via rtsock by introducing rmx_metric.

Finally, remove the upper 8-bit reservation of weight for
administrative distance.

Reviewed by:    adrian

    [3 lines not shown]
DeltaFile
+45-18sys/net/route/nhgrp_ctl.c
+36-3sys/net/route/nhop_ctl.c
+5-2sys/net/route.h
+1-4sys/net/route/route_ctl.c
+2-1sys/net/route/nhop_var.h
+2-0sys/net/route/nhop.h
+91-282 files not shown
+93-288 files

FreeBSD/src b718f7dcrypto/openssh freebsd-configure.sh

openssh: Fix SIZEOF_TIME_T in freebsd-configure.sh

Sponsored by:   The FreeBSD Foundation
Reviewed by:    jlduran
Differential Revision: https://reviews.freebsd.org/D57053

(cherry picked from commit 0b0e5daf4333a0faf93133f7d2c7b3743eead9d8)
DeltaFile
+7-0crypto/openssh/freebsd-configure.sh
+7-01 files

FreeBSD/src 59601a7lib/libcasper/services/cap_net cap_net.3

cap_net.3: Clarify monotonic reduction in permitted operations

Reviewed by:    markj, oshogbo
Sponsored by:   The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D57141
DeltaFile
+2-1lib/libcasper/services/cap_net/cap_net.3
+2-11 files

FreeBSD/src f15df0ausr.sbin/bsdconfig/share/media wlan.subr

bsdconfig: Make sure that SSID names are properly escaped

The f_menu_wpa_scan_results() function returns a list of networks
discovered by a scan.  The untrusted network names are evaluated in
f_dialog_menu_wireless_edit.  The quoting applied in
f_menu_wpa_scan_results() protects against evaluation of something like
"$(whoami)" but one can add single quotes to defeat that.

Pass the SSID names through f_shell_escape to work around this.  Escape
single quotes in f_dialog_wireless_edit() and f_menu_wireless_configs()
too for consistency.

I note that this module doesn't seem to actually work, see e.g.,
bugzilla PR 229883.

Approved by:    so
Security:       FreeBSD-SA-26:23.bsdinstall
Security:       CVE-2026-45255
Reported by:    Austin Ralls

    [2 lines not shown]
DeltaFile
+3-0usr.sbin/bsdconfig/share/media/wlan.subr
+3-01 files