100 Commits
Author SHA1 Message Date
Cy Schubert 71bb028fc1 sqlite3: Vendor import of sqlite3 3.54.1
Release notes at https://sqlite.org/releaselog/3_54_1.html.

Obtained from:	https://www.sqlite.org/2026/sqlite-autoconf-3540100.tar.gz
Security:	84cd82e1-d49f-11f1-bae2-3497f65b111b
		CVE-2026-119371
		CVE-2026-119372
		CVE-2026-119373
		CVE-2026-119374
		CVE-2026-119375
		CVE-2026-119376
		CVE-2026-119377
		CVE-2026-119378
		CVE-2026-119379
		CVE-2026-119591
MFC after:	1 day

Merge commit '8fcea37c441fdc95cbfc8c34eeb0dcddbc02dca1'
2026-11-03 09:59:24 -07:00
Cy Schubert 8fcea37c44 sqlite3: Vendor import of sqlite3 3.54.1
Release notes at https://sqlite.org/releaselog/3_54_1.html.

Obtained from:	https://www.sqlite.org/2026/sqlite-autoconf-3540100.tar.gz
2026-11-03 09:40:28 -07:00
Cy Schubert 509cf5f548 qlite3: Vendor import of sqlite3 3.54.0
Release notes at https://www.sqlite.org/releaselog/3_54_0.html.

Obtained from:	https://www.sqlite.org/2026/sqlite-autoconf-3540000.tar.gz
2026-11-03 09:37:50 -07:00
Cy Schubert c08a97fa27 ipfilter: Fix checksum update for NAT_DIVERTOUT
When taking a snapshot of the before ip_len (s1) for comparison with the
after-translated ip_len (s2), we must convert it from network to host
byte order before we can use it. Add the missing ntohs() call.

PR:		296944
MFC after:	3 days
2026-08-18 07:42:23 -07:00
Cy Schubert 14e3daa72d sqlite3: Vendor import of sqlite3 3.53.3
Release notes at https://www.sqlite.org/releaselog/3_53_3.html.

Obtained from:  https://www.sqlite.org/2026/sqlite-autoconf-3530300.tar.gz

MFC after:	2 weeks

Merge commit 'e698feec080925c6cffa9ec31be884daa5cea536'
2026-08-16 20:42:16 -07:00
Cy Schubert e698feec08 sqlite3: Vendor import of sqlite3 3.53.3
Release notes at https://www.sqlite.org/releaselog/3_53_3.html.

Obtained from:  https://www.sqlite.org/2026/sqlite-autoconf-3530300.tar.gz
2026-08-15 20:17:20 -07:00
Cy Schubert 71e72c9e91 wpa: Update to 2.12
Fixes and new features include:

hostapd:
* support RSN overriding (e.g., WPA3-Personal Compatibility Mode)
* EHT/IEEE 802.11be/Wi-Fi 7
  - more complete support
  - fix message validation issues that could enable DoS attacks
  - fix group key rekeying
* enable SAE group 20 by default if SAE-EXT-KEY is enabled
* reject unexpected SAE password identifier to avoid DoS attack against
  a specific STA
* mandate use of SAE H2E when using password identifiers
* assign VLAN when using SAE with PMKSA caching
* support SPP A-MSDU negotiation
* support IEEE 802.11bi functionality
  - changing SAE password identifiers
  - EPPKE
  - IEEE 802.1X/EAP in Authentication frames
  - Association frame encryption
  - PMKID privacy
* remove the driver interface for now obsolete Host AP driver
* remove the driver interface for now obsolete Atheros WEXT interface
* move supported, basic, and Beacon TX rate configuration to be at BSS
  level instead of per-radio for all BSSs
* fix various issues in Multiple-BSSID functionality
* support OpenSSL 3.0 API changes
* EAP-TEAP: protocol changes based on RFC 9930; this is not compatible
  with previous versions
* support Automated Frequency Coordination (AFC) on the 6 GHz band
* improve GAS/ANQP processing to support larger ANQP responses
* a large number of other fixes, cleanup, and extensions

wpa_supplicant:
* support RSN overriding (e.g., WPA3-Personal Compatibility Mode)
* improve BSS transition management support
* EHT/IEEE 802.11be/Wi-Fi 7
  - more complete support
  - fix message validation issues that could enable DoS attacks
* support Wi-Fi Direct R2
* support Wi-Fi Aware (add synchronized NAN; extend USD support)
* support Proximity Ranging
* support SPP A-MSDU negotiation
* support IEEE 802.11bi functionality
  - changing SAE password identifiers
  - EPPKE
  - IEEE 802.1X/EAP in Authentication frames
  - Association frame encryption
  - PMKID privacy
* enable layer 2/Wi-Fi multicast filtering for all networks (not
  just some Passpoint networks which enabled this before)
* wpa_gui: port to Qt6
* support OpenSSL 3.0 API changes
* EAP-TEAP: protocol changes based on RFC 9930; this is not compatible
  with previous versions
* maintain configuration file permissions when writing updated
  configuration
* add option to validate PKCS#11/OpenSC engine and module paths
* fix PMKSA caching to enforce network context to avoid misuse of
  unexpected PMKSA cache entries
* fix a potential DoS attack in SAE processing of an unexpected element
* fix incomplete bounds checking of mesh AMPE messages that could have
  resulted in DoS attacks and memory corruption
* a large number of other fixes, cleanup, and extensions

MFC after:	2 months

Merge commit '513264698a892550ba20aeb9da7f360417fdc63b'
2026-08-10 20:54:02 -07:00
Cy Schubert 513264698a wpa: Update to 2.12
Fixes and new features include:

hostapd:
* support RSN overriding (e.g., WPA3-Personal Compatibility Mode)
* EHT/IEEE 802.11be/Wi-Fi 7
  - more complete support
  - fix message validation issues that could enable DoS attacks
  - fix group key rekeying
* enable SAE group 20 by default if SAE-EXT-KEY is enabled
* reject unexpected SAE password identifier to avoid DoS attack against
  a specific STA
* mandate use of SAE H2E when using password identifiers
* assign VLAN when using SAE with PMKSA caching
* support SPP A-MSDU negotiation
* support IEEE 802.11bi functionality
  - changing SAE password identifiers
  - EPPKE
  - IEEE 802.1X/EAP in Authentication frames
  - Association frame encryption
  - PMKID privacy
* remove the driver interface for now obsolete Host AP driver
* remove the driver interface for now obsolete Atheros WEXT interface
* move supported, basic, and Beacon TX rate configuration to be at BSS
  level instead of per-radio for all BSSs
* fix various issues in Multiple-BSSID functionality
* support OpenSSL 3.0 API changes
* EAP-TEAP: protocol changes based on RFC 9930; this is not compatible
  with previous versions
* support Automated Frequency Coordination (AFC) on the 6 GHz band
* improve GAS/ANQP processing to support larger ANQP responses
* a large number of other fixes, cleanup, and extensions

wpa_supplicant:
* support RSN overriding (e.g., WPA3-Personal Compatibility Mode)
* improve BSS transition management support
* EHT/IEEE 802.11be/Wi-Fi 7
  - more complete support
  - fix message validation issues that could enable DoS attacks
* support Wi-Fi Direct R2
* support Wi-Fi Aware (add synchronized NAN; extend USD support)
* support Proximity Ranging
* support SPP A-MSDU negotiation
* support IEEE 802.11bi functionality
  - changing SAE password identifiers
  - EPPKE
  - IEEE 802.1X/EAP in Authentication frames
  - Association frame encryption
  - PMKID privacy
* enable layer 2/Wi-Fi multicast filtering for all networks (not
  just some Passpoint networks which enabled this before)
* wpa_gui: port to Qt6
* support OpenSSL 3.0 API changes
* EAP-TEAP: protocol changes based on RFC 9930; this is not compatible
  with previous versions
* maintain configuration file permissions when writing updated
  configuration
* add option to validate PKCS#11/OpenSC engine and module paths
* fix PMKSA caching to enforce network context to avoid misuse of
  unexpected PMKSA cache entries
* fix a potential DoS attack in SAE processing of an unexpected element
* fix incomplete bounds checking of mesh AMPE messages that could have
  resulted in DoS attacks and memory corruption
* a large number of other fixes, cleanup, and extensions
2026-08-10 06:56:41 -07:00
Cy Schubert cf3eeeb75c krb5: Install profile.h again
Commit 1876de606e exposed missing symbols that the port security/krb5
installed that the base system did not install. Part of the solution
was to make libprofile.so private (not libprofile.a) just as the port
does, Red Hat Enterprise Linux does, and as installing MIT KRB5 by hand
does. The actual fix for this was to put symbols and their corresponding
functions into the correct librarires, i.e. libkrb5.so and othes, just
as the port, Red Hat, and manually installed via tarball do.

Unfortunately INTERNALLIB disables the include of bsd.incs.mk and the
install of header files. This is still needed to install profile.h into
/usr/include (just as the port installs it into ${LOCALBASE}/include
and RHEL installs it in /usr/include). This commit fixes this by
installing profile.h into /usr/include from the krb5/include Makfile.

Reported by:	fluffy
Tested by:	fluffy
Reviewed by:	fluffy
Fixes:		1876de606e
MFC after:	3 days
Differential Revision:	https://reviews.freebsd.org/D58286
2026-07-27 07:01:21 -07:00
Cy Schubert fce16f60de krb5: Fix reachable assert when importing krb5 names
If a name token contains trailing garbage, error out from
krb5_gss_import_name() instead of crashing the process with an
assertion failure.

Commit message details obtained from upstream commit.
Obtained from:	upstream commit 07818f1fd
Reported by:	Aisle Research (Ze Sheng, Dmitrijs Trizna,
		Luigino Camastra, Guido Vranken) to krb5-bugs
MFC after:	3 days
2026-06-08 06:52:04 -07:00
Cy Schubert efb5c07f91 krb5: Fix null dereference in SPNEGO token processing
krb5 1.22.1 erroneously removed a check from get_negTokenResp() for
successful decoding of the mechListMIC field.  Restore the check to
prevent a null pointer dereference.

Commit message details obtained from upstream commit.
Obtained from:	Upstream commit 4ae75cded
MFC after:	3 days
2026-06-08 06:52:04 -07:00
Cy Schubert 37e9d3641b ipfilter: Fix ip_pptp_pxy (PPTP proxy) length underflow
A PPTP client sending a specially crafted PPTP message with a length
smaller than the already processed fixed header can panic the system.
This resultes in a negative remaining length (a large unsigned 16-bit
number).

Reported by:	Yuxiang Yang, Yizhou Zhao, Ao Wang, Xuewei Feng, Qi Li,
		and Ke Xu from Tsinghua University using GLM-5.1 from
		Z.ai
MFC after:	3 days
Differential Revision:	https://reviews.freebsd.org/D57383
2026-06-08 06:51:24 -07:00
Cy Schubert 5b8f59e648 sqlite3: Vendor import of sqlite3 3.53.1
Release notes at https://www.sqlite.org/releaselog/3_53_1.html.

Obtained from:  https://www.sqlite.org/2026/sqlite-autoconf-3530100.tar.g

Merge commit 'b00eb376e3fb28e738f9370552dae9d92c1fdd76' into sqlite3
2026-05-25 10:19:28 -07:00
Cy Schubert b00eb376e3 sqlite3: Vendor import of sqlite3 3.53.1
Release notes at https://www.sqlite.org/releaselog/3_53_1.html.

Obtained from:  https://www.sqlite.org/2026/sqlite-autoconf-3530100.tar.gz
2026-05-25 10:05:16 -07:00
Cy Schubert 8dfb0805fc ipfilter: Validate length before checksum
Validate the length of the packet listed in the mbuf is the same as
the calculated packet length. If not reject the packet and bump the
bad packet stat.

PR:		295198
MFC after:	1 week
Differential Revision:	https://reviews.freebsd.org/D57095
2026-05-20 08:32:37 -07:00
Cy Schubert c64ee36e5d krb5: Adjust additional version strings
Fixes:		736e411a73
2026-05-01 07:40:19 -07:00
Cy Schubert 8f46ba0651 krb5: Adjust version to 1.22.2
Fixes:		736e411a73
2026-04-30 17:57:39 -07:00
Cy Schubert c9dd7bffa5 krb5: Fix two NegoEx parsing vulnerabilities
Bring in upstream commit 2e75f0d93 fixing two CVEs. Upstream commit
log is:

 In parse_nego_message(), check the result of the second call to
 vector_base() before dereferencing it.  In parse_message(), check for
 a short header_len to prevent an integer underflow when calculating
 the remaining message length.

 Reported by Cem Onat Karagun.

 CVE-2026-40355:

 In MIT krb5 release 1.18 and later, if an application calls
 gss_accept_sec_context() on a system with a NegoEx mechanism
 registered in /etc/gss/mech, an unauthenticated remote attacker can
 trigger a null pointer dereference, causing the process to terminate.

 CVE-2026-40356:

 In MIT krb5 release 1.18 and later, if an application calls
 gss_accept_sec_context() on a system with a NegoEx mechanism
 registered in /etc/gss/mech, an unauthenticated remote attacker can
 trigger a read overrun of up to 52 bytes, possibly causing the process
 to terminate.  Exfiltration of the bytes read does not appear
 possible.
2026-04-30 17:11:25 -07:00
Cy Schubert 736e411a73 krb5: import MIT 1.22.2
Merge commit '90c687295e2d62f9411fc5b571f5af4e8ee187a7'
2026-04-30 17:10:53 -07:00
Cy Schubert 90c687295e mport MIT 1.22.2 2026-04-30 11:06:28 -07:00
Cy Schubert f5d0b30e4a ippool(5): Correct example in man page
The example provided puts the semicolon in the wrong place. It must
come after the file:// specification, not in it.

MFC after:	1 week
2026-04-16 21:09:42 -07:00
Cy Schubert 3fdbd8a07a ipfilter: Avoid negative array indicies
Array indices must always be posive. We avoid this by making each index
unsigned. This mitigates out-of-bounds reads and writes.

Reported by:		Ilja Van Sprundel <[email protected]>
Reviewed by:		glebius
MFC after:		3 days
Differential revision:	https://reviews.freebsd.org/D55260
2026-02-16 18:21:59 -08:00
Cy Schubert 47fb51847f ipfilter: Interface name must not extend beyond end of buffer
sifpidx (an interface name) cannot extend beyond the end of the
fr_names buffer.

We do the validation for fr_sifpidx here because it is a union that
contains an offset only when fr_sifpidx points to an interface name,
an offset into fr_names. The union is  an offset into fr_names in this
case only.

interr_tbl now becomes a static variable outside a function to facilitate
its use by two functions within fil.c

Note that sifpidx is only used in ipf_sync() which implments ipf -y.

Reported by:	Ilja Van Sprundel <[email protected]>
MFC after:	1 week
2026-02-10 06:02:18 -08:00
Cy Schubert ee44ab936e diff: Fix build
rc must be defined first.

Fixes:		590126789c
MFC after:	1 week
X-MFC with:	590126789c
2026-02-05 07:26:01 -08:00
Cy Schubert e40817302e ipfilter: Fix possible overrun
The destination buffer is FR_GROUPLEN (16 bytes) in length. When
gname is created, the userspace utilities correctly use FR_GROUPLEN
as the buffer length. The kernel should also limit its copy operation to
FR_GROUPLEN bytes to avoid any user written code from exploiting this
vulnerability.

Reported by:	Ilja Van Sprundel <[email protected]>
MFC after:	1 week
2026-02-04 12:46:20 -08:00
Cy Schubert d0309745e6 ObsoleteFiles.mk: Remove obsolete MIT KRB5 plugins
Fixes:			1f9da4793c, dd0ec030f8
MFC after:		1 week
Differential revision:	https://reviews.freebsd.org/D54780
2026-02-02 08:47:21 -08:00
Cy Schubert af9d11303c CODEOWNERS: Add myself to WPA 2026-01-27 07:52:05 -08:00
Cy Schubert 19a913c4ed CODEOWNERS: Add myself to Heimdal and MIT KRB5 2026-01-27 07:52:04 -08:00
Cy Schubert ad9932995c hwpstate: Add CPPC enable tunable
The Framework 13 runs very hot the maximum frequency is possible. By
disabling CPPC (reverting to Cool`n'Quiet 2.0) we can use powerd to
limit the CPU frequency to 2200, thereby reducing the CPU temperature.

Some systems may run slower with CPPC enabled. See PR/292615 for that
bug.

Those experiencing either of these issues may add the following to
their loader.conf or device.hints to disable CPPC:

machdep.hwpstate_amd_cppc_enable="0"

PR:			292615
Reviewed by:		lwhsu, olce
Differential revision:	https://reviews.freebsd.org/D54803
2026-01-21 20:36:33 -08:00
Cy Schubert 2d8ec3bab2 krb5: Fix another GCC build issue
Fixes:		1876de606e
X-MFC with:	1876de606e
MFC after:	2 weeks
2026-01-20 09:40:52 -08:00
Cy Schubert 6637e8f616 krb5: Fix gcc14 build
Fixes:		1876de606e
X-MFC with:	1876de606e
MFC After:	2 weeks
2026-01-20 07:35:00 -08:00
Cy Schubert 1876de606e krb5: Expose missing symbols
Add symbols found in the port but not in base. This requires replacing
a shared libkrb5profile.so with libkrb5profile.a (with -fPIC so it can
be used by shared libraries). We do this by making libkrb5profile
INTERNALLIB.

Base currently has libkrb5profile in a shared library. The patch moves
those functions to the various "consumer" libraries as the port does.

Symbols that should be in the other libraries are in libkrb5profile.so.
This is causing some ports issues.

PR:		291695
Reported by:	michaelo, markj,  Chris Inacio <[email protected]>
Tested by:	michaelo
Fixes:		ae07a5805b
Reviewed by:	michaelo (previous version)
MFC after:	2 weeks
Differential revision:	https://reviews.freebsd.org/D54323
2026-01-20 05:41:02 -08:00
Cy Schubert 2804461adf ntp: Fix buildworld with MK_OPENSSL=no
Reported by:	wosch
Tested by:	wosch
MFC after:	1 week
2025-12-19 04:54:11 -08:00
Cy Schubert f74173b5da krb5: Remove extraneous exports file
We use version.map in the FreeBSD MIT KRB5 build. The exports file is
a lefteover from when the version map file was created.

MFC after:	1 week
2025-12-18 10:16:39 -08:00
Cy Schubert a6ea80bc91 ipfilter: Add missing kenv fetch
When a module the environment must be explicitly fetched.

Fixes:			d9788eabff
PR:			291548
Noted by:		markj
Reviewed by:		markj
Differential Revision:	https://reviews.freebsd.org/D54242
MFC after:		3 days
2025-12-16 08:27:33 -08:00
Cy Schubert f825427c0a krb5: Add missing symbol
Submitted by:	[email protected]
PR:		291565
MFC after:	1 day
2025-12-11 06:02:37 -08:00
Cy Schubert cc1e4aae5a rc.d/ipfilter: ipfilter must be enabled for options to take
ipfilter options are erased and reset to default when ipfilter is
disabled. This results in nullifying options from rc.conf that were
previously set.

8d6feaaaa2, which added this code, was incorrect as it was for a bug in
ipfilter 4.2.28 and no longer applies to ipfilter 5.1.2.

Fixes:		8d6feaaaa2
MFC after:	1 day
2025-12-09 16:03:38 -08:00
Cy Schubert f04b23ce35 rc.d/{ipfilter,ippool}: Fix typo in variable name
MFC after:	1 day
2025-12-09 12:33:26 -08:00
Cy Schubert 0ff0c19e7f ipfilter: Disable ipfs(8) by default
At the moment ipfs(8) is a tool that can be easily abused. Though the
concept is sound the implementation needs some work.

ipfs(8) should be considered experimental at the moment.

This commit also makes ipfs support in the kernel optional.

Reviewed by:		emaste, glebius
MFC after:		1 week
Differential revision:	https://reviews.freebsd.org/D53787
2025-12-08 08:15:18 -08:00
Cy Schubert d9788eabff ipfilter: Restrict ipfilter within a jail
Add a sysctl/tunable (net.inet.ipf.jail_allowed) to control whether a
jail can manage its own ipfilter rules, pools, and settings. A jail's
control over its own ipfilter rules and settings may not be desireable.
The default is jail access to ipfilter is denied.

The host system can stil manage a jail's rules by attaching the rules,
using the on keyword, limiting the rule to the jail's interface. Or
the sysctl/tunable can be enabled to allow a jail control over its own
ipfilter rules and settings.

Implementation note: Rather than store the jail_allowed variable,
referenced by sysctl(9), in a global area, storing the variable in the
ipfilter softc is consistent with ipfilter's use of its softc.

Discussed with:		emaste, jrm
MFC after:		1 week
Differential revision:	https://reviews.freebsd.org/D53623
2025-12-08 08:15:18 -08:00
Cy Schubert 07d5a9b1b2 sqlite3: Update to 3.50.4
Release notes at https://www.sqlite.org/releaselog/3_50_4.html.

Obtained from:  https://www.sqlite.org/2025/sqlite-autoconf-3500400.tar.gz

Merge commit 'e7e917ee3cf2b3010b1c511c6ebaf8b65b983ad7'
2025-12-02 07:22:26 -08:00
Cy Schubert e7e917ee3c sqlite3: Vendor import of sqlite3 3.50.4
Release notes at https://www.sqlite.org/releaselog/3_50_4.html.

Obtained from:  https://www.sqlite.org/2025/sqlite-autoconf-3500400.tar.gz
2025-12-02 06:56:21 -08:00
Cy Schubert 78c6cfdc3d ipfilter: Restore used variable
One of the "unused" i variables is actually used.

Fixes:		20c48f090b
2025-11-26 15:39:24 -08:00
Cy Schubert 20c48f090b ipfilter: Remove unused variable
Reported by:	jlduran
Fixes:		eda1756d04, 821774dfbd
MFC after:	1 week
X-MFC with:	eda1756d04, 821774dfbd
2025-11-26 15:31:37 -08:00
Cy Schubert d5d005e9bf ipfilter: Load optionlist prior to ippool invocation
As a safety precaution df381bec2d limits ippool hash table size to 1K.
This causes any legitimely large hash table to fail to load. The
htable_size_max ipf tuneable adjusts this but the adjustment is made
in the ipfilter rc script, invoked after the ippool script (because it
depends on ippool). Let's load the ipfilter_optionlist in ippool as well.
ipfilter_optionlist load will also occur in the ipfilter rc script in case
the user uses ipfilter without ippool.

Fixes:		df381bec2d
MFC after:	3 days
2025-11-26 14:26:38 -08:00
Cy Schubert 821774dfbd ipfilter: Verify ipnat on entry into kernel
The ipnat struct is built by ipnat(8), specifically ipnat_y.y when
parsing the ipnat configuration file (typically ipnat.conf). ipnat
contains a variable length string field at the end of the struct. This
data field, called in_names, may contain various text strings such as
NIC names. There is no upper bound limit to the length of strings as
long as the in_namelen length field specifies the length of in_names
within the ipnat structure and in_size specifies the size of the ipnat
structure itself.

Reported by:		Ilja Van Sprundel <[email protected]>
Reviewed by:		markj
MFC after:		1 week
Differential revision:	https://reviews.freebsd.org/D53843
2025-11-26 07:16:47 -08:00
Cy Schubert eda1756d04 ipfilter: Verify frentry on entry into kernel
The frentry struct is built by ipf(8), specifically ipf_y.y when parsing
the ipfilter configuration file (typically ipf.conf). frentry contains
a variable length string field at the end of the struct. This data field,
called fr_names, may contain various text strings such as NIC names,
destination list (dstlist) names, and filter rule comments.  The length
field specifies the length of fr_names within the frentry structure and
fr_size specifies the size of the frentry structure itself.

The upper bound limit to the length of strings field is controlled by the
fr_max_namelen sysctl/kenv or the max_namelen ipfilter tuneable.

The initial concepts were discussed with emaste and jrm.

Reported by:		Ilja Van Sprundel <[email protected]>
Reviewed by:		markj
MFC after:		1 week
Differential revision:	https://reviews.freebsd.org/D53843
2025-11-26 07:16:46 -08:00
Cy Schubert 525c535d5a ipfilter: Add ipf_check_names_string()
ipf_check_names_string will verify userland inputs in names strings
(fr.fr_names, in.in_names) for correctness.

Original concept of ipf_check_names_string() instead of macros by
markj.

Reviewed by:		markj
MFC after:		1 week
Differential revision:	https://reviews.freebsd.org/D53843
2025-11-26 07:15:44 -08:00
Cy Schubert ac1f48b4a7 ntpd: Fix segfault when same IP on multiple interfaces
Use the protype socket to obtain the IP address for an error message.
Using the resultant socket address, a NULL because create_interface()
had failed, results in SIGSEGV.

To reproduce this bug,

ifconfig bridge100 create
ifconfig bridge100 10.10.10.10/24
ifconfig bridge101 create
ifconfig bridge101 10.10.10.10/24
ntpd -n

PR:		291119
MFC after:	3 days
2025-11-20 16:28:25 -08:00
Cy Schubert df381bec2d ipfilter: Don't trust userland supplied iph_size
ipf_htable_create() trusts a user-supplied iph_size from iphtable_t
and computes the allocation size as iph->iph_size * sizeof(*iph->iph_table)
without checking for integer overflow. A sufficiently large iph_size
causes the multiplication to wrap, resulting in an under-sized allocation
for the table pointer array. Subsequent code (e.g., in ipf_htent_insert())
can then write past the end of the allocated buffer, corrupting kernel
memory and causing DoS or potential privilege escalation.

This is not typically a problem when using the ipfilter provided
userland tools as calculate the correct lengths. This mitigates a
rogue actor calling ipfilter ioctls directly.

Reported by:		Ilja Van Sprundel <[email protected]>
Reviewed by:		markj
MFC after:		1 week
Differential revision:	https://reviews.freebsd.org/D53286
2025-11-05 07:32:17 -08:00
Cy Schubert f3b94f47f5 ipfilter: Add an htable max size tuneable.
Add an ipfilter runtime option (ipf -T) to adjust the default
maximum hash table size. Default it to 1024 entries. It will be
used by a subsequent commit to limit any damage due to excessively
large hash table input by the user.

Reviewed by:		markj
MFC after:		1 week
Differential revision:	https://reviews.freebsd.org/D53284
2025-11-05 07:32:16 -08:00
Cy Schubert c57262716b ipfilter: Add htable (hash table) tunable
This is in preparation for addition of a hash table max size.

Reviewed by:		markj
MFC after:		1 week
Differential revision:	https://reviews.freebsd.org/D53283
2025-11-05 07:32:16 -08:00
Cy Schubert ab3c985328 ipfilter: Calculate the number of elements in ipf_errors
It serves no purpose to manually manage the IPF_NUM_ERRORS count.
Calculate it instead.

Reviewed by:		emaste, markj
MFC after:		1 week
Differential revision:	https://reviews.freebsd.org/D53308
2025-11-05 07:32:16 -08:00
Cy Schubert 5ae7b106cf ipfs: Fix typo in error message
MFC after:	3 days
2025-10-27 20:43:14 -07:00
Cy Schubert 0d589ecbc7 ipfilter: Plug ip_htable kernel information leak
ipf_htable_stats_get() constructs an iphtstat_t on the stack and only
initializes select fields before copying the entire structure to
userland. The trailing padding array iphs_pad[16] is never initialized,
so ~128 bytes of uninitialized kernel stack memory can be leaked to user
space on each call. This is a classic information disclosure
vulnerability that can reveal pointers and other sensitive data.

We fix this by zeroing out the data structure prior to use.

Reported by:		Ilja Van Sprundel <[email protected]>
Reviewed by:		emaste
MFC after:		3 days
Differential revision:	https://reviews.freebsd.org/D53275
2025-10-23 15:56:28 -07:00
Cy Schubert 6535e9308a ipfilter: Plug ip_nat kernel information leak
ipf_nat_getent() allocates a variable-sized nat_save_t buffer with
KMALLOCS() (which does not zero memory) and then copies only a subset
of fields into it before returning the object to userland using
ipf_outobjsz(). Because the structure is not fully initialized on all
paths, uninitialized kernel heap bytes can be copied back to user space,
resulting in an information leak.

We fix this by zeroing out the data structure immediately after
allocation.

Reported by:		Ilja Van Sprundel <[email protected]>
Reviewed by:		emaste
MFC after:		3 days
Differential revision:	https://reviews.freebsd.org/D53274
2025-10-23 15:56:28 -07:00
Cy Schubert 8b29c373e6 unbound: Vendor import 1.24.1
Release notes at
	https://nlnetlabs.nl/news/2025/Oct/22/unbound-1.24.1-released/

Security:	CVE-2025-11411
MFC after:	3 days

Merge commit '73dd92916f532cb3fe353220103babe576d30a15'
2025-10-23 12:03:29 -07:00
Cy Schubert 73dd92916f unbound: Vendor import 1.24.0
Release notes at
	https://nlnetlabs.nl/news/2025/Oct/22/unbound-1.24.1-released/

Security:	CVE-2025-11411
2025-10-23 11:47:50 -07:00
Cy Schubert 05637c8224 rc: Chase 052211e08c and bfb202c455, remove ifconfig down/up
bfb202c455 addresses the CTRL-EVENT-SCAN-FAILED. Upstream d807e289d
caused FreeBSD regression in driver_bsd.c, which this rc.d patch
worked around. As of bfb202c455 this workaround is no longer needed.

052211e08c implemented this change for wpa_supplicant but not for
hostapd.

Reported by:	avg
MFC after:	3 days
2025-10-21 10:31:23 -07:00
Cy Schubert 0064eb9cf1 unbound: Vendor import 1.24.0
Release notes at
	https://nlnetlabs.nl/news/2025/Sep/18/unbound-1.24.0-released/
2025-10-07 06:46:20 -07:00
Cy Schubert b2efd602ae unbound: Vendor import 1.24.0
Release notes at
	https://nlnetlabs.nl/news/2025/Sep/18/unbound-1.24.0-released/

MFC after:	1 week

Merge commit '0064eb9cf1c8d526e87d3149249445d4bc8d0248'
2025-10-07 08:16:21 -07:00
Cy Schubert eee36ffa0d ipfilter/ippool: Dump a copy of ippool dstlist data in "new" format
As with 7531c434a5, which dumped ippool table data in the "new"
format, print dstlist data in the "new" format.

MFC after:      1 week
2025-10-02 12:03:35 -07:00
Cy Schubert 2f30b43fa2 ipfilter/ippool: Dump a copy of ippool hash data in "new" format
As with 7531c434a5, which dumped ippool table data in the "new"
format, print hash data in the "new" format.

MFC after:	1 week
2025-10-02 12:03:35 -07:00
Cy Schubert f3ff6abb9d ipfilter ippool: Prefix deleted entries with "#"
To maintain consistency with ippool list functions, prefix deleted
entries with "#".

MFC after:	1 week
2025-10-02 12:03:35 -07:00
Cy Schubert 94758e72fd ipfilter ippool: Flag deleted entries with "#"
List deleted entries prefixed by "#". This is consistent with other
ippool list functions.

Fixes:		7531c434a5
MFC after:	1 week
2025-10-02 12:03:35 -07:00
Cy Schubert 3e13aae0d1 krb5: Remove tests
Tests contains a file that contains spaces in it. This causes the
freebsd-update build scripts some issues. As we don't need the tests
directory let's simply remove it.

MFC after:	3 days or as determined by re@
MFC to:		stable/15
2025-09-22 08:42:15 -07:00
Cy Schubert b0e7b55a0e krb5: Enable PRINC_LOOK_AHEAD in ksu
PRINC_LOOK_AHEAD is the upstream default. Normally ksu determines the
target princiapl by (quoted from the man page)

a. default principal of the source cache

b. target_user@local_realm

c. source_user@local_realm

With PRINC_LOOK_AHEAD emabled, for each candidate in the above
list, select an authorized principal that has the same realm name
and first part of the principal name equal to the prefix of the
candidate. For example if candidate a) is [email protected] and
jqpublic/[email protected] is authorized to access the target account
then the default principal is set to jqpublic/[email protected].

Case 2: source user is root.

If the target user is non-root then the default principal name
is target_user@local_realm.  Else, if the source cache exists
the default principal name is set to the default principal of
the source cache.  If the source cache does not exist, default
principal name is set to root\@local_realm.

This commit restores the same behaviour as Heimdal ksu.

Reported by:		Dan Mahoney <[email protected]>
Requested by:		Dan Mahoney <[email protected]>
MFC after:		3 days
MFC to:			15/stable
Differential revision:	 https://reviews.freebsd.org/D52478
2025-09-12 07:32:48 -07:00
Cy Schubert c553872b77 RELNOTES: Fix another typo 2025-08-26 10:01:31 -07:00
Cy Schubert 099e61a665 RELNOTES: Fix typo 2025-08-26 09:12:13 -07:00
Cy Schubert 863d5cc2ad RELNOTES: Document MIT KRB5 import 2025-08-26 07:53:00 -07:00
Cy Schubert 621e0e7f27 krb5: Update to 1.22.1
Reviewed by:		des
Differential revision:	https://reviews.freebsd.org/D52100

Merge commit 'e5fe63eaf1d35ebbeac17eeed04cf873fbb9b3da' into main
2025-08-26 07:33:03 -07:00
Cy Schubert 5bc59bbb48 krb5: Remove documentation
Requested by des in D52100.
2025-08-26 06:20:50 -07:00
Cy Schubert e5fe63eaf1 krb5: Import MIT 1.22.1
Security:	CVE-2025-57736
2025-08-20 22:22:47 -07:00
Cy Schubert f96110babb krb5: Fix MIT KRB5 Bug #9181
According to https://krbdev.mit.edu/rt/Ticket/Display.html?id=9181,

The function verify_mic_v3() in src/lib/gssapi/krb5/verify_mic.c
calls kg_verify_checksum_v3() as it returns an OM_uint32 status
but kg_verify_checksum_v3() returns a krb5_boolean which has
the opposite interpretation:
 - OM_uint32 0 is GSS_S_COMPLETE so no error
 - krb5_boolean 0 is false so failure

This patch will be in MIT KRB5 1.22.1.

Obtained from:		Greg Hudson <[email protected]> on krbdev.mit.edu ML.
Reviewed by:		ivy, ngie
Differential review:	https://reviews.freebsd.org/D51990
2025-08-19 07:41:12 -07:00
Cy Schubert cb3eac927b krb5: Update version strings
Fixes:	f1c4c3dacc
2025-08-18 19:03:18 -07:00
Cy Schubert d82a140dad krb5: Import MIT 1.22 2025-08-05 23:54:05 -07:00
Cy Schubert 89c82750da krb5 ksu: Enable prompt for password
Enable prompt for password when no TGT is available.

Reported by:	Dan Mahoney <[email protected]>
2025-08-11 15:12:09 -07:00
Cy Schubert f1c4c3dacc krb5: Update MIT KRB5 from 1.21 to 1.22
Merge commit 'd82a140dad3a571d66abb2da24acbba90191f168'
2025-08-09 22:29:02 -07:00
Cy Schubert 42cacae4eb ObsoleteFiles: Remove gssapi_krbt/gssapi.h
Noted by:	"Herbert J. Skuhra" <[email protected]>
2025-08-07 13:43:54 -07:00
Cy Schubert e26259f48a gssapi,krb5: Replace libgssapi with the MIT version
lib/libgssapi is based on Heimdal. As on Linux systems, the MIT
libgssapi_krb5 replaces it. With both gssapi libraries and header files
installed results in broken buildworld (gssd) and ports that will not
build without modifications to support the MIT gssapi in an alternate
location.

73ed0c7992 removed the MIT GSSAPI headers from /usr/include. Apps using
MIT KRB5 gssapi functions and structures will fail to build without this
patch.

This patch includes a temporary patch to usr.sbin/gssd to allow it
to build with this patch. rmacklem@ has a patch for this and for
kgssapi that uses this patch to resolve kgssapi issues for NFS with
Kerberos.

This patch is an updated version of D51661 to allow it to build following
additional patchs to the tree.

This should have been implmented with 7e35117eb0.

Fixes:			7e35117eb0, 73ed0c7992
Differential Revision:	https://reviews.freebsd.org/D51661
2025-08-07 10:17:00 -07:00
Cy Schubert a245dc5d68 krb5: Move include/krb5_private to include/krb5
This maintains the krb5.h to krb5/krb5.h relationship during build
while still maintaining no interference from the other Makefile's
variables.
2025-08-07 10:16:30 -07:00
Cy Schubert 62e5a36294 krb5: Remove et directory
Reported and patch by:	"Herbert J. Skuhra" <[email protected]>
Fixes:			9a726ef241
2025-08-05 12:48:48 -07:00
Cy Schubert 9a726ef241 krb5: Move compile_et to /usr/bin as it was with Heimdal
Fixes:		ee3960cba1
2025-08-05 09:33:03 -07:00
Cy Schubert 3a99a0961d krb5: Remove Heimdal library when MK_MITKRB5 is enabled
Fixes:		af2593e321
2025-08-05 09:32:43 -07:00
Cy Schubert 383e7290c0 krb5: Add missing gssapi header
Fixes:		ee3960cba1
2025-08-05 09:32:42 -07:00
Cy Schubert c0fae431fd krb5: Chase dd0ec030f8 updating to current DSO
Fixes:		dd0ec030f8
2025-07-27 20:58:20 -07:00
Cy Schubert dd0ec030f8 krb5: Bump DSO version for version map creation
Differential Revision:	https://reviews.freebsd.org/D51520
2025-07-27 05:59:34 -07:00
Cy Schubert 110111a6cc Revert "krb5: Use Heimdal DSO names"
This is incorrect.

This reverts commit 5f8493bbf4.
2025-07-24 11:58:39 -07:00
Cy Schubert 5f8493bbf4 krb5: Use Heimdal DSO names
Using MIT DSO names breaks the libc ABI, we are forced to use Heimdal
DSO names. This is not optimal but necessary.

Fixes:		e447c252d0
Requested by:	kib
2025-07-24 10:47:09 -07:00
Cy Schubert e447c252d0 krb5: Merge Heimdal common functions into version maps
Requested by:	kib
2025-07-24 09:31:40 -07:00
Cy Schubert 4680e7fcc7 krb5: Replace version maps with generated version maps
Suggested by:	jhb
Fixes:		ae07a5805b
2025-07-24 09:31:39 -07:00
Cy Schubert 188138106b krb5: Remove a duplicate include of error_tables/Makefile.inc
And move the aggregation of its generated sources to the correct
library, libkrb5.so.

Fixes:		ee3960cba1
2025-07-24 09:31:39 -07:00
Cy Schubert 805498e49a KRB5: Add util version maps 2025-07-22 12:09:23 -07:00
Cy Schubert f58febc4ce krb5: Correct version maps
Fixes:		ae07a5805b
2025-07-22 12:09:23 -07:00
Cy Schubert ae07a5805b krb5: Add version maps
Shared objects must have version maps. These were copied from upstream's
*.exports files.

Reminded by:	kib
Fixes:		ee3960cba1
2025-07-22 08:48:40 -07:00
Cy Schubert c7da9fb90b KRB5: Enable MIT KRB5 by default
Set WITH_MITKRB5=yes as the default.

Rebuild all USES=gssapi ports is recommended.

A clean buildworld is required.

Relnotes:	yes
2025-07-21 07:07:22 -07:00
Cy Schubert 5df4eb5fd7 krb5: Add pkgbase templates
Repored by:	fluffy
2025-07-20 21:37:38 -07:00
Cy Schubert 0559f30a88 krb5: Install the libkrb5clnt.so symlink with the .so
For 34 days the libclntkrb5.so symlink was installed as libclntkrb5.
Fix this and add the error to ObsoleteFiles.inc.

Noted and Makefile patch by fluffy@.

Fixes:		ee3960cba1
2025-07-08 06:54:27 -07:00
Cy Schubert 17f0f75308 sqlite3: Vendor import of sqlite3 3.50.2
Release notes at https://www.sqlite.org/releaselog/3_50_2.html.

Obtained from:  https://www.sqlite.org/2025/sqlite-autoconf-3500200.tar.gz

MFC after:	1 month

Merge commit '89922daaa168292633b1a7a523bcd0559487c6ad'
2025-07-07 16:49:17 -07:00
Cy Schubert 89922daaa1 sqlite3: Vendor import of sqlite3 3.50.2
Release notes at https://www.sqlite.org/releaselog/3_50_2.html.

Obtained from:	https://www.sqlite.org/2025/sqlite-autoconf-3500200.tar.gz
2025-07-07 16:45:18 -07:00