FreeBSD/src 2670291usr.sbin/rtsold rtsol.c

rtsold: Validate entries in domain search lists

Reported by:    Kevin Day <kevin at your.org>
Approved by:    so
Security:       FreeBSD-SA-25:12.rtsold
Security:       CVE-2025-14558

(cherry picked from commit bf804f69dd94b3c98962618b4ad3b48a35bff2ff)
DeltaFile
+40-6usr.sbin/rtsold/rtsol.c
+40-61 files

FreeBSD/src 4fef581usr.sbin/rtsold rtsol.c

rtsold: Validate entries in domain search lists

Reported by:    Kevin Day <kevin at your.org>
Approved by:    so
Security:       FreeBSD-SA-25:12.rtsold
Security:       CVE-2025-14558

(cherry picked from commit bf804f69dd94b3c98962618b4ad3b48a35bff2ff)
DeltaFile
+40-6usr.sbin/rtsold/rtsol.c
+40-61 files

FreeBSD/src 63a5b64. UPDATING, sys/conf newvers.sh

Add UPDATING entries and bump version.

Approved by:    so
DeltaFile
+11-0UPDATING
+1-1sys/conf/newvers.sh
+12-12 files

FreeBSD/src 408f5c6usr.sbin/rtsold rtsol.c

rtsold: Validate entries in domain search lists

Reported by:    Kevin Day <kevin at your.org>
Approved by:    so
Security:       FreeBSD-SA-25:12.rtsold
Security:       CVE-2025-14558
DeltaFile
+40-6usr.sbin/rtsold/rtsol.c
+40-61 files

FreeBSD/src eb5a6f5. UPDATING, sys/conf newvers.sh

Add UPDATING entries and bump version

Approved by:    so
DeltaFile
+8-0UPDATING
+1-1sys/conf/newvers.sh
+9-12 files

FreeBSD/src 35cee6ausr.sbin/rtsold rtsol.c

rtsold: Validate entries in domain search lists

Reported by:    Kevin Day <kevin at your.org>
Approved by:    so
Security:       FreeBSD-SA-25:12.rtsold
Security:       CVE-2025-14558
DeltaFile
+40-6usr.sbin/rtsold/rtsol.c
+40-61 files

FreeBSD/src 8b2a912. UPDATING, sys/conf newvers.sh

Add UPDATING entries and bump version.

Approved by:    so
DeltaFile
+8-0UPDATING
+1-1sys/conf/newvers.sh
+9-12 files

FreeBSD/src 3c54b20usr.sbin/rtsold rtsol.c

rtsold: Validate entries in domain search lists

Reported by:    Kevin Day <kevin at your.org>
Approved by:    so
Security:       FreeBSD-SA-25:12.rtsold
Security:       CVE-2025-14558
DeltaFile
+40-6usr.sbin/rtsold/rtsol.c
+40-61 files

FreeBSD/src 6759fbbusr.sbin/rtsold rtsol.c

rtsold: Validate entries in domain search lists

Reported by:    Kevin Day <kevin at your.org>
Approved by:    so
Security:       FreeBSD-SA-25:12.rtsold
Security:       CVE-2025-14558

(cherry picked from commit bf804f69dd94b3c98962618b4ad3b48a35bff2ff)
DeltaFile
+40-6usr.sbin/rtsold/rtsol.c
+40-61 files

FreeBSD/src bf804f6usr.sbin/rtsold rtsol.c

rtsold: Validate entries in domain search lists

Reported by:    Kevin Day <kevin at your.org>
Approved by:    so
Security:       FreeBSD-SA-25:12.rtsold
Security:       CVE-2025-14558
DeltaFile
+40-6usr.sbin/rtsold/rtsol.c
+40-61 files

FreeBSD/src 2ed21f9sys/dev/netmap netmap_kloop.c

netmap: silence -Wdefault-const-init-field-unsafe warning

The netmap_ring struct starts with various const members and rencent
clang warns about leaving them uninitialized. Having them const in the
first place is highly suspicious since they are updated with various
macros but using hand-coded __DECONST(). But fixing that is a more
invasive change that I am unable to test.

```
.../freebsd/sys/dev/netmap/netmap_kloop.c:320:21: error: default initialization of an object of type 'struct netmap_ring' with const member leaves the object uninitialized [-Werror,-Wdefault-const-init-field-unsafe]
  320 |         struct netmap_ring shadow_ring; /* shadow copy of the netmap_ring */
      |                            ^
.../freebsd/sys/net/netmap.h:290:16: note: member 'buf_ofs' declared 'const' here
  290 |         const int64_t   buf_ofs;
      |                         ^
```

Test Plan: Compiles


    [3 lines not shown]
DeltaFile
+4-2sys/dev/netmap/netmap_kloop.c
+4-21 files

FreeBSD/src 802c6d5sys/sys cdefs.h, tools/build/cross-build/include/common/sys cdefs.h

cdefs.h: Introduce __nonstring attribute

This attribute can be used to annotate char arrays that are not supposed to
be terminated with a NUL char and is needed to silence clang's new
-Wunterminated-string-initialization warning. The name matches linuxkpi.

Reviewed by:    emaste, jhb
MFC after:      1 week
Differential Revision: https://reviews.freebsd.org/D52565
DeltaFile
+8-0tools/build/cross-build/include/common/sys/cdefs.h
+7-0sys/sys/cdefs.h
+15-02 files

FreeBSD/src 86f3257lib/libsysdecode utrace.c, libexec/rtld-elf rtld.c rtld_utrace.h

rtld: silence clang's unterminated-string-initialization warning

Since the initializer is used in other places where we can't just
replace it with a char-by-char initializer, this adds a macro for the
nonstring attribute (match the linuxkpi definition).

Reviewed by:    emaste, jhb
MFC after:      1 week
Differential Revision: https://reviews.freebsd.org/D52535
DeltaFile
+2-1lib/libsysdecode/utrace.c
+2-1libexec/rtld-elf/rtld.c
+1-1libexec/rtld-elf/rtld_utrace.h
+5-33 files

FreeBSD/src 4cfc7delib/libthr/thread thr_printf.c

libthr: fix -Wunterminated-string-initialization

Reviewed by:    jhb, emaste
MFC after:      1 week
Differential Revision: https://reviews.freebsd.org/D52528
DeltaFile
+1-2lib/libthr/thread/thr_printf.c
+1-21 files

FreeBSD/src 79f5785lib/libfetch common.c

libfetch: Fix -Wunterminated-string-initialization

This defaults to an error in clang HEAD, use a char-by-char
initializer instead.

Reviewed by:    emaste, jhb
MFC after:      1 week
Differential Revision: https://reviews.freebsd.org/D52532
DeltaFile
+1-1lib/libfetch/common.c
+1-11 files

FreeBSD/src ce9557dlib/libc/amd64/string stpncpy.S

libc/amd64: Disable baseline version of stpncpy()

This implementation appears to be broken on some CPUs.  Disable it
until the issue can be investigated and fixed.

PR:             291720
Fixes:          66eb78377bf1 ("libc/amd64: fix overread conditions in stpncpy()")
Fixes:          90253d49db09 ("lib/libc/amd64/string: add stpncpy scalar, baseline implementation")
DeltaFile
+2-0lib/libc/amd64/string/stpncpy.S
+2-01 files

FreeBSD/src 8b780f7contrib/libpcap pcap-bpf.c

libpcap: disable more code related to USB pseudo-interfaces

Fixes:  6e297e1cdff3568da19760e7e7c615ee4e8383ef
DeltaFile
+3-3contrib/libpcap/pcap-bpf.c
+3-31 files

FreeBSD/src 6e297e1contrib/libpcap pcap-bpf.c

libpcap: don't try to create usbusX interfaces
DeltaFile
+3-3contrib/libpcap/pcap-bpf.c
+3-31 files

FreeBSD/src 2c75ac1lib/libpathconv abs2rel.3 rel2abs.3

libpathconv: Document library in the man pages

Reviewed by:            ziaee, imp
Differential Revision:  https://reviews.freebsd.org/D54213
DeltaFile
+2-1lib/libpathconv/abs2rel.3
+2-1lib/libpathconv/rel2abs.3
+4-22 files

FreeBSD/src 2cd31bdusr.sbin/makefs/tests makefs_cd9660_tests.sh makefs_msdos_tests.sh

makefs/tests: Use require.kmods property instead of ad-hoc checks

Signed-off-by: Siva Mahadevan <me at svmhdvn.name>
MFC after:      3 days
Sponsored by:   The FreeBSD Foundation
Pull Request:   https://github.com/freebsd/freebsd-src/pull/1870
DeltaFile
+0-19usr.sbin/makefs/tests/makefs_cd9660_tests.sh
+0-8usr.sbin/makefs/tests/makefs_msdos_tests.sh
+2-0usr.sbin/makefs/tests/Makefile
+2-273 files

FreeBSD/src 681e9d3tests/sys/netinet6/frag6 frag6_07.sh

Unskip test sys.netinet6.frag6.frag6_07.frag6_07

This is now consistently passing with 100+ consecutive runs.

Signed-off-by: Siva Mahadevan <me at svmhdvn.name>
PR:             244170
MFC after:      3 days
Sponsored by: The FreeBSD Foundation
DeltaFile
+0-3tests/sys/netinet6/frag6/frag6_07.sh
+0-31 files

FreeBSD/src a6ea80bsys/netpfil/ipfilter/netinet ip_fil_freebsd.c

ipfilter: Add missing kenv fetch

When a module the environment must be explicitly fetched.

Fixes:                  d9788eabffa4
PR:                     291548
Noted by:               markj
Reviewed by:            markj
Differential Revision:  https://reviews.freebsd.org/D54242
MFC after:              3 days
DeltaFile
+2-0sys/netpfil/ipfilter/netinet/ip_fil_freebsd.c
+2-01 files

FreeBSD/src a34c50fsbin/ipf/libipf interror.c, sys/netpfil/ipfilter/netinet ip_sync.c

ipfilter: Prevent stack buffer overflow

When copying ipfs data from user space, don't just check that the payload
length is nonzero, but also that it does not exceed the size of the stack
buffer we're copying it into.

While we're at it, use a union to create a buffer of the exact size we
need instead of guessing that 2048 will be enough (and not too much).

Finally, check the size of the payload once it gets to where it's used.

MFC after:      3 days
Reported by:    Ilja Van Sprundel <ivansprundel at ioactive.com>
Reviewed by:    cy
Differential Revision:  https://reviews.freebsd.org/D54194
DeltaFile
+37-14sys/netpfil/ipfilter/netinet/ip_sync.c
+5-0sbin/ipf/libipf/interror.c
+42-142 files

FreeBSD/src c93d9e0usr.sbin/trim trim.8

trim.8: minor update for manual page

Further explain that trim(8) is not for trimming free blocks
in populated file systems/ZFS pools, as people still take it wrong sometimes.

(cherry picked from commit dbc4a1c69191909a7210cad6da46b755557d0d34)
(cherry picked from commit b2f8d46d898fb50222aefca47d687a852c647b2f)
DeltaFile
+13-3usr.sbin/trim/trim.8
+13-31 files

FreeBSD/src 2619d43tools/build/options makeman.lua

makeman.lua: Update for src.conf in the src tree

Copy the text change from the shell makeman to makeman.lua.

Fixes: dd8c666d8b78 ("src.sys.mk: Support src.conf in SRCTOP")
Sponsored by:   The FreeBSD Foundation
DeltaFile
+5-2tools/build/options/makeman.lua
+5-21 files

FreeBSD/src 04e9f1asys/amd64/vmm vmm.c

amd64/vmm.c: Fix an incorrect memory segment check in vm_iommu_{un}map

This change fixes two checks that conflated memory mapping and memory
segment idenitifers. In both cases the code iterates over all memory
mappings but passes the index to `vm_memseg_sysmem`, which is wrong.

Fix this by passing the memory mapping's segment identifier instead.

Differential Revision:  https://reviews.freebsd.org/D54210
Reviewed by:    markj
Fixes:  c76c2a19ae37
PR:     290920
Approved by:    so
Security:       FreeBSD-EN-25:20.vmm

(cherry picked from commit f1809eab82a796845f126b703c01d4a31ccf2193)
(cherry picked from commit 4f7436bf297b93fd9e835ffca3d56288ce934dc5)
DeltaFile
+4-4sys/amd64/vmm/vmm.c
+4-41 files

FreeBSD/src ff6b9c7sys/contrib/openzfs/module/os/freebsd/zfs zfs_vnops_os.c

zfs: Merge commit 86b064469dc9c2 from OpenZFS

  FreeBSD: Fix a potential null dereference in zfs_freebsd_fsync()

  In general it's possible for a vnode to not have an associated VM
  object.  This happens in particular with named pipes, which have
  some distinct VOPs, defined in zfs_fifoops.  Thus, this chunk of
  zfs_freebsd_fsync() needs to check for the FIFO case, like other
  vm_object_mightbedirty() callers do.

  (Note that vn_flush_cached_data() calls are predicated on
  zn_has_cached_data() returning true, and it checks for a NULL v_object
  pointer already.)

  Fixes: ef4058fcdc01838117dd93a654228bac7487a37c
  Reported-by: Collin Funk <collin.funk1 at gmail.com>
  Reviewed-by: Sean Eric Fagan <sef at FreeBSD.org>
  Reviewed-by: Brian Behlendorf <behlendorf1 at llnl.gov>
  Reviewed-by: Alexander Motin <alexander.motin at TrueNAS.com>

    [9 lines not shown]
DeltaFile
+1-1sys/contrib/openzfs/module/os/freebsd/zfs/zfs_vnops_os.c
+1-11 files

FreeBSD/src cce603csys/dev/rge if_rge.c

if_rge: Add PNP info for module

Add PNP info so the module can be matched by devmatch(8) and automatically
loaded.

Reviewed by:    adrian
Approved by:    adrian
Differential Revision:  https://reviews.freebsd.org/D54254
DeltaFile
+2-0sys/dev/rge/if_rge.c
+2-01 files

FreeBSD/src 98d08b8contrib/diff/src diff3.c

diff3: Use logical-not, not bitwise for booleans

And compare impcompat != 0 as it's actually an integer incremented on
each use of one of the AeExX3 options.

Reviewed by:    fuz
Sponsored by:   The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D53808

(cherry picked from commit abcb80f46c2607fc16564ca87cc25f0908f29f99)
(cherry picked from commit 56bdfd2d967ac104dc599bced168e1a200aa168e)
DeltaFile
+3-3contrib/diff/src/diff3.c
+3-31 files

FreeBSD/src 07681cbcontrib/diff/lib getopt.h

diff3: Remove bespoke getopt.h

diff3's getopt.h included a function declaration without a prototype,
which produces a compiler warning.  Just remove the bespoke getopt.h
and use the system header.

Reported by:    Mark Millard
Reviewed by:    fuz
Sponsored by:   The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D53802

(cherry picked from commit 38829592dc77e9ead4259785e0bfb93bd4c2fe34)
(cherry picked from commit 437c77476e726e0414e460c973fd88fe812ce2b4)
DeltaFile
+0-176contrib/diff/lib/getopt.h
+0-1761 files