FreeBSD/src f86c3e6tools/tools/git git-arc.1 git-arc.sh

git-arc: Handle -h on subcommands and align usage with the man page

git-sh-setup treats -h as help against an empty USAGE, so
"git arc create -h" prints "usage: git arc". Handle -h before
sourcing it so every subcommand prints the real synopsis.

The create, stage, and update synopses showed optional commit-refs
while git-arc(1) and the code require them. Advertise -p parent on
create; the option was already implemented and documented.

Sort create sub-command option-arguments alphabetically in three
places: (1) synopsis from tool, (2) man-page synopsis, and (3)
man-page description.

Check for jq(1) / arc after checking for usage so -h always works.

While here, fix missing "local o" in gitarc__stage().

Reviewed by:    markj
Differential Revision:  https://reviews.freebsd.org/D59129
DeltaFile
+149-60tools/tools/git/git-arc.sh
+16-11tools/tools/git/git-arc.1
+165-712 files

FreeBSD/src 90ed365tools/tools/git git-arc.sh

git-arc: Fix inconsistent whitespace

Reviewed by:    markj
Differential Revision:  https://reviews.freebsd.org/D59161
DeltaFile
+3-3tools/tools/git/git-arc.sh
+3-31 files

FreeBSD/src 918fbc9sys/netpfil/pf pf_lb.c pf.c

pf: Re-optimize state key handling

pf states may be looked up using one of two keys: the stack key or the
wire key.  For states involving address translation, these will be
distinct; the stack key describes the addresses seen by the local
network stack, and the wire key has the translated addresses.

Historically, pf would avoid allocating separate keys if both are
identical.  This changed in commit fcdb520c1b4e ("pf: nat64") to always
allocate separate state key structures.  Incidentally, OpenBSD seems to
maintain the optimization, but also has an explicit reference count
embedded in state keys.

The change breaks another optimization: pf_state_key_attach() still uses
state key pointer equality to check whether the stack and wire keys are
equal, so those checks are always false after the aforementioned commit.
Thus we never skip the second key lookup, even when that's possible
(i.e., no address translation is involved).


    [13 lines not shown]
DeltaFile
+15-10sys/netpfil/pf/pf.c
+10-1sys/netpfil/pf/pf_lb.c
+25-112 files

FreeBSD/src cb70098sys/kern uipc_socket.c, sys/netinet in.h

socket: Restore handling of IPPROTO_DIVERT

Python scripts which use divert sockets no longer work after commit
e967a2a03677; even if one patches socket() calls, getaddrlen() doesn't
work on divert sockets, needed to use recvfrom().

Restore compatibility when COMPAT_FREEBSD15 is defined.

Reviewed by:    kib
Sponsored by:   OPNsense
Sponsored by:   Klara, Inc.
Differential Revision:  https://reviews.freebsd.org/D59018
DeltaFile
+7-0sys/kern/uipc_socket.c
+2-0sys/netinet/in.h
+9-02 files

FreeBSD/src d70e5b3sys/amd64/conf FIRECRACKER, sys/conf NOTES

conf: Add COMPAT_FREEBSD15

Define it everywhere that wants COMPAT_FREEBSD14.

Reviewed by:    imp, kib, emaste
Sponsored by:   OPNsense
Sponsored by:   Klara, Inc.
Differential Revision:  https://reviews.freebsd.org/D59017
DeltaFile
+3-0sys/conf/NOTES
+1-0sys/riscv/conf/GENERIC
+1-0sys/powerpc/conf/MPC85XX
+1-0sys/powerpc/conf/GENERIC64LE
+1-0sys/powerpc/conf/GENERIC64
+1-0sys/amd64/conf/FIRECRACKER
+8-08 files not shown
+16-014 files

FreeBSD/src e6a2ee4sys/dev/cpufreq cpufreq_dt.c

cpufreq_dt: fix attach for single CPU

The 'opp-shared' property is required, but has no meaning for a
single-processor system, and is thus not present in such device trees as
the BeagleBone Black. Expand the check so we do not fail attachment in
this case.

This is a partial cherry-pick from the original commit. Intended for
merge into releng/14.5.

PR:             297788
Reported by:    Rick Richard <rick at sloservers.com>
Sponsored by:   The FreeBSD Foundation
Differential Revision:  https://reviews.freebsd.org/D48124

(cherry picked from commit def7999c2ccddc9a303a65c0bea22976e79d8613)
DeltaFile
+1-1sys/dev/cpufreq/cpufreq_dt.c
+1-11 files

FreeBSD/src 68da0d6sys/dev/usb/controller generic_ehci_fdt.c

generic_ehci_fdt: fix driver softc size

This subclass declares its own softc structure adding necessary members
after the embedded ehci_softc_t. The full size of the struct must be
included in the driver declaration, otherwise the allocation backing the
softc is not guaranteed to be large enough.

Reported by:    KASAN
Reviewed by:    jrtc27, manu
Fixes: 7a58744fd0f1 ("Split out the attachment from the generic-ehci driver")
MFC after:      3 days
Sponsored by:   The FreeBSD Foundation
Differential Revision:  https://reviews.freebsd.org/D57951

(cherry picked from commit d5332d3a904242cb82e7dbf35e4aeec7c2df4402)
DeltaFile
+1-1sys/dev/usb/controller/generic_ehci_fdt.c
+1-11 files

FreeBSD/src ac15e56usr.sbin/crashinfo crashinfo.sh

crashinfo: Create core.txt.last symlink

When saving a coredump, savecore(8) maintains .last symlinks for the
info and vmcore artifacts, but not for the crashinfo text report.

Make crashinfo(8) create the link, pointing at the current
core.txt.<bounds> file.

This makes /var/crash/core.txt.last track the same core dump as
info.last and vmcore.last.

[mhorne: I tweaked the submission, such that the link will be created as
soon as the core.txt.X file is generated; not only after a successful
report has been written.]

Signed-off-by:  Ricardo Branco <rbranco at suse.de>
Reviewed by:    mhorne
MFC after:      1 week
Pull Request:   https://github.com/freebsd/freebsd-src/pull/2199

    [2 lines not shown]
DeltaFile
+3-0usr.sbin/crashinfo/crashinfo.sh
+3-01 files

FreeBSD/src 179d779lib/geom/part gpart.8, sys/geom/part g_part_gpt.c

g_part,mkimg: Add additional GPT partition types

Add the hifive-fsbl, hifive-bbl, and xbootldr aliases to mkimg(1).
Add the xbootldr alias to geom(4), and thus gpart(8).

The "hifive" partition types are defined and used by various RISC-V SBCs
for locating firmware.

"xbootldr", or the Extended Boot Loader Partition is defined here:
https://uapi-group.org/specifications/specs/boot_loader_specification/

Reviewed by:    emaste, markj, mhorne
MFC after:      1 week
Differential Revision:  https://reviews.freebsd.org/D56784

(cherry picked from commit dab8138e13dea539a387c458979403980a137bf2)
(cherry picked from commit 54d0ae979d9596399f33dc7d7245866f86ab7f8e)
DeltaFile
+7-1lib/geom/part/gpart.8
+6-0usr.bin/mkimg/gpt.c
+3-0usr.bin/mkimg/scheme.h
+3-0usr.bin/mkimg/scheme.c
+2-0sys/sys/disk/gpt.h
+2-0sys/geom/part/g_part_gpt.c
+23-12 files not shown
+26-18 files

FreeBSD/src 336cc04crypto/openssh sshd.8 ssh.1

openssh: Fix shosts.equiv path in manual pages

Change the path for the shosts.equiv file to consistently reflect
/etc/ssh/shosts.equiv across all manual pages.

This change stems from 35d4ccfb5576 ("Document FreeBSD defaults and
paths.")

Reviewed by:    bcr, emaste
Differential Revision:  https://reviews.freebsd.org/D52203
DeltaFile
+2-2crypto/openssh/ssh.1
+1-1crypto/openssh/sshd.8
+3-32 files

FreeBSD/src 6269b9bsys/kern tty.c

tty: Revalidate after dropping the tty lock in ioctl handlers

The TIOCSCTTY ioctl handler drops the tty lock in order to acquire the
proctree relock.  After relocking the tty, it did not revalidate the
tty state, and it could end up linking a doomed tty to the calling
process' session.  This race can be exploited to escalate privileges.

TIOCSPGRP has a similar race, fix that too.

Approved by:    so
Security:       FreeBSD-SA-26:62.tty
Security:       CVE-2026-58093
Reported by:    tsune of GMO Cybersecurity by Ierae, Inc. working with TrendAI Zero Day Initiative
Reviewed by:    kib
Sponsored by:   The FreeBSD Foundation
Differential Revision:  https://reviews.freebsd.org/D59126
DeltaFile
+12-2sys/kern/tty.c
+12-21 files

FreeBSD/src 9e9609acrypto/openssl/crypto/cmp cmp_vfy.c, crypto/openssl/crypto/cms cms_kari.c

openssl: Fix multiple vulnerabilities

This is a rollup commit from upstream to fix:
  Avoid full read buffer allocation when buffering DTLS records
  ssl/record: lower the DTLS unprocessed_rcds queue limit
  Fix heap buffer overflow (8-byte OOB write) in AES-WRAP-PAD unwrap
  Add a test for restricting growth in cmp cert cache
  Fix unbounded cert cache growth in cmp
  Fix Remote NULL deref in ossl_cmp_calc_protection() via crafted protectionAlg

Approved by:    so
Obtained from:  OpenSSL
Security:       FreeBSD-SA-26:61.openssl
Security:       CVE-2026-54874
Security:       CVE-2026-63072
Security:       CVE-2026-63074
Security:       CVE-2026-63076
DeltaFile
+348-0crypto/openssl/test/cmp_extracerts_dos_test.c
+88-32crypto/openssl/ssl/record/rec_layer_d1.c
+14-1crypto/openssl/crypto/cmp/cmp_vfy.c
+8-4crypto/openssl/ssl/record/ssl3_record.c
+10-1crypto/openssl/ssl/record/record_local.h
+8-1crypto/openssl/crypto/cms/cms_kari.c
+476-394 files not shown
+488-4310 files

FreeBSD/src e6c1c92sys/dev/sound/pcm channel.h dsp.c

dsp: Fix a potential use-after-free in dsp_oss_syncstart()

This function has a loop where it attempts to lock all channels in a
group.  If doing so would block, it releases all locks, sleeps for a
bit, and tries again.  However, once the syncgroup lock is dropped,
nothing prevents the syncgroup structure from being freed.

Fix the inner loop: after waking up, break out of it unconditionally and
start everything again.  I think the old code was also buggy and not
well-exercised: after waking up we'd continue to try and continue
locking channels.  Then we'd try again from the beginning and fail to
lock the channels we had already locked.

Approved by:    so
Security:       FreeBSD-SA-26:58.sound
Security:       CVE-2026-58091
Reported by:    Hazley Samsudin of GovTech CSG
Reviewed by:    christos
Sponsored by:   The FreeBSD Foundation
Differential Revision:  https://reviews.freebsd.org/D58912
DeltaFile
+6-11sys/dev/sound/pcm/dsp.c
+5-4sys/dev/sound/pcm/channel.h
+11-152 files

FreeBSD/src 6bfd894sys/kern uipc_shm.c, sys/sys mman.h

posixshm: Fix a TOCTOU race in the FIOSSHMLPGCNF handler

The check for whether shm_lp_psind was assigned was unlocked.  This race
can be exploited to create an object with psind==2 but with only
pagesizes[1] worth of pages populated.  This in turn can be used to
escalate privileges.

Fix this by acquiring the rangelock earlier.  In shm_mmap_large(),
assert that we hold the rangelock.  In shm_write(), annotate an unlocked
load of shm_lp_psind.

Approved by:    so
Security:       FreeBSD-SA-26:63.posixshm
Security:       CVE-2026-58094
Reported by:    tsune of GMO Cybersecurity by Ierae, Inc. working with TrendAI Zero Day Initiative
Reviewed by:    kib
Sponsored by:   The FreeBSD Foundation
Differential Revision:  https://reviews.freebsd.org/D59104
DeltaFile
+17-10sys/kern/uipc_shm.c
+1-1sys/sys/mman.h
+18-112 files

FreeBSD/src 5eaecdbsys/dev/hwpmc hwpmc_mod.c, sys/kern kern_exec.c

hwpmc: Fix the execve handler

When a process execve()s, pmc_process_exec() is supposed to evaluate
whether the new image is setuid/setgid and if so, whether to detach
PMCs.  This was handled by pmc_can_attach(), which is effectively an
open-coded copy of cr_xids_subset().

Unfortunately, the test of the result of this function was inverted,
with the result that we'd detach PMCs only if the predicate said it was
okay to do so.  It appears the bug has always been there; it seems the
intent was to return 0 on "success", i.e., it is okay to attach the
PMCs, much like p_candebug().  Commits 1c3c698ba4c4 and 1c40b15971f0
obscured this a bit.

I think this check is trying to be too clever.  Let's make it simpler:
simply do not attach PMCs unless the owner is privileged.  This is how,
e.g., ktrace works.  I do not think it's worth trying to be more
sophisticated than this unless we can generalize the policy in a way
that's applicable to other subsystems.

    [11 lines not shown]
DeltaFile
+12-60sys/dev/hwpmc/hwpmc_mod.c
+1-1sys/kern/kern_exec.c
+13-612 files

FreeBSD/src 5990860sys/kern uipc_shm.c, sys/sys mman.h

posixshm: Fix a TOCTOU race in the FIOSSHMLPGCNF handler

The check for whether shm_lp_psind was assigned was unlocked.  This race
can be exploited to create an object with psind==2 but with only
pagesizes[1] worth of pages populated.  This in turn can be used to
escalate privileges.

Fix this by acquiring the rangelock earlier.  In shm_mmap_large(),
assert that we hold the rangelock.  In shm_write(), annotate an unlocked
load of shm_lp_psind.

Approved by:    so
Security:       FreeBSD-SA-26:63.posixshm
Security:       CVE-2026-58094
Reported by:    tsune of GMO Cybersecurity by Ierae, Inc. working with TrendAI Zero Day Initiative
Reviewed by:    kib
Sponsored by:   The FreeBSD Foundation
Differential Revision:  https://reviews.freebsd.org/D59104
DeltaFile
+17-10sys/kern/uipc_shm.c
+1-1sys/sys/mman.h
+18-112 files

FreeBSD/src c7cec6fsys/kern tty.c

tty: Revalidate after dropping the tty lock in ioctl handlers

The TIOCSCTTY ioctl handler drops the tty lock in order to acquire the
proctree relock.  After relocking the tty, it did not revalidate the
tty state, and it could end up linking a doomed tty to the calling
process' session.  This race can be exploited to escalate privileges.

TIOCSPGRP has a similar race, fix that too.

Approved by:    so
Security:       FreeBSD-SA-26:62.tty
Security:       CVE-2026-58093
Reported by:    tsune of GMO Cybersecurity by Ierae, Inc. working with TrendAI Zero Day Initiative
Reviewed by:    kib
Sponsored by:   The FreeBSD Foundation
Differential Revision:  https://reviews.freebsd.org/D59126
DeltaFile
+12-2sys/kern/tty.c
+12-21 files

FreeBSD/src edff72esys/dev/sound/pcm channel.h dsp.c

dsp: Fix a potential use-after-free in dsp_oss_syncstart()

This function has a loop where it attempts to lock all channels in a
group.  If doing so would block, it releases all locks, sleeps for a
bit, and tries again.  However, once the syncgroup lock is dropped,
nothing prevents the syncgroup structure from being freed.

Fix the inner loop: after waking up, break out of it unconditionally and
start everything again.  I think the old code was also buggy and not
well-exercised: after waking up we'd continue to try and continue
locking channels.  Then we'd try again from the beginning and fail to
lock the channels we had already locked.

Approved by:    so
Security:       FreeBSD-SA-26:58.sound
Security:       CVE-2026-58091
Reported by:    Hazley Samsudin of GovTech CSG
Reviewed by:    christos
Sponsored by:   The FreeBSD Foundation
Differential Revision:  https://reviews.freebsd.org/D58912
DeltaFile
+6-11sys/dev/sound/pcm/dsp.c
+5-4sys/dev/sound/pcm/channel.h
+11-152 files

FreeBSD/src ae27dffsys/sys ucred.h, tests/sys/mac/do Makefile regression.c

cred: Fix group_is_primary()

This helper wasn't updated in commit be1f7435ef21, so in reality it was
testing whether "gid" is the first supplemental group.  If a user
doesn't belong to a supplementary group, then it's testing an
uninitialized slot; since ucreds are allocated with M_ZERO, this
typically means that we're testing gid == 0.

group_is_primary() has exactly one use, in mac_do.  There, it's used to
determine whether to keep the caller's current primary groups.  This
means that a rule such as gid=0>uid=0 will permit any credential with no
supplementary groups.

I believe this is mostly exploitable by daemons which have explicitly
dropped privileges and called setgroups(0, NULL); logged in users will
have a non-empty supplementary group list by virtue of having gone
through initgroups(3).

Fix group_is_primary(), and add a regression test.

    [9 lines not shown]
DeltaFile
+83-0tests/sys/mac/do/regression.c
+1-1sys/sys/ucred.h
+2-0tests/sys/mac/do/Makefile
+86-13 files

FreeBSD/src c5ad29ccrypto/openssl/ssl/quic quic_port.c quic_txp.c, crypto/openssl/ssl/record/methods dtls_meth.c

openssl: Fix multiple vulnerabilities

This is a rollup commit from upstream to fix:
  Handle signature_algorithms_cert extension in key-only context
  Avoid double free of qrx in port_default_packet_handler()
  Avoid full read buffer allocation when buffering DTLS next-epoch records
  ssl/record/methods/dtls_meth.c: lower the unprocessed_rcds queue limit
  ssl/record: remove dead DTLS processed_rcds record queue
  Fix heap buffer overflow (8-byte OOB write) in AES-WRAP-PAD unwrap
  CMP unexpected sender DN used as format string in ERR_raise_data()
  Add test for CVE-2026-63073
  Add a test for restricting growth in cmp cert cache
  Fix unbounded cert cache growth in cmp
  Don't store ACK-only frames in TX history for QUIC.
  Add test for CVE-2026-63076
  Fix Remote NULL deref in ossl_cmp_calc_protection() via crafted protectionAlg

Approved by:    so
Obtained from:  OpenSSL

    [8 lines not shown]
DeltaFile
+338-0crypto/openssl/test/cmp_extracerts_dos_test.c
+16-75crypto/openssl/ssl/record/methods/dtls_meth.c
+66-10crypto/openssl/test/rpktest.c
+50-0crypto/openssl/test/cmp_vfy_test.c
+34-12crypto/openssl/ssl/quic/quic_txp.c
+28-12crypto/openssl/ssl/quic/quic_port.c
+532-10912 files not shown
+682-12518 files

FreeBSD/src 87bb4aasys/dev/hwpmc hwpmc_mod.c, sys/kern kern_exec.c

hwpmc: Fix the execve handler

When a process execve()s, pmc_process_exec() is supposed to evaluate
whether the new image is setuid/setgid and if so, whether to detach
PMCs.  This was handled by pmc_can_attach(), which is effectively an
open-coded copy of cr_xids_subset().

Unfortunately, the test of the result of this function was inverted,
with the result that we'd detach PMCs only if the predicate said it was
okay to do so.  It appears the bug has always been there; it seems the
intent was to return 0 on "success", i.e., it is okay to attach the
PMCs, much like p_candebug().  Commits 1c3c698ba4c4 and 1c40b15971f0
obscured this a bit.

I think this check is trying to be too clever.  Let's make it simpler:
simply do not attach PMCs unless the owner is privileged.  This is how,
e.g., ktrace works.  I do not think it's worth trying to be more
sophisticated than this unless we can generalize the policy in a way
that's applicable to other subsystems.

    [11 lines not shown]
DeltaFile
+12-60sys/dev/hwpmc/hwpmc_mod.c
+1-1sys/kern/kern_exec.c
+13-612 files

FreeBSD/src 96bf349sys/sys ucred.h, tests/sys/mac/do Makefile regression.c

cred: Fix group_is_primary()

This helper wasn't updated in commit be1f7435ef21, so in reality it was
testing whether "gid" is the first supplemental group.  If a user
doesn't belong to a supplementary group, then it's testing an
uninitialized slot; since ucreds are allocated with M_ZERO, this
typically means that we're testing gid == 0.

group_is_primary() has exactly one use, in mac_do.  There, it's used to
determine whether the requested primary GID can be used in a setcred(2)
call when the ruleset does not explicitly specify a target primary GID.

I believe this is mostly exploitable by daemons which have explicitly
dropped privileges and called setgroups(0, NULL); logged in users will
have a non-empty supplementary group list by virtue of having gone
through initgroups(3).

Fix group_is_primary(), and add a regression test.


    [8 lines not shown]
DeltaFile
+83-0tests/sys/mac/do/regression.c
+1-1sys/sys/ucred.h
+2-0tests/sys/mac/do/Makefile
+86-13 files

FreeBSD/src fad7f65crypto/openssl/ssl/quic quic_port.c quic_txp.c, crypto/openssl/ssl/record/methods dtls_meth.c

openssl: Fix multiple vulnerabilities

This is a rollup commit from upstream to fix:
  Handle signature_algorithms_cert extension in key-only context
  Avoid double free of qrx in port_default_packet_handler()
  Avoid full read buffer allocation when buffering DTLS next-epoch records
  ssl/record/methods/dtls_meth.c: lower the unprocessed_rcds queue limit
  ssl/record: remove dead DTLS processed_rcds record queue
  Fix heap buffer overflow (8-byte OOB write) in AES-WRAP-PAD unwrap
  CMP unexpected sender DN used as format string in ERR_raise_data()
  Add test for CVE-2026-63073
  Add a test for restricting growth in cmp cert cache
  Fix unbounded cert cache growth in cmp
  Don't store ACK-only frames in TX history for QUIC.
  Add test for CVE-2026-63076
  Fix Remote NULL deref in ossl_cmp_calc_protection() via crafted protectionAlg

Approved by:    so
Obtained from:  OpenSSL

    [8 lines not shown]
DeltaFile
+338-0crypto/openssl/test/cmp_extracerts_dos_test.c
+16-75crypto/openssl/ssl/record/methods/dtls_meth.c
+66-10crypto/openssl/test/rpktest.c
+50-0crypto/openssl/test/cmp_vfy_test.c
+34-12crypto/openssl/ssl/quic/quic_txp.c
+28-12crypto/openssl/ssl/quic/quic_port.c
+532-10912 files not shown
+682-12518 files

FreeBSD/src 62c4afcsys/dev/sound/pcm channel.h dsp.c

dsp: Fix a potential use-after-free in dsp_oss_syncstart()

This function has a loop where it attempts to lock all channels in a
group.  If doing so would block, it releases all locks, sleeps for a
bit, and tries again.  However, once the syncgroup lock is dropped,
nothing prevents the syncgroup structure from being freed.

Fix the inner loop: after waking up, break out of it unconditionally and
start everything again.  I think the old code was also buggy and not
well-exercised: after waking up we'd continue to try and continue
locking channels.  Then we'd try again from the beginning and fail to
lock the channels we had already locked.

Approved by:    so
Security:       FreeBSD-SA-26:58.sound
Security:       CVE-2026-58091
Reported by:    Hazley Samsudin of GovTech CSG
Reviewed by:    christos
Sponsored by:   The FreeBSD Foundation
Differential Revision:  https://reviews.freebsd.org/D58912
DeltaFile
+6-11sys/dev/sound/pcm/dsp.c
+5-4sys/dev/sound/pcm/channel.h
+11-152 files

FreeBSD/src b207f75sys/kern tty.c

tty: Revalidate after dropping the tty lock in ioctl handlers

The TIOCSCTTY ioctl handler drops the tty lock in order to acquire the
proctree relock.  After relocking the tty, it did not revalidate the
tty state, and it could end up linking a doomed tty to the calling
process' session.  This race can be exploited to escalate privileges.

TIOCSPGRP has a similar race, fix that too.

Approved by:    so
Security:       FreeBSD-SA-26:62.tty
Security:       CVE-2026-58093
Reported by:    tsune of GMO Cybersecurity by Ierae, Inc. working with TrendAI Zero Day Initiative
Reviewed by:    kib
Sponsored by:   The FreeBSD Foundation
Differential Revision:  https://reviews.freebsd.org/D59126
DeltaFile
+12-2sys/kern/tty.c
+12-21 files

FreeBSD/src b13a700sys/kern uipc_shm.c, sys/sys mman.h

posixshm: Fix a TOCTOU race in the FIOSSHMLPGCNF handler

The check for whether shm_lp_psind was assigned was unlocked.  This race
can be exploited to create an object with psind==2 but with only
pagesizes[1] worth of pages populated.  This in turn can be used to
escalate privileges.

Fix this by acquiring the rangelock earlier.  In shm_mmap_large(),
assert that we hold the rangelock.  In shm_write(), annotate an unlocked
load of shm_lp_psind.

Approved by:    so
Security:       FreeBSD-SA-26:63.posixshm
Security:       CVE-2026-58094
Reported by:    tsune of GMO Cybersecurity by Ierae, Inc. working with TrendAI Zero Day Initiative
Reviewed by:    kib
Sponsored by:   The FreeBSD Foundation
Differential Revision:  https://reviews.freebsd.org/D59104
DeltaFile
+17-10sys/kern/uipc_shm.c
+1-1sys/sys/mman.h
+18-112 files

FreeBSD/src cbf3fe8sys/dev/hwpmc hwpmc_mod.c, sys/kern kern_exec.c

hwpmc: Fix the execve handler

When a process execve()s, pmc_process_exec() is supposed to evaluate
whether the new image is setuid/setgid and if so, whether to detach
PMCs.  This was handled by pmc_can_attach(), which is effectively an
open-coded copy of cr_xids_subset().

Unfortunately, the test of the result of this function was inverted,
with the result that we'd detach PMCs only if the predicate said it was
okay to do so.  It appears the bug has always been there; it seems the
intent was to return 0 on "success", i.e., it is okay to attach the
PMCs, much like p_candebug().  Commits 1c3c698ba4c4 and 1c40b15971f0
obscured this a bit.

I think this check is trying to be too clever.  Let's make it simpler:
simply do not attach PMCs unless the owner is privileged.  This is how,
e.g., ktrace works.  I do not think it's worth trying to be more
sophisticated than this unless we can generalize the policy in a way
that's applicable to other subsystems.

    [11 lines not shown]
DeltaFile
+12-60sys/dev/hwpmc/hwpmc_mod.c
+1-1sys/kern/kern_exec.c
+13-612 files

FreeBSD/src 5db5c82sys/arm/arm machdep.c

arm: Quote diagnostic message

The C standard does not require diagnostic messages to be quoted, but
some tools get confused by unbalanced quotes such as the apostrophe in
“don't”.  Wrap this message in double quotes to resolve the confusion.

Sponsored by:   Klara, Inc.
Sponsored by:   NetApp, Inc.
DeltaFile
+1-1sys/arm/arm/machdep.c
+1-11 files

FreeBSD/src 9186704sys/arm64/include armreg.h

arm64: Fix the indentation of ID_AA64ISAR2_EL1

Some ID_AA64ISAR2_EL1 fields values are incorrectly indented. Values
have an extra space before the macro to make scanning for them easier.

Add this extra space to the two fields that were missing it.

Sponsored by:   Arm Ltd
DeltaFile
+4-4sys/arm64/include/armreg.h
+4-41 files

FreeBSD/src 137ce1esys/arm64/include armreg.h

arm64: Use decimal values for op and CR macros

Using hex here breaks the instruction generated by MRS_REG_ALT_NAME.
Switch to a decimal value.

Sponsored by:   Arm Ltd
DeltaFile
+15-15sys/arm64/include/armreg.h
+15-151 files