FreeBSD/src 36d7d20sys/x86/x86 mca.c

mca_log: add missing breaks when handling thresholds

Per the "Intel® 64 and IA-32 Architectures Software Developer’s Manual
Combined Volumes: Vol. 3B 17-7", the Green and Yellow threshold
indicators are mutually exclusive. Add the missing `break` statements so
they're treated that way.

MFC after:      1 week
Reported by:    Coverity
Differential Revision:  https://reviews.freebsd.org/D48722
DeltaFile
+2-0sys/x86/x86/mca.c
+2-01 files

FreeBSD/src 810c122sys/netlink netlink_message_parser.c

netlink: use u_int as argument for ifnet_byindex()
DeltaFile
+13-6sys/netlink/netlink_message_parser.c
+13-61 files

FreeBSD/src 031fbf8sys/netlink/route rt.c

netlink/route: fix fib number validation in old Linux compat mode

The value passed via old field also needs to be validated.

PR:                     283848
Fixes:                  f34aca55adef1e28cd68b2e6705a0cac03f0238e
DeltaFile
+3-3sys/netlink/route/rt.c
+3-31 files

FreeBSD/src 8b094a9sys/netlink netlink_message_parser.c netlink_message_parser.h

netlink: style(9) pass over message parsing code

Mostly breaking long lines, few other changes.
DeltaFile
+71-42sys/netlink/netlink_message_parser.c
+43-34sys/netlink/netlink_message_parser.h
+114-762 files

FreeBSD/src cdacb12sys/netlink/route rt.c

netlink/route: validate family attribute

PR:                     283818
DeltaFile
+3-3sys/netlink/route/rt.c
+3-31 files

FreeBSD/src 876b88asys/netlink netlink_message_parser.c netlink_message_parser.h

netlink: consistently use unsigned types in the parser

Use uint32_t for anything that is derived from message length, use
uint16_t for anything that represents attribute length and use u_int for
array indices.
DeltaFile
+23-19sys/netlink/netlink_message_parser.c
+18-24sys/netlink/netlink_message_parser.h
+2-2sys/netlink/netlink_ctl.h
+43-453 files

FreeBSD/src 49a6e21sys/netlink/route rt.c

netlink/route: fix nlattr_get_multipath() to check length

of supplied nexthop sub-attributes.  While here, use unsigned types for
length calculations and improve style(9).

PR:                     283860
DeltaFile
+22-10sys/netlink/route/rt.c
+22-101 files

FreeBSD/src 0feaf86usr.sbin/bluetooth/iwmbtfw main.c iwmbtfw.8

iwmbtfw(8): fix getopt flags, unify usage()/manual page contents

Seems like there was an intention to use command line switches
-m, -p and -v (each with argument), but there is no handling
for them.

Also, some enhancements to the usage()/manpage:

 - use FreeBSD manpage style -- square brackets -- for denoting
   optional arguments in usage();

 - show default directory path in usage();

 - update manual: -f is the optional flag;

 - show descriptions for -I/-D together: they are logically related.

Signed-off-by:  Eygene Ryabinkin <rea at FreeBSD.org>
Reviewed by:    wulf
MFC after:      1 month
DeltaFile
+4-3usr.sbin/bluetooth/iwmbtfw/main.c
+3-3usr.sbin/bluetooth/iwmbtfw/iwmbtfw.8
+7-62 files

FreeBSD/src ff41163usr.sbin/bluetooth/iwmbtfw main.c

iwmbtfw(8): don't program hardware without existing firmware image

One should not start firmware update sequence just to understand
that there is no firmware image to program: update sequence for 7260
requires leaving manufacturing mode and in the case of missing
firmware file it will trigger complete re-initialization of BT adapter.
Which, in turn, will make the USB device to go away and reappear.

Since devd(8) has hooks for USB device attachment, in the case
of missing firmware it used to
 - trigger the (failing) firmware download,
 - which triggers device reset,
 - which creates USB notification and devd(8) kicks back in.

Nice infinite cycle with many notifications via syslog:
{{{
Jan  3 09:00:01 kernel: ugen0.2: <vendor 0x8087 product 0x0a2a> at usbus0
Jan  3 09:00:01 kernel: ugen0.2: <vendor 0x8087 product 0x0a2a> at usbus0 (disconnected)
Jan  3 09:00:02 kernel: ugen0.2: <vendor 0x8087 product 0x0a2a> at usbus0

    [6 lines not shown]
DeltaFile
+14-27usr.sbin/bluetooth/iwmbtfw/main.c
+14-271 files

FreeBSD/src f466ba4usr.sbin/bluetooth/iwmbtfw main.c

Refactor iwmbtfw: set default firmware_dir after argument parsing

Don't repeat firmware_dir stanza at all "if" branches: be more DRY.

Signed-off-by:  Eygene Ryabinkin <rea at FreeBSD.org>
Reviewed by:    wulf
MFC after:      1 month
DeltaFile
+4-12usr.sbin/bluetooth/iwmbtfw/main.c
+4-121 files

FreeBSD/src 06969dbusr.sbin/bluetooth/iwmbtfw main.c iwmbt_hw.c

Refactor iwmbtfw: modularize and de-constify

 - Move logic for firmware download into different adapter types
   to the own functions to allow main() to be simpler

 - Use enums/typedefs for exit modes, image types, etc

 - Purge most obvious comments: functions are named properly,
   so most of their invocations self-document the code.

Signed-off-by:  Eygene Ryabinkin <rea at FreeBSD.org>
Reviewed by:    wulf
MFC after:      1 month
DeltaFile
+273-253usr.sbin/bluetooth/iwmbtfw/main.c
+3-12usr.sbin/bluetooth/iwmbtfw/iwmbt_hw.c
+13-1usr.sbin/bluetooth/iwmbtfw/iwmbt_hw.h
+8-0usr.sbin/bluetooth/iwmbtfw/iwmbt_fw.h
+1-0usr.sbin/bluetooth/iwmbtfw/iwmbt_fw.c
+298-2665 files

FreeBSD/src 9fab5bbusr.sbin/devinfo devinfo.8

devinfo.8: Bump Dd for addition of -v to -u mode
DeltaFile
+1-1usr.sbin/devinfo/devinfo.8
+1-11 files

FreeBSD/src 22167b0. ObsoleteFiles.inc

ObsoleteFiles.inc: Fix placeholder date for libdevinfo.so.6

Fixes: 7554746c43c5 ("libdevinfo: Avoid false positives for the root0 sentinel value")
DeltaFile
+1-1ObsoleteFiles.inc
+1-11 files

FreeBSD/src 094f44econtrib/tcpdump configure install-sh

tcpdump: Update to 4.99.5

Reviewed by:    kp (changes related to pf)
Sponsored by:   The FreeBSD Foundation

(cherry picked from commit 0a7e5f1f02aad2ff5fff1c60f44c6975fd07e1d9)
(cherry picked from commit d72f87c0fd1418bdb814594ea8fc76a202f7d5c6)
DeltaFile
+4,673-3,361contrib/tcpdump/configure
+502-211contrib/tcpdump/install-sh
+372-112contrib/tcpdump/configure.ac
+248-53contrib/tcpdump/CMakeLists.txt
+236-33contrib/tcpdump/CONTRIBUTING.md
+250-0contrib/tcpdump/instrument-functions.c
+6,281-3,770221 files not shown
+8,134-5,536227 files

FreeBSD/src 68ddf72contrib/libpcap configure CMakeLists.txt

libpcap: Update to 1.10.5

Reviewed by:    kp (pflogd changes)
Sponsored by:   The FreeBSD Foundation

(cherry picked from commit afdbf109c6a661a729938f68211054a0a50d38ac)
(cherry picked from commit ecb75be376a3e18d3e4836b6ee07015264784694)
(cherry picked from commit f0bcebe67ef6cf9f104535d6cd9f151c1b61dd6a)
(cherry picked from commit 34aa6f2c2db5cc9655f201a1ef01adbb9fb484d5)
DeltaFile
+4,828-4,793contrib/libpcap/configure
+621-398contrib/libpcap/CMakeLists.txt
+502-211contrib/libpcap/install-sh
+402-254contrib/libpcap/pcap-linux.c
+426-158contrib/libpcap/gencode.c
+504-0contrib/libpcap/pcap-haiku.c
+7,283-5,814152 files not shown
+12,016-9,205158 files

FreeBSD/src f68d1f3contrib/tcpdump print-ppp.c print.c

tcpdump: ppp: Use the buffer stack for the de-escaping buffer

This both saves the buffer for freeing later and saves the packet
pointer and snapend to be restored when packet processing is complete,
even if an exception is thrown with longjmp.

This means that the hex/ASCII printing in pretty_print_packet()
processes the packet data as captured or read from the savefile, rather
than as modified by the PPP printer, so that the bounds checking is
correct.

That fixes CVE-2024-2397, which was caused by an exception being thrown
by the hex/ASCII printer (which should only happen if those routines are
called by a packet printer, not if they're called for the -X/-x/-A
flag), which jumps back to the setjmp() that surrounds the packet
printer.  Hilarity^Winfinite looping ensues.

Also, restore ndo->ndo_packetp before calling the hex/ASCII printing
routine, in case nd_pop_all_packet_info() didn't restore it.

    [4 lines not shown]
DeltaFile
+17-14contrib/tcpdump/print-ppp.c
+6-2contrib/tcpdump/print.c
+23-162 files

FreeBSD/src e5258a0contrib/tcpdump configure print-bgp.c

tpcdump: Update to 4.99.4

Prior to this MFC, the stable/13 tcpdump was at version 4.9.3, which was
released over five years ago.  Several CVEs have been identified in that
version.  For a detailed list, see
https://www.tcpdump.org/public-cve-list.txt.

Reviewed by:    kp (print-pf changes)
Sponsored by:   The FreeBSD Foundation

(cherry picked from commit 1cdec2832d051ddcb1417f3f2601e6212aff2613)
(cherry picked from commit ee67461e56828dd1f8de165947ba83f6d9148a87)
(cherry picked from commit a75d93a74d55d371876f5444075de4ecd685297f)
(cherry picked from commit 171a7bbfc04885150401ab64d96793373a8b2061)
(cherry picked from commit 1ad8d2ee1f7dec1d747ec955a68fbbb362958315)
(cherry picked from commit 7e0a7ef95fac1183854cab662bd9afa4647422d6)
(cherry picked from commit 85247ee6a2ba1c2dd0053e9be9055efa4be1438e)

Commit 1cdec2832d051ddcb1417f3f2601e6212aff2613 has been adapted for

    [9 lines not shown]
DeltaFile
+2,261-2,169contrib/tcpdump/configure
+2,249-1,965contrib/tcpdump/print-bgp.c
+1,554-1,177contrib/tcpdump/print-isoclns.c
+2,484-151contrib/tcpdump/print-802_15_4.c
+1,105-1,367contrib/tcpdump/print-openflow-1.0.c
+990-891contrib/tcpdump/config.sub
+10,643-7,720277 files not shown
+48,298-33,574283 files

FreeBSD/src f904cdecontrib/tcpdump print-pflog.c

tcpdump: add missing pf reasons and actions

Reviewed by:    kp
Sponsored by:   InnoGames GmbH
Differential Revision:  https://reviews.freebsd.org/D39586

(cherry picked from commit 56cd7716b63d84190e6308d50717ec8bbbdfe1c0)
DeltaFile
+4-0contrib/tcpdump/print-pflog.c
+4-01 files

FreeBSD/src 33c859cusr.sbin/tcpdump/tcpdump Makefile

tcpdump: specify OpenSSL 1.1 APIs

OPENSSL_API_COMPAT can be used to specify the OpenSSL API version in
use for the purpose of hiding deprecated interfaces and enabling
the appropriate deprecation notices.

This change is a NFC while we're still using OpenSSL 1.1.1 but will
avoid deprecation warnings upon the switch to OpenSSL 3.0.

A future update should migrate to use the OpenSSL 3.0 APIs.

PR:             271615
Reviewed by:    emaste
Event:          Kitchener-Waterloo Hackathon 202305
Sponsored by:   The FreeBSD Foundation

(cherry picked from commit baef3a5b585f462d9256f3b5a771ab5508ef6fd2)
DeltaFile
+1-0usr.sbin/tcpdump/tcpdump/Makefile
+1-01 files

FreeBSD/src 7aedea8contrib/libpcap configure pcap-linux.c

libpcap: Update to 1.10.3

Prior to this MFC, the stable/13 libpcap was at version 1.9.1, which was
released over five years ago.  Several CVEs have been identified in that
version.  For a detailed list, see
https://www.tcpdump.org/public-cve-list.txt.

Reviewed by:    kp (pf changes)
Sponsored by:   The FreeBSD Foundation

(cherry picked from commit 6d1c946e916845d01062e146aad5395410da1e54)
(cherry picked from commit 0c59e0b4e5817f139ce28486085b2f196351c7a3)
(cherry picked from commit 512c553671bef26e93342d4ae1ec5f60d8ae112b)
(cherry picked from commit 6f9cba8f8b5efd16249633e52483ea351876b67b)
(cherry picked from commit 437f05885047c533cadf15b564729cfd0273d2fe)

Commit 437f05885047c533cadf15b564729cfd0273d2fe has been adapted to only
include the changes for the libpcap 1.10.3 update.
DeltaFile
+4,984-2,194contrib/libpcap/configure
+1,678-3,625contrib/libpcap/pcap-linux.c
+972-890contrib/libpcap/config.sub
+1,217-467contrib/libpcap/configure.ac
+1,273-348contrib/libpcap/CMakeLists.txt
+901-609contrib/libpcap/config.guess
+11,025-8,133237 files not shown
+29,943-16,089243 files

FreeBSD/src e6efc82contrib/libpcap configure nametoaddr.c, contrib/libpcap/rpcapd rpcapd.manadmin.in

libpcap: Update to 1.10.4

Sponsored by:   The FreeBSD Foundation

(cherry picked from commit dd744a896be358d6f001766188da6aed80e00378)
(cherry picked from commit 270d20ce91c898c532ebaff76bb5b71c8544e928)
(cherry picked from commit 67c802c948abf6955c3d8b53f4a41293a9caea24)
(cherry picked from commit b1538e8fc488409113b833dd1c53aab1057b0568)
DeltaFile
+32-32contrib/libpcap/configure
+41-1contrib/libpcap/rpcapd/rpcapd.manadmin.in
+20-20contrib/libpcap/nametoaddr.c
+26-12contrib/libpcap/CHANGES
+25-8contrib/libpcap/config.sub
+13-13contrib/libpcap/configure.ac
+157-8629 files not shown
+255-18035 files

FreeBSD/src 697fd84. Makefile

Makefile: Fix several issues with bmake upgrade

Firstly, if NEED_MAKE_UPGRADE isn't set, we shouldn't use whatever
bootstrapped bmake happens to be lying around. We're not going to re-run
the bmake target, so won't make sure it's up-to-date, and thus it could
be some ancient unsupported version. We can still, however, optimise
setting SUB_MAKE when the file exists, so long as it's guarded by
NEED_MAKE_UPGRADE.

Secondly, make kernel-toolchain should also bootstrap bmake if needed,
since it's supposed to be the subset of buildworld needed for building a
kernel.

Finally, if there is a stale bootstrapped bmake lying around that isn't
needed, delete it, since it will only cause confusion, and as far as I
can tell nothing else will clean it up, not even cleandir twice. So as
to ensure nobody's doing anything crazy with MYMAKE that would cause us
to delete something unexpected, or that would change behaviour by no
longer checking exists(${MYMAKE}) and using that regardless of version

    [4 lines not shown]
DeltaFile
+15-6Makefile
+15-61 files

FreeBSD/src 89321a8. UPDATING, sys/conf newvers.sh

Add UPDATING entries and bump version

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

FreeBSD/src 9c72da8usr.bin/genl genl.1

genl: typo fixes

PR:     284017
(cherry picked from commit 8b5058ec78a6fad972f48e6cd5613c2750f43ad6)
DeltaFile
+2-2usr.bin/genl/genl.1
+2-21 files

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

Add UPDATING entries and bump version

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

FreeBSD/src c55000eusr.sbin/etcupdate etcupdate.sh

etcupdate: Restrict access to the conflicts directory

In the window during conflict resolution, copies of installed files with
conflicts are added here with the default mode.  Restrict access.

Approved by:    so
Security:       FreeBSD-SA-25:03.etcupdate
PR:             277470
Reviewed by:    philip, jhb, emaste
Differential Revision:  https://reviews.freebsd.org/D48576

(cherry picked from commit c43ae7ab4bf89c2b274c1cbefe663c456e9211d1)
(cherry picked from commit 93836ff92be84a1d4e7611577ffe116a0e30d008)
DeltaFile
+3-0usr.sbin/etcupdate/etcupdate.sh
+3-01 files

FreeBSD/src faa47d2sys/fs/tarfs tarfs_vnops.c tarfs.h

tarfs: Fix the size of struct tarfs_fid and add a static assert

File system specific *fid structures are copied into the generic
struct fid defined in sys/mount.h.
As such, they cannot be larger than struct fid.

This patch packs the structure and checks via a __Static_assert().

Approved by:    so
Security:       FreeBSD-SA-25:02.fs
Reviewed by:    markj
MFC after:      2 weeks

(cherry picked from commit 4db1b113b15158c7d134df83e7a7201cf46d459b)
(cherry picked from commit 155987e2019089a5bd2eef77ed7bcc5cc26c362e)
DeltaFile
+2-0sys/fs/tarfs/tarfs_vnops.c
+1-1sys/fs/tarfs/tarfs.h
+3-12 files

FreeBSD/src 1f3cea9sys/fs/ext2fs inode.h ext2_vnops.c

ext2fs: Fix the size of struct ufid and add a static assert

File system specific *fid structures are copied into the generic
struct fid defined in sys/mount.h.
As such, they cannot be larger than struct fid.

This patch packed the structure and checks via a __Static_assert().

Approved by:    so
Security:       FreeBSD-SA-25:02.fs
Reviewed by:    markj
MFC after:      2 weeks

(cherry picked from commit bfc8e3308bee23d0f7836d57f32ed8d47da02627)
(cherry picked from commit 7a3a0402aeb626a7379addd344cbfd8900e83baa)
DeltaFile
+1-1sys/fs/ext2fs/inode.h
+2-0sys/fs/ext2fs/ext2_vnops.c
+3-12 files

FreeBSD/src 4985615sys/fs/cd9660 cd9660_vnops.c iso.h

cd9660: Make sure that struct ifid fits in generic filehandle structure

File system specific *fid structures are copied into the generic
struct fid defined in sys/mount.h.
As such, they cannot be larger than struct fid.

This patch packs the structure and checks via a __Static_assert().

Approved by:    so
Security:       FreeBSD-SA-25:02.fs
Reported by:    Kevin Miller <mas at 0x194.net>
Reviewed by:    olce, imp, kib, emaste
MFC after:      1 week
Differential Revision:  https://reviews.freebsd.org/D47879

(cherry picked from commit 205659c43d87bd42c4a0819fde8f81e8ebba068e)
(cherry picked from commit 54974e731f279941ef7aebd7d30ba2e9299a4056)
DeltaFile
+3-0sys/fs/cd9660/cd9660_vnops.c
+1-1sys/fs/cd9660/iso.h
+4-12 files

FreeBSD/src b9149a3contrib/tzdata australasia asia

contrib/tzdata: import tzdata 2025a

Changes: https://github.com/eggert/tz/blob/2025a/NEWS

Approved by:    so
Security:       FreeBSD-EN-25:03.tzdata

(cherry picked from commit 46226b0162ba03986b1de2c790804b37dd8e64d6)
(cherry picked from commit a158d26e89f2e3274ba1064e3fd6b341c6fcb07c)
DeltaFile
+61-52contrib/tzdata/australasia
+81-30contrib/tzdata/asia
+81-3contrib/tzdata/NEWS
+27-13contrib/tzdata/theory.html
+37-2contrib/tzdata/checktab.awk
+17-15contrib/tzdata/Makefile
+304-11513 files not shown
+368-14219 files