vn_fallocate/vn_deallocate: drop vnode addr from exterrors
This was converted from a KASSERT where it made sense, but not enough
thought was applied. vp is useless, just print both offset/len instead.
Reported by: llm-postcr
Fixes: 95c7b9eaa9ec ("vfs: fail VOP_DEALLOCATE passes [...]")
Fixes: 8bee7ea63a6a ("vfs: fail VOP_ALLOCATE passes [...]")
libc: regen exterr_cat_filenames.h
GEOMZONED had previously missed updating this; I had noted that I would
fix it before 95c7b9eaa9ecc874, but alas. Fixing it now is the second
best time to do it.
Fixes: 48efb6c4eb9fe ("gzoned: Introduce Zoned Storage emulator")
krb5: Import MIT 1.22.3
Major changes in 1.22.3 (2026-11-09)
====================================
This is a bug fix release, with a focus on security issues discovered
with the aid of large language models. See
https://web.mit.edu/kerberos/advisories/MITKRB5-SA-2026-001.txt for
information on the risks of continuing to use unpatched releases.
* Fix a logic error when checking PAC server checksums
[CVE-2026-111423].
* Check for unkeyed checksums when validating CAMMAC verifiers
[CVE-2026-71199].
* Fix a loophole in the KDC's client authdata filtering which could
allow clients to include fake PAC and CAMMAC authdata values when
requesting service tickets. These fake values would be rejected by
[52 lines not shown]
vmm: Avoid redundant AMD DEBUGCTL writes
Skip clearing and restoring DEBUGCTL when the saved host value is
zero. The entry path leaves DEBUGCTL zero, and LBR virtualization
restores that host value on VM exit. A rejected guest entry also
returns with the pre-VMRUN DEBUGCTL value. Guest accesses to DEBUGCTL
remain intercepted.
Preserve the existing writes for nonzero host state. Avoiding the
redundant writes can also avoid intercepted MSR accesses when bhyve
runs under another hypervisor.
Reviewed by: markj, bnovkov
Approved by: markj (mentor)
Sponsored by: Alchemilla Ventures Private Limited
MFC after: 2 weeks
Differential Revision: https://reviews.freebsd.org/D61218
vmm: Avoid redundant Intel DEBUGCTL writes
Skip clearing and restoring IA32_DEBUGCTL when the saved host value
is zero.
VM exit clears the register. If VM entry fails, the entry path has
already cleared any nonzero host value, so restoring zero is also
unnecessary in that case. Preserve the existing writes for nonzero
host state.
Avoiding these writes can also avoid intercepted MSR accesses when
bhyve runs under another hypervisor.
Reviewed by: markj, bnovkov
Approved by: markj (mentor)
Sponsored by: Alchemilla Ventures Private Limited
MFC after: 2 weeks
Differential Revision: https://reviews.freebsd.org/D61219
vfs: fail VOP_DEALLOCATE passes that make no progress
VOP_DEALLOCATE(9) permits a filesystem to return a partial result, and
vn_deallocate_impl() simply loops until the range is consumed. If a
filesystem returns success without shrinking the remaining length, we
spin forever with the rangelock held and no way to interrupt the thread.
Return EIO if a pass doesn't make progress so that a buggy filesystem
doesn't wedge the caller.
Document the progress requirement in VOP_DEALLOCATE(9) and the new EIO
condition in fspacectl(2).
I did wonder if this should be made interruptible for, e.g., slow I/O
over NFS, but I've declined to touch it for now.
Reviewed by: kib
Differential Revision: https://reviews.freebsd.org/D61496
tmpfs: fix a hang reachable through hole-punching
Deallocate requests that clip only the start of a single page need to be
taken into account as well- it misses the first branch because
startofs == 0, but then it also misses the last branch because the start
and end are on the same page.
Handling this case in either branch is equally valid, so I've
arbitrarily chosen the first branch since it already has single-page
logic.
Reviewed by: kib
Differential Revision: https://reviews.freebsd.org/D61490
tmpfs: fix append-only file handling for writes and hole-punching
Write protection assumed that O_APPEND handling at open time is
sufficient, but the flag can be cleared with F_SETFL. That's maybe
worth rejecting, but that's harder to do without some clear layering
violations.
Hole-punching also violates the spirit of append-only, so reject that
on files that are append-only.
Note that we don't reject IMMUTABLE here- UFS seems to historically
not care if a file transitions to IMMUTABLE after it's opened, so follow
suit here instead of trying to tighten it up. ZFS will apparently use
the more constraining logic, but that's OK for now.
Reviewed by: kib
Differential Revision: https://reviews.freebsd.org/D61491
vfs: fail VOP_ALLOCATE passes that make no progress
vn_fallocate() loops over VOP_ALLOCATE until the requested range has
been allocated, permitting partial results. It only asserts that each
pass makes progress, so on a non-INVARIANTS kernel a filesystem that
returns success without shrinking the remaining length leaves the caller
spinning forever.
Drop the assertion and just return EIO in that case, as was just done
for vn_deallocate_impl(). The NFS server already does the same in its
own VOP_ALLOCATE loop.
Document the progress requirement in VOP_ALLOCATE(9) and the new EIO
condition in posix_fallocate(2).
Reviewed by: kib
Differential Revision: https://reviews.freebsd.org/D61497
traceroute6: do not print an ECN report for an echo reply
packet_ok() takes the ECN bits from the IPv6 header quoted by an
ICMPv6 error message. The destination answers an ICMPv6 probe (-I)
with an echo reply, which repeats the ICMPv6 data of the probe but not
its IPv6 header, so for that reply the main loop used whatever an
earlier packet had left in ecn.
With -E the ECN report for the destination therefore repeated the
bits quoted by an earlier ICMPv6 error. If no ICMPv6 error had been
received before, because the destination is one hop away, the first
hops are skipped with -f or the routers on the path are silent, ecn
was still uninitialized:
$ traceroute6 -E -I -n -q 1 ::1
traceroute6 to ::1 (::1) from ::1, 64 hops max, 20 byte packets
1 ::1 0.055 ms (ecn=bleached)
Print the ECN report only when there is a quoted header. Document
[7 lines not shown]
traceroute: do not use a stale or NULL quoted header with -E
packet_ok() points the global hip at the IP header quoted by an ICMP
error message and nothing resets it afterwards. The destination
answers an ICMP probe (-I) with an echo reply, which repeats the ICMP
data of the probe but not its IP header, so for that reply the main
loop used whatever an earlier packet had left in hip.
With -E the ECN report for the destination was therefore read from
the payload of the echo reply. If no ICMP error had been received
before, because the destination is one hop away, the first hops are
skipped with -f or the routers on the path are silent, hip was still
NULL and traceroute crashed:
$ traceroute -E -I 127.0.0.1
traceroute to 127.0.0.1 (127.0.0.1), 64 hops max, 48 byte packets
Segmentation fault
With -D the stale quote was compared with the probe.
[10 lines not shown]
tests/ssl_sendfile: fix flakyness under load
When loopback TCP delivery is faster than our sending thread it may take
several writes to full buffer reliably.
PR: 299447
syslogd/tests: wait for tcpdump before sending the message
The forwarded and relayed format tests could send the message before tcpdump
attached to lo0, so "tcpdump -c 1" never saw it and the test hung until the
300s timeout. Also make syslogd_stop_on_ports stop every port it is given.
Reviewed by: markj
Approved by: markj
Sponsored by: Netflix
Differential Revision: https://ron-dev.freebsd.org/FreeBSD/src/pulls/108
axgbe: return positive errno values from the sysctl handlers
Return positive errno values from the FreeBSD sysctl handlers so that
userland reports the proper error instead of "Unknown error: -22".
Convert the negative phy_config_aneg() result at the sysctl boundary,
matching axgbe_if_media_change(), and retain the PHY code's internal
error convention.
Differential Revision: https://reviews.freebsd.org/D61400
(cherry picked from commit c89613ded9237811d35a42788e9728fe0404e26b)
axgbe: bound the sysctl parser writes in get_val()
Reject tokens and option counts that exceed the fixed parser buffers,
and fix the terminating NUL offset. Have the sysctl handlers propagate
parser errors before applying settings.
Handle SYSL_U32 options and reject failed numeric conversions instead of
using an uninitialized value. Fix the duplex case falling through to an
error, and initialize the link-setting strings for unexpected speeds.
Differential Revision: https://reviews.freebsd.org/D61339
(cherry picked from commit 5523a8ba6f618fa5c853450dd551d8a5f06715ca)
modstat: check errno before calling feature_present
feature_present will overwrite errno if COMPAT_FREEBSD13 is not present.
Approved by: re (cperciva)
Reported by: llm-postcr
Fixes: ef726c645300 ("modstat: allow compat support to fail in tests")
(cherry picked from commit acd270c8c6542b45e404078b28e1a732106aa76c)
(cherry picked from commit ed8dc5e715fff0a0c9f60416362924315bb49381)
modstat: allow compat support to fail in tests
v1 and v2 versions of stuct module_stat are now gated by COMPAT_ ifdefs
so allow the otherwise valid query to fail with EINVAL.
Approved by: re (cperciva)
Effort: CHERI upstreaming
Reviewed by: markj
Reported by: llm-postcr
Sponsored by: Innovate UK
Fixes: 1ebf46ecb627 ("modstat: don't copyout while holding a lock")
Differential Revision: https://reviews.freebsd.org/D61460
(cherry picked from commit ef726c645300870b6bdf3573079b1f89f3b45c74)
(cherry picked from commit 4a9770b9256c7119da287b15a6e7900298e6d514)
modstat: don't copyout while holding a lock
If a user arranges for a page fault to never be filled (e.g., via a
FUSE file system), this can hold the shared lock forever.
To make this all work, refactor kern_modstat and freebsd32_modstat to
malloc a temporary buffer and fill it before copying it out rather
than doing a bunch of copies.
Add COMPAT_* ifdefs around compat code. The module_stat_v1 code is
really for a.out binaries in practice and thus a bit questionable.
Approved by: re (cperciva)
Reviewed by: markj
Reported by: llm-postcr
Sponsored by: Innovate UK
Fixes: 7f8c2056db1e ("modstat: avoid copying from freed memory")
Differential Revision: https://reviews.freebsd.org/D61432
[2 lines not shown]
modstat: avoid copying from freed memory
If a module is unloaded after the module is looked up in kern_modstat,
but before one of the copyout's occurs, then the memory being copied
might be freed and reused leading to an information disclosure.
The LLM was particularly concerned about a TOCTOU issue in the length
of the name, but it seems likely that there are issues with all the
copyout's. As such, hold the shared lock throughout.
Approved by: re (cperciva)
Reviewed by: markj
Reported by: llm-postcr
MFC after: 3 days
Sponsored by: Innovate UK
Fixes: 9b3851e9e3b1 ("- Lock down the ``module'' structure...")
Differential Revision: https://reviews.freebsd.org/D61398
(cherry picked from commit 7f8c2056db1e39e44c3eda15aa4e53f7fc971cd8)
(cherry picked from commit 80fed5b6b5bdf712603b90a236796e35ed7e604c)