From nobody Mon Apr 27 00:30:05 2026 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4g3kwt0C2Zz6bKtk for ; Mon, 27 Apr 2026 00:30:06 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R13" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4g3kws6SPqz3RQh for ; Mon, 27 Apr 2026 00:30:05 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1777249805; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=GefgSmGP3W5Uf2uWWeVj9BUTdBAwLSEAQYxoJCtR9xo=; b=U/eY7ltCB8oP96ufyCYzJ6EYZp6h/ieLcwElTEW7defeAJuYJvndyhIsN/cRBR0U9Eh3n4 /TtIFr7xUYilndVejIzAw0VLooZgJIaHfsrKvtRe/iFNaw9cOJpnv7hY9U5fF6gY78QAlQ fN0XXit7z5TnvxaO3CX2VwjsancUM7CcIluMdz2QTmuFL9Z0S1FqcN7k0uu6l36E/CBkS1 Dm5Mx+YRZom1tbD//qMqGmAsnYZCQnhe+pzyv/IHSWgH0to73KXeeykUd3ih7HuLnLy44b 1BdUk12PfGMJJZyDq30IEUai9+D4jYQsbNmTbh/qq85hQN7buaG1Mtn2nTpqIg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1777249805; a=rsa-sha256; cv=none; b=Ah2OKhRSCEutbt5rHIRHD5hUcvaq9G1/9s7mfCRqg73KFCPlH3k1E5XvFHqMfVBvn2n/y0 +TxKqQ5herQWh4nILtZja1eIh9LcAi2DNUBYAMVnWfbhmUNEPIcs6Z9ikuPGWe7+KsPf3E FzmwHetYwPpd3myUpRfO+eQgr0rtKzNrbEu5gymN0nsJhpZ0GNrCjaa0waxZPNRzxyLkMa n62UCfeRonllqc2NMT69mUtXLEcjcy7c4sKVVnhfCeXMMVJGWJhCvzX1YiZ6K21Ps18xA6 9nhCZ8WlW9wgIJArSv5lfxUEI5F68qw/H6hQAEO7GS80ZrFrMo+u+UyDOfaWdg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1777249805; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=GefgSmGP3W5Uf2uWWeVj9BUTdBAwLSEAQYxoJCtR9xo=; b=HzvUjBBnzwu24r741vvvH/QKZcEnZiviMB63wbszTB/mhjahFroqakbBDWC8cNKlbv3cCN RJVHGnElx8+Ab5jMKiC/ZF0F5j/jHK02EXnzQhgrwgd0eub0tzx83SMM2iU/KgqifkRbaa PlAZOaRiZucEx251zQ+weQF1oC+GzXPIl7yLAOGj7quYuCAJ1t1G1l7vEBn2mTPJprI8I4 Xfm/QZyPtoW6f+ZCZQd69JApKfxuP2NVyGvS4KkLCk7nKZpaV7aEM6rYsHWtp8LhsXWM5v iMrAicfLsRuvDG7GoO4DhNVGkUHdgu+3nBIA8jMQ1A48RtbPQy1QXy7UaPzy6g== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4g3kws5mFHzkw5 for ; Mon, 27 Apr 2026 00:30:05 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 1ee69 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Mon, 27 Apr 2026 00:30:05 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Robert Clausecker Subject: git: 16ed84d2b9a1 - stable/15 - include/stdbit.h: declare size_t, (u)int*_t, and (u)int_least*_t List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: fuz X-Git-Repository: src X-Git-Refname: refs/heads/stable/15 X-Git-Reftype: branch X-Git-Commit: 16ed84d2b9a1c95b6e0aabd5b7976367b2997d00 Auto-Submitted: auto-generated Date: Mon, 27 Apr 2026 00:30:05 +0000 Message-Id: <69eeae0d.1ee69.664c2129@gitrepo.freebsd.org> The branch stable/15 has been updated by fuz: URL: https://cgit.FreeBSD.org/src/commit/?id=16ed84d2b9a1c95b6e0aabd5b7976367b2997d00 commit 16ed84d2b9a1c95b6e0aabd5b7976367b2997d00 Author: Robert Clausecker AuthorDate: 2026-04-19 12:36:34 +0000 Commit: Robert Clausecker CommitDate: 2026-04-27 00:29:49 +0000 include/stdbit.h: declare size_t, (u)int*_t, and (u)int_least*_t These are required by ISO/IEC 9899:2024 § 7.18.1 ¶ 1 but were forgotten in my initial work. The current approach leaks intptr_t, uintptr_t, intmax_t, and uintmax_t through . This could be avoided using a more complicated approach if desired. PR: 294131 Fixes: 6296500a85c8474e3ff3fe2f8e4a9d56dd0acd64 Reported by: Collin Funk Reviewed by: imp MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D56515 (cherry picked from commit c8c9324c94dfd4eeecbcfe4a1d3daa047420d3e5) --- include/stdbit.h | 22 +++++++++++++++++++++- sys/sys/stdint.h | 3 +++ 2 files changed, 24 insertions(+), 1 deletion(-) diff --git a/include/stdbit.h b/include/stdbit.h index a529676bed4b..6b9ea02971b0 100644 --- a/include/stdbit.h +++ b/include/stdbit.h @@ -1,5 +1,5 @@ /*- - * Copyright (c) 2025 Robert Clausecker + * Copyright (c) 2025-2026 Robert Clausecker * * SPDX-License-Identifier: BSD-2-Clause */ @@ -8,6 +8,26 @@ #define __STDC_VERSION_STDBIT_H__ 202311L #include +#include +#include + +#ifndef _SIZE_T_DECLARED +typedef __size_t size_t; +#define _SIZE_T_DECLARED +#endif + +#ifndef _INT_LEAST_T_DECLARED +typedef __int_least8_t int_least8_t; +typedef __int_least16_t int_least16_t; +typedef __int_least32_t int_least32_t; +typedef __int_least64_t int_least64_t; + +typedef __uint_least8_t uint_least8_t; +typedef __uint_least16_t uint_least16_t; +typedef __uint_least32_t uint_least32_t; +typedef __uint_least64_t uint_least64_t; +#define _INT_LEAST_T_DECLARED +#endif /* byte order */ #define __STDC_ENDIAN_LITTLE__ __ORDER_LITTLE_ENDIAN__ diff --git a/sys/sys/stdint.h b/sys/sys/stdint.h index 77f469f3c2a3..dccc5a8e6a6d 100644 --- a/sys/sys/stdint.h +++ b/sys/sys/stdint.h @@ -35,6 +35,7 @@ #include #include +#ifndef _INT_LEAST_T_DECLARED typedef __int_least8_t int_least8_t; typedef __int_least16_t int_least16_t; typedef __int_least32_t int_least32_t; @@ -44,6 +45,8 @@ typedef __uint_least8_t uint_least8_t; typedef __uint_least16_t uint_least16_t; typedef __uint_least32_t uint_least32_t; typedef __uint_least64_t uint_least64_t; +#define _INT_LEAST_T_DECLARED +#endif typedef __int_fast8_t int_fast8_t; typedef __int_fast16_t int_fast16_t; From nobody Mon Apr 27 01:29:44 2026 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4g3mFh5M2cz6bQL3 for ; Mon, 27 Apr 2026 01:29:44 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R13" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4g3mFh3V13z3XZF for ; Mon, 27 Apr 2026 01:29:44 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1777253384; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=xzfg5H1ncAvp6UervSk1vbSjSfu5a+knTG5aoEfwCzw=; b=FLiWpXw8TbiEmxvfUJJ0Wf2BYG8PJzRPDHFnJVhCGJfQ8zTEjSA08rLNg4gOq4kkG+sXYw T5c/v3XACBrxaWWGfCY97aD3JUOjpj/Vmf7KjA/XzgJdoDBeF7Pt9uC49XBFKJNryY/1X8 j8PmzN2cR8UkGhPxplIz/QXDODk69GaOMiYnBfWDSOKppba9dbJYk5Ej1cWYekb27KaE3G kT0xnMYU1jlQlQtY5bJRkAkbK9Y0tBCCwsgg0X07ukcIDkOP9Omy0IaCVWRs53R8BVTer9 wTZu4Lei7FlK2C8PaEW/Ray6AuMagoAzIrO45SS1AFQlqWdz6zj1IPM+jzEsJQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1777253384; a=rsa-sha256; cv=none; b=wrtGJKEnDjct8D1hZXk6CYolGvjU84sRUpR2I62z2Ek42sixLJ8YaW0iLMjoF2FORNL1l/ R455C5DSLRu8As9f241PYk2jmA8bmzYXitOBquhTj6iGrQHmIGux3BM5vX1BUHjZkgcWUS h3TUpvMxMrC5cv+HDFTM6ZsB9XF9mmcFQv0DlP4A2dEU+a9wplIPBMS3KnezY6YwyxvZjA T76hma/T8i+76qpPCQp1tcJnX7MDCZQrFGqqV0ulGOhPyaHSQNykVGXZTYUv+s9Obap86p z9rw4ijTXgjhDrrelSFGLNmiv+EQanXNXiAWTURE4wipKW6MB43w2YppdwWgNA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1777253384; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=xzfg5H1ncAvp6UervSk1vbSjSfu5a+knTG5aoEfwCzw=; b=ykmhhZT1PVpR05X3ymY6/yaYPHp971o8dZRQTvDIjkSvC5K2Gknkco4/26n0zJpJ1yRCjs W6wAjE4h17jyboQasZOLAb/8C58/WBEVY/xvdXe1/9Z2n+cBpzkBWX8Nyvkfn8qcM4WZCl TvJWNaaxpKHZFO7Juy3IDrUSDpFQMePvqhBk64cpNW7Ps9N4ReHm72a1ilBboQPwRXV/Xt Kq94mFnAgpiPT+wM9skhUNdtQ6Sw8cxiwkd3HSP150hy0b4eLMt7RMLaub4XJkDjlK0anX SxfUjkpPmbZB66/wm/HTnW1r9saacZpM3hL4YW70zxUfk8CuKL3+vYx3Bj6Duw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4g3mFh2jZKzlRJ for ; Mon, 27 Apr 2026 01:29:44 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 2695f by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Mon, 27 Apr 2026 01:29:44 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Konstantin Belousov Subject: git: fad4e7b656b8 - stable/15 - membarrier(2): use atomic for lockless read of curproc->p_flag2 List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kib X-Git-Repository: src X-Git-Refname: refs/heads/stable/15 X-Git-Reftype: branch X-Git-Commit: fad4e7b656b86befd5995fc4704c68e57a96caa6 Auto-Submitted: auto-generated Date: Mon, 27 Apr 2026 01:29:44 +0000 Message-Id: <69eebc08.2695f.43727b7c@gitrepo.freebsd.org> The branch stable/15 has been updated by kib: URL: https://cgit.FreeBSD.org/src/commit/?id=fad4e7b656b86befd5995fc4704c68e57a96caa6 commit fad4e7b656b86befd5995fc4704c68e57a96caa6 Author: Konstantin Belousov AuthorDate: 2026-04-18 18:42:56 +0000 Commit: Konstantin Belousov CommitDate: 2026-04-27 01:28:59 +0000 membarrier(2): use atomic for lockless read of curproc->p_flag2 (cherry picked from commit 950fd59955e10429c1325c327f0141a7e97fcfe5) --- sys/kern/kern_membarrier.c | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/sys/kern/kern_membarrier.c b/sys/kern/kern_membarrier.c index f0660bd7360e..6d210a1b1783 100644 --- a/sys/kern/kern_membarrier.c +++ b/sys/kern/kern_membarrier.c @@ -120,7 +120,7 @@ kern_membarrier(struct thread *td, int cmd, unsigned flags, int cpu_id) struct thread *td1; cpuset_t cs; uint64_t *swt; - int c, error; + int c, error, f; bool first; if (flags != 0 || (cmd & ~MEMBARRIER_SUPPORTED_CMDS) != 0) @@ -133,6 +133,7 @@ kern_membarrier(struct thread *td, int cmd, unsigned flags, int cpu_id) p = td->td_proc; error = 0; + f = atomic_load_int(&td->td_proc->p_flag2); switch (cmd) { case MEMBARRIER_CMD_GLOBAL: @@ -155,7 +156,7 @@ kern_membarrier(struct thread *td, int cmd, unsigned flags, int cpu_id) break; case MEMBARRIER_CMD_GLOBAL_EXPEDITED: - if ((td->td_proc->p_flag2 & P2_MEMBAR_GLOBE) == 0) { + if ((f & P2_MEMBAR_GLOBE) == 0) { error = EPERM; } else { CPU_ZERO(&cs); @@ -171,7 +172,7 @@ kern_membarrier(struct thread *td, int cmd, unsigned flags, int cpu_id) break; case MEMBARRIER_CMD_REGISTER_GLOBAL_EXPEDITED: - if ((p->p_flag2 & P2_MEMBAR_GLOBE) == 0) { + if ((f & P2_MEMBAR_GLOBE) == 0) { PROC_LOCK(p); p->p_flag2 |= P2_MEMBAR_GLOBE; PROC_UNLOCK(p); @@ -179,7 +180,7 @@ kern_membarrier(struct thread *td, int cmd, unsigned flags, int cpu_id) break; case MEMBARRIER_CMD_PRIVATE_EXPEDITED: - if ((td->td_proc->p_flag2 & P2_MEMBAR_PRIVE) == 0) { + if ((f & P2_MEMBAR_PRIVE) == 0) { error = EPERM; } else { pmap_active_cpus(vmspace_pmap(p->p_vmspace), &cs); @@ -188,7 +189,7 @@ kern_membarrier(struct thread *td, int cmd, unsigned flags, int cpu_id) break; case MEMBARRIER_CMD_REGISTER_PRIVATE_EXPEDITED: - if ((p->p_flag2 & P2_MEMBAR_PRIVE) == 0) { + if ((f & P2_MEMBAR_PRIVE) == 0) { PROC_LOCK(p); p->p_flag2 |= P2_MEMBAR_PRIVE; PROC_UNLOCK(p); @@ -196,7 +197,7 @@ kern_membarrier(struct thread *td, int cmd, unsigned flags, int cpu_id) break; case MEMBARRIER_CMD_PRIVATE_EXPEDITED_SYNC_CORE: - if ((td->td_proc->p_flag2 & P2_MEMBAR_PRIVE_SYNCORE) == 0) { + if ((f & P2_MEMBAR_PRIVE_SYNCORE) == 0) { error = EPERM; } else { /* From nobody Mon Apr 27 01:29:45 2026 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4g3mFj5gdVz6bQRc for ; Mon, 27 Apr 2026 01:29:45 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R13" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4g3mFj37s4z3XNv for ; Mon, 27 Apr 2026 01:29:45 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1777253385; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=N+bKrymRHqpVADIJpuICFvlLZ3soWLlOVY/1zlBSmCY=; b=oLLOcYBGnQZNk3F3wMilsxMXBv2+sgLjyneRVnF74qV7X/AyrP9/jsnM0yH0S4gJDmFocU Jo84Hs+iu7FFGyWmJkdTexwbfsmXsQaBcUQtOwaXD8gAbAxVecb/AqBLiOqBA9rEo8y3BF J/pjBnEuLuKWd7k56vn5JkkNkQZ+29PozFQdWa1G70PMAHDN2qKLmegTT+ozfhph9ADZ0O KISUGIus7Br1aWhp8SM/5UQ3g0jsmHpTrklSTEsXh6qgcXuQ6Um8PNDIDSGurEsej6DnWo +Ug96qmiG9s/BUGwu0+FsDeN1cvydrZ/ZOc9uRibdgN/i00iGbg6qQCAtJxinw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1777253385; a=rsa-sha256; cv=none; b=pKfMC3iCzECvNJ8topSLpQfv05X38QFK6PeTkZ209WdTnXqo/TRlK2okDbOxOV+d/E50b2 Q886P1w/6otDFq6xkipnZ07dtXaBLxsIwEib4tz5FhkAJwwdZH96rnLuAU2jMIdod3ikkG mqhiOyd5SSYqOqEUD1CCgz889OcqtCvUB1iBUw3BdZfjcT/X42/P0y78k7/OiH/GeqTEHb uY6YyqDxpOK7x7O0T6RyDSAHKsb/dkQUIUaLYxnp3TF4sDMT5YbYJEIinBvHs3ppUHWO01 L/oFwNrW1nSrNp6+qD9YxqCvNniv+q9EBqUobfuv2kZPICiqkGVXHmXUi7BiGA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1777253385; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=N+bKrymRHqpVADIJpuICFvlLZ3soWLlOVY/1zlBSmCY=; b=LZQVsCqrkwyBJJ4KTkSro2XKPuVfYbhIurezr6+rYb0vMSi9+4J8V8BmKYmTjaURS4Iyxe rWZnnRPOeXXK3eMTQFlJrjuUxUdpgsaJBn9E48Z2J4cnmthEDnxuZGCNpWcfqI9nanvyn4 Jl4LutiekZlVoF3/RSyG5CS4cAydOzbKBgq6O7fkHftHXrn0uciMkX667ZcU+N6KgSxFvM wgNylKOVSyQvEEdskOSSBDfuUIMNp6lUbXRPh0L/GPJUPO2d5f+9J429z3YHtSD85Oy5ln 58nzLsj7r5HNJjdsn2N0+Be8yep2KPZyWqgvvkTbyf4bD5bxpBU9xTih4DvDng== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4g3mFj2g6zzlk6 for ; Mon, 27 Apr 2026 01:29:45 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 270fe by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Mon, 27 Apr 2026 01:29:45 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Konstantin Belousov Subject: git: 342ce4b6b4d9 - stable/15 - membarrier(2): implement the MEMBARRIER_CMD_GET_REGISTRATIONS command List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kib X-Git-Repository: src X-Git-Refname: refs/heads/stable/15 X-Git-Reftype: branch X-Git-Commit: 342ce4b6b4d98c5bf6ba5e0be46dd2805d710d75 Auto-Submitted: auto-generated Date: Mon, 27 Apr 2026 01:29:45 +0000 Message-Id: <69eebc09.270fe.31f09416@gitrepo.freebsd.org> The branch stable/15 has been updated by kib: URL: https://cgit.FreeBSD.org/src/commit/?id=342ce4b6b4d98c5bf6ba5e0be46dd2805d710d75 commit 342ce4b6b4d98c5bf6ba5e0be46dd2805d710d75 Author: Konstantin Belousov AuthorDate: 2026-04-18 18:43:59 +0000 Commit: Konstantin Belousov CommitDate: 2026-04-27 01:28:59 +0000 membarrier(2): implement the MEMBARRIER_CMD_GET_REGISTRATIONS command (cherry picked from commit aaa10396a997bafc28ce6551e92563620caf3df4) --- sys/kern/kern_membarrier.c | 20 +++++++++++++++++--- sys/sys/membarrier.h | 3 +++ 2 files changed, 20 insertions(+), 3 deletions(-) diff --git a/sys/kern/kern_membarrier.c b/sys/kern/kern_membarrier.c index 6d210a1b1783..0c8f4b843473 100644 --- a/sys/kern/kern_membarrier.c +++ b/sys/kern/kern_membarrier.c @@ -51,7 +51,8 @@ MEMBARRIER_CMD_PRIVATE_EXPEDITED | \ MEMBARRIER_CMD_REGISTER_PRIVATE_EXPEDITED | \ MEMBARRIER_CMD_PRIVATE_EXPEDITED_SYNC_CORE | \ - MEMBARRIER_CMD_REGISTER_PRIVATE_EXPEDITED_SYNC_CORE) + MEMBARRIER_CMD_REGISTER_PRIVATE_EXPEDITED_SYNC_CORE | \ + MEMBARRIER_CMD_GET_REGISTRATIONS) static void membarrier_action_seqcst(void *arg __unused) @@ -120,7 +121,7 @@ kern_membarrier(struct thread *td, int cmd, unsigned flags, int cpu_id) struct thread *td1; cpuset_t cs; uint64_t *swt; - int c, error, f; + int c, error, f, res; bool first; if (flags != 0 || (cmd & ~MEMBARRIER_SUPPORTED_CMDS) != 0) @@ -218,13 +219,26 @@ kern_membarrier(struct thread *td, int cmd, unsigned flags, int cpu_id) break; case MEMBARRIER_CMD_REGISTER_PRIVATE_EXPEDITED_SYNC_CORE: - if ((p->p_flag2 & P2_MEMBAR_PRIVE_SYNCORE) == 0) { + if ((f & P2_MEMBAR_PRIVE_SYNCORE) == 0) { PROC_LOCK(p); p->p_flag2 |= P2_MEMBAR_PRIVE_SYNCORE; PROC_UNLOCK(p); } break; + case MEMBARRIER_CMD_GET_REGISTRATIONS: + res = 0; + if ((f & P2_MEMBAR_GLOBE) != 0) + res |= MEMBARRIER_CMD_REGISTER_GLOBAL_EXPEDITED; + if ((f & P2_MEMBAR_PRIVE) != 0) + res |= MEMBARRIER_CMD_REGISTER_PRIVATE_EXPEDITED; + if ((f & P2_MEMBAR_PRIVE_SYNCORE) != 0) { + res |= + MEMBARRIER_CMD_REGISTER_PRIVATE_EXPEDITED_SYNC_CORE; + } + td->td_retval[0] = res; + break; + default: error = EINVAL; break; diff --git a/sys/sys/membarrier.h b/sys/sys/membarrier.h index 31a605634ddb..34a525dabae6 100644 --- a/sys/sys/membarrier.h +++ b/sys/sys/membarrier.h @@ -55,6 +55,9 @@ enum membarrier_cmd { */ MEMBARRIER_CMD_PRIVATE_EXPEDITED_RSEQ = 0x00000080, MEMBARRIER_CMD_REGISTER_PRIVATE_EXPEDITED_RSEQ = 0x00000100, + + /* Return the bitmask of current registrations. */ + MEMBARRIER_CMD_GET_REGISTRATIONS = 0x00000200, }; enum membarrier_cmd_flag { From nobody Mon Apr 27 01:29:46 2026 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4g3mFk5xb0z6bQfm for ; Mon, 27 Apr 2026 01:29:46 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R13" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4g3mFk3s5nz3XKG for ; Mon, 27 Apr 2026 01:29:46 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1777253386; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Q3Rv16HzcGAyBL9Uki446o7qOQRxP1mg09tarXJwvLQ=; b=tN2YDRCzBlV4xoK0/lasXlrMD8bAb2oF/nRQuqaHM6w2UB5UdtBxHxcAVy4OV8VX2SnH28 SUMJSbPL7QKuzCwcUewZl7Ckr/E21AoKEBchqbGaU1bVtVTDKaveWlgc6XEuejt4oHuqk/ e26/t6cYewPjOtbl18DYkuyIR5MnJJzhl6jsKZQ99bei4XtWRlK382/evlD6JXBX3UvnjE FVyc+gCr0X7TpB1X3onMLwRqA4KlKp/L+8w7mIRvTEPXpVMkhbs2og/+hk6IhwonXsVXtZ R9yWu0IHnybm54NfTD9dtj1tEkqGDecA4FLcINvEgygKOFgPdobNs01yqEFEjg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1777253386; a=rsa-sha256; cv=none; b=KUmLoxADLjGr0yf5X3gpFprxMkXG5nXtYXCBGZiekFLWTdzheafi1dCHAixC9PrPqr6HCy j+1WiSrjJrS+w0TbJl7o1bpWXynhGQWUqahag7uxQvrdzZ+Xq1WyWufZ+/BFuwtS61nZPZ 8kNCWwghuu4nNEnJ02e1AkJ3rwJjfXLFXkktAhFBLdBdXDD+CvprO1v/c0Bp1pbstl9xGn sV1zWkT8HZpFsmhRxBTNDeyEZBMO98qPltCPFB8z8VR8O1v/6+p1kKjIkz1LjvMH5DSJyB mtpjsGdfpt3SAxkzZIo2hqsluAfHhsEFIMkweKmyv+Xl4GNe/dE6+WoDRjGADw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1777253386; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Q3Rv16HzcGAyBL9Uki446o7qOQRxP1mg09tarXJwvLQ=; b=JllOsVxdg7fczvshQovtENkN9uRZ0JFwfYBl8eh0UwX+TpipGKK38buBMtFmz/q4P7+l8m CcggbvWZLQ46z2xvSLq4R9GXX3dthOXlsjaDljpcKOAogFdgheaZgtm60r2d/BLGy+NYhf vbiAdlVSDqUCP40rz0FNGX7gXqhZ34lgrCIZXu6qTF/8A1aycEU2cIcLYwWt04KLSQ8Vzy 7lzTBrrQRPkkqGRu73qphbT8B1hvmZhw5Krn1scVbRsEihnEM6FuDUBmmOZSqOzth0vOSx etiUdF+J+OGNs1mNpm+8Y9170brK7JaG8ya4F2ZX4SEipVkiv3xzftiGfWTWHg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4g3mFk3S9YzlnC for ; Mon, 27 Apr 2026 01:29:46 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 2641e by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Mon, 27 Apr 2026 01:29:46 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Konstantin Belousov Subject: git: b024a8d082a9 - stable/15 - membarrier.2: document MEMBARRIER_CMD_GET_REGISTRATIONS List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kib X-Git-Repository: src X-Git-Refname: refs/heads/stable/15 X-Git-Reftype: branch X-Git-Commit: b024a8d082a96a9c9d0151d0aeb864f67a4e9fcb Auto-Submitted: auto-generated Date: Mon, 27 Apr 2026 01:29:46 +0000 Message-Id: <69eebc0a.2641e.5ce8a89c@gitrepo.freebsd.org> The branch stable/15 has been updated by kib: URL: https://cgit.FreeBSD.org/src/commit/?id=b024a8d082a96a9c9d0151d0aeb864f67a4e9fcb commit b024a8d082a96a9c9d0151d0aeb864f67a4e9fcb Author: Konstantin Belousov AuthorDate: 2026-04-18 18:47:02 +0000 Commit: Konstantin Belousov CommitDate: 2026-04-27 01:28:59 +0000 membarrier.2: document MEMBARRIER_CMD_GET_REGISTRATIONS (cherry picked from commit 324b3c2892a53e5fd9b1d8795a31a59ee835c5de) --- lib/libsys/membarrier.2 | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/lib/libsys/membarrier.2 b/lib/libsys/membarrier.2 index 87db620975ef..1dce2c823022 100644 --- a/lib/libsys/membarrier.2 +++ b/lib/libsys/membarrier.2 @@ -83,6 +83,8 @@ CPU are fenced. Register the process to receive .Dv MEMBARRIER_CMD_PRIVATE_EXPEDITED_SYNC_CORE memory barriers. +.It Dv MEMBARRIER_CMD_GET_REGISTRATIONS +Return the bitmask of the currently registered receive barriers. .El .Pp The following @@ -106,6 +108,10 @@ If the is .Dv MEMBARRIER_CMD_QUERY a bitmask of supported commands is returned. +For the +.Dv MEMBARRIER_CMD_GET_REGISTRATIONS +command, a bitmask of the registrations for the current process +is returned. Otherwise, on success, .Nm returns 0. From nobody Mon Apr 27 01:29:47 2026 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4g3mFl6xcMz6bQf9 for ; Mon, 27 Apr 2026 01:29:47 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R13" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4g3mFl53dMz3XZH for ; Mon, 27 Apr 2026 01:29:47 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1777253387; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=4KatSwTwJki3cvCl7pMKR+u2JjMqpm8Kpo9ALhlt37I=; b=iumdWkM9RLKrOKu5l1qE2tF1xeSDSe1WeLTMTnM78wLx+JwVdOfCS7dnV1eUXA2heyIJuM +k9m0OhuoAaTyKfqFt/crI+AIYWCh791kdHvlCagaC2yt9abp0EPsht833on3uk1ectjlQ 4NTyy9Lh68ZpQA5Sn43DHrxyfRfKjijc+a7mvS3AFPXWo1FQ0teHi0VB8NjJyUztCuStMR Zo3SYsr+FzHRb+FIpFfuMnq6KvgHOcqB2sa/vXXuLBdl54cUmdwHKK6VWZmM1+EYs7drIi D3vfE3wG/OuaRcHmgUvkAyZ11AGPQdtS6VG5AHfH26fD5qN8cv8DjPyAKhezUg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1777253387; a=rsa-sha256; cv=none; b=Nx5NU3lAr+AogCjKij+iwgPQicuVlmkKy5XxSTB5Gq88loRAHS3UPJo8SH4bbaqkLDhGsn Fgw8g29iYyhdL8ncWMKSaf0PQ8827lziAFO5/ch+XjeB6XoXqelt/E8Gqg6c9gfdfU2N8e Wk7x4hGVVVs0yv0cChdroOdP61Ig3M4wpzIP7JY8pyTngge6VcHJ7IaPBAZQE0RKVZfnxT Qk7bio5YAsorXUoVohKKQy22uRfirFG/xTO8fenpSf/Gz/qeQdxShUncFomOQWwUClieIe 9r08VnpNZj8UyDMGxIhWpG/lMmCHH/fYJr9MOjCy3+aZOHURp2zS+aEXCvq+Dg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1777253387; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=4KatSwTwJki3cvCl7pMKR+u2JjMqpm8Kpo9ALhlt37I=; b=esbmZWbHnvnSvS1Xd7495mq2abYDWPhsBnO1L57j15Mf4vT+IM5FYvnUyhxleKdyBpNBbd WZ5y9etp9WRjYwNTsHXSce/S3OWaC1aWpb4mZu/io6MUrGcf1eTD3gkuaS+WXgu0fnP0Dw 6rxY2xGt58q0fByOeZd53/WXUmWXf0gyvZyUlkgTxVNyA8MM9U4pf3wovBt7QQiGdmV9mj vwF9INNfmcmV4Rf4BfD/AODUAoKeeuvHp/+RzpF/SAWrKeFWwt4wyq77jXwAZrTrHGa8w6 AiGJ5vK0Z/Nev3cUixD81FTV+JYxKRyYnpjcSoadxH2Rx6iqyBR8UpChTFTRAA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4g3mFl4KjnzmMf for ; Mon, 27 Apr 2026 01:29:47 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 26487 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Mon, 27 Apr 2026 01:29:47 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org Cc: GenericRikka From: Konstantin Belousov Subject: git: ea8fd844183f - stable/15 - kern/proc: expose reaper PID and subtree root in struct kinfo_proc List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kib X-Git-Repository: src X-Git-Refname: refs/heads/stable/15 X-Git-Reftype: branch X-Git-Commit: ea8fd844183feb8ff44a32aa30291477e88fe4ae Auto-Submitted: auto-generated Date: Mon, 27 Apr 2026 01:29:47 +0000 Message-Id: <69eebc0b.26487.68aa34f7@gitrepo.freebsd.org> The branch stable/15 has been updated by kib: URL: https://cgit.FreeBSD.org/src/commit/?id=ea8fd844183feb8ff44a32aa30291477e88fe4ae commit ea8fd844183feb8ff44a32aa30291477e88fe4ae Author: GenericRikka AuthorDate: 2026-04-20 23:32:49 +0000 Commit: Konstantin Belousov CommitDate: 2026-04-27 01:28:59 +0000 kern/proc: expose reaper PID and subtree root in struct kinfo_proc PR: 293871 (cherry picked from commit 0f89380a3d208d67698f2d35afd35257e5fdbe09) --- lib/libkvm/kvm_proc.c | 8 ++++++++ sys/compat/freebsd32/freebsd32.h | 4 +++- sys/kern/kern_proc.c | 4 ++++ sys/sys/user.h | 4 +++- 4 files changed, 18 insertions(+), 2 deletions(-) diff --git a/lib/libkvm/kvm_proc.c b/lib/libkvm/kvm_proc.c index fed483978e62..a952888c9ef0 100644 --- a/lib/libkvm/kvm_proc.c +++ b/lib/libkvm/kvm_proc.c @@ -121,6 +121,7 @@ kvm_proclist(kvm_t *kd, int what, int arg, struct proc *p, struct thread mtd; struct proc proc; struct proc pproc; + struct proc rproc; struct sysentvec sysent; char svname[KI_EMULNAMELEN]; struct thread *td = NULL; @@ -365,6 +366,13 @@ nopgrp: kp->ki_xstat = KW_EXITCODE(proc.p_xexit, proc.p_xsig); kp->ki_acflag = proc.p_acflag; kp->ki_lock = proc.p_lock; + if (KREAD(kd, (u_long)proc.p_reaper, &rproc)) { + _kvm_err(kd, kd->program, + "can't read reaper at %p", proc.p_reaper); + return (-1); + } + kp->ki_reaper = rproc.p_pid; + kp->ki_reapsubtree = proc.p_reapsubtree; kp->ki_tdev_freebsd11 = kp->ki_tdev; /* truncate */ /* Per-thread items; iterate as appropriate. */ diff --git a/sys/compat/freebsd32/freebsd32.h b/sys/compat/freebsd32/freebsd32.h index 1436b630689f..3f5b93859f5c 100644 --- a/sys/compat/freebsd32/freebsd32.h +++ b/sys/compat/freebsd32/freebsd32.h @@ -392,8 +392,10 @@ struct kinfo_proc32 { char ki_emul[KI_EMULNAMELEN+1]; char ki_loginclass[LOGINCLASSLEN+1]; char ki_moretdname[MAXCOMLEN-TDNAMLEN+1]; - char ki_sparestrings[46]; + char ki_sparestrings[38]; int ki_spareints[KI_NSPARE_INT]; + pid_t ki_reaper; + pid_t ki_reapsubtree; freebsd32_uint64_t ki_tdev; int ki_oncpu; int ki_lastcpu; diff --git a/sys/kern/kern_proc.c b/sys/kern/kern_proc.c index e6541c73ccac..758f54c540ab 100644 --- a/sys/kern/kern_proc.c +++ b/sys/kern/kern_proc.c @@ -1237,6 +1237,8 @@ fill_kinfo_proc_pgrp(struct proc *p, struct kinfo_proc *kp) kp->ki_tdev = NODEV; kp->ki_tdev_freebsd11 = kp->ki_tdev; /* truncate */ } + kp->ki_reaper = p->p_reaper->p_pid; + kp->ki_reapsubtree = p->p_reapsubtree; } /* @@ -1496,6 +1498,8 @@ freebsd32_kinfo_proc_out(const struct kinfo_proc *ki, struct kinfo_proc32 *ki32) CP(*ki, *ki32, ki_fibnum); CP(*ki, *ki32, ki_cr_flags); CP(*ki, *ki32, ki_jid); + CP(*ki, *ki32, ki_reaper); + CP(*ki, *ki32, ki_reapsubtree); CP(*ki, *ki32, ki_numthreads); CP(*ki, *ki32, ki_tid); CP(*ki, *ki32, ki_pri); diff --git a/sys/sys/user.h b/sys/sys/user.h index 59210913f889..e1a3897cd319 100644 --- a/sys/sys/user.h +++ b/sys/sys/user.h @@ -186,8 +186,10 @@ struct kinfo_proc { * front of ki_sparestrings, and ints from the end of ki_spareints. * That way the spare room from both arrays will remain contiguous. */ - char ki_sparestrings[46]; /* spare string space */ + char ki_sparestrings[38]; /* spare string space */ int ki_spareints[KI_NSPARE_INT]; /* spare room for growth */ + pid_t ki_reaper; /* pid of reaper process */ + pid_t ki_reapsubtree; /* reaper subtree id */ uint64_t ki_tdev; /* controlling tty dev */ int ki_oncpu; /* Which cpu we are on */ int ki_lastcpu; /* Last cpu we were on */ From nobody Mon Apr 27 01:29:48 2026 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4g3mFn2nnHz6bQGF for ; Mon, 27 Apr 2026 01:29:49 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R13" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4g3mFn017Qz3XWw for ; Mon, 27 Apr 2026 01:29:48 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1777253389; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=eTmnlwTsninQBD+xyABEEhl+NewjJvlrVALFko+gJW0=; b=NJInSD60hgdKwFh2VQElvSkF+IYmkQzjpF3jLEbPFNVcflvvR8QpEMuBvu/zml0jJ2V4YG 8RO9YoXxAti2agPQDiKpaNc6urMI9hzfrOXaoMAyCp6/1JQXFYDs2bWdTpQC9SI3DH1Y9L pE+3QDbPA4wjiHdnu+lrRdCHcBVcqwO1KoYHWPcgF24DQ536nKhY5sR1KM1SwMG6mom9wl B2BqwMWxW3+2gkMUOXzZdpaIzjiJSWIh7krDl+edvyp9ID2r8vyjkgT/njnPfKdQjRcvgr WV5ot4nyKVLK++Oopq5ZXLq+3u+SXWt6FWornLYEJ4X2cgtKYgy77N1CJjl9Ww== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1777253389; a=rsa-sha256; cv=none; b=J/YEdDA5q4eSRLy20Iicm5JMlQpOEOeodXX5LYETiCU/OWQNPXmBGXzRl5jnCqt447WY5e KPbKpGNdnbD9fzBCRKoqgv8ZZeYI0lsMcoSXWLxb8VUd/zdWFE34Ptu7BfKTRxeH0aIN6i hvMZtKJMd7ZqPPYrjfMlzyeDyh090KkT6MArDFE4KiRnhKaCs4Fm3iioplbkm2SXE0xK/S 83UJGEY/0xEGoPqWy8crd5c9xnkoSDDifbr1pEAsXGaSg8dZzyoQx5RUVbOsBTj2rcCJzG l232Ytgegl/mkv+xFLmGy76hMpwAB8jHmGnKrG56+BQ2pz+r14j38uoTBFmIeg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1777253389; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=eTmnlwTsninQBD+xyABEEhl+NewjJvlrVALFko+gJW0=; b=MmAMyFwTBiikHinGVNqHcN9H6CjZH70fJ1+Prb9ZFZqbJc7yxK3FxvR/AoN7IJrUagdDIU HJ/APwNIA4++cvO/mFb5LfZxN3Wfjf1w2rlKBS7zIGk56ML9XYyoB+Zbuq5jcsVXX7zZ+/ JTbNLHuXxhmWp11HoRY6mRV9wDaPeLjBc1XfSCkU3OWF0/Mv28/vZTDEFHW551X9S+97XU uiKifg0OSvoLwCasyYAWU5vVKuQjiLy//4uns3VrwbiWvMwmAdSv2rXbR/49QPYCWNthxt Qytfd73We0xDCSbCP52wHZF5tdM9slhFRQMN9jhPkORuUHBEw/BNCGIVRU/CNQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4g3mFm5R5Kzlys for ; Mon, 27 Apr 2026 01:29:48 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 26422 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Mon, 27 Apr 2026 01:29:48 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Konstantin Belousov Subject: git: f60defbd2bcb - stable/15 - conf/std.nodebug: disable DEBUG_LOCKS List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kib X-Git-Repository: src X-Git-Refname: refs/heads/stable/15 X-Git-Reftype: branch X-Git-Commit: f60defbd2bcb6212294a783958f7884faa8b2b34 Auto-Submitted: auto-generated Date: Mon, 27 Apr 2026 01:29:48 +0000 Message-Id: <69eebc0c.26422.3aa8568a@gitrepo.freebsd.org> The branch stable/15 has been updated by kib: URL: https://cgit.FreeBSD.org/src/commit/?id=f60defbd2bcb6212294a783958f7884faa8b2b34 commit f60defbd2bcb6212294a783958f7884faa8b2b34 Author: Konstantin Belousov AuthorDate: 2026-04-26 02:16:55 +0000 Commit: Konstantin Belousov CommitDate: 2026-04-27 01:29:00 +0000 conf/std.nodebug: disable DEBUG_LOCKS (cherry picked from commit 85a04bea5a54d6879c8fbf49eea20aba7ca24692) --- sys/conf/std.nodebug | 1 + 1 file changed, 1 insertion(+) diff --git a/sys/conf/std.nodebug b/sys/conf/std.nodebug index 4035e28d2a62..bb5f1ef8cb02 100644 --- a/sys/conf/std.nodebug +++ b/sys/conf/std.nodebug @@ -8,6 +8,7 @@ nooptions DIAGNOSTIC nooptions WITNESS nooptions WITNESS_SKIPSPIN nooptions DEBUG_VFS_LOCKS +nooptions DEBUG_LOCKS nooptions BUF_TRACKING nooptions FULL_BUF_TRACKING nooptions DEADLKRES From nobody Mon Apr 27 16:12:04 2026 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4g47qn1Wcjz6bH1j for ; Mon, 27 Apr 2026 16:12:05 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R13" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4g47qn000cz3f9r for ; Mon, 27 Apr 2026 16:12:04 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1777306325; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=4Rd3rGYQKSfAd8fXsESHfhiIuizdJCUB19/Qg28MG2Q=; b=Fjw5lLsV2Vz8hYBlvAlAEtRuvIoBUb5jZ1bW0SRM3Onzx3iLGeTCIqtTtPmoOWP6XcehLg Zk8Q7Z5D7luJFZtWNoWa6q9ejZIXw7V+Lq80/eELlT4cVZALoYE4kGXjZEJBKGNVoIorpV YE/L0CbGXOWtLAAHkjmRZO2PArptWTf3n0Gp+9AgjtHi8ZqpNUuLR8g+YTIP59BloDs+Pv 3BZOsl8uc17Kbxf1s+7EpUM5ey2goHrH6VBbh81xzY3/1VY5hukvX/QGndb3mVDSCBvfVR A0AyQQzIKrfyKW4vFzIKCP9mBR0lpgUUCq2XrI9ClJCTK6nDVoBzSyfSvdwm8w== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1777306325; a=rsa-sha256; cv=none; b=tEgHTDnqIR6A/NtbENE22fXHEYR00dx+zuIXkx/dQntZRDaO0tpsHXalSEUaw5+ffcbJHD yM5YB/B9oA78fIdH86dMdd3Uy1EaoSREWWM7Qf5rxFsxJISeehVOGTmx0MBmKwgE+mFINa XWWy0NvWVL6WdvbkpH9Fo0RMquh901w4ChNYsY4JF/JuU8aCqmlRfN39i4DGtl4L19rcR4 Ni7sNBkBRM36g7fkoqJro3OO8dDjqWeZHKhCu7ulD/96I+77yEO2s2QvM1MJ4r7ssngqws Wh7PbTcR2sVVndR8MdBApdko6x3WaF9qWbPIt/1cFnjcnFAyTfBJvk+22lEOmw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1777306325; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=4Rd3rGYQKSfAd8fXsESHfhiIuizdJCUB19/Qg28MG2Q=; b=fm3TGIvGn//zvUeACdB0IRu90k+PW75b+ZACjm8WoKFokyNDau4TAy0rzd/ivS6Wx/iYuB nAdd4vVnvJYDhwHOspcOIAE/oWri7ovXyEPoxE4sIiq/4MPq+debSH6uNf5Y3oGnKA9Y5Z MNvE1+UTcVa8Dg5HaRdol35BLQxoM942me5q0orj6Ul9L9HxHEmztaEFDnj7/eTphXn4Xz ppzuuU4uK4NZXeGOuMPrRfyKqIqEpjk3KSOD7HCUav9PvYniUv+uoAyY5eBs+VXjXAPFeO NHtUbWhLojCiGhk1swT8+nCt9lbLJLKKSqoto5063mhod99xP7catayTZ5Tk2w== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4g47qm6bGpz8V for ; Mon, 27 Apr 2026 16:12:04 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 444b2 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Mon, 27 Apr 2026 16:12:04 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Gleb Smirnoff Subject: git: 8695b968815f - stable/15 - kgss: remove KGSS_VNET_* macros family List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: glebius X-Git-Repository: src X-Git-Refname: refs/heads/stable/15 X-Git-Reftype: branch X-Git-Commit: 8695b968815f9e9a4da0654495df3de02d1af8ae Auto-Submitted: auto-generated Date: Mon, 27 Apr 2026 16:12:04 +0000 Message-Id: <69ef8ad4.444b2.11552bb8@gitrepo.freebsd.org> The branch stable/15 has been updated by glebius: URL: https://cgit.FreeBSD.org/src/commit/?id=8695b968815f9e9a4da0654495df3de02d1af8ae commit 8695b968815f9e9a4da0654495df3de02d1af8ae Author: Gleb Smirnoff AuthorDate: 2026-04-25 02:55:45 +0000 Commit: Gleb Smirnoff CommitDate: 2026-04-27 16:11:51 +0000 kgss: remove KGSS_VNET_* macros family The original idea was that something else than VNET(9) might be used for kgss in jails, but that is very unlikely to happen. Mechanical change done with sed+grep. No functional change. Reviewed by: rmacklem Differential Revision: https://reviews.freebsd.org/D56560 (cherry picked from commit 50c5715159f172103f68fa90e5423a45aea2a626) --- sys/kgssapi/gss_delete_sec_context.c | 8 ++--- sys/kgssapi/gss_impl.c | 30 ++++++++-------- sys/kgssapi/gss_release_cred.c | 8 ++--- sys/kgssapi/gss_release_name.c | 8 ++--- sys/kgssapi/gssapi_impl.h | 14 +------- sys/rpc/rpcsec_gss/rpcsec_gss.c | 6 ++-- sys/rpc/rpcsec_gss/svc_rpcsec_gss.c | 66 ++++++++++++++++++------------------ 7 files changed, 64 insertions(+), 76 deletions(-) diff --git a/sys/kgssapi/gss_delete_sec_context.c b/sys/kgssapi/gss_delete_sec_context.c index a5da31af136b..c435e6193b0f 100644 --- a/sys/kgssapi/gss_delete_sec_context.c +++ b/sys/kgssapi/gss_delete_sec_context.c @@ -52,12 +52,12 @@ gss_delete_sec_context(OM_uint32 *minor_status, gss_ctx_id_t *context_handle, *minor_status = 0; - KGSS_CURVNET_SET_QUIET(KGSS_TD_TO_VNET(curthread)); - if (!KGSS_VNET(kgss_gssd_handle)) { - KGSS_CURVNET_RESTORE(); + CURVNET_SET_QUIET(TD_TO_VNET(curthread)); + if (!VNET(kgss_gssd_handle)) { + CURVNET_RESTORE(); return (GSS_S_FAILURE); } - KGSS_CURVNET_RESTORE(); + CURVNET_RESTORE(); if (*context_handle) { ctx = *context_handle; diff --git a/sys/kgssapi/gss_impl.c b/sys/kgssapi/gss_impl.c index 323b379e1619..e7e0e5d00118 100644 --- a/sys/kgssapi/gss_impl.c +++ b/sys/kgssapi/gss_impl.c @@ -52,7 +52,7 @@ MALLOC_DEFINE(M_GSSAPI, "GSS-API", "GSS-API"); struct kgss_mech_list kgss_mechs; struct mtx kgss_gssd_lock; -KGSS_VNET_DEFINE(CLIENT *, kgss_gssd_handle) = NULL; +VNET_DEFINE(CLIENT *, kgss_gssd_handle) = NULL; static int kgss_load(void) @@ -79,11 +79,11 @@ kgss_load(void) */ clnt_control(cl, CLSET_WAITCHAN, "gssd"); - KGSS_CURVNET_SET_QUIET(KGSS_TD_TO_VNET(curthread)); + CURVNET_SET_QUIET(TD_TO_VNET(curthread)); mtx_lock(&kgss_gssd_lock); - KGSS_VNET(kgss_gssd_handle) = cl; + VNET(kgss_gssd_handle) = cl; mtx_unlock(&kgss_gssd_lock); - KGSS_CURVNET_RESTORE(); + CURVNET_RESTORE(); return (0); } @@ -93,9 +93,9 @@ static void kgss_unload(void) { - KGSS_CURVNET_SET_QUIET(KGSS_TD_TO_VNET(curthread)); - clnt_destroy(KGSS_VNET(kgss_gssd_handle)); - KGSS_CURVNET_RESTORE(); + CURVNET_SET_QUIET(TD_TO_VNET(curthread)); + clnt_destroy(VNET(kgss_gssd_handle)); + CURVNET_RESTORE(); } #endif @@ -207,16 +207,16 @@ kgss_transfer_context(gss_ctx_id_t ctx, void *lctx) return (maj_stat); } - KGSS_CURVNET_SET_QUIET(KGSS_TD_TO_VNET(curthread)); - if (!KGSS_VNET(kgss_gssd_handle)) { - KGSS_CURVNET_RESTORE(); + CURVNET_SET_QUIET(TD_TO_VNET(curthread)); + if (!VNET(kgss_gssd_handle)) { + CURVNET_RESTORE(); return (GSS_S_FAILURE); } args.ctx = ctx->handle; bzero(&res, sizeof(res)); - stat = gssd_export_sec_context_1(&args, &res, KGSS_VNET(kgss_gssd_handle)); - KGSS_CURVNET_RESTORE(); + stat = gssd_export_sec_context_1(&args, &res, VNET(kgss_gssd_handle)); + CURVNET_RESTORE(); if (stat != RPC_SUCCESS) { return (GSS_S_FAILURE); } @@ -250,13 +250,13 @@ kgss_gssd_client(void) { CLIENT *cl; - KGSS_CURVNET_SET_QUIET(KGSS_TD_TO_VNET(curthread)); + CURVNET_SET_QUIET(TD_TO_VNET(curthread)); mtx_lock(&kgss_gssd_lock); - cl = KGSS_VNET(kgss_gssd_handle); + cl = VNET(kgss_gssd_handle); if (cl != NULL) CLNT_ACQUIRE(cl); mtx_unlock(&kgss_gssd_lock); - KGSS_CURVNET_RESTORE(); + CURVNET_RESTORE(); return (cl); } diff --git a/sys/kgssapi/gss_release_cred.c b/sys/kgssapi/gss_release_cred.c index 91625000fa9c..191eca0904c6 100644 --- a/sys/kgssapi/gss_release_cred.c +++ b/sys/kgssapi/gss_release_cred.c @@ -50,12 +50,12 @@ gss_release_cred(OM_uint32 *minor_status, gss_cred_id_t *cred_handle) *minor_status = 0; - KGSS_CURVNET_SET_QUIET(KGSS_TD_TO_VNET(curthread)); - if (!KGSS_VNET(kgss_gssd_handle)) { - KGSS_CURVNET_RESTORE(); + CURVNET_SET_QUIET(TD_TO_VNET(curthread)); + if (!VNET(kgss_gssd_handle)) { + CURVNET_RESTORE(); return (GSS_S_FAILURE); } - KGSS_CURVNET_RESTORE(); + CURVNET_RESTORE(); if (*cred_handle) { args.cred = (*cred_handle)->handle; diff --git a/sys/kgssapi/gss_release_name.c b/sys/kgssapi/gss_release_name.c index ee9a259134e3..d5d86fb107ff 100644 --- a/sys/kgssapi/gss_release_name.c +++ b/sys/kgssapi/gss_release_name.c @@ -51,12 +51,12 @@ gss_release_name(OM_uint32 *minor_status, gss_name_t *input_name) *minor_status = 0; - KGSS_CURVNET_SET_QUIET(KGSS_TD_TO_VNET(curthread)); - if (!KGSS_VNET(kgss_gssd_handle)) { - KGSS_CURVNET_RESTORE(); + CURVNET_SET_QUIET(TD_TO_VNET(curthread)); + if (!VNET(kgss_gssd_handle)) { + CURVNET_RESTORE(); return (GSS_S_FAILURE); } - KGSS_CURVNET_RESTORE(); + CURVNET_RESTORE(); if (*input_name) { name = *input_name; diff --git a/sys/kgssapi/gssapi_impl.h b/sys/kgssapi/gssapi_impl.h index d8a85f20a602..f5b36d67816b 100644 --- a/sys/kgssapi/gssapi_impl.h +++ b/sys/kgssapi/gssapi_impl.h @@ -52,22 +52,10 @@ struct kgss_mech { }; LIST_HEAD(kgss_mech_list, kgss_mech); -/* Macros for VIMAGE. */ -/* Just define the KGSS_VNETxxx() macros as VNETxxx() macros. */ -#define KGSS_VNET_DEFINE(t, n) VNET_DEFINE(t, n) -#define KGSS_VNET_DEFINE_STATIC(t, n) VNET_DEFINE_STATIC(t, n) -#define KGSS_VNET_DECLARE(t, n) VNET_DECLARE(t, n) -#define KGSS_VNET(n) VNET(n) - -#define KGSS_CURVNET_SET(n) CURVNET_SET(n) -#define KGSS_CURVNET_SET_QUIET(n) CURVNET_SET_QUIET(n) -#define KGSS_CURVNET_RESTORE() CURVNET_RESTORE() -#define KGSS_TD_TO_VNET(n) TD_TO_VNET(n) - extern struct mtx kgss_gssd_lock; extern struct kgss_mech_list kgss_mechs; -KGSS_VNET_DECLARE(CLIENT *, kgss_gssd_handle); +VNET_DECLARE(CLIENT *, kgss_gssd_handle); CLIENT *kgss_gssd_client(void); int kgss_oid_equal(const gss_OID oid1, const gss_OID oid2); diff --git a/sys/rpc/rpcsec_gss/rpcsec_gss.c b/sys/rpc/rpcsec_gss/rpcsec_gss.c index 4d5c53e2545e..d99e3a3090df 100644 --- a/sys/rpc/rpcsec_gss/rpcsec_gss.c +++ b/sys/rpc/rpcsec_gss/rpcsec_gss.c @@ -783,7 +783,7 @@ rpc_gss_init(AUTH *auth, rpc_gss_options_ret_t *options_ret) * only option. This is broken if NFS mounts are enabled * within vnet prisons. */ - KGSS_CURVNET_SET_QUIET(vnet0); + CURVNET_SET_QUIET(vnet0); /* * For KerberosV, if there is a client principal name, that implies * that this is a host based initiator credential in the default @@ -1030,14 +1030,14 @@ out: gss_delete_sec_context(&min_stat, &gd->gd_ctx, GSS_C_NO_BUFFER); } - KGSS_CURVNET_RESTORE(); + CURVNET_RESTORE(); mtx_lock(&gd->gd_lock); gd->gd_state = RPCSEC_GSS_START; wakeup(gd); mtx_unlock(&gd->gd_lock); return (FALSE); } - KGSS_CURVNET_RESTORE(); + CURVNET_RESTORE(); mtx_lock(&gd->gd_lock); gd->gd_state = RPCSEC_GSS_ESTABLISHED; diff --git a/sys/rpc/rpcsec_gss/svc_rpcsec_gss.c b/sys/rpc/rpcsec_gss/svc_rpcsec_gss.c index 528112d5642a..3990b0220229 100644 --- a/sys/rpc/rpcsec_gss/svc_rpcsec_gss.c +++ b/sys/rpc/rpcsec_gss/svc_rpcsec_gss.c @@ -100,7 +100,7 @@ struct svc_rpc_gss_callback { rpc_gss_callback_t cb_callback; }; SLIST_HEAD(svc_rpc_gss_callback_list, svc_rpc_gss_callback); -KGSS_VNET_DEFINE_STATIC(struct svc_rpc_gss_callback_list, +VNET_DEFINE_STATIC(struct svc_rpc_gss_callback_list, svc_rpc_gss_callbacks) = SLIST_HEAD_INITIALIZER(svc_rpc_gss_callbacks); struct svc_rpc_gss_svc_name { @@ -113,7 +113,7 @@ struct svc_rpc_gss_svc_name { u_int sn_version; }; SLIST_HEAD(svc_rpc_gss_svc_name_list, svc_rpc_gss_svc_name); -KGSS_VNET_DEFINE_STATIC(struct svc_rpc_gss_svc_name_list, +VNET_DEFINE_STATIC(struct svc_rpc_gss_svc_name_list, svc_rpc_gss_svc_names) = SLIST_HEAD_INITIALIZER(svc_rpc_gss_svc_names); enum svc_rpc_gss_client_state { @@ -195,9 +195,9 @@ SYSCTL_UINT(_kern_rpc_gss, OID_AUTO, client_count, CTLFLAG_RD, &svc_rpc_gss_client_count, 0, "Number of rpc-gss clients"); -KGSS_VNET_DEFINE(struct svc_rpc_gss_client_list *, svc_rpc_gss_client_hash); -KGSS_VNET_DEFINE(struct svc_rpc_gss_client_list, svc_rpc_gss_clients); -KGSS_VNET_DEFINE_STATIC(uint32_t, svc_rpc_gss_next_clientid) = 1; +VNET_DEFINE(struct svc_rpc_gss_client_list *, svc_rpc_gss_client_hash); +VNET_DEFINE(struct svc_rpc_gss_client_list, svc_rpc_gss_clients); +VNET_DEFINE_STATIC(uint32_t, svc_rpc_gss_next_clientid) = 1; static void svc_rpc_gss_init(void *unused __unused) @@ -223,12 +223,12 @@ svc_rpc_gss_vnetinit(void *unused __unused) { int i; - KGSS_VNET(svc_rpc_gss_client_hash) = mem_alloc( + VNET(svc_rpc_gss_client_hash) = mem_alloc( sizeof(struct svc_rpc_gss_client_list) * svc_rpc_gss_client_hash_size); for (i = 0; i < svc_rpc_gss_client_hash_size; i++) - TAILQ_INIT(&KGSS_VNET(svc_rpc_gss_client_hash)[i]); - TAILQ_INIT(&KGSS_VNET(svc_rpc_gss_clients)); + TAILQ_INIT(&VNET(svc_rpc_gss_client_hash)[i]); + TAILQ_INIT(&VNET(svc_rpc_gss_clients)); } VNET_SYSINIT(svc_rpc_gss_vnetinit, SI_SUB_VNET_DONE, SI_ORDER_ANY, svc_rpc_gss_vnetinit, NULL); @@ -237,7 +237,7 @@ static void svc_rpc_gss_vnet_cleanup(void *unused __unused) { - mem_free(KGSS_VNET(svc_rpc_gss_client_hash), + mem_free(VNET(svc_rpc_gss_client_hash), sizeof(struct svc_rpc_gss_client_list) * svc_rpc_gss_client_hash_size); } @@ -256,7 +256,7 @@ rpc_gss_set_callback(rpc_gss_callback_t *cb) } scb->cb_callback = *cb; sx_xlock(&svc_rpc_gss_lock); - SLIST_INSERT_HEAD(&KGSS_VNET(svc_rpc_gss_callbacks), scb, cb_link); + SLIST_INSERT_HEAD(&VNET(svc_rpc_gss_callbacks), scb, cb_link); sx_xunlock(&svc_rpc_gss_lock); return (TRUE); @@ -268,11 +268,11 @@ rpc_gss_clear_callback(rpc_gss_callback_t *cb) struct svc_rpc_gss_callback *scb; sx_xlock(&svc_rpc_gss_lock); - SLIST_FOREACH(scb, &KGSS_VNET(svc_rpc_gss_callbacks), cb_link) { + SLIST_FOREACH(scb, &VNET(svc_rpc_gss_callbacks), cb_link) { if (scb->cb_callback.program == cb->program && scb->cb_callback.version == cb->version && scb->cb_callback.callback == cb->callback) { - SLIST_REMOVE(&KGSS_VNET(svc_rpc_gss_callbacks), scb, + SLIST_REMOVE(&VNET(svc_rpc_gss_callbacks), scb, svc_rpc_gss_callback, cb_link); sx_xunlock(&svc_rpc_gss_lock); mem_free(scb, sizeof(*scb)); @@ -343,7 +343,7 @@ rpc_gss_set_svc_name(const char *principal, const char *mechanism, } sx_xlock(&svc_rpc_gss_lock); - SLIST_INSERT_HEAD(&KGSS_VNET(svc_rpc_gss_svc_names), sname, sn_link); + SLIST_INSERT_HEAD(&VNET(svc_rpc_gss_svc_names), sname, sn_link); sx_xunlock(&svc_rpc_gss_lock); return (TRUE); @@ -356,10 +356,10 @@ rpc_gss_clear_svc_name(u_int program, u_int version) struct svc_rpc_gss_svc_name *sname; sx_xlock(&svc_rpc_gss_lock); - SLIST_FOREACH(sname, &KGSS_VNET(svc_rpc_gss_svc_names), sn_link) { + SLIST_FOREACH(sname, &VNET(svc_rpc_gss_svc_names), sn_link) { if (sname->sn_program == program && sname->sn_version == version) { - SLIST_REMOVE(&KGSS_VNET(svc_rpc_gss_svc_names), sname, + SLIST_REMOVE(&VNET(svc_rpc_gss_svc_names), sname, svc_rpc_gss_svc_name, sn_link); sx_xunlock(&svc_rpc_gss_lock); gss_release_cred(&min_stat, &sname->sn_cred); @@ -603,7 +603,7 @@ svc_rpc_gss_find_client(struct svc_rpc_gss_clientid *id) if (id->ci_hostid != hostid || id->ci_boottime != boottime.tv_sec) return (NULL); - list = &KGSS_VNET(svc_rpc_gss_client_hash) + list = &VNET(svc_rpc_gss_client_hash) [id->ci_id % svc_rpc_gss_client_hash_size]; sx_xlock(&svc_rpc_gss_lock); TAILQ_FOREACH(client, list, cl_link) { @@ -612,9 +612,9 @@ svc_rpc_gss_find_client(struct svc_rpc_gss_clientid *id) * Move this client to the front of the LRU * list. */ - TAILQ_REMOVE(&KGSS_VNET(svc_rpc_gss_clients), client, + TAILQ_REMOVE(&VNET(svc_rpc_gss_clients), client, cl_alllink); - TAILQ_INSERT_HEAD(&KGSS_VNET(svc_rpc_gss_clients), + TAILQ_INSERT_HEAD(&VNET(svc_rpc_gss_clients), client, cl_alllink); refcount_acquire(&client->cl_refs); break; @@ -648,7 +648,7 @@ svc_rpc_gss_create_client(void) client->cl_id.ci_hostid = hostid; getboottime(&boottime); client->cl_id.ci_boottime = boottime.tv_sec; - client->cl_id.ci_id = KGSS_VNET(svc_rpc_gss_next_clientid)++; + client->cl_id.ci_id = VNET(svc_rpc_gss_next_clientid)++; /* * Start the client off with a short expiration time. We will @@ -658,11 +658,11 @@ svc_rpc_gss_create_client(void) client->cl_locked = FALSE; client->cl_expiration = time_uptime + 5*60; - list = &KGSS_VNET(svc_rpc_gss_client_hash) + list = &VNET(svc_rpc_gss_client_hash) [client->cl_id.ci_id % svc_rpc_gss_client_hash_size]; sx_xlock(&svc_rpc_gss_lock); TAILQ_INSERT_HEAD(list, client, cl_link); - TAILQ_INSERT_HEAD(&KGSS_VNET(svc_rpc_gss_clients), client, cl_alllink); + TAILQ_INSERT_HEAD(&VNET(svc_rpc_gss_clients), client, cl_alllink); svc_rpc_gss_client_count++; sx_xunlock(&svc_rpc_gss_lock); return (client); @@ -716,10 +716,10 @@ svc_rpc_gss_forget_client_locked(struct svc_rpc_gss_client *client) struct svc_rpc_gss_client_list *list; sx_assert(&svc_rpc_gss_lock, SX_XLOCKED); - list = &KGSS_VNET(svc_rpc_gss_client_hash) + list = &VNET(svc_rpc_gss_client_hash) [client->cl_id.ci_id % svc_rpc_gss_client_hash_size]; TAILQ_REMOVE(list, client, cl_link); - TAILQ_REMOVE(&KGSS_VNET(svc_rpc_gss_clients), client, cl_alllink); + TAILQ_REMOVE(&VNET(svc_rpc_gss_clients), client, cl_alllink); svc_rpc_gss_client_count--; } @@ -732,7 +732,7 @@ svc_rpc_gss_forget_client(struct svc_rpc_gss_client *client) struct svc_rpc_gss_client_list *list; struct svc_rpc_gss_client *tclient; - list = &KGSS_VNET(svc_rpc_gss_client_hash) + list = &VNET(svc_rpc_gss_client_hash) [client->cl_id.ci_id % svc_rpc_gss_client_hash_size]; sx_xlock(&svc_rpc_gss_lock); TAILQ_FOREACH(tclient, list, cl_link) { @@ -764,18 +764,18 @@ svc_rpc_gss_timeout_clients(void) * svc_rpc_gss_clients in LRU order. */ sx_xlock(&svc_rpc_gss_lock); - client = TAILQ_LAST(&KGSS_VNET(svc_rpc_gss_clients), + client = TAILQ_LAST(&VNET(svc_rpc_gss_clients), svc_rpc_gss_client_list); while (svc_rpc_gss_client_count > svc_rpc_gss_client_max && client != NULL) { svc_rpc_gss_forget_client_locked(client); sx_xunlock(&svc_rpc_gss_lock); svc_rpc_gss_release_client(client); sx_xlock(&svc_rpc_gss_lock); - client = TAILQ_LAST(&KGSS_VNET(svc_rpc_gss_clients), + client = TAILQ_LAST(&VNET(svc_rpc_gss_clients), svc_rpc_gss_client_list); } again: - TAILQ_FOREACH(client, &KGSS_VNET(svc_rpc_gss_clients), cl_alllink) { + TAILQ_FOREACH(client, &VNET(svc_rpc_gss_clients), cl_alllink) { if (client->cl_state == CLIENT_STALE || now > client->cl_expiration) { svc_rpc_gss_forget_client_locked(client); @@ -964,7 +964,7 @@ svc_rpc_gss_accept_sec_context(struct svc_rpc_gss_client *client, */ sx_xlock(&svc_rpc_gss_lock); if (!client->cl_sname) { - SLIST_FOREACH(sname, &KGSS_VNET(svc_rpc_gss_svc_names), + SLIST_FOREACH(sname, &VNET(svc_rpc_gss_svc_names), sn_link) { if (sname->sn_program == rqst->rq_prog && sname->sn_version == rqst->rq_vers) { @@ -1271,7 +1271,7 @@ svc_rpc_gss_callback(struct svc_rpc_gss_client *client, struct svc_req *rqst) * See if we have a callback for this guy. */ result = TRUE; - SLIST_FOREACH(scb, &KGSS_VNET(svc_rpc_gss_callbacks), cb_link) { + SLIST_FOREACH(scb, &VNET(svc_rpc_gss_callbacks), cb_link) { if (scb->cb_callback.program == rqst->rq_prog && scb->cb_callback.version == rqst->rq_vers) { /* @@ -1407,7 +1407,7 @@ svc_rpc_gss(struct svc_req *rqst, struct rpc_msg *msg) int call_stat; enum auth_stat result; - KGSS_CURVNET_SET_QUIET(KGSS_TD_TO_VNET(curthread)); + CURVNET_SET_QUIET(TD_TO_VNET(curthread)); rpc_gss_log_debug("in svc_rpc_gss()"); /* Garbage collect old clients. */ @@ -1418,7 +1418,7 @@ svc_rpc_gss(struct svc_req *rqst, struct rpc_msg *msg) /* Deserialize client credentials. */ if (rqst->rq_cred.oa_length <= 0) { - KGSS_CURVNET_RESTORE(); + CURVNET_RESTORE(); return (AUTH_BADCRED); } @@ -1429,7 +1429,7 @@ svc_rpc_gss(struct svc_req *rqst, struct rpc_msg *msg) if (!xdr_rpc_gss_cred(&xdrs, &gc)) { XDR_DESTROY(&xdrs); - KGSS_CURVNET_RESTORE(); + CURVNET_RESTORE(); return (AUTH_BADCRED); } XDR_DESTROY(&xdrs); @@ -1665,7 +1665,7 @@ out: svc_rpc_gss_release_client(client); xdr_free((xdrproc_t) xdr_rpc_gss_cred, (char *) &gc); - KGSS_CURVNET_RESTORE(); + CURVNET_RESTORE(); return (result); } From nobody Mon Apr 27 16:12:06 2026 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4g47qp2jd1z6bHCS for ; Mon, 27 Apr 2026 16:12:06 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R13" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4g47qp19Y4z3fWj for ; Mon, 27 Apr 2026 16:12:06 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1777306326; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=zxkdKuNNNu4I99EKn6ZHlBujN39Y62Fn8IU6u2rnYUg=; b=H5tz6vB/k1xH0UOTKPxkAjSW+z0P9XT0vldZk6qlJmyJZdb8183ctR43rOUttzpgPshATJ ux9Ij2B5Clu3MYpQYVE9X3jZ+oLE4/81FCZt0rw4dgca6E2aVUTsFEbqtRaVwviOO90KTY hvYas8gI5c1F4AptGRl3gkmhGxfzBivO/O6hjwanWWzKQ24n5JRKLin8jiv6uxfoUFnfWQ 6U/9fKq/59kKHsjrEJC2krjWfADBgTCYtrEN1pjXXPkfc5D35NSIzW2r28QCJnGd/s8ktb StdDCsthMUu/Iyn+IGnquZBd9enqWQWX42HBTdCC/UaT1kBhYuwYKXVKMe8BCA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1777306326; a=rsa-sha256; cv=none; b=udrbSBuprsbsrP+RLdw1dyfgFV9oqq7GGxJ2halCZ4I2PDw7ruWXJi4P+w7B9A8XHVzoeA fTWzshBmnR596az5maBo+Sch1Wo/ntzf0lTug0nvAGLqNf5LfHt4cmwjjFMOMVmcM9dHmv I8UeP7EwUjS913dl7O88ycljz8nS2eLuyX7zTgTTL57THnHiPhxjTJASwmqliY9yi9eUs4 74MkuubTaSIT4buU/FwuzrnDWyj6PMXWlWUY0hCYk9uF9YruMmive4GJ/gC0IAarXJeFpD wKMO/nOuCIEERgWlko4dW2skAq+J+eBtf4v5nWdXE1T/4Vrg6pYbovt8goKVTA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1777306326; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=zxkdKuNNNu4I99EKn6ZHlBujN39Y62Fn8IU6u2rnYUg=; b=ndHYYLOGECGkGnbwnjyof/66BFJLE9QZAzEeEh5fc/2jZmpJ2P23yRMitNyo1v4/Cym0yU jMEUO3dB2N53hvLudUL5lUnj9ZlWiGSA8mYKctkoW9f/u2CPJ10YbJlsHD9YfpyWacne9M dAf5kDqyAEQo4RYwhUQb/ZCdGN8HYqAltMRhK2in+og5nYI/5ni+1WbROwICLceAns8OuX 4Xp5/fDEXamqBZCYF5EvJMTsSfWzHSAX5Z/HLlPYl/BvtWT+E6vWGynnPDERVzpoN6TK4u tvAmiGBZjaqXFVKaOt/GSH/d1oHSzZxRy3aW3uCC4WkXRnsKUJOMajohUywAUQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4g47qp0KPpzJD for ; Mon, 27 Apr 2026 16:12:06 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 44db4 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Mon, 27 Apr 2026 16:12:06 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Gleb Smirnoff Subject: git: f8c8cc64ff0d - stable/15 - kgss: remove unnecessary CURVNET_SET() and kgss_gssd_handle checks List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: glebius X-Git-Repository: src X-Git-Refname: refs/heads/stable/15 X-Git-Reftype: branch X-Git-Commit: f8c8cc64ff0dbd9f1ada030e2742391d854a11aa Auto-Submitted: auto-generated Date: Mon, 27 Apr 2026 16:12:06 +0000 Message-Id: <69ef8ad6.44db4.6131170f@gitrepo.freebsd.org> The branch stable/15 has been updated by glebius: URL: https://cgit.FreeBSD.org/src/commit/?id=f8c8cc64ff0dbd9f1ada030e2742391d854a11aa commit f8c8cc64ff0dbd9f1ada030e2742391d854a11aa Author: Gleb Smirnoff AuthorDate: 2026-04-25 02:55:50 +0000 Commit: Gleb Smirnoff CommitDate: 2026-04-27 16:11:51 +0000 kgss: remove unnecessary CURVNET_SET() and kgss_gssd_handle checks These RPC methods correctly acquire the kgss_gssd_handle later with call to kgss_gssd_client(). Reviewed by: rmacklem Differential Revision: https://reviews.freebsd.org/D56561 (cherry picked from commit 2bd2f267f344c51c66fc18d963df8cec78db34c1) --- sys/kgssapi/gss_delete_sec_context.c | 8 -------- sys/kgssapi/gss_release_cred.c | 8 -------- sys/kgssapi/gss_release_name.c | 8 -------- 3 files changed, 24 deletions(-) diff --git a/sys/kgssapi/gss_delete_sec_context.c b/sys/kgssapi/gss_delete_sec_context.c index c435e6193b0f..b5a985215b6b 100644 --- a/sys/kgssapi/gss_delete_sec_context.c +++ b/sys/kgssapi/gss_delete_sec_context.c @@ -28,7 +28,6 @@ */ #include -#include #include #include #include @@ -52,13 +51,6 @@ gss_delete_sec_context(OM_uint32 *minor_status, gss_ctx_id_t *context_handle, *minor_status = 0; - CURVNET_SET_QUIET(TD_TO_VNET(curthread)); - if (!VNET(kgss_gssd_handle)) { - CURVNET_RESTORE(); - return (GSS_S_FAILURE); - } - CURVNET_RESTORE(); - if (*context_handle) { ctx = *context_handle; diff --git a/sys/kgssapi/gss_release_cred.c b/sys/kgssapi/gss_release_cred.c index 191eca0904c6..f46c3ec5ac06 100644 --- a/sys/kgssapi/gss_release_cred.c +++ b/sys/kgssapi/gss_release_cred.c @@ -28,7 +28,6 @@ */ #include -#include #include #include #include @@ -50,13 +49,6 @@ gss_release_cred(OM_uint32 *minor_status, gss_cred_id_t *cred_handle) *minor_status = 0; - CURVNET_SET_QUIET(TD_TO_VNET(curthread)); - if (!VNET(kgss_gssd_handle)) { - CURVNET_RESTORE(); - return (GSS_S_FAILURE); - } - CURVNET_RESTORE(); - if (*cred_handle) { args.cred = (*cred_handle)->handle; diff --git a/sys/kgssapi/gss_release_name.c b/sys/kgssapi/gss_release_name.c index d5d86fb107ff..76c77868ed9e 100644 --- a/sys/kgssapi/gss_release_name.c +++ b/sys/kgssapi/gss_release_name.c @@ -28,7 +28,6 @@ */ #include -#include #include #include #include @@ -51,13 +50,6 @@ gss_release_name(OM_uint32 *minor_status, gss_name_t *input_name) *minor_status = 0; - CURVNET_SET_QUIET(TD_TO_VNET(curthread)); - if (!VNET(kgss_gssd_handle)) { - CURVNET_RESTORE(); - return (GSS_S_FAILURE); - } - CURVNET_RESTORE(); - if (*input_name) { name = *input_name; args.input_name = name->handle; From nobody Mon Apr 27 16:12:07 2026 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4g47qq4ChBz6bHZt for ; Mon, 27 Apr 2026 16:12:07 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R13" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4g47qq1X2zz3fMJ for ; Mon, 27 Apr 2026 16:12:07 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1777306327; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=GZEpjTHnePqUhK4efwcgjg2QX3r+JSraNIPlvgfBKw8=; b=SmUxuUl/EmtieQq7Ztyqbx+rBwA01tpA4y+iPc+AHOK/q2feKhIpjCb9le49RvFOpcafih jvd9RCFYfnx3fLW7+9nT6Z+clhYXXsaGvPok2GsiYWC0FoUm3pyWM196c70+gsw0nupW2A 7bK2aRVsYxNoPUjcVJ+6ofxll1SVL2+z+bbJgkxx+swtIz56rVP3tEG9JgtR9eCTl5wicW OiXJ/6uJVBxOTAcYmKWSPEDDNrg0mU/GFlvTLCy0wPyU57l1n6Sd/TEMa0U9aW3NEGb9Fh SQNnrfNDOielznJ6pNYNvMc/MhanEp3uQGhjkO1C1GBZVRyXaRONpGa7V6zd6w== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1777306327; a=rsa-sha256; cv=none; b=Vu4lXUxT2WMT2BNhI3Vj3zfXJIKIkRKgWhGJUaUwiRPCo9ulChzwoB0OmbDlF/VXywsRR9 3yASN5PFW7UUXnO6hF6xPSP/waAj/6qfsNrZMFRcaV9ywbsuGL+WS4iUq/AMIp0e4RewVC snK37KKMni1993xbT9hPsxAQ8wsT/mKAtvO46oxh0hUvaIDyygZLcuEP18PKBNQntMsYo7 vDakGvB9q/Qj6HG6sdEqWQUxcilc07L2m6CF4FM84CxDr1UqjQSuOxfn/J9dvmZUtQkXGl K7P1dgu4TXUUj/gZ3DqMSFpQE3V0idWAeJf+y10OKUbQYzz9s8RM1vQ7SzvZAg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1777306327; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=GZEpjTHnePqUhK4efwcgjg2QX3r+JSraNIPlvgfBKw8=; b=V/5olYlJeEyZLCvsGWgk4iHm/wYttrpPUpB3QjXdXEPidYCAlUrdd3Rsk8JsIjQlM4sq0T LdTOywh+cae41nAPCmAGaXzplkpiRkUGwGLLVsGyMyjOxLWzkJ1dKfVYvw33Xbp/5serO5 ImztNzkoq6hKijIE3RTqOCeiVOtpUP7r+qsnkjR5K+N5pTg14ykSynmQ9SYMP+vWmSiytE 8R2MPQbgiMQ4BIZMDjrPeTG4VyoZN8b5ev2Rc77PRkqBCCB1aBZIVDaCJA+/0cOesoyw2t gYJ9kSDClDrJwRrHA8jHt+VvBaNTwrpLDclb7q/2s0WxU0kcW+O2Rip+uOZ20w== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4g47qq11MgzNL for ; Mon, 27 Apr 2026 16:12:07 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 4459e by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Mon, 27 Apr 2026 16:12:07 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Gleb Smirnoff Subject: git: b5f4d40951c3 - stable/15 - kgss: de-virtualize kgss_gssd_handle List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: glebius X-Git-Repository: src X-Git-Refname: refs/heads/stable/15 X-Git-Reftype: branch X-Git-Commit: b5f4d40951c302cf803d3b7c18a17f9bc0f1c3f0 Auto-Submitted: auto-generated Date: Mon, 27 Apr 2026 16:12:07 +0000 Message-Id: <69ef8ad7.4459e.7a6c90cc@gitrepo.freebsd.org> The branch stable/15 has been updated by glebius: URL: https://cgit.FreeBSD.org/src/commit/?id=b5f4d40951c302cf803d3b7c18a17f9bc0f1c3f0 commit b5f4d40951c302cf803d3b7c18a17f9bc0f1c3f0 Author: Gleb Smirnoff AuthorDate: 2026-04-25 02:55:55 +0000 Commit: Gleb Smirnoff CommitDate: 2026-04-27 16:11:51 +0000 kgss: de-virtualize kgss_gssd_handle The RPC client is more of a class rather than an instance. RPCs from different VNETs are served by the same client. This makes the kgss layer fully transparent to VIMAGE and not even required to be aware of it. It is responsibility of the rpcsec_gss module to have curvnet set on the calling thread when doing RPC calls via kgssapi. This change should enable proper operation of an NFS server with gssd(8) in a VIMAGE jail. PR: 294501 Reviewed by: rmacklem Differential Revision: https://reviews.freebsd.org/D56562 (cherry picked from commit 4602d45eb3b1d33e0ea0d97c4d18033af95d7fca) --- sys/kgssapi/gss_impl.c | 24 +++++------------------- 1 file changed, 5 insertions(+), 19 deletions(-) diff --git a/sys/kgssapi/gss_impl.c b/sys/kgssapi/gss_impl.c index e7e0e5d00118..97b85a034071 100644 --- a/sys/kgssapi/gss_impl.c +++ b/sys/kgssapi/gss_impl.c @@ -28,7 +28,6 @@ */ #include -#include #include #include #include @@ -52,7 +51,7 @@ MALLOC_DEFINE(M_GSSAPI, "GSS-API", "GSS-API"); struct kgss_mech_list kgss_mechs; struct mtx kgss_gssd_lock; -VNET_DEFINE(CLIENT *, kgss_gssd_handle) = NULL; +CLIENT *kgss_gssd_handle; static int kgss_load(void) @@ -79,11 +78,9 @@ kgss_load(void) */ clnt_control(cl, CLSET_WAITCHAN, "gssd"); - CURVNET_SET_QUIET(TD_TO_VNET(curthread)); mtx_lock(&kgss_gssd_lock); - VNET(kgss_gssd_handle) = cl; + kgss_gssd_handle = cl; mtx_unlock(&kgss_gssd_lock); - CURVNET_RESTORE(); return (0); } @@ -93,9 +90,7 @@ static void kgss_unload(void) { - CURVNET_SET_QUIET(TD_TO_VNET(curthread)); - clnt_destroy(VNET(kgss_gssd_handle)); - CURVNET_RESTORE(); + clnt_destroy(kgss_gssd_handle); } #endif @@ -207,16 +202,9 @@ kgss_transfer_context(gss_ctx_id_t ctx, void *lctx) return (maj_stat); } - CURVNET_SET_QUIET(TD_TO_VNET(curthread)); - if (!VNET(kgss_gssd_handle)) { - CURVNET_RESTORE(); - return (GSS_S_FAILURE); - } - args.ctx = ctx->handle; bzero(&res, sizeof(res)); - stat = gssd_export_sec_context_1(&args, &res, VNET(kgss_gssd_handle)); - CURVNET_RESTORE(); + stat = gssd_export_sec_context_1(&args, &res, kgss_gssd_handle); if (stat != RPC_SUCCESS) { return (GSS_S_FAILURE); } @@ -250,13 +238,11 @@ kgss_gssd_client(void) { CLIENT *cl; - CURVNET_SET_QUIET(TD_TO_VNET(curthread)); mtx_lock(&kgss_gssd_lock); - cl = VNET(kgss_gssd_handle); + cl = kgss_gssd_handle; if (cl != NULL) CLNT_ACQUIRE(cl); mtx_unlock(&kgss_gssd_lock); - CURVNET_RESTORE(); return (cl); } From nobody Mon Apr 27 16:27:53 2026 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4g48B22JRxz6bJMl for ; Mon, 27 Apr 2026 16:27:54 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R13" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4g48B16MBNz3kpv for ; Mon, 27 Apr 2026 16:27:53 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1777307273; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=XumhasR2FfC4koBUNZyM8W2gMNEFPq7QCC6O/Uok0o8=; b=MSQAFAwUGdRE/TuNpYUxarLAX5l5aKUjPnSxuOeHY9ujm3SvMozvdGkYJn9Btp9MdQhEtO SWosyLhchiNt54H8UnkijbXHhrCOHb1M8fAcu2fAdKs0V99waJ8CHOTsLwQZdavLKdyBC3 b7xmHK0zBK/pDQA7l07wZnu5yiisAz4mQNnoclZcH6wd+5fK74ltRqu7GR5xmys7Y5Ktnn vhh7u4f3c2la5ErXuQcfi6DKt56cp08pVwvf9fwqfMlNXg0Bus28Ns0SSttOtHIokpLa5Z BdU4iKdUFAF2zppg6LDgwfreoFwzMQb5BCfmTD6o4lGq1ybTBH1vJnlZxf+vSg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1777307273; a=rsa-sha256; cv=none; b=cETI/oSKmAVGgNj7OVpaDR/c3t2dZCWhOqWxwfEgfzfzQ1VeNOgoCzjCIOL8LFNMD8mvEG 4gbNkc8hqwcHr1nNswG3GCo1xRqOUDLX5gKlcUSlG0V9IvAf3GI1bRAKk6ajAVUtbC7wKO 6QP++JRuvUTzcjN0QKrWr39qCAltl2xDmlo+uyDuTkfkNRzWzGDI/2EocwCM3YY6sIFPZp jKXyZWIE7IlExKiGasoPuPxst8xiuvYLy7z2pOmSkbuV+S5n4DadG7XHW0oodtizMB/T2T AiPr9uRuMP1sz5CRZip3YhSgpRtaim9cvHnCZCabEdAK4wywJ2/N+LijYpMVUA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1777307273; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=XumhasR2FfC4koBUNZyM8W2gMNEFPq7QCC6O/Uok0o8=; b=eCY+NcuZ4hQ24cn8L0g/Dkz01mX1ArQmxLRmpyT5dwhdFikWN9YmV3R/4kSsQ35Y5naTdI d17xTH29aDbpNw6SRWl115p8fJp/k/dNxbJBM7wmpI6BnPZLzWcwxBn+0guALXy3ArNV9S YLiQzZ/ywY3twGDsu0IiWbmvnTIl2cx0t+f/6n85CtnV3NgxI42Mpb7x6HojunEsmKfURH zwucdWcJJgQnS/vYDc/wc1K9FHFH+Pdzt4TE2d9FMtt3LgBay5K1J9BwGI8IN905PunVA8 f38UJX87oWe5JoKNPKLs11G+Xc18HnBpBDRPoyFMBJzbqdSXmMAAbANDdpbkLg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4g48B14t7jz9x for ; Mon, 27 Apr 2026 16:27:53 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 44cba by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Mon, 27 Apr 2026 16:27:53 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org Cc: Alice Cariboni From: Mateusz Piotrowski <0mp@FreeBSD.org> Subject: git: 464818ebc9e1 - stable/15 - tuning.7: Fix suds typo in manual pages List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: 0mp X-Git-Repository: src X-Git-Refname: refs/heads/stable/15 X-Git-Reftype: branch X-Git-Commit: 464818ebc9e14ce22271f1cd24d6bee0cb00ffde Auto-Submitted: auto-generated Date: Mon, 27 Apr 2026 16:27:53 +0000 Message-Id: <69ef8e89.44cba.3940ade1@gitrepo.freebsd.org> The branch stable/15 has been updated by 0mp: URL: https://cgit.FreeBSD.org/src/commit/?id=464818ebc9e14ce22271f1cd24d6bee0cb00ffde commit 464818ebc9e14ce22271f1cd24d6bee0cb00ffde Author: Alice Cariboni AuthorDate: 2026-04-09 15:35:47 +0000 Commit: Mateusz Piotrowski <0mp@FreeBSD.org> CommitDate: 2026-04-27 16:27:29 +0000 tuning.7: Fix suds typo in manual pages MFC after: 3 days Fixes: fc32c802158f Add two new manual pages Differential Revision: https://reviews.freebsd.org/D55814 (cherry picked from commit f9160912415eef078c32317e02695bc0cc775d39) --- share/man/man7/tuning.7 | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/share/man/man7/tuning.7 b/share/man/man7/tuning.7 index 586b63c247a8..831362e9e179 100644 --- a/share/man/man7/tuning.7 +++ b/share/man/man7/tuning.7 @@ -22,7 +22,7 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.Dd October 28, 2025 +.Dd April 9, 2026 .Dt TUNING 7 .Os .Sh NAME @@ -687,7 +687,7 @@ There are many solutions to saturated disks: increasing memory for caching, mirroring disks, distributing operations across several machines, and so forth. .Pp -Finally, you might run out of network suds. +Finally, you might run out of network resources. Optimize the network path as much as possible. For example, in From nobody Mon Apr 27 16:28:21 2026 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4g48BY3g4qz6bHs0 for ; Mon, 27 Apr 2026 16:28:21 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R13" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4g48BY2nHsz3l4K for ; Mon, 27 Apr 2026 16:28:21 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1777307301; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=0IU+9hzwpx89hdrLOH9DAVPuv4Y2TUJtP52tH++MTXE=; b=WMzFC5YQ8lZcWuhe3iS8eB16vd+t+oGMfMs3xnUF5rjzOAHQFcVjmXdwhs+YNhRs1MFePA /1z9LFnKYyRr6lJ9ZSxiYDp02kkI4NvJ48aO1upM5VBMi7Wcur1HQd7LHGCh4WToEFaIws Qbw8HyOtPOU7BZid3N67qSPYf9wgXKXVaHXLpIATPNHs0Hftn1H+4TBScGBFljz8d/kUJn t53wOUYpRbUneqUX1p2Kl8wLuay6MGiKpDQCY6cODO0C7myMrUBoiE+hwMbStuZ0XAVtfL SX8wxx484hQaZCdEwLkVwPYO9SqdCrBXKvfWuP0dBc8x9eN5H60COVWWqAwrSw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1777307301; a=rsa-sha256; cv=none; b=pnOEDXIL5yDds5Io9n1azNBXtOCLmz+6YuaiL5SYJ9iWhvFHkj3gu/5Nxy0h9wLmqbxahY 1l01Gbu0q8gvOt3CKc2AM0SjhbNZL29A02RhjWlXGp0ui42m4P9Rj2FsO1FGhTKyxrJRyJ 7TBBcVvK2ueMrkojATz4nNTCpXLOlzAFVvoI3hxGD2oCQxJpLDZ9pJTl1Ymu8HcYBUQ/Ft vSN5m/HWdM9KC2UjAp3ut+/S8oARfbXS4PdgGCIBr2lYfFS/7fFWBVktRADuR//DX3w1Pv WvVqmJglkpsgw9REgAHYi03pIh8AKUjdAiMIRjx4Rh8LNS8nXNAsE7vKwDHi7g== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1777307301; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=0IU+9hzwpx89hdrLOH9DAVPuv4Y2TUJtP52tH++MTXE=; b=Ld2HPEwKE5IGLP3K7i4WkVMRjkFzz5eBSBvsC5DXWaGJxhFMVi9go5N2aY53BSfHxIDUBu iEny5hiMVNvqY8y2ZILk9f1hXkW3XEsVmjpCYttk5XLcJGBVpAemEIVKqCjHZxAndH9HKr TNvM9VKEizykx3fU5LG98e09lG8+R6ijt9tdLVKHXFsnJMHLBX8ThF+SxJGvDNhsWC4dzv 1TcbgtXdRmJyXzrQr90pm6oIL0Ff/l/51mVfy7vJufdq6wv9bpdrrYwgsczQj8CznncvZR O3zNejT0yKuvs0YzmAI5ZJ2gxD1t0Vt0qrFidkrC3jtZhbzMc5fwSpbzx8a1XQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4g48BY2Nkqz1CpF for ; Mon, 27 Apr 2026 16:28:21 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 44e43 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Mon, 27 Apr 2026 16:28:21 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org Cc: Alice Cariboni From: Mateusz Piotrowski <0mp@FreeBSD.org> Subject: git: e1d544c49956 - stable/14 - tuning.7: Fix suds typo in manual pages List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: 0mp X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: e1d544c49956cd710d6fbe8929974c66c658fa34 Auto-Submitted: auto-generated Date: Mon, 27 Apr 2026 16:28:21 +0000 Message-Id: <69ef8ea5.44e43.67935da3@gitrepo.freebsd.org> The branch stable/14 has been updated by 0mp: URL: https://cgit.FreeBSD.org/src/commit/?id=e1d544c49956cd710d6fbe8929974c66c658fa34 commit e1d544c49956cd710d6fbe8929974c66c658fa34 Author: Alice Cariboni AuthorDate: 2026-04-09 15:35:47 +0000 Commit: Mateusz Piotrowski <0mp@FreeBSD.org> CommitDate: 2026-04-27 16:28:09 +0000 tuning.7: Fix suds typo in manual pages MFC after: 3 days Fixes: fc32c802158f Add two new manual pages Differential Revision: https://reviews.freebsd.org/D55814 (cherry picked from commit f9160912415eef078c32317e02695bc0cc775d39) --- share/man/man7/tuning.7 | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/share/man/man7/tuning.7 b/share/man/man7/tuning.7 index 8da4b55b9d4f..609a16b140ad 100644 --- a/share/man/man7/tuning.7 +++ b/share/man/man7/tuning.7 @@ -22,7 +22,7 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.Dd October 28, 2025 +.Dd April 9, 2026 .Dt TUNING 7 .Os .Sh NAME @@ -670,7 +670,7 @@ There are many solutions to saturated disks: increasing memory for caching, mirroring disks, distributing operations across several machines, and so forth. .Pp -Finally, you might run out of network suds. +Finally, you might run out of network resources. Optimize the network path as much as possible. For example, in From nobody Mon Apr 27 16:28:39 2026 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4g48Bv31MCz6bJKp for ; Mon, 27 Apr 2026 16:28:39 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R13" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4g48Bv2BcWz3lBF for ; Mon, 27 Apr 2026 16:28:39 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1777307319; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=t7v3Qy4eWcRhwxRWbSlg9ZQWO5P7KiwZzkw9/VHEFEw=; b=G4bw3irlOTXHT0IczFZnZm6foRM+ThXfanPTxp245K5+Y/RF5rJinu2fWtG9N93FMsXzAB etGKsgeX2Teg9Ms7JKRHkEZR9LqfdbNDpOySHzW2/Yddt9kZ98Yw3ODNowir3BsifrQQLF QEcs4a5FpDCnyCgIvy+QMecue3kGTAlLVX59/iwmNTYkZ9mVyR0ewheokW7SacJp3jOgls toG4b0n/rYBW/xGRnKtDMeIjkiViTUGkrANwUaR0GD5k3YKu8OrheAGxFxM2Qx30nGg0Wg 8tTbivE+zBd6u4tP9RXIblYfdHxJRJBBSPOC+oB1N9vK+8/kx+WsJTwopE41YA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1777307319; a=rsa-sha256; cv=none; b=ObTjfusgf1Gebspo/0XRlU9YfW23wvE3B1muXOZm0PuB1iv0etFLT5wpQrTKUWIAiKok+8 frYPc/+c9JDubpxYxDFtis967pnFxg+BRkipHXZ/gCWivnaSklMXLijBgKIdZHPq3xl06T mZ3pQbOKeuUgIJlBqzPPyB4Tojk9ltIu4HCZTehisJsw2CN69in71ySnv22DTDvhb/8FBn urLs4dAwqZMr2UkLYcbtxPV7ezWq8ZGHvHEtexB6fMivtpsbrcaA2nZtaY85g3Il3U82W0 MLp5C1qocczTgyQUn41APenxBctUYM9Ynopt/rj6Acxf7I2oYKcIJo+AjiycXg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1777307319; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=t7v3Qy4eWcRhwxRWbSlg9ZQWO5P7KiwZzkw9/VHEFEw=; b=VRZ7zDIF3AReUNVt6VD37kLO1T6teqStSNaQ0PAfAjZh3SsNkDGjMyW20QpQc/aNSjTETg paVG74z7GvB+JoBEsIgIOmJ+0AFzs2HQ1fy6m1jgIpVachaBVEmr7vQG22rJireXPPMiFu 2QrGrbblwxBiJ4HZHWcC/iKl+ElBzHvVL/7PoZOlXnAJDxSzKRL0PcJnjfnfrR49m/93Bx 2kgXm9X8N++KgouVyXvzX75SyVoDK1j5O30FKsdIx+zlrszPMrozDAWArZ8Ipb4eMmpkmf 15QU1MMZTZ1g1r0jRmyeh4wJWhsRszKuvCYd6MpMMpJmzTB9npQewqSZufMYyw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4g48Bv1p4Hzcj for ; Mon, 27 Apr 2026 16:28:39 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 445cf by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Mon, 27 Apr 2026 16:28:39 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org Cc: Alice Cariboni From: Mateusz Piotrowski <0mp@FreeBSD.org> Subject: git: 4a56a9aae6e3 - stable/13 - tuning.7: Fix suds typo in manual pages List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: 0mp X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 4a56a9aae6e3c71f7ecbfb31304609db34e1d8ce Auto-Submitted: auto-generated Date: Mon, 27 Apr 2026 16:28:39 +0000 Message-Id: <69ef8eb7.445cf.1039d540@gitrepo.freebsd.org> The branch stable/13 has been updated by 0mp: URL: https://cgit.FreeBSD.org/src/commit/?id=4a56a9aae6e3c71f7ecbfb31304609db34e1d8ce commit 4a56a9aae6e3c71f7ecbfb31304609db34e1d8ce Author: Alice Cariboni AuthorDate: 2026-04-09 15:35:47 +0000 Commit: Mateusz Piotrowski <0mp@FreeBSD.org> CommitDate: 2026-04-27 16:28:31 +0000 tuning.7: Fix suds typo in manual pages MFC after: 3 days Fixes: fc32c802158f Add two new manual pages Differential Revision: https://reviews.freebsd.org/D55814 (cherry picked from commit f9160912415eef078c32317e02695bc0cc775d39) --- share/man/man7/tuning.7 | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/share/man/man7/tuning.7 b/share/man/man7/tuning.7 index 8da4b55b9d4f..609a16b140ad 100644 --- a/share/man/man7/tuning.7 +++ b/share/man/man7/tuning.7 @@ -22,7 +22,7 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.Dd October 28, 2025 +.Dd April 9, 2026 .Dt TUNING 7 .Os .Sh NAME @@ -670,7 +670,7 @@ There are many solutions to saturated disks: increasing memory for caching, mirroring disks, distributing operations across several machines, and so forth. .Pp -Finally, you might run out of network suds. +Finally, you might run out of network resources. Optimize the network path as much as possible. For example, in From nobody Mon Apr 27 16:50:27 2026 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4g48h35Nq1z6bKPv for ; Mon, 27 Apr 2026 16:50:27 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R13" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4g48h34s11z3myR for ; Mon, 27 Apr 2026 16:50:27 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1777308627; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Qxs9a2ccDvIBsokhpO4BluaBBoUMxVgqpkF+L8ETd8I=; b=ZQDOD1dWd33Lagsi8FSWP9rrk7lxCvPorc9TxBHLF0+vWOeqHF8xZPCJ871/GrRDqgPdvj 1k373S3AqeTTEaG+pEzFCpUBpyeIvr+XPFGLLdX+pdQopt+b6lhzq99fjhg/WtvvV5fK2G iOeUYl3ZbeVPDB/pkTPLNsg6K69F/5/9KYk7/9F/YTsibR+SLtt9Xmar4EXuLfqA1LOnCf hlW1Iq5cF6n1SmJ1by/0cJ2v87sQcHzkKWCiI9d3Ud29sCzoGMs1emBu0MnU4OYhkNMYDT SVJwCFRPzqCNql3tC37GmRgKr1pt7TqMY/B13awm9xWlzPn2BjLbOkvGyXSYcw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1777308627; a=rsa-sha256; cv=none; b=l0iBGNPN+kGyIB7lV1+Rh16UbfUZ3zZiJAgQJ+kUgfa9JwGU4sycgRv88z3z8AxtErc1UQ abpCdl3yl6fc3dtoVesHOVHUOxGbn8ne/9afPbtbD2FAKgwfSwrPv0h2e6AroSN30g84pi 3Rgv5tF6mGSv/a2gMRyP1tLdOQUzgDYq4q47YgMcl1I0J9K81dGkLJIy0PG1LWCe6b89Iz Rxl+HFAydT5xwP9/HHiub53gBmnrNPu7r3QGAyBtPRf4vdGksODovDnOyaXZUQ48I5iKKX 4Yvz2Fp+QvHJxuvxaE1afzqZVuXiCanzvaZtXiIGcA29sdAoVgM22EorDCzVMQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1777308627; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Qxs9a2ccDvIBsokhpO4BluaBBoUMxVgqpkF+L8ETd8I=; b=uaphYn14+5gOaEnaqo2Y2vIpe5RAFRizS4+IiP3ScLTop1HnE6yCf/IQcxKw+/BygCZZmu kdorjjrJFP2AD9OqelAIkrbPcvtbHF0RpvCpbHcw9YlvD/eeMi+C1XAtZGkUy3iyT8gbw3 sWDDPfxPE57K04YKVL0EuciIz3WDY7/G4hEN1TxnToNgFDbZOsCIaO4od0NahADg0mNcQC sHFtcNlOhzZEpGE+O6Iv6aG7yzNoPY0QlMG77WKrxNztRwloNV8J6h0WpMmi9aWrP9K6Cd SshxN7+cv2/61wwQxIm1GvspPVyY2lfvppsIbjBm5ySj3XD4rhyAb77wSGVW9Q== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4g48h3479nz16l for ; Mon, 27 Apr 2026 16:50:27 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 18953 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Mon, 27 Apr 2026 16:50:27 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Mateusz Piotrowski <0mp@FreeBSD.org> Subject: git: 050ee8641ff8 - stable/15 - mdo.1: Cross-reference with security.7 List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: 0mp X-Git-Repository: src X-Git-Refname: refs/heads/stable/15 X-Git-Reftype: branch X-Git-Commit: 050ee8641ff8e44b3f4e64f61244aab743aa853f Auto-Submitted: auto-generated Date: Mon, 27 Apr 2026 16:50:27 +0000 Message-Id: <69ef93d3.18953.fe6786a@gitrepo.freebsd.org> The branch stable/15 has been updated by 0mp: URL: https://cgit.FreeBSD.org/src/commit/?id=050ee8641ff8e44b3f4e64f61244aab743aa853f commit 050ee8641ff8e44b3f4e64f61244aab743aa853f Author: Mateusz Piotrowski <0mp@FreeBSD.org> AuthorDate: 2026-03-22 07:31:44 +0000 Commit: Mateusz Piotrowski <0mp@FreeBSD.org> CommitDate: 2026-04-27 16:50:18 +0000 mdo.1: Cross-reference with security.7 MFC after: 3 days Reviewed by: olce Differential Revision: https://reviews.freebsd.org/D56024 (cherry picked from commit e23f0deceac4fb77c14066d4a76074548ee75fc4) --- share/man/man7/security.7 | 3 ++- usr.bin/mdo/mdo.1 | 5 +++-- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/share/man/man7/security.7 b/share/man/man7/security.7 index 0685da5db437..4cbe4b3090b8 100644 --- a/share/man/man7/security.7 +++ b/share/man/man7/security.7 @@ -26,7 +26,7 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.Dd June 1, 2024 +.Dd March 22, 2026 .Dt SECURITY 7 .Os .Sh NAME @@ -1099,6 +1099,7 @@ Enables mapping of simultaneously writable and executable pages for .Xr chflags 1 , .Xr find 1 , .Xr md5 1 , +.Xr mdo 1 , .Xr netstat 1 , .Xr openssl 1 , .Xr proccontrol 1 , diff --git a/usr.bin/mdo/mdo.1 b/usr.bin/mdo/mdo.1 index 1de694c69e40..c1a0295535df 100644 --- a/usr.bin/mdo/mdo.1 +++ b/usr.bin/mdo/mdo.1 @@ -9,7 +9,7 @@ .\" at Kumacom SARL under sponsorship from the FreeBSD .\" Foundation. .\" -.Dd November 26, 2025 +.Dd March 22, 2026 .Dt MDO 1 .Os .Sh NAME @@ -232,7 +232,8 @@ mdo -k --euid root --svuid root id .Sh SEE ALSO .Xr su 1 , .Xr setcred 2 , -.Xr mac_do 4 +.Xr mac_do 4 , +.Xr security 7 .Sh HISTORY The .Nm From nobody Mon Apr 27 16:50:37 2026 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4g48hF6RnYz6bKNQ for ; Mon, 27 Apr 2026 16:50:37 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R13" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4g48hF5XVmz3nk6 for ; Mon, 27 Apr 2026 16:50:37 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1777308637; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=OvNpyLOg6aT11pZkcIG1Sr0JEPF+2nBT9QC36Zsu168=; b=pqERDocFtsnPllH2r/JieR6OLP/OkLKqDb6sU0nER/oBU0Ds1ktDPAwTo/gxvmf/oacUtu EFWxpALVEh+h3x0H2ZNvw2MVhyUw+oCwzzAg8KXCeWLR66Ii/qjnUJ7rOd5YRuVv7lB9// d6ivPMnrWhQf5lkL9TC+R8kJsVJJrYpafWzpKjVTIxK99zXBco+6ElW+ZQnenyKyFzHmNh 9/oH3GzY4ftgPReGtzQBosnUxRcnyWGdk1C4qB8TlsEXcL1WI54BKkIdksQqWhFZg+/MEn fyA11GGxu8PyJbWfEoGkuZllQF57oz/bg4HsATp3jo+ptYVL6cDlDv2UCeYeoA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1777308637; a=rsa-sha256; cv=none; b=cnfgcMuTUVvhFzlHmsQjVbbIheyVsj6wwrCowXGxStYEwslly8tyZ+tZoDq3Qo670NuR+a UwV+Y8pKFE5VhWClgs3GUhSyFUjO1vMlWQzzMf6UV5OMgmcBrpxhjHs0YAKYr7slEXbB/2 hHy5mV2unjo5KCYsDfBOsZmkvbPTrUFgEXTpfgAtSBvi7x3cNQQZyLKeBYZUpab0iLbtLE z4m/E9pkNzm30khwvOJ9bs3WyDKjskrySJS576BLw5GVoqwsDkBBt0AKuSBkuy0CV6eZpq DjKmVtAgdXz8AN6H7ZXCBtF5eteMcZd/iGfw1cwgZb7MM1xbODH+AhydMLdfmA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1777308637; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=OvNpyLOg6aT11pZkcIG1Sr0JEPF+2nBT9QC36Zsu168=; b=AyvSA/KZVu8Rikxg3FI33cCcoV70Qneeqlx6mTiaVis0zizUVaXBNMuxoYxhKL/y8W02sy i5mXGFHNkPUosPeQCJ8z7FVa9EGmLToJgbpj6ueNXLfzKDsV3J0vmzuht4av2FPpu2QGck sAuBPthWOWm7Sr/pm0xC1ALBO4aF4yzizFHl10a1a4XdYGeydqHInQpeSFODpsPW8cLP7X 7ZBP32+Y1KZFrUUpdq+SBP2PQpKKiCHQZOrzL5GW7dcyP06a3TcUofU416uwGNzD20GtYL DVLd5miemKbI6nszQGEnSAopb2ct39GdO2FojSrjKMnNy1w5Muq3f2rxb3czUw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4g48hF4c38zxH for ; Mon, 27 Apr 2026 16:50:37 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 18589 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Mon, 27 Apr 2026 16:50:37 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Mateusz Piotrowski <0mp@FreeBSD.org> Subject: git: 2fb72649b5e4 - stable/14 - mdo.1: Cross-reference with security.7 List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: 0mp X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: 2fb72649b5e47f7d2bd4e32822a4b5b2c2f23130 Auto-Submitted: auto-generated Date: Mon, 27 Apr 2026 16:50:37 +0000 Message-Id: <69ef93dd.18589.cb5c708@gitrepo.freebsd.org> The branch stable/14 has been updated by 0mp: URL: https://cgit.FreeBSD.org/src/commit/?id=2fb72649b5e47f7d2bd4e32822a4b5b2c2f23130 commit 2fb72649b5e47f7d2bd4e32822a4b5b2c2f23130 Author: Mateusz Piotrowski <0mp@FreeBSD.org> AuthorDate: 2026-03-22 07:31:44 +0000 Commit: Mateusz Piotrowski <0mp@FreeBSD.org> CommitDate: 2026-04-27 16:50:32 +0000 mdo.1: Cross-reference with security.7 MFC after: 3 days Reviewed by: olce Differential Revision: https://reviews.freebsd.org/D56024 (cherry picked from commit e23f0deceac4fb77c14066d4a76074548ee75fc4) --- share/man/man7/security.7 | 3 ++- usr.bin/mdo/mdo.1 | 5 +++-- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/share/man/man7/security.7 b/share/man/man7/security.7 index 20334edef6c3..594595dae8da 100644 --- a/share/man/man7/security.7 +++ b/share/man/man7/security.7 @@ -26,7 +26,7 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.Dd June 1, 2024 +.Dd March 22, 2026 .Dt SECURITY 7 .Os .Sh NAME @@ -1100,6 +1100,7 @@ Enables mapping of simultaneously writable and executable pages for .Xr chflags 1 , .Xr find 1 , .Xr md5 1 , +.Xr mdo 1 , .Xr netstat 1 , .Xr openssl 1 , .Xr proccontrol 1 , diff --git a/usr.bin/mdo/mdo.1 b/usr.bin/mdo/mdo.1 index 1de694c69e40..c1a0295535df 100644 --- a/usr.bin/mdo/mdo.1 +++ b/usr.bin/mdo/mdo.1 @@ -9,7 +9,7 @@ .\" at Kumacom SARL under sponsorship from the FreeBSD .\" Foundation. .\" -.Dd November 26, 2025 +.Dd March 22, 2026 .Dt MDO 1 .Os .Sh NAME @@ -232,7 +232,8 @@ mdo -k --euid root --svuid root id .Sh SEE ALSO .Xr su 1 , .Xr setcred 2 , -.Xr mac_do 4 +.Xr mac_do 4 , +.Xr security 7 .Sh HISTORY The .Nm From nobody Mon Apr 27 17:18:21 2026 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4g49JM3CDKz6bMYS for ; Mon, 27 Apr 2026 17:18:27 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R13" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4g49JM0C8Jz3r40 for ; Mon, 27 Apr 2026 17:18:27 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1777310307; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=BSvwcuk0Q11q+XTju6tJOMgMj0uy8ZP/T21pVawTfJw=; b=GJs1K01RgjaLKnLLnBU/UaBgKWHfBnR1masKKZQYp8YW21FVX0qxQBDUaoabL0vKAE7Hwn cwmcTizgNeSfVivZhjK85GnXp2wmNZRaiZDkMOl9/WU0xv8qkSqtpC0tpYin0KB4v8b/o2 1wCD26zyBg7qRfM8ArPt2O3EQtMPFJULFUOqbmQ0x6jLFnoNXB+7NBlkyR+0vWh/1ObSw7 pokQdljr0MIPqrno492N9LGZyoANd4h8FcGTgz/RSs3H6zmzhwHRLVO1BvcCIjnf6HYITF rXCcuebbzwq3lQUL8RsAt4KWDeDmSMIWel4D+4N7UUkhGPw7RihpFXVZhozm8g== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1777310307; a=rsa-sha256; cv=none; b=kqJ0Zpkqf1B8RNA6/Fb3/j0elkS3SAYXWqFQMxJqvIwB8hSx+0nU0he5BgxP4Yd1KL29i0 fDwvd/pKD+iIe+xdS5ra4HQpGFPND8Bi04+7+/3S7p/f8QSbt1D+rPPsSpN74lNutPueTL fSOna3J9N2aIqtbmts0iZo8P2ZGZk7JISAm8mdxQXtAS9hEeLE3HGqTJhT+7s/n8ARH9ao uH43RnatJmBbpvvEf41jAcpy3n3OVUl4Rsxw/vRFuqKgGYuqSnV9xg0zoZhFUXHhq/jsDX TCcg9o4Rm7TavJMsHUEKztp0bf7GQ29ECAB5DaKMIyujHRRHqnLY4osjj2g/QQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1777310307; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=BSvwcuk0Q11q+XTju6tJOMgMj0uy8ZP/T21pVawTfJw=; b=YGjl7CIuUt3FUD6/EAcTKoRftKY0TMCdn496K6yCvb7WHyap691KOmNvfU82AGQCPoL9fr o6NgEcmKDAjeNFZtRDXHPQ/hjE3Irc9x978DhiFGPFm3eyG29L7Io9xcTTPHx8mpYc9+z4 JYaInJeJce5vQ0W0lubqs6mge0V+Tn/ac+5odgvuzLggnF2z/ImHJ7+DB9ie1aHgTc4Lu6 9Ir8srK5k4V1I+29sl9h+rE5Phgu4hpOqrfJiSmen8Hc5jGaLxVKvbIlfiXKP3Zg4dbkhM yZgixKVH7Ns/8Uq4Dy18pLV37htyogjyf1+VUi/oGvv5n9nSuxoUkAoyZCBLfw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4g49JL6C3cz1XN for ; Mon, 27 Apr 2026 17:18:26 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 19e4e by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Mon, 27 Apr 2026 17:18:21 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org Cc: Ali Mashtizadeh From: Ed Maste Subject: git: 43315a8a15cc - stable/15 - powerpc: remove dead code call into x86 perfmon List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: emaste X-Git-Repository: src X-Git-Refname: refs/heads/stable/15 X-Git-Reftype: branch X-Git-Commit: 43315a8a15cc5a690ac97ccb911106cf704286f9 Auto-Submitted: auto-generated Date: Mon, 27 Apr 2026 17:18:21 +0000 Message-Id: <69ef9a5d.19e4e.8cb29e@gitrepo.freebsd.org> The branch stable/15 has been updated by emaste: URL: https://cgit.FreeBSD.org/src/commit/?id=43315a8a15cc5a690ac97ccb911106cf704286f9 commit 43315a8a15cc5a690ac97ccb911106cf704286f9 Author: Ali Mashtizadeh AuthorDate: 2026-04-20 22:23:57 +0000 Commit: Ed Maste CommitDate: 2026-04-27 17:17:46 +0000 powerpc: remove dead code call into x86 perfmon FreeBSD and NetBSD has copied these lines from the x86 architecture when porting to other machines and forgetting to delete them. Reviewed by: mhorne Sponsored by: Netflix Pull Request: https://github.com/freebsd/freebsd-src/pull/2154 (cherry picked from commit 0ac31026e1e0fb4e4b8a2eaa8ce2ead6a945dc6e) --- sys/powerpc/powerpc/machdep.c | 3 --- 1 file changed, 3 deletions(-) diff --git a/sys/powerpc/powerpc/machdep.c b/sys/powerpc/powerpc/machdep.c index 04b3967ee110..a98f095cadc0 100644 --- a/sys/powerpc/powerpc/machdep.c +++ b/sys/powerpc/powerpc/machdep.c @@ -195,9 +195,6 @@ cpu_startup(void *dummy) */ cpu_setup(PCPU_GET(cpuid)); -#ifdef PERFMON - perfmon_init(); -#endif printf("real memory = %ju (%ju MB)\n", ptoa((uintmax_t)physmem), ptoa((uintmax_t)physmem) / 1048576); realmem = physmem; From nobody Mon Apr 27 19:37:48 2026 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4g4DP82dw6z6bWTJ for ; Mon, 27 Apr 2026 19:37:48 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R13" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4g4DP826jwz3FZf for ; Mon, 27 Apr 2026 19:37:48 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1777318668; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=j0fLge3QZOYso+NnMn0LMYNblrG1CtCObmwff6kHM3I=; b=PSg5g/iiyv7NSuI+JK1YK3L1X3BuPByOGutmuJJZC8OHmbmiC6KT6fsQT/YFTIaSJBbTH/ 0kwJfWXcGA6WiGqAM9hlyh8ZbDmzoPj7iqyIcyuLykmFWl+8RfGUP9meG4zwOHmYKl0bBU wLGPpJXXpzwyikD+MVK+7aIgkJX3+7+0AGMrbSfJ6tWVNGZOd5oFeiOQj+5zD1svWeuzSR W8WG4NPtLEbxQrMkt21GwNm7Emv+TyX2yUYk7e/gjlzoxHn/DZ9toG/ROofSdRJVvXmSbz c+9KsXCOwNn2/ZTxdu84cyFELpffinCFvcLDHHnOXER4/U7p9Z30EpIEzEt1RQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1777318668; a=rsa-sha256; cv=none; b=EWMRGLKOomD6XXt9vXELExyy5WzasU19EWBoKE58q+W/DT5chexOKe/xigTt4KMmTJHm2w ZPUZzcLqCIueW/PaRfa8TRnnavhMZnIQomhIGJJO5uLzcPuS6mpWKVclLR3U6JfLzV9Xrz rhG5NPB74TYkzCXZiaJ0wXXvWV2RjjPO6Qwh06493Oze0AhhWoudYe3byQhQiM++kaqp2U iwLZt2d+76ktjaxux24fy3kp/Ynk3w3+U4tyXy3hKL2kszAYtZlvP04XL+VJxhlMHYI73q 8O4qXcpWflx3gwntYa74p2SIH0yFjaRehcUvFNlu4G/Ie/9Z/7ym+LIUR8C+5Q== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1777318668; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=j0fLge3QZOYso+NnMn0LMYNblrG1CtCObmwff6kHM3I=; b=Vnp6Xht0qcNcPUujI4ZbU8FSXqt2NEoWp/ADQmMWx6D6eTRzTYsEDFRnfmpepWjKHXVgBu Z7t4kUJhTewcG975yk5IQ8ZpecWl7UkMEwHaqAkMjwCBRuoIq88XkFIpXXhFI02abtzMdm nSIXRCXf5LbRrdU90gV8TxViRD/EdHgg1ehWUc3MqJkt2TkmKlSaHcbo/2fDR1GFIEUkdg gYYpdzOJggpWA5q1XinO3EZwHVjVCt6ZIX7Q6JB1MiF1DFKjAM2Hu7ORdAATY5EpV2Pm36 nYdTTAUsnEGssBH0L1/Sc+wpcd16fcotGPDNLKvvSj6TzzBI1qpBiSbDjwPDmA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4g4DP81RbFz577 for ; Mon, 27 Apr 2026 19:37:48 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 31c2c by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Mon, 27 Apr 2026 19:37:48 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Alan Somers Subject: git: fac95c74d23d - stable/15 - pdfork.2: correct pdrfork's HISTORY section List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: asomers X-Git-Repository: src X-Git-Refname: refs/heads/stable/15 X-Git-Reftype: branch X-Git-Commit: fac95c74d23d645eb2b8487049051cb2d83fb117 Auto-Submitted: auto-generated Date: Mon, 27 Apr 2026 19:37:48 +0000 Message-Id: <69efbb0c.31c2c.68161a79@gitrepo.freebsd.org> The branch stable/15 has been updated by asomers: URL: https://cgit.FreeBSD.org/src/commit/?id=fac95c74d23d645eb2b8487049051cb2d83fb117 commit fac95c74d23d645eb2b8487049051cb2d83fb117 Author: Alan Somers AuthorDate: 2026-04-19 15:26:50 +0000 Commit: Alan Somers CommitDate: 2026-04-27 19:37:22 +0000 pdfork.2: correct pdrfork's HISTORY section Since pdrfork will be included in FreeBSD 15.1 Reviewed by: kib Differential Revision: https://reviews.freebsd.org/D56513 (cherry picked from commit 9d39213d222395eb40323102db018cbedf773ddf) --- lib/libsys/pdfork.2 | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/libsys/pdfork.2 b/lib/libsys/pdfork.2 index 49226cf069de..3997570d2125 100644 --- a/lib/libsys/pdfork.2 +++ b/lib/libsys/pdfork.2 @@ -30,7 +30,7 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.Dd January 20, 2026 +.Dd April 19, 2026 .Dt PDFORK 2 .Os .Sh NAME @@ -256,7 +256,7 @@ The and .Fn pdwait system calls first appeared in -.Fx 16.0 . +.Fx 15.1 . .Pp Support for process descriptors mode was developed as part of the .Tn TrustedBSD From nobody Mon Apr 27 19:42:09 2026 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4g4DV94w7zz6bXFQ for ; Mon, 27 Apr 2026 19:42:09 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R13" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4g4DV94HvCz3GYF for ; Mon, 27 Apr 2026 19:42:09 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1777318929; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=wnKb47OarKkoMAZ+VsX6L2IkoS89JmFZIpFsMiegmO0=; b=Rns5u3FzxA/qtOIsMgO5eC0ppgGXyCOXOfAzNYUR2RZnuCzGHjxOnuQ2Iuo71FAbljcYKo 8mULNBWftd0Gogwf7MkcYAKHFMFj2LeABTOCb3h0HJJhJKZNSSjz1L1b5mdJM9Ag6esx2j NS6yIknqdDl7zcC/lwxAJ9DXX1/JRfrHtpa854UzZhkkwb3kqAiNB5NYonofXUjYBPBe3E 2UW0NZuvEJH5Wzhd1aapkquHk0FFMCSVXl0vsKm0nEF4eEBd7BFjPWE89+EIrwtn99BaWO kRkuaC+zGEQcS0ntKyYvGdWC5OphBuPMjabY8xddybbKEFUjnAV+bBwP+CwN2A== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1777318929; a=rsa-sha256; cv=none; b=a48RYizTY8Xu/zP/UqqO8eW2UTkANpUQBS2RhnVR61yYn5WuYN5MfQfl/V6b/t9r2NoEb3 ++/NzVqN97HciIeV8vkXN0WDOpnv+2td8ymUiWFXeuxrZe+/otT+ASrb+EgL2HVgARY4wB kZcXyQWO7yRVvGpBI11q1DEjvQUY9zuDJ5yIPWFaY+/sQBcu/a/atrAZCgJfyrNvSmR5y0 wk2Vtf06129VZJIxMTcaOjkF1RCsbYE0j9rOVl7+r2C8x8zGu1VYmFkSDc8OV7G6YsU0Rp /+/MD07Ih9MgvgsN1Vr9V/Oi4tBHFTENfs38NXDa4oCjjP4C3+qnz0ZybdKVUQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1777318929; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=wnKb47OarKkoMAZ+VsX6L2IkoS89JmFZIpFsMiegmO0=; b=lc6QDyLOTy+GRlVvA5vvXNEAdtMgYuF8kQDZTJf9Xorw+YLCRW0m4CcVTsrMY7xq2U1oG5 y7hwfUmnDVR23Vh9PnclOd3ugMwOYknvMNvL1BSAxQz++Byp/pZGRylmahrVeszNkDh3TE 4s5v4Vf4sBAUdP6oIxCQN9esaS8dC2AdcPAwbU9i34VMfjSz5i+UJRtCcQ0GkdOBTtE5uy dmWnAmNJ30plVnKbpimRZZ96H8Dw7AZrSF3iws6jsfDkUJmUyno2AMa/5l4knKBwnr/Vjk a4cA42M5RjiCRk4icmTOV2w4tjSTaNMQ8APQ8mlqjA1Y/rg87fNAvDiwarOCmw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4g4DV93tXRz4YL for ; Mon, 27 Apr 2026 19:42:09 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 32f15 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Mon, 27 Apr 2026 19:42:09 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Alan Somers Subject: git: 43e7448343dd - stable/15 - fusefs: better handling for low-memory conditions List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: asomers X-Git-Repository: src X-Git-Refname: refs/heads/stable/15 X-Git-Reftype: branch X-Git-Commit: 43e7448343ddfc487e8899c3b3e7582b5618da4d Auto-Submitted: auto-generated Date: Mon, 27 Apr 2026 19:42:09 +0000 Message-Id: <69efbc11.32f15.76bbaf43@gitrepo.freebsd.org> The branch stable/15 has been updated by asomers: URL: https://cgit.FreeBSD.org/src/commit/?id=43e7448343ddfc487e8899c3b3e7582b5618da4d commit 43e7448343ddfc487e8899c3b3e7582b5618da4d Author: Alan Somers AuthorDate: 2026-03-30 14:22:07 +0000 Commit: Alan Somers CommitDate: 2026-04-27 19:37:59 +0000 fusefs: better handling for low-memory conditions Under conditions of low memory, getblk can fail. fusefs was not handling those failures very systematically. It was always using PCATCH, which appears to have been originally copy/pasted from the NFS client code, but isn't always appropriate: * During fuse_vnode_setsize_immediate, which can be called from many different VOPs and from the vn_delayed_setsize mechanism, remove PCATCH. Some of these callers cannot tolerate allocate failure. * In fuse_inval_buf_range, don't assume that getblk will always succeed. * When calling fuse_inval_buf_range from VOP_ALLOCATE, VOP_COPY_FILE_RANGE, or VOP_WRITE (with IO_DIRECT), return EINTR if the allocation fails. * When calling fuse_inval_buf_range from VOP_DEALLOCATE, remove PCATCH. This VOP must not fail with EINTR. No new tests, because I can't force any particular getblk call to fail. PR: 293957 Sponsored by: ConnectWise Reported by: zjk7@wp.pl (cherry picked from commit 374548e930bd9452351059c14e697036d903b1c4) --- sys/fs/fuse/fuse_node.c | 6 +----- sys/fs/fuse/fuse_vnops.c | 24 +++++++++++++++++------- 2 files changed, 18 insertions(+), 12 deletions(-) diff --git a/sys/fs/fuse/fuse_node.c b/sys/fs/fuse/fuse_node.c index f4fb993a7ca1..6768e87fdef1 100644 --- a/sys/fs/fuse/fuse_node.c +++ b/sys/fs/fuse/fuse_node.c @@ -506,11 +506,7 @@ fuse_vnode_setsize_immediate(struct vnode *vp, bool shrink) */ lbn = newsize / iosize; - bp = getblk(vp, lbn, iosize, PCATCH, 0, 0); - if (!bp) { - err = EINTR; - goto out; - } + bp = getblk(vp, lbn, iosize, 0, 0, 0); if (!(bp->b_flags & B_CACHE)) goto out; /* Nothing to do */ MPASS(bp->b_flags & B_VMIO); diff --git a/sys/fs/fuse/fuse_vnops.c b/sys/fs/fuse/fuse_vnops.c index 80db04a25166..43a0d2de0d1a 100644 --- a/sys/fs/fuse/fuse_vnops.c +++ b/sys/fs/fuse/fuse_vnops.c @@ -326,7 +326,8 @@ fuse_fifo_close(struct vop_close_args *ap) /* Invalidate a range of cached data, whether dirty of not */ static int -fuse_inval_buf_range(struct vnode *vp, off_t filesize, off_t start, off_t end) +fuse_inval_buf_range(struct vnode *vp, off_t filesize, off_t start, off_t end, + int slpflag) { struct buf *bp; daddr_t left_lbn, end_lbn, right_lbn; @@ -338,7 +339,9 @@ fuse_inval_buf_range(struct vnode *vp, off_t filesize, off_t start, off_t end) end_lbn = howmany(end, iosize); left_on = start & (iosize - 1); if (left_on != 0) { - bp = getblk(vp, left_lbn, iosize, PCATCH, 0, 0); + bp = getblk(vp, left_lbn, iosize, slpflag, 0, 0); + if (!bp) + return (EINTR); if ((bp->b_flags & B_CACHE) != 0 && bp->b_dirtyend >= left_on) { /* * Flush the dirty buffer, because we don't have a @@ -357,7 +360,9 @@ fuse_inval_buf_range(struct vnode *vp, off_t filesize, off_t start, off_t end) right_lbn = end / iosize; new_filesize = MAX(filesize, end); right_blksize = MIN(iosize, new_filesize - iosize * right_lbn); - bp = getblk(vp, right_lbn, right_blksize, PCATCH, 0, 0); + bp = getblk(vp, right_lbn, right_blksize, slpflag, 0, 0); + if (!bp) + return (EINTR); if ((bp->b_flags & B_CACHE) != 0 && bp->b_dirtyoff < right_on) { /* * Flush the dirty buffer, because we don't have a @@ -647,7 +652,10 @@ fuse_vnop_allocate(struct vop_allocate_args *ap) err = fuse_vnode_size(vp, &filesize, cred, curthread); if (err) return (err); - fuse_inval_buf_range(vp, filesize, *offset, *offset + *len); + err = fuse_inval_buf_range(vp, filesize, *offset, *offset + *len, + PCATCH); + if (err) + return (err); fdisp_init(&fdi, sizeof(*ffi)); fdisp_make_vp(&fdi, FUSE_FALLOCATE, vp, curthread, cred); @@ -941,7 +949,7 @@ fuse_vnop_copy_file_range(struct vop_copy_file_range_args *ap) vnode_pager_clean_sync(invp); err = fuse_inval_buf_range(outvp, outfilesize, *ap->a_outoffp, - *ap->a_outoffp + io.uio_resid); + *ap->a_outoffp + io.uio_resid, PCATCH); if (err) goto unlock; @@ -2589,7 +2597,7 @@ fuse_vnop_write(struct vop_write_args *ap) end = start + uio->uio_resid; if (!pages) { err = fuse_inval_buf_range(vp, filesize, start, - end); + end, PCATCH); if (err) goto out; } @@ -3123,7 +3131,9 @@ fuse_vnop_deallocate(struct vop_deallocate_args *ap) err = fuse_vnode_size(vp, &filesize, cred, curthread); if (err) goto out; - fuse_inval_buf_range(vp, filesize, *offset, *offset + *len); + err = fuse_inval_buf_range(vp, filesize, *offset, *offset + *len, 0); + if (err) + goto out; fdisp_init(&fdi, sizeof(*ffi)); fdisp_make_vp(&fdi, FUSE_FALLOCATE, vp, curthread, cred); From nobody Mon Apr 27 20:14:12 2026 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4g4FC85sG7z6bYjf for ; Mon, 27 Apr 2026 20:14:12 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R13" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4g4FC857L7z3Lk8 for ; Mon, 27 Apr 2026 20:14:12 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1777320852; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=ypx5XZn+Yy8vln4RWqW83zq/aWjvbwdQsBcuYpvDS4k=; b=A3Pg8oMC3BagN3n+nBqCffIiX9jBKG8AgzrtaA0ag6tScPLE+K47WlzT7Ds9SwvN6VXPBj 0KMes3CkKW4OYPlkhF6G4wUnmQmTZ6F7VnMxvYD3mBViLig6qLOroeCKiAfyJs4T4Tz68K QZNzObiMLhI/L2laOWIPC15JLAJapLsJ9yrYyxk38P3MrGoJbM5YsYRHSYg7p4jpXUUySU JujBHRpS0Me9BVWs66LE3vd/xXW+RluUO8zLdrVPDHvDk2oFx6e19Y/F1HopXYGrcS5Ghn 72iscd9tfwgk2XISTAdceoI6yrykfFNjJme/cvrGIxc8uwTpy8c9pPQ5k35wEQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1777320852; a=rsa-sha256; cv=none; b=CT4E6ZOeWwu7k88QTemI8EJvf9VZ+vr2JfaY+BcWoIFGQt5b+7W/vCo3P2/97I83dRJiFO MEkYP7ntqOKurreMztXQ/dUIwIT6bbpCJWPGdDmfNdMU6ITUWMi1q2FhlXGXiqScurba5t d8fU2UoI+W9hDFnm2mLNUAt0nDUniK4aZT+zoZVuDwK2fXzF1Io/BG2AaFjZOoyFT76MZR 5phdtRw13PUbGcuTZSauohGCQlWkv3HCJG/wohiRB03B14MLtQY5xq3itLcoR6XXcVuBt/ wyD229NjgAS6TwP/K0l1ww7742KtXvtDrja03cPDN70mCqosay1VaY5+Ve8hWg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1777320852; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=ypx5XZn+Yy8vln4RWqW83zq/aWjvbwdQsBcuYpvDS4k=; b=Ge5t3psRZjrJewHZLLH0tv3pTc/RX5MZTwFkchYA9dN3rMX52k5omluFiJV601EujHwRNC 93keZcNGj1US7xdbw+bixUspPjOXY7sUIkl4TMkjaQuU0UQIxsbNFEoBDsUOfvPa6y2uU0 Qu6P6PBjMtiPZo3sPzHez5h57oGbXBFbcdpKOPV7kl33oIEXpR+mVU54gZ4/P8wM+JavNf Ifc3qOrZ/Hsxuf2+d+/CDO5cyCsroQ2w3CVLCU0gkgpIrK2oS1udsKVgJwgegptS+MQGzC ojcDMrPGIEEa3ZxJnALv49pG03qDz1eNeGOgBLFbahI6yKlcQgea9c8sY0uyKQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4g4FC84jrMz652 for ; Mon, 27 Apr 2026 20:14:12 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 35cec by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Mon, 27 Apr 2026 20:14:12 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Siva Mahadevan Subject: git: 321937183be7 - stable/15 - tests/fibs_test: unskip udp_dontroute6 testcase List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: siva X-Git-Repository: src X-Git-Refname: refs/heads/stable/15 X-Git-Reftype: branch X-Git-Commit: 321937183be7b13c2fd990b1da5f83856f6f1d93 Auto-Submitted: auto-generated Date: Mon, 27 Apr 2026 20:14:12 +0000 Message-Id: <69efc394.35cec.79dba3eb@gitrepo.freebsd.org> The branch stable/15 has been updated by siva: URL: https://cgit.FreeBSD.org/src/commit/?id=321937183be7b13c2fd990b1da5f83856f6f1d93 commit 321937183be7b13c2fd990b1da5f83856f6f1d93 Author: Siva Mahadevan AuthorDate: 2026-04-27 20:13:42 +0000 Commit: Siva Mahadevan CommitDate: 2026-04-27 20:13:42 +0000 tests/fibs_test: unskip udp_dontroute6 testcase This test now consistently passes (300+ consecutive runs). Approved by: lwhsu (mentor) Signed-off-by: Siva Mahadevan PR: 244172 Sponsored by: The FreeBSD Foundation (cherry picked from commit e93e57d3da2ea54598b5db01cc12a3acd656faba) --- tests/sys/netinet/fibs_test.sh | 3 --- 1 file changed, 3 deletions(-) diff --git a/tests/sys/netinet/fibs_test.sh b/tests/sys/netinet/fibs_test.sh index 2d0b63f8e30a..51f19d359137 100644 --- a/tests/sys/netinet/fibs_test.sh +++ b/tests/sys/netinet/fibs_test.sh @@ -663,9 +663,6 @@ udp_dontroute6_head() udp_dontroute6_body() { - if [ "$(atf_config_get ci false)" = "true" ]; then - atf_skip "https://bugs.freebsd.org/244172" - fi # Configure the TAP interface to use an RFC3849 nonrouteable address # and a non-default fib ADDR0="2001:db8::2" From nobody Tue Apr 28 00:10:19 2026 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4g4LRc0VpZz6Zv9l for ; Tue, 28 Apr 2026 00:10:20 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R13" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4g4LRb6zmKz40N5 for ; Tue, 28 Apr 2026 00:10:19 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1777335020; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Ri4APSY/5kskerfQFlPsjuBEU21x7nWXyMsDz1NXbys=; b=ZK2+J/slM1s1egitMYCNYWFDUxd5MAgw/QA7kr38mx0FtqKzDIYznvniShALFpEk/XwsoY tqT59AiAKGaZZRkNIwYygfUtY/pEwFCQodD5LuVtsArAKUpBMggCyVZzeeKrpiLnZGzwWZ +oEKuxvptb/u3cvHOhb6+AL/Ka9Iet6KV/lXASLbcRYI07b47G2GaZ0qEl9P+5HgtI6A8K ah+Vn0wXfBm6FYD0VjfR9SFXpSsnsaKfBoV2qnAw7jBl+/wZiV71qAfMFgjn4JT/slKSbk pHdEWwGmX3EgFnyyy5iOGfhuwv15oxYpzxn6oxqBYdBdL0a3K94yLT0u4g1+uQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1777335020; a=rsa-sha256; cv=none; b=R9MOqHcCeZ73emhU44pEJcjPJ40ud2CDobOt1aHC3LCfqdIQgayQVhFgbKjNrVatdtqpSQ cPHXNR/5Lqq0mN024K/WwMdff12S2NlvgTUBqHwF6ke+8lV6khgLo+k6UXfq3MCIeUg0z3 PMTqBQdTRI0mM6xSrpd2aFWRYTxLm5QE803dZKk5dPyTRLPhDroTGr2xWJIDO7eVe3YKtx 7EaI/HvOG71dWWdZtBEzI+pyjwen90Smw5GHCFFhEzJlDAuxD1NBTgKINVAeHmC5cq+s2s ez/OguXCVXzvFKzeINUFLa4trddDH+ZRvdcOGX7u2FXVq1eyBIRz1YtjFIF2UQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1777335020; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Ri4APSY/5kskerfQFlPsjuBEU21x7nWXyMsDz1NXbys=; b=Gp3eorf08s3wxt4XIAdsrqyFKehgrmlXc55voOg8Re1kW02F35eSmkxcLTtQRY9NsRrEjw Q8dJx3xcCq3YBW4NRmAztP8o5soDpSSekcHci+8VWZtzFQj7exRUUPwrlR3QR8ubR9lqGm lOsUZMskJSQlINrcSHkxwNyZtCZxTegZE29XDFHptZMfm9hZozmq4vOFtFyyRzXZaJNiVk iHWwdCExoAfj68YEPD7Pz4/EyM4ejxFJ/26oU7gTbifW4F1TzNgcGksDlvzpuvoQllRigh mon6H0r4zNyETd+v38ZPCHXyGr96JrBKbB9OMU1UFqC7G11Gg75y40fKmAJuOA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4g4LRb6Xy2zDCX for ; Tue, 28 Apr 2026 00:10:19 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 30964 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Tue, 28 Apr 2026 00:10:19 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Siva Mahadevan Subject: git: 8c84a6ebbe16 - stable/15 - tests/pf/nat: endpoint_independent: wait for tcpdump to start List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: siva X-Git-Repository: src X-Git-Refname: refs/heads/stable/15 X-Git-Reftype: branch X-Git-Commit: 8c84a6ebbe166710be42815d29da683363b385a8 Auto-Submitted: auto-generated Date: Tue, 28 Apr 2026 00:10:19 +0000 Message-Id: <69effaeb.30964.3a1900a@gitrepo.freebsd.org> The branch stable/15 has been updated by siva: URL: https://cgit.FreeBSD.org/src/commit/?id=8c84a6ebbe166710be42815d29da683363b385a8 commit 8c84a6ebbe166710be42815d29da683363b385a8 Author: Siva Mahadevan AuthorDate: 2026-04-22 17:20:38 +0000 Commit: Siva Mahadevan CommitDate: 2026-04-27 20:15:16 +0000 tests/pf/nat: endpoint_independent: wait for tcpdump to start This matches pflog.sh tests and fixes flaky tests found in CI[0]. [0] https://ci.freebsd.org/job/FreeBSD-main-amd64-test/28126/testReport/junit/sys.netpfil.pf/nat/endpoint_independent_exhaust/ PR: 289628 Reviewed by: glebius Approved by: lwhsu (mentor) Sponsored by: The FreeBSD Foundation MFC after: 3 days Differential Revision: https://reviews.freebsd.org/D56145 (cherry picked from commit 60000d94b4e85caf931230a8a7ae86888db00d01) --- tests/sys/netpfil/pf/nat.sh | 44 ++++++++++++++++++++++++++++---------------- 1 file changed, 28 insertions(+), 16 deletions(-) diff --git a/tests/sys/netpfil/pf/nat.sh b/tests/sys/netpfil/pf/nat.sh index 71af0f31d174..1355da83d2f3 100644 --- a/tests/sys/netpfil/pf/nat.sh +++ b/tests/sys/netpfil/pf/nat.sh @@ -159,20 +159,26 @@ endpoint_independent_common() pft_set_rules nat "${1}" jexec server1 tcpdump -i ${epair_server1}a -w ${PWD}/server1.pcap \ - --immediate-mode $filter & + --immediate-mode $filter -c 1 & server1tcppid="$!" jexec server2 tcpdump -i ${epair_server2}a -w ${PWD}/server2.pcap \ - --immediate-mode $filter & + --immediate-mode $filter -c 1 & server2tcppid="$!" - # send out multiple packets - for i in $(seq 1 10); do - echo "ping" | jexec client nc -u 198.51.100.32 1234 -p 4242 -w 0 - echo "ping" | jexec client nc -u 198.51.100.22 1234 -p 4242 -w 0 + # wait for tcpdumps to fully attach and block in bpfread() + for p in ${server1tcppid} ${server2tcppid}; do + while [ $(ps -o wchan ${p} | tr "\n" " " | cut -w -f 2) != "bpf" ]; do + sleep 0.01; + done done - kill $server1tcppid - kill $server2tcppid + echo "ping" | jexec client nc -u 198.51.100.32 1234 -p 4242 + echo "ping" | jexec client nc -u 198.51.100.22 1234 -p 4242 + + for p in ${server1tcppid} ${server2tcppid}; do + wait ${p} + atf_check_equal 0 $? + done tuple_server1=$(tcpdump -r ${PWD}/server1.pcap | awk '{addr=$3} END {print addr}') tuple_server2=$(tcpdump -r ${PWD}/server2.pcap | awk '{addr=$3} END {print addr}') @@ -198,20 +204,26 @@ endpoint_independent_common() pft_set_rules nat "${2}" jexec server1 tcpdump -i ${epair_server1}a -w ${PWD}/server1.pcap \ - --immediate-mode $filter & + --immediate-mode $filter -c 1 & server1tcppid="$!" jexec server2 tcpdump -i ${epair_server2}a -w ${PWD}/server2.pcap \ - --immediate-mode $filter & + --immediate-mode $filter -c 1 & server2tcppid="$!" - # send out multiple packets, sometimes one fails to go through - for i in $(seq 1 10); do - echo "ping" | jexec client nc -u 198.51.100.32 1234 -p 4242 -w 0 - echo "ping" | jexec client nc -u 198.51.100.22 1234 -p 4242 -w 0 + # wait for tcpdumps to fully attach and block in bpfread() + for p in ${server1tcppid} ${server2tcppid}; do + while [ $(ps -o wchan ${p} | tr "\n" " " | cut -w -f 2) != "bpf" ]; do + sleep 0.01; + done done - kill $server1tcppid - kill $server2tcppid + echo "ping" | jexec client nc -u 198.51.100.32 1234 -p 4242 + echo "ping" | jexec client nc -u 198.51.100.22 1234 -p 4242 + + for p in ${server1tcppid} ${server2tcppid}; do + wait ${p} + atf_check_equal 0 $? + done tuple_server1=$(tcpdump -r ${PWD}/server1.pcap | awk '{addr=$3} END {print addr}') tuple_server2=$(tcpdump -r ${PWD}/server2.pcap | awk '{addr=$3} END {print addr}') From nobody Tue Apr 28 02:29:11 2026 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4g4PWq56BJz6b5cr for ; Tue, 28 Apr 2026 02:29:11 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R13" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4g4PWq3m3xz3FDh for ; Tue, 28 Apr 2026 02:29:11 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1777343351; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=TcAnpkMnsXwqp1ia4y+/FxVuXgfdYeEkF+3eg1rLUZU=; b=yMKXjQhCXSvNsMjL/88GOZfDCiDOLJP19g6PyK/xjgp7bT1DLB8mtxutyVRh3TYJ6nKdO6 eQNoQbGjLdETjbFPq1BwXpcnVOlh8yZvuu5HPhRDJRL2zUKB9VpQb3fYBShN4ZQvVvNUI7 r5zeXx+tdCp4NflvB8jYBs18H7Ncef3fv1i/HPP4BIwvUAWw3ginFgP14hhnj3l4zYrR7z 8RR5W1t7ZgoL/koZiD/7WsXX7CVLK6wGceYtQ9dCj81JcJkGpOc74w7adU673TErmzypgA p4Gg2ScBJLzcMkE4d0px3b7o2FZ6Ha7iOtMQHtaHzaEya29iCOTxZ2p86PQW2Q== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1777343351; a=rsa-sha256; cv=none; b=QolIOLB9ntgAcpKGNeFcpA1KM6DXAoabvH4d2DBqen32qjhOD+32zfqcvlT8LOzHdumhfi x/wLqyCABzCXOqR2O5LuXeGKfXKS3l3RuIJyV4GjPfYlaPUBUWkeVxRt98/3gut0DHyV2F +Zs2auLbV+HuMFTegdYaUb94LNNcVv1zgkZ85dbRZEPh7tOMRN4qq6xnsSQzeufj05X1I6 I5suNMnfbEaGyDsdIHAUT84pA0PsyrAYnOdftOUkfcJeD3+iD7xWbp8qJGcftEqLTdbqtd UUP+GVTF4yeOR3RI+FLhaAjEBp7snMf5sI19uJmhZkO4yR+yHJvOxCy5W2wUGg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1777343351; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=TcAnpkMnsXwqp1ia4y+/FxVuXgfdYeEkF+3eg1rLUZU=; b=x0AAYN+YOr4r20HJuRxnx8hnUef6Glh2eSbwDZOXW4VL2S/aDSzYUiXJk2iWwzeVaSUlR3 p6OfO5620pHsMmOZfM+HTfK7/k5We+S4zTo1rXVz0ExmxWZPzoCWDkBO2HcbxFnruzQegX 5aNYkRJTAy8iqlRXavy5mdLiu7fO4A79S1INAseB9ebXrTraJU1PgO8NExghlhFoV/KEde M/xVPS5mnxTPGLEDPDZtBHMya1OR2zUJpm7blTNilweaWJjgp9xVyn4xoVytyZDIfbDptI F9KzU2f4G/8l1nmhlzpbHT7zM3ESa3LjQhmJIbQ5ykaF+8iAWIuS1dyauG2dmA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4g4PWq36JWzb7t for ; Tue, 28 Apr 2026 02:29:11 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 3d1ac by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Tue, 28 Apr 2026 02:29:11 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org Cc: Christos Longros From: Vladimir Kondratyev Subject: git: 8d584f064885 - stable/15 - bluetooth: remove redundant 0x0bda entries from ng_ubt_rtl, rtlbtfw List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: wulf X-Git-Repository: src X-Git-Refname: refs/heads/stable/15 X-Git-Reftype: branch X-Git-Commit: 8d584f064885495d47811c98027a8005ea5135c1 Auto-Submitted: auto-generated Date: Tue, 28 Apr 2026 02:29:11 +0000 Message-Id: <69f01b77.3d1ac.2a4a6708@gitrepo.freebsd.org> The branch stable/15 has been updated by wulf: URL: https://cgit.FreeBSD.org/src/commit/?id=8d584f064885495d47811c98027a8005ea5135c1 commit 8d584f064885495d47811c98027a8005ea5135c1 Author: Christos Longros AuthorDate: 2026-03-29 19:00:59 +0000 Commit: Vladimir Kondratyev CommitDate: 2026-04-28 02:25:47 +0000 bluetooth: remove redundant 0x0bda entries from ng_ubt_rtl, rtlbtfw Generic Realtek vendor rules already match all 0x0bda Bluetooth devices. Remove the redundant per-product entries from ng_ubt_rtl.c, rtlbtfw main.c, and rtlbtfw.conf. Reviewed by: wulf MFC after: 1 month Differential Revision: https://reviews.freebsd.org/D56137 (cherry picked from commit f3fc362c0fb27731e2c22523e0cedf1adec26c44) --- sys/netgraph/bluetooth/drivers/ubt/ng_ubt_rtl.c | 24 +++------ usr.sbin/bluetooth/rtlbtfw/main.c | 24 +++------ usr.sbin/bluetooth/rtlbtfw/rtlbtfw.conf | 68 ------------------------- 3 files changed, 12 insertions(+), 104 deletions(-) diff --git a/sys/netgraph/bluetooth/drivers/ubt/ng_ubt_rtl.c b/sys/netgraph/bluetooth/drivers/ubt/ng_ubt_rtl.c index f5dcac0a6846..54c3659d0ac9 100644 --- a/sys/netgraph/bluetooth/drivers/ubt/ng_ubt_rtl.c +++ b/sys/netgraph/bluetooth/drivers/ubt/ng_ubt_rtl.c @@ -74,21 +74,19 @@ const STRUCT_USB_HOST_ID ubt_rtl_devs[] = USB_IFACE_SUBCLASS(UDSUBCLASS_RF), USB_IFACE_PROTOCOL(UDPROTO_BLUETOOTH) }, + /* + * Non-Realtek vendors using Realtek Bluetooth chipsets. + * Devices with vendor 0x0bda are already matched by the + * generic rule above. + */ + /* Realtek 8821CE Bluetooth devices */ { USB_VPI(0x13d3, 0x3529, 0) }, - /* Realtek 8822CE Bluetooth devices */ - { USB_VPI(0x0bda, 0xb00c, 0) }, - { USB_VPI(0x0bda, 0xc822, 0) }, - /* Realtek 8851BE Bluetooth devices */ { USB_VPI(0x13d3, 0x3600, 0) }, /* Realtek 8852AE Bluetooth devices */ - { USB_VPI(0x0bda, 0x2852, 0) }, - { USB_VPI(0x0bda, 0xc852, 0) }, - { USB_VPI(0x0bda, 0x385a, 0) }, - { USB_VPI(0x0bda, 0x4852, 0) }, { USB_VPI(0x04c5, 0x165c, 0) }, { USB_VPI(0x04ca, 0x4006, 0) }, { USB_VPI(0x0cb8, 0xc549, 0) }, @@ -105,9 +103,6 @@ const STRUCT_USB_HOST_ID ubt_rtl_devs[] = /* Realtek 8852BE Bluetooth devices */ { USB_VPI(0x0cb8, 0xc559, 0) }, - { USB_VPI(0x0bda, 0x4853, 0) }, - { USB_VPI(0x0bda, 0x887b, 0) }, - { USB_VPI(0x0bda, 0xb85b, 0) }, { USB_VPI(0x13d3, 0x3570, 0) }, { USB_VPI(0x13d3, 0x3571, 0) }, { USB_VPI(0x13d3, 0x3572, 0) }, @@ -115,11 +110,7 @@ const STRUCT_USB_HOST_ID ubt_rtl_devs[] = { USB_VPI(0x0489, 0xe123, 0) }, { USB_VPI(0x0489, 0xe125, 0) }, - /* Realtek 8852BT/8852BE-VT Bluetooth devices */ - { USB_VPI(0x0bda, 0x8520, 0) }, - /* Realtek 8922AE Bluetooth devices */ - { USB_VPI(0x0bda, 0x8922, 0) }, { USB_VPI(0x13d3, 0x3617, 0) }, { USB_VPI(0x13d3, 0x3616, 0) }, { USB_VPI(0x0489, 0xe130, 0) }, @@ -141,7 +132,6 @@ const STRUCT_USB_HOST_ID ubt_rtl_devs[] = { USB_VPI(0x7392, 0xa611, 0) }, /* Realtek 8723DE Bluetooth devices */ - { USB_VPI(0x0bda, 0xb009, 0) }, { USB_VPI(0x2ff8, 0xb011, 0) }, /* Realtek 8761BUV Bluetooth devices */ @@ -149,7 +139,6 @@ const STRUCT_USB_HOST_ID ubt_rtl_devs[] = { USB_VPI(0x2357, 0x0604, 0) }, { USB_VPI(0x0b05, 0x190e, 0) }, { USB_VPI(0x2550, 0x8761, 0) }, - { USB_VPI(0x0bda, 0x8771, 0) }, { USB_VPI(0x6655, 0x8771, 0) }, { USB_VPI(0x7392, 0xc611, 0) }, { USB_VPI(0x2b89, 0x8761, 0) }, @@ -175,7 +164,6 @@ const STRUCT_USB_HOST_ID ubt_rtl_devs[] = { USB_VPI(0x13d3, 0x3555, 0) }, { USB_VPI(0x2ff8, 0x3051, 0) }, { USB_VPI(0x1358, 0xc123, 0) }, - { USB_VPI(0x0bda, 0xc123, 0) }, { USB_VPI(0x0cb5, 0xc547, 0) }, }; const size_t ubt_rtl_devs_sizeof = sizeof(ubt_rtl_devs); diff --git a/usr.sbin/bluetooth/rtlbtfw/main.c b/usr.sbin/bluetooth/rtlbtfw/main.c index 37c902739206..dc9ccd6c5fcd 100644 --- a/usr.sbin/bluetooth/rtlbtfw/main.c +++ b/usr.sbin/bluetooth/rtlbtfw/main.c @@ -57,21 +57,19 @@ struct rtlbt_devid { }; static struct rtlbt_devid rtlbt_list[] = { + /* + * Non-Realtek vendors using Realtek Bluetooth chipsets. + * Devices with vendor 0x0bda are already matched by the + * generic check in rtlbt_find_device(). + */ + /* Realtek 8821CE Bluetooth devices */ { .vendor_id = 0x13d3, .product_id = 0x3529 }, - /* Realtek 8822CE Bluetooth devices */ - { .vendor_id = 0x0bda, .product_id = 0xb00c }, - { .vendor_id = 0x0bda, .product_id = 0xc822 }, - /* Realtek 8851BE Bluetooth devices */ { .vendor_id = 0x13d3, .product_id = 0x3600 }, /* Realtek 8852AE Bluetooth devices */ - { .vendor_id = 0x0bda, .product_id = 0x2852 }, - { .vendor_id = 0x0bda, .product_id = 0xc852 }, - { .vendor_id = 0x0bda, .product_id = 0x385a }, - { .vendor_id = 0x0bda, .product_id = 0x4852 }, { .vendor_id = 0x04c5, .product_id = 0x165c }, { .vendor_id = 0x04ca, .product_id = 0x4006 }, { .vendor_id = 0x0cb8, .product_id = 0xc549 }, @@ -88,9 +86,6 @@ static struct rtlbt_devid rtlbt_list[] = { /* Realtek 8852BE Bluetooth devices */ { .vendor_id = 0x0cb8, .product_id = 0xc559 }, - { .vendor_id = 0x0bda, .product_id = 0x4853 }, - { .vendor_id = 0x0bda, .product_id = 0x887b }, - { .vendor_id = 0x0bda, .product_id = 0xb85b }, { .vendor_id = 0x13d3, .product_id = 0x3570 }, { .vendor_id = 0x13d3, .product_id = 0x3571 }, { .vendor_id = 0x13d3, .product_id = 0x3572 }, @@ -98,11 +93,7 @@ static struct rtlbt_devid rtlbt_list[] = { { .vendor_id = 0x0489, .product_id = 0xe123 }, { .vendor_id = 0x0489, .product_id = 0xe125 }, - /* Realtek 8852BT/8852BE-VT Bluetooth devices */ - { .vendor_id = 0x0bda, .product_id = 0x8520 }, - /* Realtek 8922AE Bluetooth devices */ - { .vendor_id = 0x0bda, .product_id = 0x8922 }, { .vendor_id = 0x13d3, .product_id = 0x3617 }, { .vendor_id = 0x13d3, .product_id = 0x3616 }, { .vendor_id = 0x0489, .product_id = 0xe130 }, @@ -124,7 +115,6 @@ static struct rtlbt_devid rtlbt_list[] = { { .vendor_id = 0x7392, .product_id = 0xa611 }, /* Realtek 8723DE Bluetooth devices */ - { .vendor_id = 0x0bda, .product_id = 0xb009 }, { .vendor_id = 0x2ff8, .product_id = 0xb011 }, /* Realtek 8761BUV Bluetooth devices */ @@ -132,7 +122,6 @@ static struct rtlbt_devid rtlbt_list[] = { { .vendor_id = 0x2357, .product_id = 0x0604 }, { .vendor_id = 0x0b05, .product_id = 0x190e }, { .vendor_id = 0x2550, .product_id = 0x8761 }, - { .vendor_id = 0x0bda, .product_id = 0x8771 }, { .vendor_id = 0x6655, .product_id = 0x8771 }, { .vendor_id = 0x7392, .product_id = 0xc611 }, { .vendor_id = 0x2b89, .product_id = 0x8761 }, @@ -158,7 +147,6 @@ static struct rtlbt_devid rtlbt_list[] = { { .vendor_id = 0x13d3, .product_id = 0x3555 }, { .vendor_id = 0x2ff8, .product_id = 0x3051 }, { .vendor_id = 0x1358, .product_id = 0xc123 }, - { .vendor_id = 0x0bda, .product_id = 0xc123 }, { .vendor_id = 0x0cb5, .product_id = 0xc547 }, }; diff --git a/usr.sbin/bluetooth/rtlbtfw/rtlbtfw.conf b/usr.sbin/bluetooth/rtlbtfw/rtlbtfw.conf index 0a2b33d33b18..f27e0ee50ccc 100644 --- a/usr.sbin/bluetooth/rtlbtfw/rtlbtfw.conf +++ b/usr.sbin/bluetooth/rtlbtfw/rtlbtfw.conf @@ -26,16 +26,6 @@ notify 100 { action "/usr/sbin/rtlbtfw -d $cdev -f /usr/local/share/rtlbt-firmware"; }; -# Realtek 8822CE Bluetooth devices -notify 100 { - match "system" "USB"; - match "subsystem" "DEVICE"; - match "type" "ATTACH"; - match "vendor" "0x0bda"; - match "product" "(0xb00c|0xc822)"; - action "/usr/sbin/rtlbtfw -d $cdev -f /usr/local/share/rtlbt-firmware"; -}; - # Realtek 8851BE Bluetooth devices notify 100 { match "system" "USB"; @@ -47,14 +37,6 @@ notify 100 { }; # Realtek 8852AE Bluetooth devices -notify 100 { - match "system" "USB"; - match "subsystem" "DEVICE"; - match "type" "ATTACH"; - match "vendor" "0x0bda"; - match "product" "(0x2852|0xc852|0x385a|0x4852)"; - action "/usr/sbin/rtlbtfw -d $cdev -f /usr/local/share/rtlbt-firmware"; -}; notify 100 { match "system" "USB"; match "subsystem" "DEVICE"; @@ -131,14 +113,6 @@ notify 100 { match "product" "0xc559"; action "/usr/sbin/rtlbtfw -d $cdev -f /usr/local/share/rtlbt-firmware"; }; -notify 100 { - match "system" "USB"; - match "subsystem" "DEVICE"; - match "type" "ATTACH"; - match "vendor" "0x0bda"; - match "product" "(0x4853|0x887b|0xb85b)"; - action "/usr/sbin/rtlbtfw -d $cdev -f /usr/local/share/rtlbt-firmware"; -}; notify 100 { match "system" "USB"; match "subsystem" "DEVICE"; @@ -156,25 +130,7 @@ notify 100 { action "/usr/sbin/rtlbtfw -d $cdev -f /usr/local/share/rtlbt-firmware"; }; -# Realtek 8852BT/8852BE-VT Bluetooth devices -notify 100 { - match "system" "USB"; - match "subsystem" "DEVICE"; - match "type" "ATTACH"; - match "vendor" "0x0bda"; - match "product" "0x8520"; - action "/usr/sbin/rtlbtfw -d $cdev -f /usr/local/share/rtlbt-firmware"; -}; - # Realtek 8922AE Bluetooth devices -notify 100 { - match "system" "USB"; - match "subsystem" "DEVICE"; - match "type" "ATTACH"; - match "vendor" "0x0bda"; - match "product" "0x8922"; - action "/usr/sbin/rtlbtfw -d $cdev -f /usr/local/share/rtlbt-firmware"; -}; notify 100 { match "system" "USB"; match "subsystem" "DEVICE"; @@ -247,14 +203,6 @@ notify 100 { }; # Realtek 8723DE Bluetooth devices -notify 100 { - match "system" "USB"; - match "subsystem" "DEVICE"; - match "type" "ATTACH"; - match "vendor" "0x0bda"; - match "product" "0xb009"; - action "/usr/sbin/rtlbtfw -d $cdev -f /usr/local/share/rtlbt-firmware"; -}; notify 100 { match "system" "USB"; match "subsystem" "DEVICE"; @@ -297,14 +245,6 @@ notify 100 { match "product" "0x8761"; action "/usr/sbin/rtlbtfw -d $cdev -f /usr/local/share/rtlbt-firmware"; }; -notify 100 { - match "system" "USB"; - match "subsystem" "DEVICE"; - match "type" "ATTACH"; - match "vendor" "0x0bda"; - match "product" "0x8771"; - action "/usr/sbin/rtlbtfw -d $cdev -f /usr/local/share/rtlbt-firmware"; -}; notify 100 { match "system" "USB"; match "subsystem" "DEVICE"; @@ -415,14 +355,6 @@ notify 100 { match "product" "0xc123"; action "/usr/sbin/rtlbtfw -d $cdev -f /usr/local/share/rtlbt-firmware"; }; -notify 100 { - match "system" "USB"; - match "subsystem" "DEVICE"; - match "type" "ATTACH"; - match "vendor" "0x0bda"; - match "product" "0xc123"; - action "/usr/sbin/rtlbtfw -d $cdev -f /usr/local/share/rtlbt-firmware"; -}; notify 100 { match "system" "USB"; match "subsystem" "DEVICE"; From nobody Tue Apr 28 13:21:43 2026 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4g4h0r5NGcz6bSj1 for ; Tue, 28 Apr 2026 13:21:48 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R13" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4g4h0r3Rs1z4KGB for ; Tue, 28 Apr 2026 13:21:48 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1777382508; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=pxttkBXYkWalxtIi5DE0mxVxXHGf1VZ316xVX/Vuhcw=; b=ShnsvImPMnS6B8jayuCemgNZBYKrlNmIIWogEM36rfyZrqr3fue6BsmKHtiKaIdQfUfF3E 0HVJwJTXeOcgg9n1xvWUAoIcWNBuSy93X4uJ43pWYX04ADzvPP/TUf7/4XaQUdiCvvE1MK c82AHpArKk3AoPkGgGdNld+zNj99Q1eFeMUAbwMqo9DJPrmjhMAVPekZ6zMj4vYubBasIh kXpRHYgI6OogcCuoIK4ZyFMR9GwPDhlURnkiXGMKFzqepR6KBpOowu6OyexWvHkRfEVxHo ttrzvFIOz+V7pNR1ZCsGfIJDblZgIb+j8zObJ+nKnfuf1irG74jjrym2RqFZmQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1777382508; a=rsa-sha256; cv=none; b=axkFRYFDI862soquQFoJP1y5YrSeuJVhiUx4I1om4VdzYIjrgOh9CbimJovpj/IyVosu5i h1hJ5yaCTXGe5Ceek6V23hU1RM9v8R0XDkUjRo2EYFuq7k89WT3XKuw74w89sIQ083RDkT OC9SO7uD8Bn20XCFH9G9aGj3j8Z8YewBE/xrxQXA0k3lqs6lH3c2KKpLIASVt6MnPfCrdU xmFyr9VUYUK/lbvUYHxzOVFacpwYR+L69Ng4Z8tD5cMEmGW8ISjsbqEFXfDVA3Cyk6YBYy kmFQoUWjNExsDsQbDIFQIf144y1Lx3+MMltirhyPqMnHsA2M+FqvuZXL5MuYIg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1777382508; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=pxttkBXYkWalxtIi5DE0mxVxXHGf1VZ316xVX/Vuhcw=; b=uI+RxuEJboQE4DTbTC7jNU8ZxFykS9idVLk5VG7Tbeux56n7dthGNKVWADSOXvHNIp6vUY aGDfs/wRJGnVxnYAvxU9lhcaFsJ5Do9nCPS0sAxb1vZiOpe4E+dGr/Eo9HHPG+kMxgEAeU 7WQuKYkl/YOYu4EWuMtaPA4rcAA06l7fBwbyR6NN9fvxM3L1PIVP7tvlnQ/7aDnhfjHUn7 B9gt6hESiLP8RTwCU7nkDv764zg5wNITL9ddu3oYd5FqVxjrCSw3xz/BFO72UVi4d4Pv2K YksgKhacP6OeXCNCH6E3LJBNTJ39G2IXLYtiqYS3RtbV0GVnT7pc14PwMZ00Ow== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4g4h0r2zpWzvl7 for ; Tue, 28 Apr 2026 13:21:48 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 33615 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Tue, 28 Apr 2026 13:21:43 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org Cc: Tuukka Pasanen From: Ed Maste Subject: git: d5a896bfc209 - stable/15 - caesar: Add SPDX-License-Identifier tags List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: emaste X-Git-Repository: src X-Git-Refname: refs/heads/stable/15 X-Git-Reftype: branch X-Git-Commit: d5a896bfc2092b39e72d799059322dd32b52ad17 Auto-Submitted: auto-generated Date: Tue, 28 Apr 2026 13:21:43 +0000 Message-Id: <69f0b467.33615.68705159@gitrepo.freebsd.org> The branch stable/15 has been updated by emaste: URL: https://cgit.FreeBSD.org/src/commit/?id=d5a896bfc2092b39e72d799059322dd32b52ad17 commit d5a896bfc2092b39e72d799059322dd32b52ad17 Author: Tuukka Pasanen AuthorDate: 2026-04-21 14:43:35 +0000 Commit: Ed Maste CommitDate: 2026-04-28 13:21:29 +0000 caesar: Add SPDX-License-Identifier tags Reviewed by: imp Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D55461 (cherry picked from commit 3cc113c94fb9635ba9f11f5dd797530b9231ca58) --- usr.bin/caesar/caesar.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/usr.bin/caesar/caesar.c b/usr.bin/caesar/caesar.c index 011f9c8e0630..0717f2637646 100644 --- a/usr.bin/caesar/caesar.c +++ b/usr.bin/caesar/caesar.c @@ -1,4 +1,6 @@ /* + * SPDX-License-Identifier: BSD-3-Clause + * * Copyright (c) 1989, 1993 * The Regents of the University of California. All rights reserved. * From nobody Tue Apr 28 14:21:11 2026 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4g4jKT5qnyz6bXnl for ; Tue, 28 Apr 2026 14:21:17 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R13" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4g4jKT2qBXz3DtS for ; Tue, 28 Apr 2026 14:21:17 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1777386077; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=4eg/bKywLzL8LrYao8vzpVG/cO0khCo6AMaxKFNKm5U=; b=nWY0rtTMperG2wEqH/91E9J9TgMsc+bmig1V1A/ctfxbOUxzgoYj0E/Wg7Hccfego2zyCt krH6oZhElY6DXnrnmsJHFCc2sDcDMpKn7FMA0WoTe/eF5MZDyVbrwOIAqxo0uI1GrfxAzS Ih+lNcS13HhAoezTCUJ5ERKxEKQyCELy1Q5EPaqiUQ7cW43+uA0x5iCsBpkyZKJNNt34Kr AkIIdMuhUMw2BhLNHoHUE2RY+o0Dor4peGlB16HJW8smtBgcWQ+zdkugnRZJVCufEuxffp GtA3MDfIL5+daBSsWa/gj1vSpD4AoFzwroFUW2YQmAyF0XLN3XQDH2UkYJzKYQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1777386077; a=rsa-sha256; cv=none; b=VHFT5iYTYP1z7PnKCbo8yJdB+Mk6tKSy7ySR2lFuNJ8IlJ3wWuoLLjhxvgXlY+ckJ+E/fS vvt/faAd6q2L/7zHDQ0mjXXjk9OrGQ90nJM6mT/QoCmMt4VWKPaYghNjkvBB7cwn/Vm2N1 f6GwKGbzYlYU6bYY7mD79aEGxIyE2yQnaQMQREYqqb6KvWYsnw2vj2ahpjBmcLHHcIJ8Oj hKfiwF31H3X5DGNt9wnkX+Tp7T2g/Rfm3C5/DOykWlIwenOS+GzjcSLwStdVLT6yMxWJ9U G1I4lOcbdTV8wTrg/4fewl1nOWyg7bATzGcWuzvqE6JvaqaMb6VDR2Yp7QTtCQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1777386077; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=4eg/bKywLzL8LrYao8vzpVG/cO0khCo6AMaxKFNKm5U=; b=Qi/yV8y6B9xeIoDtgiSptSZFl55iiF08+Az6h9FGliXfsJ12NMCbP6lv8vluA2K2+8Z2+h gTBVIAirIGkJrrmZR0KXD8nDBXHovU20hewbxhznLD4XYIAkpgSMIYmGXXnW1LRBpifQFQ AJDAyXTHcGHGLmMeDBNoeOM/0gLbmjj/J8gww9WYA1xBHe5mGJQRAgSC1Rn+PYxgGb1bTq kldbAbJ+YEJt6bzwygUKF0yU5n7El52tQEwvrJQC6V8OuUtzlSd8ijCirlZqxiSfST9iy9 47VDU8tLsXJrAV5EnRZc1nsYKPJKdz3/roOZh1YHjlZoBPKFYKgIdidHIBC6pA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4g4jKT03LvzxM5 for ; Tue, 28 Apr 2026 14:21:17 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 3a495 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Tue, 28 Apr 2026 14:21:11 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org Cc: Dan Mahoney From: Cy Schubert Subject: git: 7dcfbf4a8bf3 - stable/15 - termcap: fix screen entry standout mode (so/se) capabilities List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: cy X-Git-Repository: src X-Git-Refname: refs/heads/stable/15 X-Git-Reftype: branch X-Git-Commit: 7dcfbf4a8bf3553993569b3a3c5bca906e8f450a Auto-Submitted: auto-generated Date: Tue, 28 Apr 2026 14:21:11 +0000 Message-Id: <69f0c257.3a495.231e0ecf@gitrepo.freebsd.org> The branch stable/15 has been updated by cy: URL: https://cgit.FreeBSD.org/src/commit/?id=7dcfbf4a8bf3553993569b3a3c5bca906e8f450a commit 7dcfbf4a8bf3553993569b3a3c5bca906e8f450a Author: Dan Mahoney AuthorDate: 2026-04-14 03:53:51 +0000 Commit: Cy Schubert CommitDate: 2026-04-28 14:19:25 +0000 termcap: fix screen entry standout mode (so/se) capabilities so=\E[3m (italic) is incorrect, should be so=\E[7m (reverse video). se=\E[23m (italic off) is incorrect, should be se=\E[27m (reverse off). mr=\E[7m (reverse video) is correctly defined in the same entry. screen-256color inherits from screen via tc=screen and is fixed transitively. PR: 294499 Pull Request: https://github.com/freebsd/freebsd-src/pull/2139 Signed-off-by: Dan Mahoney (cherry picked from commit 2bff747bb04db6beb19678abc45edd96be0a1347) --- share/termcap/termcap | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/share/termcap/termcap b/share/termcap/termcap index 44704653045d..46a1ba0a59bd 100644 --- a/share/termcap/termcap +++ b/share/termcap/termcap @@ -2769,8 +2769,8 @@ SC|screen|VT 100/ANSI X3.64 virtual terminal:\ :k;=\E[21~:kD=\E[3~:kI=\E[2~:kN=\E[6~:kP=\E[5~:kd=\EOB:\ :ke=\E[?1l\E>:kh=\E[1~:kl=\EOD:kr=\EOC:ks=\E[?1h\E=:\ :ku=\EOA:le=^H:mb=\E[5m:md=\E[1m:me=\E[m:mr=\E[7m:nd=\E[C:\ - :nw=\EE:op=\E[39;49m:rc=\E8:rs=\Ec:sc=\E7:se=\E[23m:sf=\n:\ - :so=\E[3m:sr=\EM:st=\EH:ta=^I:te=\E[?1049l:ti=\E[?1049h:\ + :nw=\EE:op=\E[39;49m:rc=\E8:rs=\Ec:sc=\E7:se=\E[27m:sf=\n:\ + :so=\E[7m:sr=\EM:st=\EH:ta=^I:te=\E[?1049l:ti=\E[?1049h:\ :ue=\E[24m:up=\EM:us=\E[4m:vb=\Eg:ve=\E[34h\E[?25h:\ :vi=\E[?25l:vs=\E[34l: SB|screen-bce|VT 100/ANSI X3.64 virtual terminal with bce:\ From nobody Tue Apr 28 14:21:28 2026 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4g4jKh6jhPz6bYBG for ; Tue, 28 Apr 2026 14:21:28 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R13" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4g4jKh2mYFz3Dy4 for ; Tue, 28 Apr 2026 14:21:28 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1777386088; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=tHipWLXV/Va7m9vrT+6HKbAAU76riSlgk4aQYI6FztY=; b=kpPg8WR+0lnlHgFayhevwIbEClKWhlUyd9pLEvTxV7RPrcjDwomie3ZK8iO0twt6ethXto dZa+Jnt0LQeddhkZmBYYw7RLmvNeUlEwFB9kQOAO7G1BcaOj1dV3oCQktIIBMfkeXfVm63 rr2/uwOgYotr4fvnjC59V5JHW9q4/ExxWFLE3AjdeE2Ho9ulCfc5IPHHeXDKZZWzP4UyLM 4JVhtZ1ZamHT7xwuTja/wYk6KbTuGSccn/xrjjy+gRig5hf8Pb26lmk6onWcqtF7HIWpb0 MK1nQKYMUZdIdu8QvjwFz4hDDQZxJWkFsKtTnePr3iyUdOFntd0ejgwBGmgjpw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1777386088; a=rsa-sha256; cv=none; b=WNQwDPP/7RPeakehxLM/frwRS0GiZoofMG2bZRETFScZ89m8Gi4LIT6Vzxe9w7aUsmFZGE 6icd+220EoQPmLTPtiQd5wYgmpBruTVrnmgA5GVA0EHf7A8Kehn9c14Y+SQmUr9HshFAzq 5kzBazgDIeuASNbddwEVBUHl0SmS2BRcilyg3TjzSQer5IQy/QGZeWmTvHuRvrw5Jdh2ey RMs+kSk9d4DDWroaiAgFh4a/keE/NlMtyAEJ8z90I/L29utTlMbuxxOxCOS47Uivt4tV8L bUJQ+dNEtmS/CuXZC31NQTFRX7XJdPt86HQ76svxp6rDogspofoeDK0+4jtYwQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1777386088; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=tHipWLXV/Va7m9vrT+6HKbAAU76riSlgk4aQYI6FztY=; b=SryZPvzLHpLryYpXfrEm6kTK1RsaHugsXPYJ00oZRQgYBlBepS+po73lI0dyOuguEXT/Ub +MpQIj8K3rA1dgu5EFYf0mkhPdSbksyKoXs4pPZ03uuEXxh9EsNywHEmoi1AYqxcRxJ37e Vc2w3BuYOyAxOWt65Ka0H1ZlOwQLDvx3ztFtrM9rE2NCirOMyFiCNbHEuwqHD9/MLS8E5d DnVZR4cBMbRhmCC8WqbXDlQaxhZdtXk4xCOfiELhESgpTOUFRUHaNGzIAuU7drKoP4xGhD ZJHKEKQy4vPVRqASoPJ1autaL8QwpA3cYxaEJVJfTTOGgXdHEh4wd/m+6Qv2uw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4g4jKh2KQMzxdg for ; Tue, 28 Apr 2026 14:21:28 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 3b180 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Tue, 28 Apr 2026 14:21:28 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org Cc: Dan Mahoney From: Cy Schubert Subject: git: 4c2563e16b40 - stable/14 - termcap: fix screen entry standout mode (so/se) capabilities List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: cy X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: 4c2563e16b401c31e82917476be1411422d6557e Auto-Submitted: auto-generated Date: Tue, 28 Apr 2026 14:21:28 +0000 Message-Id: <69f0c268.3b180.168b3923@gitrepo.freebsd.org> The branch stable/14 has been updated by cy: URL: https://cgit.FreeBSD.org/src/commit/?id=4c2563e16b401c31e82917476be1411422d6557e commit 4c2563e16b401c31e82917476be1411422d6557e Author: Dan Mahoney AuthorDate: 2026-04-14 03:53:51 +0000 Commit: Cy Schubert CommitDate: 2026-04-28 14:19:48 +0000 termcap: fix screen entry standout mode (so/se) capabilities so=\E[3m (italic) is incorrect, should be so=\E[7m (reverse video). se=\E[23m (italic off) is incorrect, should be se=\E[27m (reverse off). mr=\E[7m (reverse video) is correctly defined in the same entry. screen-256color inherits from screen via tc=screen and is fixed transitively. PR: 294499 Pull Request: https://github.com/freebsd/freebsd-src/pull/2139 Signed-off-by: Dan Mahoney (cherry picked from commit 2bff747bb04db6beb19678abc45edd96be0a1347) --- share/termcap/termcap | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/share/termcap/termcap b/share/termcap/termcap index 48c0b12085cf..5305193711ab 100644 --- a/share/termcap/termcap +++ b/share/termcap/termcap @@ -2771,8 +2771,8 @@ SC|screen|VT 100/ANSI X3.64 virtual terminal:\ :k;=\E[21~:kD=\E[3~:kI=\E[2~:kN=\E[6~:kP=\E[5~:kd=\EOB:\ :ke=\E[?1l\E>:kh=\E[1~:kl=\EOD:kr=\EOC:ks=\E[?1h\E=:\ :ku=\EOA:le=^H:mb=\E[5m:md=\E[1m:me=\E[m:mr=\E[7m:nd=\E[C:\ - :nw=\EE:op=\E[39;49m:rc=\E8:rs=\Ec:sc=\E7:se=\E[23m:sf=\n:\ - :so=\E[3m:sr=\EM:st=\EH:ta=^I:te=\E[?1049l:ti=\E[?1049h:\ + :nw=\EE:op=\E[39;49m:rc=\E8:rs=\Ec:sc=\E7:se=\E[27m:sf=\n:\ + :so=\E[7m:sr=\EM:st=\EH:ta=^I:te=\E[?1049l:ti=\E[?1049h:\ :ue=\E[24m:up=\EM:us=\E[4m:vb=\Eg:ve=\E[34h\E[?25h:\ :vi=\E[?25l:vs=\E[34l: SB|screen-bce|VT 100/ANSI X3.64 virtual terminal with bce:\ From nobody Tue Apr 28 14:21:43 2026 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4g4jL021WFz6bXky for ; Tue, 28 Apr 2026 14:21:44 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R13" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4g4jKz74z2z3FGH for ; Tue, 28 Apr 2026 14:21:43 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1777386104; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=NWJgzulp6yCrB8Psd5tunkBuxUWX5ixN7BKBqIy/2aM=; b=CG8DQDQyeKHHndyS7NRFAQFs/2kxbQtfwUrVcYAufW3buWYwecKFXDmU85nWim1LyA5XKH nXzSyorg7SUQhhR+EMjVL9bZIGRJKlCEOMyUPmr0dcmicN86NB3DApIQdYXA1vbUAUF4kG v5a2O5U+k+59zqdGqKAKJbziLIikTSsSLkoiGoVTvqZKuyUrukuKdvqB/9oyptBdFP4r8g sm/Jz4yoxOZ+7Zg1ofIAyzdwnrLTASV3Y3PY3LpJz04lvvNoBSQnjn3Tt4OlmQPwf+Glfs OmF2dyDrNNk4FHd4T/IpInYazXU5NeGWjV3XEXv84lh86hxAwvRnwfJBbivVMw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1777386104; a=rsa-sha256; cv=none; b=Hvbr0RfgkmTAyAwP1jR2J37tJCNTX1DlBw5Qd7BKMxlwG2UBdDDNNkK1B0dDJY3fSwQAWa 4rHefgK3fGZyGLtE6ErNzYEa4A8G+U3KIxAgX7xN0kWR+cpXYHxurzzcckhg6LZl73BEMK iuqufa43LCsbeUXIdUGP7UeU8tyfRQcMgDUJjc/aCbQgci2MOLPfqFQZ1UUi3c/07iao/s Mrw5A8owksKwfGFuvS2GZGecudkJHAIlXt9osLbzJA0qact62JHHDpmXOFi5bGaZvJhZjo cYGu6e3m4J6tPfygRV3DdxQQ5wzy9j432CVteCZgtV6VoancXpM82uHmn/jVJQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1777386104; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=NWJgzulp6yCrB8Psd5tunkBuxUWX5ixN7BKBqIy/2aM=; b=gmd091ZiGOcateMrdjl53fURvAjDzWQOROZ+edyo3yIry+5qQL/w/uvTj9ykP/uryptMOl QNe2PXADsYUm6gtn71hRx0E87AQqVEoCO3Y2GCx24eAYljftmqxB61+QyrQwWGxO7OxIBi 7xv7O1jhLT5YqyeALiHTRpGUftFDvOqeFMH7UuH+0HUp6WIT2/3bTiIvAXkrqm2Rln1ss5 XfVSTrQdWsMGdV8h9i76cypyfuUPHlSAF+CT3TWy5xEu1o2tsZdi7em992PFeFBbfU+ZhQ XtcjymnfYwnqVTDyb5FVVQVxn8nYUaudrPaa/tnJGGSfU8MP/ux45cGchD1rIw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4g4jKz6cnSzxSQ for ; Tue, 28 Apr 2026 14:21:43 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 3a8aa by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Tue, 28 Apr 2026 14:21:43 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org Cc: Dan Mahoney From: Cy Schubert Subject: git: 2a32297a6d9f - stable/13 - termcap: fix screen entry standout mode (so/se) capabilities List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: cy X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 2a32297a6d9f0c82e64d315239693fcf4bc7bc23 Auto-Submitted: auto-generated Date: Tue, 28 Apr 2026 14:21:43 +0000 Message-Id: <69f0c277.3a8aa.76379e9e@gitrepo.freebsd.org> The branch stable/13 has been updated by cy: URL: https://cgit.FreeBSD.org/src/commit/?id=2a32297a6d9f0c82e64d315239693fcf4bc7bc23 commit 2a32297a6d9f0c82e64d315239693fcf4bc7bc23 Author: Dan Mahoney AuthorDate: 2026-04-14 03:53:51 +0000 Commit: Cy Schubert CommitDate: 2026-04-28 14:20:05 +0000 termcap: fix screen entry standout mode (so/se) capabilities so=\E[3m (italic) is incorrect, should be so=\E[7m (reverse video). se=\E[23m (italic off) is incorrect, should be se=\E[27m (reverse off). mr=\E[7m (reverse video) is correctly defined in the same entry. screen-256color inherits from screen via tc=screen and is fixed transitively. PR: 294499 Pull Request: https://github.com/freebsd/freebsd-src/pull/2139 Signed-off-by: Dan Mahoney (cherry picked from commit 2bff747bb04db6beb19678abc45edd96be0a1347) --- share/termcap/termcap | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/share/termcap/termcap b/share/termcap/termcap index 892f17c90e80..8f1ad4fcc3ee 100644 --- a/share/termcap/termcap +++ b/share/termcap/termcap @@ -2771,8 +2771,8 @@ SC|screen|VT 100/ANSI X3.64 virtual terminal:\ :k;=\E[21~:kD=\E[3~:kI=\E[2~:kN=\E[6~:kP=\E[5~:kd=\EOB:\ :ke=\E[?1l\E>:kh=\E[1~:kl=\EOD:kr=\EOC:ks=\E[?1h\E=:\ :ku=\EOA:le=^H:mb=\E[5m:md=\E[1m:me=\E[m:mr=\E[7m:nd=\E[C:\ - :nw=\EE:op=\E[39;49m:rc=\E8:rs=\Ec:sc=\E7:se=\E[23m:sf=\n:\ - :so=\E[3m:sr=\EM:st=\EH:ta=^I:te=\E[?1049l:ti=\E[?1049h:\ + :nw=\EE:op=\E[39;49m:rc=\E8:rs=\Ec:sc=\E7:se=\E[27m:sf=\n:\ + :so=\E[7m:sr=\EM:st=\EH:ta=^I:te=\E[?1049l:ti=\E[?1049h:\ :ue=\E[24m:up=\EM:us=\E[4m:vb=\Eg:ve=\E[34h\E[?25h:\ :vi=\E[?25l:vs=\E[34l: SB|screen-bce|VT 100/ANSI X3.64 virtual terminal with bce:\ From nobody Tue Apr 28 16:05:07 2026 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4g4ldH504Nz6bhXn for ; Tue, 28 Apr 2026 16:05:07 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R13" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4g4ldH47HZz3Q7G for ; Tue, 28 Apr 2026 16:05:07 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1777392307; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=XIkwIM2MdMPsuCf/hfaFJTnhhdd1rUTzOoJIc0lOR8s=; b=SrzEeR71O+UrQ+FfnqtDDmsafMC/vsRv2/dUVxPgtZWggncswzzCNQlX5mg/ME9D/qaFvi Bv5A7QYh3bKs8405u6M5YX/FkkZTw+hauL169W4o/MaQf0ITnl3nqtN6qLuxsJg/2y1+do pVNrjzLRpVQXfxRPC5w8k+7PKXPL94YU8rzV/CKUQuNJ5+YxsXHvpG13bagSGNMOGgvCkE 1D/iSwaUObMm7tNRDGzlNmTI5lwvSFp1rwLrzaif/DmD2WiL2imwYfb7NjUaqFE+RJ3zd5 GGXlKR1vx2+puYskrTGvay4LQt+lE4gEIbdcPsvDwKfbUqgmpZQbd7u7NXYbtw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1777392307; a=rsa-sha256; cv=none; b=wqzsaojaKiRkRDMSCr2EX838kN5WLwmDvsgADF33IqS3vVe1pRy+YG3Boq8t96k1DSge5/ sx/GL2SowOtZHkLR0Y4v5+CLEmTbqrROSnF5ubOtY+2UPhJbKeXk3sYG8h5SPeU62baxX+ ZSd6yde8z6PiNxY7Ht8XqY9BfVnY2oP9FKQlxjeDpd8nMpHVo6KPABJBa/jmlYAtjl0zZV b/DmOcNhM1RidX5vFA91XTiH47YMXdV5KhLz2fMQMh+Q1CDWJukvxtuE3UnKBBBJyVHCb9 cvU20XAsvpxX7rzyMYFg77AZy83VO5UhKXtjReax6CTAxw4BCI0GbkO0m1c1UQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1777392307; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=XIkwIM2MdMPsuCf/hfaFJTnhhdd1rUTzOoJIc0lOR8s=; b=v+9d4tYbaYKNIgKLDJw+9BJhdBNz7YEckLSN8XydAogaXP5LjWwdBJudLIJwVMFdYn4HFn O1Yoh0kG1O5V2fjgc0FeG1ReWm/rTi/j8wypg8iLAKHcZXjngwZU86qO9o1mEocmYWPD33 0BJg4SmVxecYM0t+0dq5C6eJy7l0CZt2zWagmK//BTcv9mAbgC7iWIEh8+qCTqFJrkhBpd Up2K3TaPzGR19gU7fZ2nXQKfwrGDZ/IDcsQMGpd6n3rWT7qsva3m+xNFQ2yhcY0BkkoE6e 3/sVIFtCSY2A/Uq6I4qIrPqDMXmqStxJoxfqScIc0g2VPMfHtwfj0y8gBKEJyA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4g4ldH3kPlz11Ny for ; Tue, 28 Apr 2026 16:05:07 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 44d55 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Tue, 28 Apr 2026 16:05:07 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Kristof Provost Subject: git: afbda5806304 - stable/14 - pf: do not allow flags to be changed with securelevel set List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kp X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: afbda58063048e2ddc47f7fc6fcc34718ccd7dbf Auto-Submitted: auto-generated Date: Tue, 28 Apr 2026 16:05:07 +0000 Message-Id: <69f0dab3.44d55.676cc1b2@gitrepo.freebsd.org> The branch stable/14 has been updated by kp: URL: https://cgit.FreeBSD.org/src/commit/?id=afbda58063048e2ddc47f7fc6fcc34718ccd7dbf commit afbda58063048e2ddc47f7fc6fcc34718ccd7dbf Author: Kristof Provost AuthorDate: 2026-04-13 13:48:39 +0000 Commit: Kristof Provost CommitDate: 2026-04-28 16:04:49 +0000 pf: do not allow flags to be changed with securelevel set With securelevel set (for pf that means >= 3) we're expected to reject rule changes. However, we allowed interface flags to be changed, which would allow 'set skip on X' to be changed. Remove DIOCSETIFFLAG and DIOCCLRIFFLAG from the securelevel whitelist. MFC after: 1 week Reported by: cyberkittens Sponsored by: Rubicon Communications, LLC ("Netgate") (cherry picked from commit d5ca00f2d8743f0885c17f50c8c011cae285fbdb) --- sys/netpfil/pf/pf_ioctl.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/sys/netpfil/pf/pf_ioctl.c b/sys/netpfil/pf/pf_ioctl.c index 5617207d28f9..e824dfcff453 100644 --- a/sys/netpfil/pf/pf_ioctl.c +++ b/sys/netpfil/pf/pf_ioctl.c @@ -2598,8 +2598,6 @@ pfioctl(struct cdev *dev, u_long cmd, caddr_t addr, int flags, struct thread *td case DIOCIGETIFACES: case DIOCGIFSPEEDV0: case DIOCGIFSPEEDV1: - case DIOCSETIFFLAG: - case DIOCCLRIFFLAG: case DIOCGETETHRULES: case DIOCGETETHRULE: case DIOCGETETHRULESETS: From nobody Tue Apr 28 16:05:09 2026 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4g4ldL2H4Fz6bhT1 for ; Tue, 28 Apr 2026 16:05:10 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R13" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4g4ldK6CFtz3QGG for ; Tue, 28 Apr 2026 16:05:09 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1777392309; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=qRtpy722JSowpXYTo05tBmCw4nfrEwgWGIeGpfsDYyI=; b=TMC5Yq9R+vnbOVG95tQ7IZjR8ezIEPvVhoOY0P4zOPnDvTNJ09xbfvE7KmVyJ+UqSPvvL7 ugwJoGDV2GBbiMGySJl8p8uHMy8fNTdcg3JX5APtG3dv3b+apgI9mfs+2r5X1wzlohkI5J Ic3iiBC3++8B6ypnarZXLZEJKrYohm1hZM8eOhkpVQ8FAOSdbqLvTIUWpPGakyEo+vZBuL Q/nb67ZXJCv7VNwcreI0t0IT9ZLiekK3Ft22VSOC2HqeFF8CU2Tm++5GXMmLPxm7jHeN1u yV7RzDe5sTFqhXWWGHHVVcDVWJ+yHhP48iLCMFALnfeswp7wvyMi3akT9SsbqA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1777392309; a=rsa-sha256; cv=none; b=Ka4cyLkFg96e73aEOrPF1/u3hQRBNmMkGTKUtidsUOVRpcrLCSsDgE2GuvEnuyqiJ5g11r EcO8VRJ4SjBnWHDghn0e7Varon9/naMqxbRc1XBZsBrVowP19pKko1oBxQuk3a1iPJZPIZ 8ufezaMlf0+++hOCRdGdkmfiNJgabhQoX38bUzhixXhPKE07+KfjdMdxyls/isxNzwAEMw jgJ+83mZl+q+D5lj/Ln3ySiGBS0AtXBOrX6CRrnuoDlPWqkhclPRUHPgHH4lu/GF2vPzeK 4gRoZ9JCwX++tvyg+pDcFRe7FYG3xIz2y/bSuIVu5S64u7r5DCDMw1kU7ODJRA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1777392309; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=qRtpy722JSowpXYTo05tBmCw4nfrEwgWGIeGpfsDYyI=; b=J7fx1D8lIvgWxRuooTjxRPfl01Whh+tzhgNcDdUOCMZ+ya8ADbrpVhbAgsnn1gE4UHA80b x7QzQ45e+QFN/IaFuvFAXTYDpUB251SgMCQnRjGtnuSg5faZMY9fbQ9GkfTv/LqTtCFajd EsyGHAasj5XHYnYndcm+mHaIiB33IAAsCbNX6ETuTkouZEEO46pClyeYVe60gD693AXqqV Vffv+5s0n6LR2Li+LVDH3YIjOj9j3cenK7tGUIkxrFLVzpzjfhaj+znF5qfknw8AgO2VIp +0w7xSz3P34K/tu3kV7xkqfiEHC3wEO4oFiIzPKw1SyF7ZUPS+vmf7g/+zFeKg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4g4ldK5kxmz11Nq for ; Tue, 28 Apr 2026 16:05:09 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 446a2 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Tue, 28 Apr 2026 16:05:09 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Kristof Provost Subject: git: ff141ea17cb7 - stable/15 - pf: do not allow flags to be changed with securelevel set List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kp X-Git-Repository: src X-Git-Refname: refs/heads/stable/15 X-Git-Reftype: branch X-Git-Commit: ff141ea17cb7d60806625423ddc855d40f7e1d06 Auto-Submitted: auto-generated Date: Tue, 28 Apr 2026 16:05:09 +0000 Message-Id: <69f0dab5.446a2.3615aee9@gitrepo.freebsd.org> The branch stable/15 has been updated by kp: URL: https://cgit.FreeBSD.org/src/commit/?id=ff141ea17cb7d60806625423ddc855d40f7e1d06 commit ff141ea17cb7d60806625423ddc855d40f7e1d06 Author: Kristof Provost AuthorDate: 2026-04-13 13:48:39 +0000 Commit: Kristof Provost CommitDate: 2026-04-28 15:33:57 +0000 pf: do not allow flags to be changed with securelevel set With securelevel set (for pf that means >= 3) we're expected to reject rule changes. However, we allowed interface flags to be changed, which would allow 'set skip on X' to be changed. Remove DIOCSETIFFLAG and DIOCCLRIFFLAG from the securelevel whitelist. MFC after: 1 week Reported by: cyberkittens Sponsored by: Rubicon Communications, LLC ("Netgate") (cherry picked from commit d5ca00f2d8743f0885c17f50c8c011cae285fbdb) --- sys/netpfil/pf/pf_ioctl.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/sys/netpfil/pf/pf_ioctl.c b/sys/netpfil/pf/pf_ioctl.c index 46197a97dae4..0825a69b8f63 100644 --- a/sys/netpfil/pf/pf_ioctl.c +++ b/sys/netpfil/pf/pf_ioctl.c @@ -3113,8 +3113,6 @@ pfioctl(struct cdev *dev, u_long cmd, caddr_t addr, int flags, struct thread *td case DIOCIGETIFACES: case DIOCGIFSPEEDV0: case DIOCGIFSPEEDV1: - case DIOCSETIFFLAG: - case DIOCCLRIFFLAG: case DIOCGETETHRULES: case DIOCGETETHRULE: case DIOCGETETHRULESETS: From nobody Tue Apr 28 16:05:10 2026 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4g4ldM2d1Kz6bhXp for ; Tue, 28 Apr 2026 16:05:11 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R13" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4g4ldM0N5Dz3QCh for ; Tue, 28 Apr 2026 16:05:11 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1777392311; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Y5cXg6Of5Otu1bLRfCnYWV6Qecn81Bqc1K+RT/ItDN8=; b=ecG4Y5JQwVU+9hxPSa9eN3JoTWKy2ahZj8iZj9OAANfdvUMmsJCbFjagDr9pWoQMMMDLl7 ATab2pzN+qjXb4hSxunZt8rGfaJceuqeHzh1+dXZvTTGPnAQl7uwyxlYYYg3dKN7Zi1OcC oKqTZRoTnvbBF6QAjtdwA3rLsC+NNnaW96MS2hN+Noq4Q4OhOctAXHCLIjE+3aBdTYkiUu PZHPMc9ToEoRJt2PaQ6fJaab466dKT+0xQvrfN9ca23xbVU/t9/Qv00mXiOfkXXEEaYXB0 JD7l6SyUmr+6AiA/ennRLfUF8BGxVYuTMQ2OXkaBC29Y7zOrn7a5hvWiAwawXQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1777392311; a=rsa-sha256; cv=none; b=iDqIvkjwrgtqCHyHNhha5Ghw/i4zv1Wol0CBFBDJxllEhMJEciaIIQXeuJLtTLTHrkG+KM qH9u6TqlQUXHWBMO5xy8aUjxLlVPpYpye/hRhEzX6EJJA8g66TjIs3XUrbbfTBvcXVN6rW J//3OSWWckTbhJQa1ELc+FnLdNtJe2IEMEFKYggohpykqald9JuneVlxR7QZn5xNb64a2V /cIRbBljlhjdIzRapNEtxGTEwGoc+smn/RF6YlaVLVD1osmpdCP/sAiXr7PWt1eAAof72u x5w+g45BaGJ86q/ksuzbemkJwRUGL/BQsmyZJALhb51bZ48YwDzcqNBWg6j0iQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1777392311; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Y5cXg6Of5Otu1bLRfCnYWV6Qecn81Bqc1K+RT/ItDN8=; b=hsEiyPmMOYhmXjgMjCbTejC658sggJSnm303yayPstaWRHK/nyvO8302v4bnaL2/dl+j0R XJ034ppKDuC5PakmhrrbyTwYNBXFoVuxg2uh8dmaBjR+XEebNkiKx15BPOwuLflG6ozjDW RtbLgHGIL6NAJZKMX6gis2OYULxikh4t1NJ9LF0qWcM86YaTvRdxTTImTTmQZZ4h63Miyy Z7oyajTA5LFBf8CraFqc2fSwLQ1tBzSxyZFVPYWTlv6jtW4CPBckDiivsegrVY3KV2HFvk EMJPKhg2W77Fn5QjirgaTxZLeBAS/F2m7EkyJ2c5NLbHRWSEmy9Ood/IhKT2zg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4g4ldL6KbBz11CK for ; Tue, 28 Apr 2026 16:05:10 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 44d59 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Tue, 28 Apr 2026 16:05:10 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Kristof Provost Subject: git: 47c12f20bf58 - stable/15 - pf: only allow a subset of netlink calls when securelevel is set List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kp X-Git-Repository: src X-Git-Refname: refs/heads/stable/15 X-Git-Reftype: branch X-Git-Commit: 47c12f20bf58b69e7ab1707e6e705907ad0d277e Auto-Submitted: auto-generated Date: Tue, 28 Apr 2026 16:05:10 +0000 Message-Id: <69f0dab6.44d59.7949e6e5@gitrepo.freebsd.org> The branch stable/15 has been updated by kp: URL: https://cgit.FreeBSD.org/src/commit/?id=47c12f20bf58b69e7ab1707e6e705907ad0d277e commit 47c12f20bf58b69e7ab1707e6e705907ad0d277e Author: Kristof Provost AuthorDate: 2026-04-20 06:36:17 +0000 Commit: Kristof Provost CommitDate: 2026-04-28 15:33:57 +0000 pf: only allow a subset of netlink calls when securelevel is set Extend the genl_cmd struct to allow calls to also carry a securelevel. If that's set compare the current securelevel to only allow the call if the level is lower than that. If no value is specified continue to allow calls in any securelevel, as before. This allows us to easily implement the same securelevel restrictions for pf as we have for the corresponding ioctls. Reviewed by: glebius MFC after: 1 week Sponsored by: Rubicon Communications, LLC ("Netgate") Differential Revision: https://reviews.freebsd.org/D56390 (cherry picked from commit 9933bdcb12641839b7396ccd0c6b8a2d55d12744) --- sys/netlink/netlink_ctl.h | 3 +++ sys/netlink/netlink_generic.c | 7 +++++++ sys/netpfil/pf/pf_nl.c | 33 +++++++++++++++++++++++++++++++++ 3 files changed, 43 insertions(+) diff --git a/sys/netlink/netlink_ctl.h b/sys/netlink/netlink_ctl.h index 7f43e0f2c25e..4740d306dd54 100644 --- a/sys/netlink/netlink_ctl.h +++ b/sys/netlink/netlink_ctl.h @@ -89,6 +89,9 @@ struct genl_cmd { uint32_t cmd_flags; uint32_t cmd_priv; uint32_t cmd_num; + + /* Disallow this call from this level up (inclusive). */ + uint32_t cmd_securelevel; }; uint16_t genl_register_family(const char *family_name, size_t hdrsize, diff --git a/sys/netlink/netlink_generic.c b/sys/netlink/netlink_generic.c index d20ec4c7545f..3a73ecc0b339 100644 --- a/sys/netlink/netlink_generic.c +++ b/sys/netlink/netlink_generic.c @@ -150,6 +150,13 @@ genl_handle_message(struct nlmsghdr *hdr, struct nl_pstate *npt) return (EPERM); } + if (cmd->cmd_securelevel > 0 && + securelevel_ge(nlp_get_cred(nlp), cmd->cmd_securelevel)) { + NLP_LOG(LOG_DEBUG, nlp, "family %s: cmd %d securelevel_gt() failed", + gf->family_name, ghdr->cmd); + return (EPERM); + } + NLP_LOG(LOG_DEBUG2, nlp, "received family %s cmd %s(%d) len %d", gf->family_name, cmd->cmd_name, ghdr->cmd, hdr->nlmsg_len); diff --git a/sys/netpfil/pf/pf_nl.c b/sys/netpfil/pf/pf_nl.c index 9fc3c67bfb58..168c6ac63d90 100644 --- a/sys/netpfil/pf/pf_nl.c +++ b/sys/netpfil/pf/pf_nl.c @@ -2241,6 +2241,7 @@ static const struct genl_cmd pf_cmds[] = { .cmd_cb = pf_handle_getstates, .cmd_flags = GENL_CMD_CAP_DO | GENL_CMD_CAP_DUMP | GENL_CMD_CAP_HASPOL, .cmd_priv = PRIV_NETINET_PF, + .cmd_securelevel = 3, }, { .cmd_num = PFNL_CMD_GETCREATORS, @@ -2248,6 +2249,7 @@ static const struct genl_cmd pf_cmds[] = { .cmd_cb = pf_handle_getcreators, .cmd_flags = GENL_CMD_CAP_DO | GENL_CMD_CAP_DUMP | GENL_CMD_CAP_HASPOL, .cmd_priv = PRIV_NETINET_PF, + .cmd_securelevel = 3, }, { .cmd_num = PFNL_CMD_START, @@ -2255,6 +2257,7 @@ static const struct genl_cmd pf_cmds[] = { .cmd_cb = pf_handle_start, .cmd_flags = GENL_CMD_CAP_DO | GENL_CMD_CAP_HASPOL, .cmd_priv = PRIV_NETINET_PF, + .cmd_securelevel = 2, }, { .cmd_num = PFNL_CMD_STOP, @@ -2262,6 +2265,7 @@ static const struct genl_cmd pf_cmds[] = { .cmd_cb = pf_handle_stop, .cmd_flags = GENL_CMD_CAP_DO | GENL_CMD_CAP_HASPOL, .cmd_priv = PRIV_NETINET_PF, + .cmd_securelevel = 2, }, { .cmd_num = PFNL_CMD_ADDRULE, @@ -2269,6 +2273,7 @@ static const struct genl_cmd pf_cmds[] = { .cmd_cb = pf_handle_addrule, .cmd_flags = GENL_CMD_CAP_DO | GENL_CMD_CAP_DUMP | GENL_CMD_CAP_HASPOL, .cmd_priv = PRIV_NETINET_PF, + .cmd_securelevel = 2, }, { .cmd_num = PFNL_CMD_GETRULES, @@ -2276,6 +2281,7 @@ static const struct genl_cmd pf_cmds[] = { .cmd_cb = pf_handle_getrules, .cmd_flags = GENL_CMD_CAP_DUMP | GENL_CMD_CAP_HASPOL, .cmd_priv = PRIV_NETINET_PF, + .cmd_securelevel = 3, }, { .cmd_num = PFNL_CMD_GETRULE, @@ -2283,6 +2289,7 @@ static const struct genl_cmd pf_cmds[] = { .cmd_cb = pf_handle_getrule, .cmd_flags = GENL_CMD_CAP_DUMP | GENL_CMD_CAP_HASPOL, .cmd_priv = PRIV_NETINET_PF, + .cmd_securelevel = 3, }, { .cmd_num = PFNL_CMD_CLRSTATES, @@ -2290,6 +2297,7 @@ static const struct genl_cmd pf_cmds[] = { .cmd_cb = pf_handle_clear_states, .cmd_flags = GENL_CMD_CAP_DO | GENL_CMD_CAP_DUMP | GENL_CMD_CAP_HASPOL, .cmd_priv = PRIV_NETINET_PF, + .cmd_securelevel = 2, }, { .cmd_num = PFNL_CMD_KILLSTATES, @@ -2297,6 +2305,7 @@ static const struct genl_cmd pf_cmds[] = { .cmd_cb = pf_handle_kill_states, .cmd_flags = GENL_CMD_CAP_DO | GENL_CMD_CAP_DUMP | GENL_CMD_CAP_HASPOL, .cmd_priv = PRIV_NETINET_PF, + .cmd_securelevel = 2, }, { .cmd_num = PFNL_CMD_SET_STATUSIF, @@ -2304,6 +2313,7 @@ static const struct genl_cmd pf_cmds[] = { .cmd_cb = pf_handle_set_statusif, .cmd_flags = GENL_CMD_CAP_DO | GENL_CMD_CAP_HASPOL, .cmd_priv = PRIV_NETINET_PF, + .cmd_securelevel = 2, }, { .cmd_num = PFNL_CMD_GET_STATUS, @@ -2311,6 +2321,7 @@ static const struct genl_cmd pf_cmds[] = { .cmd_cb = pf_handle_get_status, .cmd_flags = GENL_CMD_CAP_DUMP | GENL_CMD_CAP_HASPOL, .cmd_priv = PRIV_NETINET_PF, + .cmd_securelevel = 3, }, { .cmd_num = PFNL_CMD_CLEAR_STATUS, @@ -2318,6 +2329,7 @@ static const struct genl_cmd pf_cmds[] = { .cmd_cb = pf_handle_clear_status, .cmd_flags = GENL_CMD_CAP_DO | GENL_CMD_CAP_HASPOL, .cmd_priv = PRIV_NETINET_PF, + .cmd_securelevel = 2, }, { .cmd_num = PFNL_CMD_NATLOOK, @@ -2325,6 +2337,7 @@ static const struct genl_cmd pf_cmds[] = { .cmd_cb = pf_handle_natlook, .cmd_flags = GENL_CMD_CAP_DUMP | GENL_CMD_CAP_HASPOL, .cmd_priv = PRIV_NETINET_PF, + .cmd_securelevel = 3, }, { .cmd_num = PFNL_CMD_SET_DEBUG, @@ -2332,6 +2345,7 @@ static const struct genl_cmd pf_cmds[] = { .cmd_cb = pf_handle_set_debug, .cmd_flags = GENL_CMD_CAP_DO | GENL_CMD_CAP_HASPOL, .cmd_priv = PRIV_NETINET_PF, + .cmd_securelevel = 2, }, { .cmd_num = PFNL_CMD_SET_TIMEOUT, @@ -2339,6 +2353,7 @@ static const struct genl_cmd pf_cmds[] = { .cmd_cb = pf_handle_set_timeout, .cmd_flags = GENL_CMD_CAP_DO | GENL_CMD_CAP_HASPOL, .cmd_priv = PRIV_NETINET_PF, + .cmd_securelevel = 2, }, { .cmd_num = PFNL_CMD_GET_TIMEOUT, @@ -2346,6 +2361,7 @@ static const struct genl_cmd pf_cmds[] = { .cmd_cb = pf_handle_get_timeout, .cmd_flags = GENL_CMD_CAP_DUMP | GENL_CMD_CAP_HASPOL, .cmd_priv = PRIV_NETINET_PF, + .cmd_securelevel = 3, }, { .cmd_num = PFNL_CMD_SET_LIMIT, @@ -2353,6 +2369,7 @@ static const struct genl_cmd pf_cmds[] = { .cmd_cb = pf_handle_set_limit, .cmd_flags = GENL_CMD_CAP_DO | GENL_CMD_CAP_HASPOL, .cmd_priv = PRIV_NETINET_PF, + .cmd_securelevel = 2, }, { .cmd_num = PFNL_CMD_GET_LIMIT, @@ -2360,6 +2377,7 @@ static const struct genl_cmd pf_cmds[] = { .cmd_cb = pf_handle_get_limit, .cmd_flags = GENL_CMD_CAP_DUMP | GENL_CMD_CAP_HASPOL, .cmd_priv = PRIV_NETINET_PF, + .cmd_securelevel = 3, }, { .cmd_num = PFNL_CMD_BEGIN_ADDRS, @@ -2367,6 +2385,7 @@ static const struct genl_cmd pf_cmds[] = { .cmd_cb = pf_handle_begin_addrs, .cmd_flags = GENL_CMD_CAP_DO | GENL_CMD_CAP_DUMP | GENL_CMD_CAP_HASPOL, .cmd_priv = PRIV_NETINET_PF, + .cmd_securelevel = 3, }, { .cmd_num = PFNL_CMD_ADD_ADDR, @@ -2374,6 +2393,7 @@ static const struct genl_cmd pf_cmds[] = { .cmd_cb = pf_handle_add_addr, .cmd_flags = GENL_CMD_CAP_DO | GENL_CMD_CAP_HASPOL, .cmd_priv = PRIV_NETINET_PF, + .cmd_securelevel = 3, }, { .cmd_num = PFNL_CMD_GET_ADDRS, @@ -2381,6 +2401,7 @@ static const struct genl_cmd pf_cmds[] = { .cmd_cb = pf_handle_get_addrs, .cmd_flags = GENL_CMD_CAP_DUMP | GENL_CMD_CAP_HASPOL, .cmd_priv = PRIV_NETINET_PF, + .cmd_securelevel = 3, }, { .cmd_num = PFNL_CMD_GET_ADDR, @@ -2388,6 +2409,7 @@ static const struct genl_cmd pf_cmds[] = { .cmd_cb = pf_handle_get_addr, .cmd_flags = GENL_CMD_CAP_DUMP | GENL_CMD_CAP_HASPOL, .cmd_priv = PRIV_NETINET_PF, + .cmd_securelevel = 3, }, { .cmd_num = PFNL_CMD_GET_RULESETS, @@ -2395,6 +2417,7 @@ static const struct genl_cmd pf_cmds[] = { .cmd_cb = pf_handle_get_rulesets, .cmd_flags = GENL_CMD_CAP_DUMP | GENL_CMD_CAP_HASPOL, .cmd_priv = PRIV_NETINET_PF, + .cmd_securelevel = 3, }, { .cmd_num = PFNL_CMD_GET_RULESET, @@ -2402,6 +2425,7 @@ static const struct genl_cmd pf_cmds[] = { .cmd_cb = pf_handle_get_ruleset, .cmd_flags = GENL_CMD_CAP_DUMP | GENL_CMD_CAP_HASPOL, .cmd_priv = PRIV_NETINET_PF, + .cmd_securelevel = 3, }, { .cmd_num = PFNL_CMD_GET_SRCNODES, @@ -2409,6 +2433,7 @@ static const struct genl_cmd pf_cmds[] = { .cmd_cb = pf_handle_get_srcnodes, .cmd_flags = GENL_CMD_CAP_DUMP | GENL_CMD_CAP_HASPOL, .cmd_priv = PRIV_NETINET_PF, + .cmd_securelevel = 3, }, { .cmd_num = PFNL_CMD_CLEAR_TABLES, @@ -2416,6 +2441,7 @@ static const struct genl_cmd pf_cmds[] = { .cmd_cb = pf_handle_clear_tables, .cmd_flags = GENL_CMD_CAP_DO | GENL_CMD_CAP_HASPOL, .cmd_priv = PRIV_NETINET_PF, + .cmd_securelevel = 2, }, { .cmd_num = PFNL_CMD_ADD_TABLE, @@ -2423,6 +2449,7 @@ static const struct genl_cmd pf_cmds[] = { .cmd_cb = pf_handle_add_table, .cmd_flags = GENL_CMD_CAP_DO | GENL_CMD_CAP_HASPOL, .cmd_priv = PRIV_NETINET_PF, + .cmd_securelevel = 2, }, { .cmd_num = PFNL_CMD_DEL_TABLE, @@ -2430,6 +2457,7 @@ static const struct genl_cmd pf_cmds[] = { .cmd_cb = pf_handle_del_table, .cmd_flags = GENL_CMD_CAP_DO | GENL_CMD_CAP_HASPOL, .cmd_priv = PRIV_NETINET_PF, + .cmd_securelevel = 2, }, { .cmd_num = PFNL_CMD_GET_TSTATS, @@ -2437,6 +2465,7 @@ static const struct genl_cmd pf_cmds[] = { .cmd_cb = pf_handle_get_tstats, .cmd_flags = GENL_CMD_CAP_DUMP | GENL_CMD_CAP_HASPOL, .cmd_priv = PRIV_NETINET_PF, + .cmd_securelevel = 3, }, { .cmd_num = PFNL_CMD_CLR_TSTATS, @@ -2444,6 +2473,7 @@ static const struct genl_cmd pf_cmds[] = { .cmd_cb = pf_handle_clear_tstats, .cmd_flags = GENL_CMD_CAP_DO | GENL_CMD_CAP_HASPOL, .cmd_priv = PRIV_NETINET_PF, + .cmd_securelevel = 3, }, { .cmd_num = PFNL_CMD_CLR_ADDRS, @@ -2451,6 +2481,7 @@ static const struct genl_cmd pf_cmds[] = { .cmd_cb = pf_handle_clear_addrs, .cmd_flags = GENL_CMD_CAP_DO | GENL_CMD_CAP_HASPOL, .cmd_priv = PRIV_NETINET_PF, + .cmd_securelevel = 3, }, { .cmd_num = PFNL_CMD_TABLE_ADD_ADDR, @@ -2458,6 +2489,7 @@ static const struct genl_cmd pf_cmds[] = { .cmd_cb = pf_handle_table_add_addrs, .cmd_flags = GENL_CMD_CAP_DO | GENL_CMD_CAP_HASPOL, .cmd_priv = PRIV_NETINET_PF, + .cmd_securelevel = 3, }, { .cmd_num = PFNL_CMD_TABLE_DEL_ADDR, @@ -2465,6 +2497,7 @@ static const struct genl_cmd pf_cmds[] = { .cmd_cb = pf_handle_table_del_addrs, .cmd_flags = GENL_CMD_CAP_DO | GENL_CMD_CAP_HASPOL, .cmd_priv = PRIV_NETINET_PF, + .cmd_securelevel = 3, }, }; From nobody Tue Apr 28 18:55:59 2026 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4g4qQR6ljqz6bx7s for ; Tue, 28 Apr 2026 18:55:59 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R13" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4g4qQR5d68z3yf5 for ; Tue, 28 Apr 2026 18:55:59 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1777402559; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=v1UfXytqkNHRHeXPCLYCTw8JXmPeTUnAR4j9WEn0ur8=; b=THcrl1+PJCkKMC24xWVcoCBH9MdjVP8TRCvc05SCDL2h0EyIuKKKrjguLN2kUrbn/ZY7yX km4CdoVE6n6ASeni8ESCYsp5Hm2GXBiVV5ei+qL9j/Ygscb/rly+XYJQLFDNWIj0AQG1iT jMqREIa3GvwD7iiieVD0AjqgUJPfqiV/k3dqw1dT7fYLdy+IuSKjdANeu4yxw9+3hB8Jhv pPwENp0FrDjzcflFtKnmpH0PveCRYRaf5wqfCAjeJm0LcpxTFpxDPeIKY0DvF0b4pnyupL cs7OQQ3C3s8xtJxuHw8kdrlcQ+e9FPEyKpPd2JeGukj/fMo8Bm7yDWtzS6s99g== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1777402559; a=rsa-sha256; cv=none; b=ymuQ9Eyjs0oB742pWX55ueTfruDd/gu6WMuQeHzTuVux4klwf71uatyFpIO0V6zb/STQ3e TcYj0TTyUFOD8dk5fZ6Y2szrf0pBiKyABi9Ml5jHVMmTCwwBijnmtith49fHD5fzY9oV+5 xHQUT5doo3/yncFjhQsLymUeYAdY64S1sXB6yksb8V0NJqW9wDpoRQ8f/0eE6tqWV/3XoJ If2V3SgzdMVqe14BOAmdbPbUiUkJTMdiYQaJwUA7m839sCfMI4VjdG4MJ5Xbh5gnpefMdF XPUnk1GM0qO2BYMBGI/utrC8geG6V8ey9tJ+Efca3EmS6yqhAPYZAxbi0n4lyg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1777402559; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=v1UfXytqkNHRHeXPCLYCTw8JXmPeTUnAR4j9WEn0ur8=; b=ZxU77P/x/Sv7ReRWTxoh++a8HdzDIqUvYn33ctmF84e3buqi9fEXy4jHyOU2AQa3j87MiX xjbXBy7cVqj3pUA9qTJ3oTckjRsefFUbpqiQgVcn/iei3vDFGXULG1RomcKfcMQ00b+gj5 7f0Gaw1OL1Mj64fRV0smjthcLrftBAO/pKXDGg4Hj3wz9fDjtfC0yRvhqxIGX8xsyGNfJH 5JUuRscHGtbqKCfS8IrVe4FOUW/VlDFX0FHc9PCHpyD+rMDdaRr1+o8aY8/i/34Y7smwws QMXiFOGw2Dg8ofAFf5q/B1SJaJAd8jeKINvshPdN59zITRSs6GGAUyKCO7kwgA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4g4qQR4kpNz15B3 for ; Tue, 28 Apr 2026 18:55:59 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 26d22 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Tue, 28 Apr 2026 18:55:59 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Ahmad Khalifa Subject: git: addb9fa7fced - stable/15 - vt_core: delay the shutdown splash event handler List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: vexeduxr X-Git-Repository: src X-Git-Refname: refs/heads/stable/15 X-Git-Reftype: branch X-Git-Commit: addb9fa7fced43a858a690b12b9274559c47815f Auto-Submitted: auto-generated Date: Tue, 28 Apr 2026 18:55:59 +0000 Message-Id: <69f102bf.26d22.4eb554ad@gitrepo.freebsd.org> The branch stable/15 has been updated by vexeduxr: URL: https://cgit.FreeBSD.org/src/commit/?id=addb9fa7fced43a858a690b12b9274559c47815f commit addb9fa7fced43a858a690b12b9274559c47815f Author: Ahmad Khalifa AuthorDate: 2026-04-20 20:11:27 +0000 Commit: Ahmad Khalifa CommitDate: 2026-04-28 16:47:10 +0000 vt_core: delay the shutdown splash event handler Even though the functions are currently executed in the correct order, there's no garuntee that this will always be the case. Reported by: kevans Discussed with: kevans Fixes: 4b862c713ac5556ab4bd1828b47c5eb9cb28e067 MFC after: 3 days (cherry picked from commit e72c59315e7a2bedd654ac7c6e82dd3ceba30ed2) --- sys/dev/vt/vt_core.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/dev/vt/vt_core.c b/sys/dev/vt/vt_core.c index ccba43a821d1..33bbe65cb678 100644 --- a/sys/dev/vt/vt_core.c +++ b/sys/dev/vt/vt_core.c @@ -3191,7 +3191,7 @@ vt_upgrade(struct vt_device *vd) vt_window_switch, vw, SHUTDOWN_PRI_DEFAULT); #ifdef DEV_SPLASH EVENTHANDLER_REGISTER(shutdown_pre_sync, - vt_shutdown_splash, vw, SHUTDOWN_PRI_DEFAULT); + vt_shutdown_splash, vw, SHUTDOWN_PRI_DEFAULT + 1); #endif } } From nobody Tue Apr 28 18:56:00 2026 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4g4qQT0Ltmz6bwkc for ; Tue, 28 Apr 2026 18:56:01 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R13" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4g4qQS5RHcz3y1F for ; Tue, 28 Apr 2026 18:56:00 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1777402560; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=JK5dNRL6FBL0xp5lpxInVoUKKUOy0cG4qzONetxEN5U=; b=ofxIaSmLqiYC6w7Hq4GGsRg5dgu1zh1LLNgcF8hieNKf1ICyMkVgZYx6F/b5PMBHmKE2bT xXXWTQIxRmd3OAINdEPRj1jurvJ42lEEvubFEGrZ/sGe4vc5t+H9Yh+8/+9n4R/Js4Y7dQ Ou0PMRDcaDm3N1vnt0LJJmQmYKan9u6pp7wU1Vr9soxEekLu2ll3Zz9wya8o08HcqNlSUx 2XdrG6dRGbAearsB1VuMVdAJ+1hdGpMB/AaExY9wPVpeLk/yiI9dHLq8eWAzRgdHRbBvSh ITXsvYkMX+xENMsKZ04UBe6Hx/djV7D5YAnLpWP6glFaTEwLYVFGBAhKA5Hpkw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1777402560; a=rsa-sha256; cv=none; b=e0b3n8DuXVO4y8WNw47oxK979OA1uHMSncCioVpaL49B9pfqm0DaQYyH4MNVHttSfY48qA 1Hol5CaPaxLb7qzA7LrEqY7b8Cpk1lHfBuk7tpeGz90OatDJcNYYQVVng92eJ6Ax3wlVFf dk1IgwL+4Pt5OAmWw2fqQrFBOvesppdNq/X+4kEbCdgUV7pI+HdzX7nbovxdrD51hNlyIc iCESIN+Z08NT04qfvZqNBvudJnUVatR2v33sUasOhfEmggGhzYxjR+GTksmk3AnzIdnOtX aq2cF/OwlnQV1gPmZ5CJz2fYzL5W1s1tHwTJYTip28LSQM/7KtvpgeGHFDqhpA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1777402560; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=JK5dNRL6FBL0xp5lpxInVoUKKUOy0cG4qzONetxEN5U=; b=AilRxcO4WO1JW8ZLJBJI88y9w1PUmSAFglBncTC1LPUfO5bweHu7g0YSx8GfEVGJtJlsaR g/sJr49UzWBgeBYhHnKiS48tyydIbyn2EdjRkzIroua3lblAEi6qALWfgz9vrjq+/XWzGV dxudgg7MlGDHJtFvU8mU2xk6DZKBwQMPq1gmBzYkYidv+54gYjjpNoYE/nz+crsEoeO+vl 0gjs+ghji1eW6+EyfnJ1/jTTVJmodOheeykfgHQ4dRb2UEEBgi/PzWzsMnfrooIwSGOLSq 0Daf7hzg735aTgGzPohVFfYKJ/hLZTVk0AqKbQFHbhU9nKHbnnngINheKsVVlw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4g4qQS50mnz156v for ; Tue, 28 Apr 2026 18:56:00 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 26f4e by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Tue, 28 Apr 2026 18:56:00 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Ahmad Khalifa Subject: git: 1a8343a00a16 - stable/15 - vt_core: make sure the driver's functions exist List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: vexeduxr X-Git-Repository: src X-Git-Refname: refs/heads/stable/15 X-Git-Reftype: branch X-Git-Commit: 1a8343a00a16a74c58eee2e74e22aee5cd347ae2 Auto-Submitted: auto-generated Date: Tue, 28 Apr 2026 18:56:00 +0000 Message-Id: <69f102c0.26f4e.7e62fe81@gitrepo.freebsd.org> The branch stable/15 has been updated by vexeduxr: URL: https://cgit.FreeBSD.org/src/commit/?id=1a8343a00a16a74c58eee2e74e22aee5cd347ae2 commit 1a8343a00a16a74c58eee2e74e22aee5cd347ae2 Author: Ahmad Khalifa AuthorDate: 2026-04-20 20:15:00 +0000 Commit: Ahmad Khalifa CommitDate: 2026-04-28 16:47:11 +0000 vt_core: make sure the driver's functions exist These are NULL if they're not implemented. Make sure all the functions we need are there before doing anything. Also invert the first if statment to lessen the indentation a bit. Reported by: Quentin Thébault MFC after: 3 days (cherry picked from commit d1854272b646306de6546f8e5702e8072051d7f6) --- sys/dev/vt/vt_core.c | 59 ++++++++++++++++++++++++++++++---------------------- 1 file changed, 34 insertions(+), 25 deletions(-) diff --git a/sys/dev/vt/vt_core.c b/sys/dev/vt/vt_core.c index 33bbe65cb678..2015d982a560 100644 --- a/sys/dev/vt/vt_core.c +++ b/sys/dev/vt/vt_core.c @@ -1682,32 +1682,41 @@ vtterm_splash(struct vt_device *vd) uintptr_t image; vt_axis_t top, left; - if (!(vd->vd_flags & VDF_TEXTMODE) && (boothowto & RB_MUTE)) { - if (rebooting == 1) { - si = MD_FETCH(preload_kmdp, MODINFOMD_SHTDWNSPLASH, struct splash_info *); - vd->vd_driver->vd_blank(vd, TC_BLACK); - } else { - si = MD_FETCH(preload_kmdp, MODINFOMD_SPLASH, struct splash_info *); - } - if (si == NULL) { - top = (vd->vd_height - vt_logo_height) / 2; - left = (vd->vd_width - vt_logo_width) / 2; - vd->vd_driver->vd_bitblt_bmp(vd, vd->vd_curwindow, - vt_logo_image, NULL, vt_logo_width, vt_logo_height, - left, top, TC_WHITE, TC_BLACK); - } else { - if (si->si_depth != 4) - return; - image = (uintptr_t)si + sizeof(struct splash_info); - image = roundup2(image, 8); - top = (vd->vd_height - si->si_height) / 2; - left = (vd->vd_width - si->si_width) / 2; - vd->vd_driver->vd_bitblt_argb(vd, vd->vd_curwindow, - (unsigned char *)image, si->si_width, si->si_height, - left, top); - } - vd->vd_flags |= VDF_SPLASH; + if ((vd->vd_flags & VDF_TEXTMODE) != 0 || (boothowto & RB_MUTE) == 0) + return; + + si = MD_FETCH(preload_kmdp, rebooting == 1 ? MODINFOMD_SHTDWNSPLASH : + MODINFOMD_SPLASH, struct splash_info *); + if (si == NULL) { + if (vd->vd_driver->vd_bitblt_bmp == NULL) + return; + } else if (vd->vd_driver->vd_bitblt_argb == NULL) + return; + + if (rebooting == 1) { + if (vd->vd_driver->vd_blank == NULL) + return; + vd->vd_driver->vd_blank(vd, TC_BLACK); } + + if (si == NULL) { + top = (vd->vd_height - vt_logo_height) / 2; + left = (vd->vd_width - vt_logo_width) / 2; + vd->vd_driver->vd_bitblt_bmp(vd, + vd->vd_curwindow, vt_logo_image, NULL, vt_logo_width, + vt_logo_height, left, top, TC_WHITE, TC_BLACK); + } else { + if (si->si_depth != 4) + return; + image = (uintptr_t)si + sizeof(struct splash_info); + image = roundup2(image, 8); + top = (vd->vd_height - si->si_height) / 2; + left = (vd->vd_width - si->si_width) / 2; + vd->vd_driver->vd_bitblt_argb(vd, vd->vd_curwindow, + (unsigned char *)image, si->si_width, si->si_height, + left, top); + } + vd->vd_flags |= VDF_SPLASH; } #endif From nobody Tue Apr 28 19:56:38 2026 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4g4rmQ5Xmzz6c1r1 for ; Tue, 28 Apr 2026 19:56:38 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R13" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4g4rmQ4ldRz3G1g for ; Tue, 28 Apr 2026 19:56:38 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1777406198; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=ZRuiVOenumgkolLrD8cox9jFTQQXR43oRI4Ega0LRr4=; b=DmAyJWmGFFOSx/QTrw+y4krNtSMM42aDzmcgt6IBnr2XmGdHk907zxFx3lr9aPesd8F2n3 oWcnZ+HZkERCBv1w8DezDgEokZDQlFD93YmzhW9ICNYWi+bed3URlK93rTONhJNYMQRMrQ c9lo2Ua3m4+xUQm+68P3krTJQtTB+64rnk6nXMr9HOsIYytbcCrHmNPcrEJYlbJDOoNrHB ls+lSQ9D3pM7O+exq6G6ujuPeSm2uNoRPU6KKFYLXbdtNOUT5dX57qUDVEc3rwCdgVW7+J Q08O7ZMaG3IItIV142s+Iz1le+s5aDK4iygu6qYyQdEvQcG0Om4z97fnwCgGhA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1777406198; a=rsa-sha256; cv=none; b=RmTDNsxyC2606bIO7WqGEipSJcdZfpNto1BtKStATRWc8hjQ51lldDrky1AWWTH6WFcQo7 JBaFPvHHWFmBW0gwKB//YlT60preybqAmiHenLNFtc0omYQKhkEHs5oix64tkqaYxbh7XH Vqzgzm5nObopHuShjh72iq26JE8EZKcKPNKWp3c/E8WIhLithcdER8UIYqj12pHwSRYdq7 Sa1sYP5NR6IsEyNPLsVOBh5TCoxnjg5EsAbcBcZkqEKJaJRs3haXTKnp97g6lP+MLeZEoS OLuOKdYbwGKBCCGJyn1K2jdFVexnjMyeltGTyebr21NQSr/tuLpZ9mNJJlgQCA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1777406198; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=ZRuiVOenumgkolLrD8cox9jFTQQXR43oRI4Ega0LRr4=; b=Jg4mfNtLgF1MJ42l6HW7B4xvB4zgeh4obO4cvfiCm195g5v0xk1sHP3tHrqIacVgr/GKv2 BxI7eAGWW2JKIWojTEPQh9ntepuVzCHsvlBsftJLbru5rqBNc4z69X+vco6cRQJnxpz7Q0 HPmnaOQwV244XFiD5frZ0hew7l1qF9wWChk4+sWsV+czMK/7DBoloIBXQ036YPkYLS01rX EQnnR7Un+LzGtcoolgNNVl11nqeKdGycPZ99sntinPH9QBpAM7j86Py3KkzPb8hCzBKoIK 4j6tdvBfiZyU3w6ZAQOXhF8z6yunQX2T1YNQcDXRNJrnCEZb7hRz1FM40KGqqQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4g4rmQ4Lynz177C for ; Tue, 28 Apr 2026 19:56:38 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 365c0 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Tue, 28 Apr 2026 19:56:38 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Lexi Winter Subject: git: 66f55b90b6bc - stable/15 - boot1.chrp: Improve comment for the SLOF hack List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: ivy X-Git-Repository: src X-Git-Refname: refs/heads/stable/15 X-Git-Reftype: branch X-Git-Commit: 66f55b90b6bcbbf3c26b2da7f56d17052e39018f Auto-Submitted: auto-generated Date: Tue, 28 Apr 2026 19:56:38 +0000 Message-Id: <69f110f6.365c0.22666958@gitrepo.freebsd.org> The branch stable/15 has been updated by ivy: URL: https://cgit.FreeBSD.org/src/commit/?id=66f55b90b6bcbbf3c26b2da7f56d17052e39018f commit 66f55b90b6bcbbf3c26b2da7f56d17052e39018f Author: Lexi Winter AuthorDate: 2026-04-17 16:56:33 +0000 Commit: Lexi Winter CommitDate: 2026-04-28 19:56:21 +0000 boot1.chrp: Improve comment for the SLOF hack Since this original comment was written, the actual issue in SLOF was diagnosed and documented in commit 424089a0fc, which fixed it for loader(8). Update the comment in boot1 to be more informative to future readers. MFC after: 3 days Reviewed by: jhibbits, adrian Sponsored by: https://www.patreon.com/bsdivy Differential Revision: https://reviews.freebsd.org/D56470 (cherry picked from commit eb0279550d52962241b4178101cd7f7d732eb682) --- stand/powerpc/boot1.chrp/boot1.c | 13 +++++-------- 1 file changed, 5 insertions(+), 8 deletions(-) diff --git a/stand/powerpc/boot1.chrp/boot1.c b/stand/powerpc/boot1.chrp/boot1.c index 1a546f3473e2..1bb06bf82983 100644 --- a/stand/powerpc/boot1.chrp/boot1.c +++ b/stand/powerpc/boot1.chrp/boot1.c @@ -102,14 +102,11 @@ ofwh_t bootdevh; ofwh_t stdinh, stdouth; /* - * Note about the entry point: + * Our entrypoint. * - * For some odd reason, the first page of the load appears to have trouble - * when entering in LE. The first five instructions decode weirdly. - * I suspect it is some cache weirdness between the ELF headers and .text. - * - * Ensure we have a gap between the start of .text and the entry as a - * workaround. + * A bug in the SLOF shipped with some versions of QEMU causes the first + * 32 bytes of .text to be wrongly byte-swapped when loading LE programs. + * As a workaround, we add some padding at the start of the text section. */ __asm(" \n\ .data \n\ @@ -118,7 +115,7 @@ stack: \n\ .space 16384 \n\ \n\ .text \n\ - /* SLOF cache hack */ \n\ + /* SLOF workaround */ \n\ .space 4096 \n\ .globl _start \n\ _start: \n\ From nobody Tue Apr 28 20:15:57 2026 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4g4sBj3SFdz6c2wn for ; Tue, 28 Apr 2026 20:15:57 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R13" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4g4sBj2mpQz3JHL for ; Tue, 28 Apr 2026 20:15:57 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1777407357; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=3AIcaqwr0kLYe+PcofJTe5r6r09+h96JVPuRLbclhH4=; b=hW0Ga4iM+EQdwuqaDg5WaVG8NFKtw4D1EPQsA/nz5+G8PIgmZwX6nuj5kBYfRq4b6fa5jp f1Lde4bat1t7pzbnhdh5SsJ+Vn/GsOAnG3eLIjYeC/k9/3JgWfY3PO4WBHDjvKgBfWlfqe JkPPHt4Ax3SpSQ0m2MZgC3RsfGzCLUJBQBrNYnMJJ92HJfzE6OTvJYHvGHLbdeV+Q2rBdR udhltiehq4Ved0Tj3NLJPNXft5rkYcs68/r4cgKwQACQoYZk16Rwl70OEHTw0+BuQPI8RV yY6jAZlqVmFHHGKtE9ZMxqW6W87HS0NPkI77PJxTwk2nGPHATWc1jKn1QCG5PA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1777407357; a=rsa-sha256; cv=none; b=VNEvCooP0ZBHafBJkbimzDYp5wvWDRS+NuxJN9tp6XYVJbwY53l3P849rrddMEGxvt0XmS JJqcj9EkvetObCe3LmoiJXHu8IJYgcJZ60QirrBVK4F8eEl9DmvuILzY777dwdR/yi1wT7 uUPpzkklnxXFgtxUv4qe09j+ztHHRsNcHmli93sxTR5O/dfpRTFG5YkCiGVROs48Burdom eotjyqxhj5eXHAw+6GnpHv+39MM2nPYU4jk/oACmIdpL8sIKdvXWuG6q3ZFE/A7ylM4RwQ xttdNBN+GPBSh/51jBt0jBvknttT0d5ZyYEspMnmSUAvFrZJW0phTliXSM83Vg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1777407357; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=3AIcaqwr0kLYe+PcofJTe5r6r09+h96JVPuRLbclhH4=; b=d/sMzV1pxKmyiJclph0sjuBdYkaibWnqavCAhndJYVp7Zdo2d50BtvVi3oxWxFTqcjho0J ku0x0DCNfc/Sx7P11iqQ4OnFyrjDBpTD25xzHbIYMFGFITwSYQspAl9gs6ewgXnLUqTsA4 SSk9l+s+aYMxdg3oJt2C/IVKlpK775GYNqR4tw+ICWdFHj4GknYx4MuXWWpN/RE+rcsPlE 8tJefpHSd/haa8sKR+NZA7ZTmrSz3xJgGUuD2wVzI9CWTFB5Gp6aMlgljQgquP1Yiubzab 7QR4Bpm0UqCjt1ZVrPVOQpUo1VYVATp/fHgGprGnxmPWumVWXRrP+nU6xHgF+A== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4g4sBj2F3Nz181N for ; Tue, 28 Apr 2026 20:15:57 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 37638 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Tue, 28 Apr 2026 20:15:57 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Lars Engels Subject: git: 44d33ead3d04 - stable/15 - bsdinstall: fix root password prompt with backslashes List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: lme X-Git-Repository: src X-Git-Refname: refs/heads/stable/15 X-Git-Reftype: branch X-Git-Commit: 44d33ead3d04b51881e7fba0cbed8f66f001280a Auto-Submitted: auto-generated Date: Tue, 28 Apr 2026 20:15:57 +0000 Message-Id: <69f1157d.37638.3cde9949@gitrepo.freebsd.org> The branch stable/15 has been updated by lme: URL: https://cgit.FreeBSD.org/src/commit/?id=44d33ead3d04b51881e7fba0cbed8f66f001280a commit 44d33ead3d04b51881e7fba0cbed8f66f001280a Author: Lars Engels AuthorDate: 2026-04-25 14:41:24 +0000 Commit: Lars Engels CommitDate: 2026-04-28 20:15:49 +0000 bsdinstall: fix root password prompt with backslashes Use "read -r" to set the root password in "bsdinstall rootpass" to prevent issues with passwords containing one or more backslash characters. PR: 294781 Discussed with: tuexen, crest Approved by: khorben MFC after: 3 days Event: Wiesbaden Hackathon 202604 (cherry picked from commit 1566386b90d34dea7f30a0e6b511e178bd0d50b8) --- usr.sbin/bsdinstall/scripts/rootpass | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/usr.sbin/bsdinstall/scripts/rootpass b/usr.sbin/bsdinstall/scripts/rootpass index 9d25569ae946..5d3a44f4b179 100755 --- a/usr.sbin/bsdinstall/scripts/rootpass +++ b/usr.sbin/bsdinstall/scripts/rootpass @@ -103,8 +103,8 @@ $errormsg" \ exec 5>&- [ $res -eq $BSDDIALOG_OK ] || exit 0 - echo -n "$output" | (read password1 - read password2 + echo -n "$output" | (read -r password1 + read -r password2 [ -n "$password1" -o -n "$password2" ] || exit 62 [ "$password1" = "$password2" ] || exit 63 echo "$password1" | chroot $BSDINSTALL_CHROOT \ From nobody Tue Apr 28 22:20:30 2026 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4g4vyV34Slz6cB40; Tue, 28 Apr 2026 22:20:34 +0000 (UTC) (envelope-from bz@FreeBSD.org) Received: from smtp.freebsd.org (smtp.freebsd.org [IPv6:2610:1c1:1:606c::24b:4]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "smtp.freebsd.org", Issuer "R12" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4g4vyV2JGRz3XY2; Tue, 28 Apr 2026 22:20:34 +0000 (UTC) (envelope-from bz@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1777414834; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=OIZxNPW1MA3Nq1yBOjMKpYwejwRdukL/6kuxAISEHao=; b=LHenBHpg6uNWmM6sEF99cXGCawZWF8GgP5YMikW5+7IEH3SJ5q5hXGvy6T7piY2ipA+XD5 4OkFQSGHPSOYoGO2MzRo5IXN1aapPSt+jbUO05F/5UXRMIRC08pY6U9+cybEESbBC5n43O 1thoSybL2e4Sa3TzDIaqz9V9o5QMJ2mNehOUaqTZFP3WzuljldYBkD2Vn5eH7xWphj1MVZ J8JLhXVrZUlwW9rN5p3tS91Mrf13GyzxKM4qPQn8rtU+RqU3PCmAYcjaD7OyK56WtQdsYq TuRXMe/D/e2B1zH0lmBGWfho30koEIHYa1p80FdEr7GWhdQUCV0Y0beCNKRx0g== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1777414834; a=rsa-sha256; cv=none; b=o+uuVl8hXMfaxhNKfW+734M7zPAQz9sDhnaudcrAT0+Z64AUQu/Lf5GEOJersBlXV1eTwU HMdJJAxe6zA5ujS+xEOfVJfAcNjmVnwuo5wXNvnvWSaR99e0BFxvCaU05BLRzg/gjM3+mU s+iTrM/bKNH0E4shnPP85QH3bb0TyKgyoSGXpiVmNNdnXP8h8D3xjGPbAg/Ewxg9on3LkP RcxdOkzN1iNx9cqZPkeEciP6f+9bhbLXXnYqBUC6j9wGibDpRJ5zRSbhXVtY9EoRChxUGj fwCQoa0CHVM7c3tpVkB041i5s70krsRv8sBsvhM6Oe4MrDpe59OnIoVR4pOP7A== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1777414834; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=OIZxNPW1MA3Nq1yBOjMKpYwejwRdukL/6kuxAISEHao=; b=mG07rb08eWeptRtGRfrnt6gDyxT3gPMl8XjTOa2Vt7i7Hz1K6xepwvKddPbJucitCTLWs9 O7fO51XK6siOGrweikCWmZ87QBgkuDVMxh7OWlKpT8RZFad/DSlK2yl2x7uVD/gaxUyUHB MIZ40TW4+p+OVqifh2hcfKiJZP+96MgqFeJiZMRCQz2W6IunhO0L+dHdNEEyTa6sJho3SK qYXbrz0KcsAwNIs4l5sse4/o3oE7WKlfGHXEZSiuDz/tZKwtgPzfNc80B6PCWrdbUTRXIZ EJiHkAjPQv7eeTv2NS8Ek8up9CvPuJvbWD0Z19J0W4+QLaxAkHEvLcuibXceNw== Received: from mx-01.divo.sbone.de (mx-01.divo.sbone.de [IPv6:2003:a:140a:2200:6:594:fffe:19]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature ECDSA (prime256v1) client-digest SHA256) (Client CN "mx-01.divo.sbone.de", Issuer "E7" (not verified)) (Authenticated sender: bz/mail) by smtp.freebsd.org (Postfix) with ESMTPSA id 4g4vyV0206zp2p; Tue, 28 Apr 2026 22:20:33 +0000 (UTC) (envelope-from bz@FreeBSD.org) Received: from mail.sbone.de (mail.sbone.de [IPv6:fde9:577b:c1a9:4902:0:7404:2:1025]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (prime256v1) server-digest SHA256) (No client certificate requested) by mx-01.divo.sbone.de (Postfix) with ESMTPS id 59542A64805; Tue, 28 Apr 2026 22:20:09 +0000 (UTC) Received: from content-filter.t4-02.sbone.de (content-filter.t4-02.sbone.de [IPv6:fde9:577b:c1a9:4902:0:7404:2:2742]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by mail.sbone.de (Postfix) with ESMTPS id 246A92D029E9; Tue, 28 Apr 2026 22:20:32 +0000 (UTC) X-Virus-Scanned: amavisd-new at sbone.de Received: from mail.sbone.de ([IPv6:fde9:577b:c1a9:4902:0:7404:2:1025]) by content-filter.t4-02.sbone.de (content-filter.t4-02.sbone.de [IPv6:fde9:577b:c1a9:4902:0:7404:2:2742]) (amavisd-new, port 10024) with ESMTP id j-Zluc0cUXJU; Tue, 28 Apr 2026 22:20:31 +0000 (UTC) Received: from nv.t4-02.sbone.de (nv.t4-02.sbone.de [IPv6:fde9:577b:c1a9:4902:0:7404:2:22]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by mail.sbone.de (Postfix) with ESMTPSA id 07AB32D029D8; Tue, 28 Apr 2026 22:20:31 +0000 (UTC) Date: Tue, 28 Apr 2026 22:20:30 +0000 (UTC) From: "Bjoern A. Zeeb" To: Kristof Provost cc: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org Subject: Re: git: 47c12f20bf58 - stable/15 - pf: only allow a subset of netlink calls when securelevel is set In-Reply-To: <69f0dab6.44d59.7949e6e5@gitrepo.freebsd.org> Message-ID: <7rsqr33-s25s-64q4-o8nn-81sn61p9s77r@mnoonqbm.arg> References: <69f0dab6.44d59.7949e6e5@gitrepo.freebsd.org> X-OpenPGP-Key-Id: 0x14003F198FEFA3E77207EE8D2B58B8F83CCF1842 List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII; format=flowed On Tue, 28 Apr 2026, Kristof Provost wrote: > The branch stable/15 has been updated by kp: > > URL: https://cgit.FreeBSD.org/src/commit/?id=47c12f20bf58b69e7ab1707e6e705907ad0d277e > > commit 47c12f20bf58b69e7ab1707e6e705907ad0d277e > Author: Kristof Provost > AuthorDate: 2026-04-20 06:36:17 +0000 > Commit: Kristof Provost > CommitDate: 2026-04-28 15:33:57 +0000 > > pf: only allow a subset of netlink calls when securelevel is set This seems to have broken LINT-NOVIMAGE on stable/15. sys/netlink/netlink_generic.c:154:6: error: call to undeclared function 'securelevel_ge'; ISO C99 and later do not support implicit function declarations [-Werror,-Wimplicit-function-declaration] > Extend the genl_cmd struct to allow calls to also carry a securelevel. > If that's set compare the current securelevel to only allow the call if > the level is lower than that. > > If no value is specified continue to allow calls in any securelevel, > as before. > > This allows us to easily implement the same securelevel restrictions for > pf as we have for the corresponding ioctls. > > Reviewed by: glebius > MFC after: 1 week > Sponsored by: Rubicon Communications, LLC ("Netgate") > Differential Revision: https://reviews.freebsd.org/D56390 > > (cherry picked from commit 9933bdcb12641839b7396ccd0c6b8a2d55d12744) -- Bjoern A. Zeeb r15:7 From nobody Wed Apr 29 04:17:46 2026 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4g53tf5BDmz6cYTK for ; Wed, 29 Apr 2026 04:17:46 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R13" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4g53tf38FTz49ML for ; Wed, 29 Apr 2026 04:17:46 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1777436266; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=bWo+xSSRcoiL5q6R/WvZixNtbQNokiayV0fix46xtbk=; b=C+WoJTRbZVeXGYM5cULBt+iD+MOX1JIInU/m9MVZZLx4NhxWSENTKj+6I2/mPZJd3PfhKa b0wV0XB3TpU7KuTbzYUEe7SVvR5lcriyUUKtmiALUMCViYgdsgXlaLuTO9UJwr+C8OjRAN 2bNm1uaS+klZzEHFcfIPWeJTu0ebLN/0Mhr0lGrr9Bd5yDE+XQIJQ2ENX/OOcS4RHt/WR3 9HtEV2BIpcT18RbLGj7FDA+7mwAbBhBVAudiO/NZV9p1IvUAM40jG5CC6MKobV22eQu2X7 8dG+fXK0XpFLu/GBKJFq/okmT1Ye+5ImYV54dsyOuN63XvltyOb/EWa5r/CNig== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1777436266; a=rsa-sha256; cv=none; b=FeCyFJ1MfBEsBNzkHpGOAeZKTj7rl+LTHkUGJWWkxaMSWe6QerWRdJK3cpH5tsJSV96krZ fV7hPuh+UGEnZJwiQc5ywZSZEAimYdz8lQd9A1aOwBfAsfBEtbhsWflHpIWFBsV3eVgldn 59cpFhrvAQADxIa+Xp7D+3fIbYWHrAkR987Qq9Lfi1b2vfGWZ1YHfO0AhdQOxVQ1c97C6i K4R+A6w4Tj+14GI3p35C7CwVnTdo359Jg0OmuAPMOmIE9THs12l+3AIn00mAIDxvjAo1nK uqoMlTlvNcreFdpOaMPoJJ/n/IzmSjJgSa5QGNBFO5dyijmJIt0y1KEoHnqnzQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1777436266; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=bWo+xSSRcoiL5q6R/WvZixNtbQNokiayV0fix46xtbk=; b=xmGNwAi+8BTSEjPD8vqP7xOPhAVruI3yrCMhGm54UgyB23zxaHpDkEieE3iUnIQn1Q9kOw IMHNLvW8pZA6s9TiV6v9QnpnsYU22/06Xo2uN8uuk1CdVV6ahJFQEqNDTTmKVu/MrXPwqC NiqDtJIyex/FQlvE+B4+SThVtH0Nct2n3Xvk7bBG4Om8o9XLjevEPMJntc1CudGviaRCMM auCJlRRiH6hV2whXUVh20v6i7tIC7Hx9Vfh6OofNv0jFNwWRt0SYBAgZ84iBcGrugKWsHP l2iDTiuIObo6E77dOcDPgo6478IlKbbKoEDX2oxQ7UIz25AHR0vDtjqBSEQOWA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4g53tf1wTnz84n for ; Wed, 29 Apr 2026 04:17:46 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 185c3 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Wed, 29 Apr 2026 04:17:46 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Kyle Evans Subject: git: 2b8d6e404a4c - stable/15 - mac_seeotheruids: allow specificgid to be a list of groups List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kevans X-Git-Repository: src X-Git-Refname: refs/heads/stable/15 X-Git-Reftype: branch X-Git-Commit: 2b8d6e404a4c8a0683fe92f598a78899422b6953 Auto-Submitted: auto-generated Date: Wed, 29 Apr 2026 04:17:46 +0000 Message-Id: <69f1866a.185c3.5b7cb87f@gitrepo.freebsd.org> The branch stable/15 has been updated by kevans: URL: https://cgit.FreeBSD.org/src/commit/?id=2b8d6e404a4c8a0683fe92f598a78899422b6953 commit 2b8d6e404a4c8a0683fe92f598a78899422b6953 Author: Kyle Evans AuthorDate: 2026-03-01 03:42:25 +0000 Commit: Kyle Evans CommitDate: 2026-04-29 04:17:06 +0000 mac_seeotheruids: allow specificgid to be a list of groups The specificgid functionality has historically allowed only a single group to be exempt, but in practice one might want a few services to be exempt for reasons. From a security perspective, we probably don't want to encourage unrelated users to be grouped together solely for this purpose, as that creates one point of shared access that could be used for nefarious purposes. Normalize the group list as we do cr_groups to allow for linear matching rather than quadratic, we just need to account for the differences in FreeBSD 15.0+ where cr_groups is entirely supplementary groups vs. earlier versions, where cr_groups[0] is the egid and the rest is sorted. Reviewed by: csjp, des (earlier version) Sponsored by: Klara, Inc. (cherry picked from commit b675ff8eedc9ac93cdf1cfe33185b7a1a027df37) --- share/man/man4/mac_seeotheruids.4 | 4 +- sys/security/mac_seeotheruids/mac_seeotheruids.c | 174 +++++++++++++++++++++-- 2 files changed, 166 insertions(+), 12 deletions(-) diff --git a/share/man/man4/mac_seeotheruids.4 b/share/man/man4/mac_seeotheruids.4 index 5b1718bf83d4..04f67ebb7ea3 100644 --- a/share/man/man4/mac_seeotheruids.4 +++ b/share/man/man4/mac_seeotheruids.4 @@ -28,7 +28,7 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.Dd July 25, 2015 +.Dd Februrary 26, 2026 .Dt MAC_SEEOTHERUIDS 4 .Os .Sh NAME @@ -80,7 +80,7 @@ set the sysctl OID .Va security.mac.seeotheruids.specificgid_enabled to 1, and .Va security.mac.seeotheruids.specificgid -to the group ID to be exempted. +to the list of group IDs to be exempted. .Ss Label Format No labels are defined for .Nm . diff --git a/sys/security/mac_seeotheruids/mac_seeotheruids.c b/sys/security/mac_seeotheruids/mac_seeotheruids.c index 9cd2e0f3c0fc..a112a904fa72 100644 --- a/sys/security/mac_seeotheruids/mac_seeotheruids.c +++ b/sys/security/mac_seeotheruids/mac_seeotheruids.c @@ -45,9 +45,12 @@ #include #include +#include +#include #include #include #include +#include #include #include #include @@ -59,6 +62,9 @@ #include +static MALLOC_DEFINE(M_SEEOTHERUIDS, "mac_seeotheruids", + "mac_seeotheruids(4) security module"); + static SYSCTL_NODE(_security_mac, OID_AUTO, seeotheruids, CTLFLAG_RW | CTLFLAG_MPSAFE, 0, "TrustedBSD mac_seeotheruids policy controls"); @@ -94,13 +100,116 @@ SYSCTL_INT(_security_mac_seeotheruids, OID_AUTO, specificgid_enabled, CTLFLAG_RW, &specificgid_enabled, 0, "Make an exception for credentials " "with a specific gid as their real primary group id or group set"); -static gid_t specificgid = 0; -SYSCTL_UINT(_security_mac_seeotheruids, OID_AUTO, specificgid, CTLFLAG_RW, - &specificgid, 0, "Specific gid to be exempt from seeotheruids policy"); +static struct rmlock seeotheruids_rmlock; +RM_SYSINIT_FLAGS(mac_seeotheruids_lock, &seeotheruids_rmlock, + "mac_seeotheruids_lock", RM_SLEEPABLE); + +static gid_t *specificgids; +static size_t specificgidcnt; + +static int +gidp_cmp(const void *p1, const void *p2) +{ + const gid_t g1 = *(const gid_t *)p1; + const gid_t g2 = *(const gid_t *)p2; + + return ((g1 > g2) - (g1 < g2)); +} + +static void +specificgid_normalize(gid_t *gidlist, size_t *ngidp) +{ + int ins_idx; + gid_t prev_g; + + if (*ngidp < 2) + return; + + qsort(gidlist, *ngidp, sizeof(*gidlist), gidp_cmp); + + prev_g = gidlist[0]; + ins_idx = 1; + for (int i = ins_idx; i < *ngidp; ++i) { + const gid_t g = gidlist[i]; + + if (g != prev_g) { + if (i != ins_idx) + gidlist[ins_idx] = g; + ++ins_idx; + prev_g = g; + } + } + + *ngidp = ins_idx; +} + +static int +specificgid_sysctl(SYSCTL_HANDLER_ARGS) +{ + gid_t *newgids = NULL; + size_t ingidcnt, newgidcnt = 0; + int error; + + /* Allocate our new gid array before we take our non-sleepable lock. */ + if (req->newptr != NULL) { + if (req->newlen % sizeof(gid_t) != 0) + return (EINVAL); + ingidcnt = newgidcnt = howmany(req->newlen, sizeof(gid_t)); + newgids = mallocarray(newgidcnt, sizeof(*newgids), + M_SEEOTHERUIDS, M_WAITOK); + + error = SYSCTL_IN(req, newgids, newgidcnt * sizeof(*newgids)); + if (error != 0) { + free(newgids, M_SEEOTHERUIDS); + return (error); + } + + specificgid_normalize(newgids, &newgidcnt); + + /* + * It might be debatable whether shrinking the allocation is + * worth it, but we'll do it in the off-chance that someone is + * generating specificgid entries from various configuration + * sources that won't de-duplicate. + */ + if (newgidcnt < ingidcnt) { + newgids = realloc(newgids, newgidcnt * sizeof(*newgids), + M_SEEOTHERUIDS, M_WAITOK); + } + } + + rm_wlock(&seeotheruids_rmlock); + + error = SYSCTL_OUT(req, specificgids, + specificgidcnt * sizeof(*specificgids)); + if (error == 0 && req->newptr != NULL) { + free(specificgids, M_SEEOTHERUIDS); + + specificgids = newgids; + specificgidcnt = newgidcnt; + } else if (error != 0) { + free(newgids, M_SEEOTHERUIDS); + } + + rm_wunlock(&seeotheruids_rmlock); + return (error); +} +SYSCTL_PROC(_security_mac_seeotheruids, OID_AUTO, specificgid, + CTLFLAG_RW | CTLTYPE_UINT | CTLFLAG_MPSAFE, 0, 0, + &specificgid_sysctl, "I", + "Specific gid(s) to be exempt from seeotheruids policy"); + +static void +seeotheruids_destroy(struct mac_policy_conf *mpc __unused) +{ + free(specificgids, M_SEEOTHERUIDS); +} static int seeotheruids_check(struct ucred *cr1, struct ucred *cr2) { + struct rm_priotracker tracker; + int error = ESRCH; if (!seeotheruids_enabled) return (0); @@ -110,12 +219,6 @@ seeotheruids_check(struct ucred *cr1, struct ucred *cr2) return (0); } - if (specificgid_enabled) { - if (cr1->cr_rgid == specificgid || - groupmember(specificgid, cr1)) - return (0); - } - if (cr1->cr_ruid == cr2->cr_ruid) return (0); @@ -124,7 +227,57 @@ seeotheruids_check(struct ucred *cr1, struct ucred *cr2) return (0); } - return (ESRCH); + rm_rlock(&seeotheruids_rmlock, &tracker); + if (specificgid_enabled && specificgids != NULL) { + const gid_t *suppgroups = cr1->cr_groups; + size_t nsupp = cr1->cr_ngroups; + +#if __FreeBSD_version < 1500056 + /* + * FreeBSD 15.0 changed the cr_groups layout: earlier versions + * used cr_groups[0] for the effective GID, but that's somewhat + * error-prone when propagated throughout the various parts of + * the system (e.g., setgroups/getgroups). In older versions, + * we want to hop over the egid. + */ + suppgroups++; + nsupp--; +#endif + + for (size_t i = 0, s = 0; i < specificgidcnt; i++) { + gid_t cgid; + + cgid = specificgids[i]; + if (cgid == cr1->cr_rgid) { + error = 0; + break; + } + + /* + * specificgids and suppgroups are both sorted + * ascending, so advance past all of the supplemental + * groups that are lower than the specificgid we're + * currently at. + */ + while (s < nsupp && cgid > suppgroups[s]) + s++; + + /* + * Out of supplementary groups, but we'll keep checking + * for rgid matches. + */ + if (s == nsupp) + continue; + + if (cgid == suppgroups[s]) { + error = 0; + break; + } + } + } + + rm_runlock(&seeotheruids_rmlock, &tracker); + return (error); } static int @@ -174,6 +327,7 @@ seeotheruids_socket_check_visible(struct ucred *cred, struct socket *so, static struct mac_policy_ops seeotheruids_ops = { + .mpo_destroy = seeotheruids_destroy, .mpo_proc_check_debug = seeotheruids_proc_check_debug, .mpo_proc_check_sched = seeotheruids_proc_check_sched, .mpo_proc_check_signal = seeotheruids_proc_check_signal, From nobody Wed Apr 29 04:17:45 2026 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4g53tm1PhNz6cYwW for ; Wed, 29 Apr 2026 04:17:52 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R13" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4g53tl3QPWz49Nl for ; Wed, 29 Apr 2026 04:17:50 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1777436271; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=6rkS7DDsnmzCGdH7rgcO2dmAubkEbAQavDLvf6pwa8s=; b=gojJvS/zxG5FuMpVCW0P98ogwIUX6xoGA21ecfWvNmXwYx7yFyBrQHYcbtFOpipZ63z9l2 0LphqmlvUjS/QeKGUt3IFlqMUscNma69tq03A32lkzVLxLV5LJtCny++y8mBtKsF5kcrqT vzX8WE8XCto9pfJywcLTzrSo5WTNUQI1iI+r+zpi5vBc+VBiLKcgWHynSGkaKtvJVAmgJA DpnEiT9VdPLVaz9gqnu/mMnhUnaCBoKlq4k2+fzGQsbfobl9huACV1FBXjbNVI7HKt1KtS sqjKBbt1RoHZ52Xj7+2DW8sRz9R0XC3MEMEIOxDZVvuqMv+91R244LnOYWglJA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1777436271; a=rsa-sha256; cv=none; b=EXnRgLWEINd6Y+nv1Yo5DOUl1EMZW6mgtidGLf4jTp9EiI5SPDuzEkkEO1HPwH5fSHza6Y BysD+kTdxJfsf0Zp2Ys+93HLrGwBP2gCQlJK4xsGZSpg93225Gyox2EHKT6ZdPtB5rwuPL egTEQuD6hrHSUIvDZF91HFaOwtMgd70950p6y6Yp50Ud/faGR3iRIOp/BK3pe5h/PZV8Vn F+4XKbi78Hdgdi1ZUIK7Ti9k8yV5At46NqMIeLUakCqC7nSTP2PzAO0AvDPSXIwI4PuKjy Ig7am2yLsue6nm2UC3uq03Fh2QKENtEaWBReBq1C2BzWbsNrJVymY6Gylx8h+Q== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1777436271; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=6rkS7DDsnmzCGdH7rgcO2dmAubkEbAQavDLvf6pwa8s=; b=i4MP7R29/zOAz8thpAabvnESbNtdY4eTeNPK7edN7fbOzjL8FXFyiRTeG2Qd7zbkvWt9pW 7pL6ikLIpTlOOeg8fo/P3ZbuH1vc6fGz7Ys+3K9g8RgnRPJNjZiMslUtqE3SrjfvAP2JHN IS/Epj2G8E9Ef+v9la2vvyPug+YK0tsurUoEVgTxd5bn4w3yQ1FqDwSLfq6fO9S5KG0tHS EnZf8IRgRDu2KEewdvUTmik+Vt4jZe9XPKqF1BcQzNDLfPIvlLowQ6Q1HAanwSz2HgVTu8 p6xEXqF80BMcgHdUpEn41GWOkU9lLpgDfOm4QG4rPVjwcUYA4O3cKkBTAOQQmw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4g53tk2WmWz83R for ; Wed, 29 Apr 2026 04:17:50 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 1882e by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Wed, 29 Apr 2026 04:17:45 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org Cc: Christian S.J. Peron From: Kyle Evans Subject: git: b9414a1ccf1d - stable/15 - Fix memory corruption bugs in BSM record parsing List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kevans X-Git-Repository: src X-Git-Refname: refs/heads/stable/15 X-Git-Reftype: branch X-Git-Commit: b9414a1ccf1d3daf218b2679fef4c2c244b9bc33 Auto-Submitted: auto-generated Date: Wed, 29 Apr 2026 04:17:45 +0000 Message-Id: <69f18669.1882e.7b7d9e31@gitrepo.freebsd.org> The branch stable/15 has been updated by kevans: URL: https://cgit.FreeBSD.org/src/commit/?id=b9414a1ccf1d3daf218b2679fef4c2c244b9bc33 commit b9414a1ccf1d3daf218b2679fef4c2c244b9bc33 Author: Christian S.J. Peron AuthorDate: 2026-04-23 20:26:50 +0000 Commit: Kyle Evans CommitDate: 2026-04-29 04:16:59 +0000 Fix memory corruption bugs in BSM record parsing fetch_newgroups_tok(3): clamp group count to AUDIT_MAX_GROUPS before the loop to prevent a stack buffer overflow when a crafted record specifies more than 16 groups. fetch_execarg_tok(3), fetch_execenv_tok(3): add a bounds check at the top of the string-walking loop to prevent an out-of-bounds read when the previous string's nul byte is the last byte of the record buffer. fetch_sock_unix_tok(3): clamp the memchr search length to the number of bytes remaining in the buffer to prevent an out-of-bounds read on short tokens. Also clamp slen to sizeof(path) to prevent a one-byte overflow when no nul byte is found within the path data. fetch_socket_tok: fix copy-paste error where the remote address was written into l_addr instead of r_addr. Previously reported by: @haginara Define AU_UNIX_PATH_MAX as 108 (the largest sun_path across all supported platforms) and use it in au_socketunix_t instead of the hardcoded 104. Update fetch_sock_unix_tok to derive its search bound from sizeof(tok->tt.sockunix.path) so cross-platform records from Solaris and Linux with paths up to 108 bytes parse correctly without truncation. REF: https://github.com/openbsm/openbsm/pull/87 Reviewed by: kevans, markj (cherry picked from commit a46205a100b3201a60aaca26e4ac8097e1e136a7) --- contrib/openbsm/bsm/libbsm.h | 10 ++++++-- contrib/openbsm/libbsm/bsm_io.c | 50 +++++++++++++++++++++++++++++++++----- contrib/openbsm/libbsm/bsm_token.c | 2 +- 3 files changed, 53 insertions(+), 9 deletions(-) diff --git a/contrib/openbsm/bsm/libbsm.h b/contrib/openbsm/bsm/libbsm.h index 2614a84f01e2..f0ea3943254d 100644 --- a/contrib/openbsm/bsm/libbsm.h +++ b/contrib/openbsm/bsm/libbsm.h @@ -585,13 +585,19 @@ typedef struct { u_int32_t addr; } au_socketinet32_t; +/* + * Largest sun_path across all supported platforms (Linux and Solaris use 108, + * macOS and FreeBSD use 104). + */ +#define AU_UNIX_PATH_MAX 108 + /* * socket family 2 bytes - * path 104 bytes + * path up to AU_UNIX_PATH_MAX bytes (NUL terminated) */ typedef struct { u_int16_t family; - char path[104]; + char path[AU_UNIX_PATH_MAX]; } au_socketunix_t; /* diff --git a/contrib/openbsm/libbsm/bsm_io.c b/contrib/openbsm/libbsm/bsm_io.c index f0b3e4a1a2df..323f4ed337f8 100644 --- a/contrib/openbsm/libbsm/bsm_io.c +++ b/contrib/openbsm/libbsm/bsm_io.c @@ -1867,6 +1867,15 @@ fetch_execarg_tok(tokenstr_t *tok, u_char *buf, int len) return (-1); for (i = 0; i < tok->tt.execarg.count; i++) { + /* + * Make sure that tok->len has not reached the end of the + * buffer. If the previous string's nul byte was the last byte + * in the buffer, the nul accounting below will have set + * tok->len == len, leaving no room for another string. + */ + if (tok->len >= (u_int32_t)len) { + return (-1); + } bptr = buf + tok->len; if (i < AUDIT_MAX_ARGS) tok->tt.execarg.text[i] = (char*)bptr; @@ -1925,6 +1934,15 @@ fetch_execenv_tok(tokenstr_t *tok, u_char *buf, int len) return (-1); for (i = 0; i < tok->tt.execenv.count; i++) { + /* + * Make sure that tok->len has not reached the end of the + * buffer. If the previous string's nul byte was the last byte + * in the buffer, the nul accounting below will have set + * tok->len == len, leaving no room for another string. + */ + if (tok->len >= (u_int32_t)len) { + return (-1); + } bptr = buf + tok->len; if (i < AUDIT_MAX_ENV) tok->tt.execenv.text[i] = (char*)bptr; @@ -2037,6 +2055,17 @@ fetch_newgroups_tok(tokenstr_t *tok, u_char *buf, int len) if (err) return (-1); + /* + * grps.list[] is statically sized and set to AUDIT_MAX_GROUPS. If the + * group count specified in the record is greater than this value just + * clamp/truncate it. Silently truncating a malformed record changes + * what was recorded and could mask tampering. However, a precedent + * has been set in fetch_execarg_tok and fetch_execenv_tok which + * truncate the count under similar circumstances. + */ + if (tok->tt.grps.no > AUDIT_MAX_GROUPS) { + tok->tt.grps.no = AUDIT_MAX_GROUPS; + } for (i = 0; itt.grps.no; i++) { READ_TOKEN_U_INT32(buf, len, tok->tt.grps.list[i], tok->len, err); @@ -3197,27 +3226,36 @@ print_sock_inet128_tok(FILE *fp, tokenstr_t *tok, char *del, int oflags) /* * socket family 2 bytes - * path (up to) 104 bytes + NULL (NULL terminated string). + * path (up to) AU_UNIX_PATH_MAX bytes (NUL terminated) */ static int fetch_sock_unix_tok(tokenstr_t *tok, u_char *buf, int len) { + size_t remaining, search, pathmax; int err = 0; u_char *p; int slen; - READ_TOKEN_U_INT16(buf, len, tok->tt.sockunix.family, tok->len, err); if (err) return (-1); - /* slen = strnlen((buf + tok->len), 104) + 1; */ - p = (u_char *)memchr((const void *)(buf + tok->len), '\0', 104); - slen = (p ? (int)(p - (buf + tok->len)) : 104) + 1; + /* + * Clamp the search to the bytes remaining in the token and the path + * storage size. Using sizeof(tok->tt.sockunix.path) rather than a + * literal keeps the bound in sync with au_socketunix_t automatically. + */ + pathmax = sizeof(tok->tt.sockunix.path); + remaining = (size_t)(len - (int)tok->len); + search = remaining < pathmax ? remaining : pathmax; + p = (u_char *)memchr((const void *)(buf + tok->len), '\0', search); + slen = (p ? (int)(p - (buf + tok->len)) + 1 : (int)search); READ_TOKEN_BYTES(buf, len, tok->tt.sockunix.path, slen, tok->len, err); if (err) return (-1); + /* guarantee NUL termination when no NUL was found in the token data */ + tok->tt.sockunix.path[pathmax - 1] = '\0'; return (0); } @@ -3278,7 +3316,7 @@ fetch_socket_tok(tokenstr_t *tok, u_char *buf, int len) if (err) return (-1); - READ_TOKEN_BYTES(buf, len, &tok->tt.socket.l_addr, + READ_TOKEN_BYTES(buf, len, &tok->tt.socket.r_addr, sizeof(tok->tt.socket.r_addr), tok->len, err); if (err) return (-1); diff --git a/contrib/openbsm/libbsm/bsm_token.c b/contrib/openbsm/libbsm/bsm_token.c index 682836f43870..8f55945cb33b 100644 --- a/contrib/openbsm/libbsm/bsm_token.c +++ b/contrib/openbsm/libbsm/bsm_token.c @@ -1051,7 +1051,7 @@ au_to_socket_ex(u_short so_domain, u_short so_type, /* * token ID 1 byte * socket family 2 bytes - * path (up to) 104 bytes + NULL (NULL terminated string) + * path (up to) AU_UNIX_PATH_MAX bytes (NUL terminated) */ token_t * au_to_sock_unix(struct sockaddr_un *so) From nobody Wed Apr 29 04:21:53 2026 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4g53zP2xXCz6cZKP for ; Wed, 29 Apr 2026 04:21:53 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R13" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4g53zP2FdHz3Bwl for ; Wed, 29 Apr 2026 04:21:53 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1777436513; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=6W99jaMyMpslmYeUQC7qas+CzIp1wb2Kcwlhk1aLTNo=; b=gAJLFppSqTEHmEsSi2IzGb99OkRV7iSAcdiwD81rYG5IldB9mhlVcLexgMXGK7M2QNbSv+ tDeci+A1BLTTwCHIj1ZvwVB4cC9+N3e2+XzdPyqzRzJP1D/UPAPichHGcXWT/GyW2EQT9N D3lSvEiLhvFApPThRoX49YnLgvOVHqDUdjKZPQnYssSPu9stpT2yqGItvyr9JQaSIBVTKO BcrOhoF73IwEc6RjvUMt+LqTDLbU1cR45CEngLTqe/BJcEUsXmfSnUQ0KsjquELCB4ap4Z HkriuRmSXSETOEsYJX/O+yo9BJ2jJcb1/r7NduSsw2WHfKuXp6oMTqiSrl77wA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1777436513; a=rsa-sha256; cv=none; b=YHTwxWJLVlWk/ix79In2t0xCLYsZR49O2E3uTIMYnp9qkkTPA3msXvAb+wi7hRMd20FVfg rjXJDR8gxMqkiCMfPHGvnrVrYtly3zD20AwBNM8Rfqynd3VZ+atDRW8+v27Q087RrKFc/y X7NQEEcUDIDrCa5IDMFnJVE6ubPmjpNee6f7XsCUQgdyr9einBpmo6wSLbcuL64IhsCuI5 9XHkeZ4h8IKGA2gsfUbLuPSzZ8MlYO2LvGb9YUVvqxP3Wmrm3J/NdJcbTxPQHrjyamM3Ug wAci97okk6xiWV8jKmkyjYsgor+rINVbV4dTzDGQ3BsucWAXCVR79NIImcbdrw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1777436513; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=6W99jaMyMpslmYeUQC7qas+CzIp1wb2Kcwlhk1aLTNo=; b=N+0Ii1CeY61BodtxoDJOF4t5KV4fZxSf70xwI4RgyZEKaoKsRKXUJwg8JAiXBlJqTVHAuH J4pPyi6e+yQHnQxAdgclZkiNJ7FvpN7BKKRgjHauD4PcQWDVeY++sxP7eU+xJEZRpeh5JT rAdG/KfhyXfjiLbz8RUcdTzflMaUPMKgbEXArllBEPyczGnUNjpIBYw+ESUwss2W0ciygD l3GkN6zw8D8AiWPUIAQMLgXPF8enQNMn38EJEFKL2UAfCOg3dhZU55YEovykiWngkNXpRk vETiPLSn4p69HuubXrtl0bSehs8Z2agjHrB5HbE55mJKJBnwmpTuh4jsM2EMsQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4g53zP1KHbz8f3 for ; Wed, 29 Apr 2026 04:21:53 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 1a1c3 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Wed, 29 Apr 2026 04:21:53 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org Cc: Christian S.J. Peron From: Kyle Evans Subject: git: 09db36421d01 - stable/14 - Fix memory corruption bugs in BSM record parsing List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kevans X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: 09db36421d01dba38a7d857d865773ac96ddacab Auto-Submitted: auto-generated Date: Wed, 29 Apr 2026 04:21:53 +0000 Message-Id: <69f18761.1a1c3.1b5bef53@gitrepo.freebsd.org> The branch stable/14 has been updated by kevans: URL: https://cgit.FreeBSD.org/src/commit/?id=09db36421d01dba38a7d857d865773ac96ddacab commit 09db36421d01dba38a7d857d865773ac96ddacab Author: Christian S.J. Peron AuthorDate: 2026-04-23 20:26:50 +0000 Commit: Kyle Evans CommitDate: 2026-04-29 04:19:58 +0000 Fix memory corruption bugs in BSM record parsing fetch_newgroups_tok(3): clamp group count to AUDIT_MAX_GROUPS before the loop to prevent a stack buffer overflow when a crafted record specifies more than 16 groups. fetch_execarg_tok(3), fetch_execenv_tok(3): add a bounds check at the top of the string-walking loop to prevent an out-of-bounds read when the previous string's nul byte is the last byte of the record buffer. fetch_sock_unix_tok(3): clamp the memchr search length to the number of bytes remaining in the buffer to prevent an out-of-bounds read on short tokens. Also clamp slen to sizeof(path) to prevent a one-byte overflow when no nul byte is found within the path data. fetch_socket_tok: fix copy-paste error where the remote address was written into l_addr instead of r_addr. Previously reported by: @haginara Define AU_UNIX_PATH_MAX as 108 (the largest sun_path across all supported platforms) and use it in au_socketunix_t instead of the hardcoded 104. Update fetch_sock_unix_tok to derive its search bound from sizeof(tok->tt.sockunix.path) so cross-platform records from Solaris and Linux with paths up to 108 bytes parse correctly without truncation. REF: https://github.com/openbsm/openbsm/pull/87 Reviewed by: kevans, markj (cherry picked from commit a46205a100b3201a60aaca26e4ac8097e1e136a7) --- contrib/openbsm/bsm/libbsm.h | 10 ++++++-- contrib/openbsm/libbsm/bsm_io.c | 50 +++++++++++++++++++++++++++++++++----- contrib/openbsm/libbsm/bsm_token.c | 2 +- 3 files changed, 53 insertions(+), 9 deletions(-) diff --git a/contrib/openbsm/bsm/libbsm.h b/contrib/openbsm/bsm/libbsm.h index 2614a84f01e2..f0ea3943254d 100644 --- a/contrib/openbsm/bsm/libbsm.h +++ b/contrib/openbsm/bsm/libbsm.h @@ -585,13 +585,19 @@ typedef struct { u_int32_t addr; } au_socketinet32_t; +/* + * Largest sun_path across all supported platforms (Linux and Solaris use 108, + * macOS and FreeBSD use 104). + */ +#define AU_UNIX_PATH_MAX 108 + /* * socket family 2 bytes - * path 104 bytes + * path up to AU_UNIX_PATH_MAX bytes (NUL terminated) */ typedef struct { u_int16_t family; - char path[104]; + char path[AU_UNIX_PATH_MAX]; } au_socketunix_t; /* diff --git a/contrib/openbsm/libbsm/bsm_io.c b/contrib/openbsm/libbsm/bsm_io.c index f0b3e4a1a2df..323f4ed337f8 100644 --- a/contrib/openbsm/libbsm/bsm_io.c +++ b/contrib/openbsm/libbsm/bsm_io.c @@ -1867,6 +1867,15 @@ fetch_execarg_tok(tokenstr_t *tok, u_char *buf, int len) return (-1); for (i = 0; i < tok->tt.execarg.count; i++) { + /* + * Make sure that tok->len has not reached the end of the + * buffer. If the previous string's nul byte was the last byte + * in the buffer, the nul accounting below will have set + * tok->len == len, leaving no room for another string. + */ + if (tok->len >= (u_int32_t)len) { + return (-1); + } bptr = buf + tok->len; if (i < AUDIT_MAX_ARGS) tok->tt.execarg.text[i] = (char*)bptr; @@ -1925,6 +1934,15 @@ fetch_execenv_tok(tokenstr_t *tok, u_char *buf, int len) return (-1); for (i = 0; i < tok->tt.execenv.count; i++) { + /* + * Make sure that tok->len has not reached the end of the + * buffer. If the previous string's nul byte was the last byte + * in the buffer, the nul accounting below will have set + * tok->len == len, leaving no room for another string. + */ + if (tok->len >= (u_int32_t)len) { + return (-1); + } bptr = buf + tok->len; if (i < AUDIT_MAX_ENV) tok->tt.execenv.text[i] = (char*)bptr; @@ -2037,6 +2055,17 @@ fetch_newgroups_tok(tokenstr_t *tok, u_char *buf, int len) if (err) return (-1); + /* + * grps.list[] is statically sized and set to AUDIT_MAX_GROUPS. If the + * group count specified in the record is greater than this value just + * clamp/truncate it. Silently truncating a malformed record changes + * what was recorded and could mask tampering. However, a precedent + * has been set in fetch_execarg_tok and fetch_execenv_tok which + * truncate the count under similar circumstances. + */ + if (tok->tt.grps.no > AUDIT_MAX_GROUPS) { + tok->tt.grps.no = AUDIT_MAX_GROUPS; + } for (i = 0; itt.grps.no; i++) { READ_TOKEN_U_INT32(buf, len, tok->tt.grps.list[i], tok->len, err); @@ -3197,27 +3226,36 @@ print_sock_inet128_tok(FILE *fp, tokenstr_t *tok, char *del, int oflags) /* * socket family 2 bytes - * path (up to) 104 bytes + NULL (NULL terminated string). + * path (up to) AU_UNIX_PATH_MAX bytes (NUL terminated) */ static int fetch_sock_unix_tok(tokenstr_t *tok, u_char *buf, int len) { + size_t remaining, search, pathmax; int err = 0; u_char *p; int slen; - READ_TOKEN_U_INT16(buf, len, tok->tt.sockunix.family, tok->len, err); if (err) return (-1); - /* slen = strnlen((buf + tok->len), 104) + 1; */ - p = (u_char *)memchr((const void *)(buf + tok->len), '\0', 104); - slen = (p ? (int)(p - (buf + tok->len)) : 104) + 1; + /* + * Clamp the search to the bytes remaining in the token and the path + * storage size. Using sizeof(tok->tt.sockunix.path) rather than a + * literal keeps the bound in sync with au_socketunix_t automatically. + */ + pathmax = sizeof(tok->tt.sockunix.path); + remaining = (size_t)(len - (int)tok->len); + search = remaining < pathmax ? remaining : pathmax; + p = (u_char *)memchr((const void *)(buf + tok->len), '\0', search); + slen = (p ? (int)(p - (buf + tok->len)) + 1 : (int)search); READ_TOKEN_BYTES(buf, len, tok->tt.sockunix.path, slen, tok->len, err); if (err) return (-1); + /* guarantee NUL termination when no NUL was found in the token data */ + tok->tt.sockunix.path[pathmax - 1] = '\0'; return (0); } @@ -3278,7 +3316,7 @@ fetch_socket_tok(tokenstr_t *tok, u_char *buf, int len) if (err) return (-1); - READ_TOKEN_BYTES(buf, len, &tok->tt.socket.l_addr, + READ_TOKEN_BYTES(buf, len, &tok->tt.socket.r_addr, sizeof(tok->tt.socket.r_addr), tok->len, err); if (err) return (-1); diff --git a/contrib/openbsm/libbsm/bsm_token.c b/contrib/openbsm/libbsm/bsm_token.c index 682836f43870..8f55945cb33b 100644 --- a/contrib/openbsm/libbsm/bsm_token.c +++ b/contrib/openbsm/libbsm/bsm_token.c @@ -1051,7 +1051,7 @@ au_to_socket_ex(u_short so_domain, u_short so_type, /* * token ID 1 byte * socket family 2 bytes - * path (up to) 104 bytes + NULL (NULL terminated string) + * path (up to) AU_UNIX_PATH_MAX bytes (NUL terminated) */ token_t * au_to_sock_unix(struct sockaddr_un *so) From nobody Wed Apr 29 04:21:54 2026 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4g53zQ3jYTz6cZ7n for ; Wed, 29 Apr 2026 04:21:54 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R13" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4g53zQ2rD5z3Btg for ; Wed, 29 Apr 2026 04:21:54 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1777436514; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=FLocsKLoC81ghI8JZ/v8smN4WiUMnbk6DhgDI2SXlWg=; b=mX6YhqHWZDAKmssilo3OOeyIevi1QB0MZFvvYKjzvxMhStBjDd1vKIRP/KGLTQEJ/Z10E1 dPf3yRzau6aLWJMBGsYh/mGJsXaXfhQs+GJGL7kQXGNFgisbvuhrzhuINjoG2/U/bYnDqf gDRAprLwb7OPkaMsxGQAgzITF9Z4JWtZxSreY8Jp8GOkKVVPiraGpYFrtexuPWi6rmvJUp KErMvmRkut72QEU1tttbOcMCCXGdB9EcgDcWjn9xfyujnXgGLv7ZfeEijkHy1GpGZbjTfi f1RIVNF6+TGktZUmCVhYwEIF8Tcn3St2blhmtg56RolTZL+8bJAqxK1eklUodQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1777436514; a=rsa-sha256; cv=none; b=JhkNf0ZgBDbnTq0+4w3Ifgzj7dMFf27+Z3tU3Yeo1cqk5TBV73X8qkeIBQaVFuKdchJvel 4sOcXzqCzqBFOqSg3Iy7G3b9cS1LXJN1kCl/HtAMB8UFqTGI4gWJ6QaWFgybxuOaGcIuk5 g0ski47Z3AurRU/9zJpoa0t+DZwQExInCckROgEth4GXuDHDzQvEHO/B6x8sbwnu9Hxtqs 2axcnB4UeVn14X+SB3Rb5IDkKu6X/QLcUWoPCQQ9IISWdvGfEOLkUdUQupRZtZRNvkj8LD 2hUgT0x8s7rShirHvjIZTGWmS/mkeaq1Fx01pWFrEcaxsWkoU839Dcqz6OvzJw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1777436514; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=FLocsKLoC81ghI8JZ/v8smN4WiUMnbk6DhgDI2SXlWg=; b=ZixqQ4vnki6l1VVSrH6k/bDwvV58QAYiEZoDN3KdrqCWjb5mDXnZS12vX1sCpv6e2B/iN/ Vq5ovD/slTbDcjneYNjSfZX4i268qgLoZhe94rShBI00UgYIHY4a0NORGOXa715UILhDrQ 3twPStaR+GoNNl/oLN1nswBQJtOuxfProsqnLQ/62kMXVyPy91YvTU81EOAnk+h/hIOh+3 VcwsWyKab9zjVtcgcLKNaloVVS9ArA55MMVrPbqnzpmIvB2rnheLEHoRjPU63tNoTYIScK 4ETKMWRgh3mceJivq4DeH4ros3Di0XSqvt7eGdp6oXPmkqmMJuMdaylb7I4lwA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4g53zQ283Hz8f4 for ; Wed, 29 Apr 2026 04:21:54 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 1c180 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Wed, 29 Apr 2026 04:21:54 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Kyle Evans Subject: git: 14dfca710fd0 - stable/14 - mac_seeotheruids: allow specificgid to be a list of groups List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kevans X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: 14dfca710fd06d02b4a1cfa25e080b7d90d802dc Auto-Submitted: auto-generated Date: Wed, 29 Apr 2026 04:21:54 +0000 Message-Id: <69f18762.1c180.356a853d@gitrepo.freebsd.org> The branch stable/14 has been updated by kevans: URL: https://cgit.FreeBSD.org/src/commit/?id=14dfca710fd06d02b4a1cfa25e080b7d90d802dc commit 14dfca710fd06d02b4a1cfa25e080b7d90d802dc Author: Kyle Evans AuthorDate: 2026-03-01 03:42:25 +0000 Commit: Kyle Evans CommitDate: 2026-04-29 04:19:58 +0000 mac_seeotheruids: allow specificgid to be a list of groups The specificgid functionality has historically allowed only a single group to be exempt, but in practice one might want a few services to be exempt for reasons. From a security perspective, we probably don't want to encourage unrelated users to be grouped together solely for this purpose, as that creates one point of shared access that could be used for nefarious purposes. Normalize the group list as we do cr_groups to allow for linear matching rather than quadratic, we just need to account for the differences in FreeBSD 15.0+ where cr_groups is entirely supplementary groups vs. earlier versions, where cr_groups[0] is the egid and the rest is sorted. Reviewed by: csjp, des (earlier version) Sponsored by: Klara, Inc. (cherry picked from commit b675ff8eedc9ac93cdf1cfe33185b7a1a027df37) --- share/man/man4/mac_seeotheruids.4 | 4 +- sys/security/mac_seeotheruids/mac_seeotheruids.c | 174 +++++++++++++++++++++-- 2 files changed, 166 insertions(+), 12 deletions(-) diff --git a/share/man/man4/mac_seeotheruids.4 b/share/man/man4/mac_seeotheruids.4 index 5b1718bf83d4..04f67ebb7ea3 100644 --- a/share/man/man4/mac_seeotheruids.4 +++ b/share/man/man4/mac_seeotheruids.4 @@ -28,7 +28,7 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.Dd July 25, 2015 +.Dd Februrary 26, 2026 .Dt MAC_SEEOTHERUIDS 4 .Os .Sh NAME @@ -80,7 +80,7 @@ set the sysctl OID .Va security.mac.seeotheruids.specificgid_enabled to 1, and .Va security.mac.seeotheruids.specificgid -to the group ID to be exempted. +to the list of group IDs to be exempted. .Ss Label Format No labels are defined for .Nm . diff --git a/sys/security/mac_seeotheruids/mac_seeotheruids.c b/sys/security/mac_seeotheruids/mac_seeotheruids.c index 9cd2e0f3c0fc..a112a904fa72 100644 --- a/sys/security/mac_seeotheruids/mac_seeotheruids.c +++ b/sys/security/mac_seeotheruids/mac_seeotheruids.c @@ -45,9 +45,12 @@ #include #include +#include +#include #include #include #include +#include #include #include #include @@ -59,6 +62,9 @@ #include +static MALLOC_DEFINE(M_SEEOTHERUIDS, "mac_seeotheruids", + "mac_seeotheruids(4) security module"); + static SYSCTL_NODE(_security_mac, OID_AUTO, seeotheruids, CTLFLAG_RW | CTLFLAG_MPSAFE, 0, "TrustedBSD mac_seeotheruids policy controls"); @@ -94,13 +100,116 @@ SYSCTL_INT(_security_mac_seeotheruids, OID_AUTO, specificgid_enabled, CTLFLAG_RW, &specificgid_enabled, 0, "Make an exception for credentials " "with a specific gid as their real primary group id or group set"); -static gid_t specificgid = 0; -SYSCTL_UINT(_security_mac_seeotheruids, OID_AUTO, specificgid, CTLFLAG_RW, - &specificgid, 0, "Specific gid to be exempt from seeotheruids policy"); +static struct rmlock seeotheruids_rmlock; +RM_SYSINIT_FLAGS(mac_seeotheruids_lock, &seeotheruids_rmlock, + "mac_seeotheruids_lock", RM_SLEEPABLE); + +static gid_t *specificgids; +static size_t specificgidcnt; + +static int +gidp_cmp(const void *p1, const void *p2) +{ + const gid_t g1 = *(const gid_t *)p1; + const gid_t g2 = *(const gid_t *)p2; + + return ((g1 > g2) - (g1 < g2)); +} + +static void +specificgid_normalize(gid_t *gidlist, size_t *ngidp) +{ + int ins_idx; + gid_t prev_g; + + if (*ngidp < 2) + return; + + qsort(gidlist, *ngidp, sizeof(*gidlist), gidp_cmp); + + prev_g = gidlist[0]; + ins_idx = 1; + for (int i = ins_idx; i < *ngidp; ++i) { + const gid_t g = gidlist[i]; + + if (g != prev_g) { + if (i != ins_idx) + gidlist[ins_idx] = g; + ++ins_idx; + prev_g = g; + } + } + + *ngidp = ins_idx; +} + +static int +specificgid_sysctl(SYSCTL_HANDLER_ARGS) +{ + gid_t *newgids = NULL; + size_t ingidcnt, newgidcnt = 0; + int error; + + /* Allocate our new gid array before we take our non-sleepable lock. */ + if (req->newptr != NULL) { + if (req->newlen % sizeof(gid_t) != 0) + return (EINVAL); + ingidcnt = newgidcnt = howmany(req->newlen, sizeof(gid_t)); + newgids = mallocarray(newgidcnt, sizeof(*newgids), + M_SEEOTHERUIDS, M_WAITOK); + + error = SYSCTL_IN(req, newgids, newgidcnt * sizeof(*newgids)); + if (error != 0) { + free(newgids, M_SEEOTHERUIDS); + return (error); + } + + specificgid_normalize(newgids, &newgidcnt); + + /* + * It might be debatable whether shrinking the allocation is + * worth it, but we'll do it in the off-chance that someone is + * generating specificgid entries from various configuration + * sources that won't de-duplicate. + */ + if (newgidcnt < ingidcnt) { + newgids = realloc(newgids, newgidcnt * sizeof(*newgids), + M_SEEOTHERUIDS, M_WAITOK); + } + } + + rm_wlock(&seeotheruids_rmlock); + + error = SYSCTL_OUT(req, specificgids, + specificgidcnt * sizeof(*specificgids)); + if (error == 0 && req->newptr != NULL) { + free(specificgids, M_SEEOTHERUIDS); + + specificgids = newgids; + specificgidcnt = newgidcnt; + } else if (error != 0) { + free(newgids, M_SEEOTHERUIDS); + } + + rm_wunlock(&seeotheruids_rmlock); + return (error); +} +SYSCTL_PROC(_security_mac_seeotheruids, OID_AUTO, specificgid, + CTLFLAG_RW | CTLTYPE_UINT | CTLFLAG_MPSAFE, 0, 0, + &specificgid_sysctl, "I", + "Specific gid(s) to be exempt from seeotheruids policy"); + +static void +seeotheruids_destroy(struct mac_policy_conf *mpc __unused) +{ + free(specificgids, M_SEEOTHERUIDS); +} static int seeotheruids_check(struct ucred *cr1, struct ucred *cr2) { + struct rm_priotracker tracker; + int error = ESRCH; if (!seeotheruids_enabled) return (0); @@ -110,12 +219,6 @@ seeotheruids_check(struct ucred *cr1, struct ucred *cr2) return (0); } - if (specificgid_enabled) { - if (cr1->cr_rgid == specificgid || - groupmember(specificgid, cr1)) - return (0); - } - if (cr1->cr_ruid == cr2->cr_ruid) return (0); @@ -124,7 +227,57 @@ seeotheruids_check(struct ucred *cr1, struct ucred *cr2) return (0); } - return (ESRCH); + rm_rlock(&seeotheruids_rmlock, &tracker); + if (specificgid_enabled && specificgids != NULL) { + const gid_t *suppgroups = cr1->cr_groups; + size_t nsupp = cr1->cr_ngroups; + +#if __FreeBSD_version < 1500056 + /* + * FreeBSD 15.0 changed the cr_groups layout: earlier versions + * used cr_groups[0] for the effective GID, but that's somewhat + * error-prone when propagated throughout the various parts of + * the system (e.g., setgroups/getgroups). In older versions, + * we want to hop over the egid. + */ + suppgroups++; + nsupp--; +#endif + + for (size_t i = 0, s = 0; i < specificgidcnt; i++) { + gid_t cgid; + + cgid = specificgids[i]; + if (cgid == cr1->cr_rgid) { + error = 0; + break; + } + + /* + * specificgids and suppgroups are both sorted + * ascending, so advance past all of the supplemental + * groups that are lower than the specificgid we're + * currently at. + */ + while (s < nsupp && cgid > suppgroups[s]) + s++; + + /* + * Out of supplementary groups, but we'll keep checking + * for rgid matches. + */ + if (s == nsupp) + continue; + + if (cgid == suppgroups[s]) { + error = 0; + break; + } + } + } + + rm_runlock(&seeotheruids_rmlock, &tracker); + return (error); } static int @@ -174,6 +327,7 @@ seeotheruids_socket_check_visible(struct ucred *cred, struct socket *so, static struct mac_policy_ops seeotheruids_ops = { + .mpo_destroy = seeotheruids_destroy, .mpo_proc_check_debug = seeotheruids_proc_check_debug, .mpo_proc_check_sched = seeotheruids_proc_check_sched, .mpo_proc_check_signal = seeotheruids_proc_check_signal, From nobody Wed Apr 29 07:29:37 2026 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4g58815THxz6b5cD for ; Wed, 29 Apr 2026 07:29:37 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R13" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4g58814lDBz3Sfr for ; Wed, 29 Apr 2026 07:29:37 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1777447777; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=sJXd6SUboNGnwqbsr2jyW+IldkKMPLB8k5/ws3QRYaU=; b=ddYZQT+wCgt4/IE7Mm64pZ8Sfcd0Sl7EORA5jirtev+ikW1lEnZxkoYb760538Hysj8BWE nWvh9wBB3vWJaYC7RRi8jP7IHS/9f36sa6GVpniOGMNIsmzcpVjWLJ2f4k84SoPFJbBTz6 UxLX4BMybgitPQtkRbtB7dmtxgRxwXdDyhmbuAXohMLl7Sc10yFzfLSRO5m2N3TeE1vjsL RxVjH2pl/vaRZiol1hAM2d1Fai6uAg1eecuciiBSbom/cedFOnmaio8zTJRsQDP/vpluGY UFXGdszvgkRvM/FAlbVljfmjIpxL+eGhaI+YUqbqhGc7PzkSxyIndCT0k2JYPA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1777447777; a=rsa-sha256; cv=none; b=SMobGYoXulzVONRHJZQI3TYKpBpwbRAorsLs4BBuerGQK05YYqhf28bnYjH3hLnlAOsJiV Xtj1h/Cl8GZbtBu/7oLHE1pnTytJTT4migW+S24Tx6GE2xSjXCTH7Y034o5q4yujgIC7qn OlXMD2JWKPuLJUNS76B2+7Ik1wjCPI92zE446kyhmxPU0NvByH1wxa62N2QAySq+Dtwv8x ICkARQ0jqSKvIDPME6A5UC6qQEz3eO0LM+GEXy8EXPTw8AbCFgDYjCmgfTZ0xEwGfFQG9k apuZGvELtbIQ2k23g03ZoPxnX3oYy36KMbFM2kxzxT0U/HumxijNctN0qSSE8A== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1777447777; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=sJXd6SUboNGnwqbsr2jyW+IldkKMPLB8k5/ws3QRYaU=; b=WzTgv3BjEhlxGVNx86SkyfT0mjk8Xa05KTYRwnpI8o5iU6KZPBIPFcztZHc8kI4sHvY5Cz i+XNjZIptimHtMb9h9P9VwlM9zuT31z2H1/sxeN2uSqqiyH0ioeVPKWMj9oLV8Rs9sPWtR TLTWpyWgUn51UZbXK88AMXqFdktL0rndDghk0x5jOofY+ntpvXcKz5t5xp+seKusxc2Rja aS8aRuQRo+tbNpF9lMnbfPfTUTfTVWni+PhhmpnND47RShn5N5h36ImuVhQ8gxnWm5h6Wk TtwVWYB4GqLcnXaEbKw4js7mlLVeQz8Vp2ozKYLqNioP29YGh29aE9sRxSNXYQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4g588142TLzVYk for ; Wed, 29 Apr 2026 07:29:37 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 36bf4 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Wed, 29 Apr 2026 07:29:37 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Johan=?utf-8?Q? S=C3=B6llv?=ander Subject: git: 6d3401ccf317 - stable/15 - ctladm tests: Only use allowed chars in IQN List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: js X-Git-Repository: src X-Git-Refname: refs/heads/stable/15 X-Git-Reftype: branch X-Git-Commit: 6d3401ccf317487b0c60233ce9058e22763ddd30 Auto-Submitted: auto-generated Date: Wed, 29 Apr 2026 07:29:37 +0000 Message-Id: <69f1b361.36bf4.36eb21d3@gitrepo.freebsd.org> The branch stable/15 has been updated by js: URL: https://cgit.FreeBSD.org/src/commit/?id=6d3401ccf317487b0c60233ce9058e22763ddd30 commit 6d3401ccf317487b0c60233ce9058e22763ddd30 Author: Johan Söllvander AuthorDate: 2026-04-22 14:19:42 +0000 Commit: Johan Söllvander CommitDate: 2026-04-29 07:28:55 +0000 ctladm tests: Only use allowed chars in IQN _ isn't part of the allowed IQN format, but - is. None functional change. Reviewed by: asomers, ngie Approved by: asomers (mentor) Sponsored by: ConnectWise Differential Revision: https://reviews.freebsd.org/D56557 (cherry picked from commit 51b65c6af2e19f1e944c67aa2b5252cd9dc9e2f7) --- usr.sbin/ctladm/tests/port.sh | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/usr.sbin/ctladm/tests/port.sh b/usr.sbin/ctladm/tests/port.sh index d966529a85ae..1103a1d7bafb 100644 --- a/usr.sbin/ctladm/tests/port.sh +++ b/usr.sbin/ctladm/tests/port.sh @@ -118,7 +118,7 @@ create_iscsi_body() { skip_if_ctld - TARGET=iqn.2018-10.myhost.create_iscsi + TARGET=iqn.2018-10.myhost.create-iscsi atf_check -o save:port-create.txt ctladm port -c -d "iscsi" -O cfiscsi_portal_group_tag=$PGTAG -O cfiscsi_target="$TARGET" echo "target: $TARGET" >> port-create.txt atf_check egrep -q "Port created successfully" port-create.txt @@ -146,7 +146,7 @@ create_iscsi_alias_body() { skip_if_ctld - TARGET=iqn.2018-10.myhost.create_iscsi_alias + TARGET=iqn.2018-10.myhost.create-iscsi-alias ALIAS="foobar" atf_check -o save:port-create.txt ctladm port -c -d "iscsi" -O cfiscsi_portal_group_tag=$PGTAG -O cfiscsi_target="$TARGET" -O cfiscsi_target_alias="$ALIAS" echo "target: $TARGET" >> port-create.txt @@ -173,7 +173,7 @@ create_iscsi_without_required_args_body() { skip_if_ctld - TARGET=iqn.2018-10.myhost.create_iscsi + TARGET=iqn.2018-10.myhost.create-iscsi atf_check -s exit:1 -e match:"Missing required argument: cfiscsi_target" ctladm port -c -d "iscsi" -O cfiscsi_portal_group_tag=$PGTAG atf_check -s exit:1 -e match:"Missing required argument: cfiscsi_portal_group_tag" ctladm port -c -d "iscsi" -O cfiscsi_target=$TARGET } @@ -288,7 +288,7 @@ remove_iscsi_body() { skip_if_ctld - TARGET=iqn.2018-10.myhost.remove_iscsi + TARGET=iqn.2018-10.myhost.remove-iscsi atf_check -o save:port-create.txt ctladm port -c -d "iscsi" -O cfiscsi_portal_group_tag=$PGTAG -O cfiscsi_target="$TARGET" portnum=`awk '/port:/ {print $2}' port-create.txt` atf_check -o save:portlist.txt ctladm portlist -qf iscsi @@ -314,7 +314,7 @@ remove_iscsi_without_required_args_body() { skip_if_ctld - TARGET=iqn.2018-10.myhost.remove_iscsi_without_required_args + TARGET=iqn.2018-10.myhost.remove-iscsi-without-required-args atf_check -o save:port-create.txt ctladm port -c -d "iscsi" -O cfiscsi_portal_group_tag=$PGTAG -O cfiscsi_target="$TARGET" echo "target: $TARGET" >> port-create.txt atf_check -s exit:1 -e match:"Missing required argument: cfiscsi_portal_group_tag" ctladm port -r -d iscsi -O cfiscsi_target="$TARGET" From nobody Wed Apr 29 07:58:09 2026 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4g58mx5x0Zz6b7m5 for ; Wed, 29 Apr 2026 07:58:09 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R13" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4g58mx5Rmjz3VTm for ; Wed, 29 Apr 2026 07:58:09 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1777449489; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=FOLuRwy4mBzq4meMNVFCQB2qug/iyfUoXroCRkPJWQQ=; b=eUUS9OU21UOr/o/FBRUR7UVLndDv/V1CUFC55UJ1WBUelGvE8JkG8uAjvjQituT+PBxNSn 3MvZmSuhLnqcfiaUqQMJxj2sG5eqta/kk+x5ct4GX0euipgOvyay4NE1F7kHDegEIGEIPm DrbBIImeWJO+zk6TlQPkvShUEjF89N2bQj0y/9a+OnSQ773vlF5D+h0CUeC0yFb2yrbsVb R6VrhpTBValq9maaQRvAUcxSWmXWPFuqjlzfI0zNk36M1CXfuNsp+HP8qved7p4XvBG8x6 LfbOEmpyqijhYhJo/5qXKuZo2a6OJMNoGDdGuAuEu3uo85jfG2JGjx8g9rrAbA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1777449489; a=rsa-sha256; cv=none; b=YMDBrJeQx7KBe8sVogMYVisNdlVj94Lk9+Yc2kSEgtXAzXGBZi94z0/7SOGd6mr7SBgPs0 bCfFCFCq2yeiuYByDlJQKPcQLxPmotLXz9mWWRiZYP36YgdT2Q7jJH72mLQ3PSd880NInE yOBFDbO38uEIpIFMd/beLYjlTi1EZYFLknFY7nX/8V8veWirUgnheEwuVZ6SRatMvLxKus L5EnwYOs5uWFhmk0ndbzAs3w5QNotDftP5adOEa4p+SfxYyL9ZSylsz7uTcGz9+uHlbVg3 KybeHzM+XnmWdX96m4PB6fZff2dffdyCIoUyPQcmBfU+aVI5ZG+MOmWYCZPN0g== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1777449489; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=FOLuRwy4mBzq4meMNVFCQB2qug/iyfUoXroCRkPJWQQ=; b=ZffBUpYE4okS/FjnqqL9kht3aXeNMHDGP8ppc5fIzpgtRFhcV3Nd7yQp6lvGNMts8JQh+u ZwdKQnm1L5gkynnkWPPaEOMv4FLuuZgVZUiHGDyfUF6Tk1ZJkm1Yf5YnLOj7Ag0pfA47Qv 5MtkTKfCi1icKnnhfFwszxFeGoNghelRPbO5vQqbfALjSIYLb3JSXzeCSOJRRLZnR6LyfL KuJHZDfMhyy2K+Sb89aa5q1w/BJGhz73DwiXVYirgNLvQS4I89hmkPDBOfFblCi+3t90yc paMWuO3CLXJpqrsC7LG5c7C4wPuwPig3v09OtG8PCGhQMcnnjjHlPg7hPcUdxQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4g58mx53TZzWtb for ; Wed, 29 Apr 2026 07:58:09 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 389c7 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Wed, 29 Apr 2026 07:58:09 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Kristof Provost Subject: git: bf1529d83918 - stable/15 - netlink: fix LINT-NOVIMAGE build List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kp X-Git-Repository: src X-Git-Refname: refs/heads/stable/15 X-Git-Reftype: branch X-Git-Commit: bf1529d839181f1eb7079e739cfd9e146ccc8952 Auto-Submitted: auto-generated Date: Wed, 29 Apr 2026 07:58:09 +0000 Message-Id: <69f1ba11.389c7.1fa16987@gitrepo.freebsd.org> The branch stable/15 has been updated by kp: URL: https://cgit.FreeBSD.org/src/commit/?id=bf1529d839181f1eb7079e739cfd9e146ccc8952 commit bf1529d839181f1eb7079e739cfd9e146ccc8952 Author: Kristof Provost AuthorDate: 2026-04-22 21:33:30 +0000 Commit: Kristof Provost CommitDate: 2026-04-29 07:41:09 +0000 netlink: fix LINT-NOVIMAGE build Include the required header for securelevel_ge() Fixes: 9933bdcb1264 ("pf: only allow a subset of netlink calls when securelevel is set") Sponsored by: Rubicon Communications, LLC ("Netgate") (cherry picked from commit 3103d39cd99f0a49414f907459d8fd3c11dc36b8) --- sys/netlink/netlink_generic.c | 1 + 1 file changed, 1 insertion(+) diff --git a/sys/netlink/netlink_generic.c b/sys/netlink/netlink_generic.c index 3a73ecc0b339..fb74860e42b3 100644 --- a/sys/netlink/netlink_generic.c +++ b/sys/netlink/netlink_generic.c @@ -34,6 +34,7 @@ #include #include #include +#include #include #include From nobody Wed Apr 29 07:58:15 2026 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4g58n81tWVz6b7k0; Wed, 29 Apr 2026 07:58:20 +0000 (UTC) (envelope-from kp@FreeBSD.org) Received: from smtp.freebsd.org (smtp.freebsd.org [96.47.72.83]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "smtp.freebsd.org", Issuer "R12" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4g58n80fxxz3W40; Wed, 29 Apr 2026 07:58:20 +0000 (UTC) (envelope-from kp@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1777449500; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=zF+o2lfefXkybzRLxzSzuEl6aGUdcNBSeCKqRNYfjO8=; b=cTKQani+xwfejl9XungMVCpgVQ4FEmkZeWJBPpsooHdtYm8A4/YEEKU9R3dUX6GJFnHcj6 ttHhTzYW+hHq+E4bDJ88Yy+ut2VUfoJpoBvkMwAVLrai3T9bhN795novf3M+v8q2ikjwiz GcLdCMWhrNJBimKaRmtBI3B2G//r8UtTWq2ZZ8dWQsndTEdhC3nNr9LRCHajt3u7EwLel2 EdAervGNzLVwhGk1ybUVYU/6cqbPGP7qpovnopYwQmDSTwWecvy8jgQtiXQc42JLGg6vYM hptBbTFuJEIgaw6BJ8+9GHq/r6dTJ5FIl+AuL1qfaIi7+f14BKDjuKVNTf6IqA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1777449500; a=rsa-sha256; cv=none; b=FNca6wvG07UqObhf6Z7lWFrZmRFutK3LxLAVUHPjFe2zrqAQ8YrwR0Jub9JOWBqo45fJV7 azi6sigYGwf0sVMDc4CWclJahAWitz9Knm65oxVbfKO24exuGA60mobgdvaNBFZfaphLbs arLxX15OYdwjqik1xK1Vr2KFZIUTu9XXnn5cP4jsNapYZFkBsikaUL6f9BY6LClYWRpayE 2q4TWWcztdSvBtCmF4ZxFOYccIcnbgURuxUpgEjhB4aazMwoWqKzNS2+USzxzEAuK6bp5z rgw/IcZncUJsDmHwE55GBxfAILCbYkD5dSyxrwlRXYF60DvA+wxTGOQjeibOuw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1777449500; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=zF+o2lfefXkybzRLxzSzuEl6aGUdcNBSeCKqRNYfjO8=; b=Dn3eGPRwUnq8XSZsb8bCzBqYOF+ho4Ssd/fdcMTktflqHj2/gP7lWYxTAPd2CcE5PwSZYR wWgpaBShw0ssKmJqTgNG4Wh7Ak/LZuUsir7vUv7vzxn1VoDe1Zjp8uiK9hKdWBLzdOlXp1 qCl7HiX51Eke27hWtw8WWkzG3u/OkUl6LXa3nLNnmgwlwFM+AXNLL73wl1vgkR92Dql/N5 rRajKm2FX3uShci/PEa8kvhevPOIWwqmfNr+t+Cz2puJdJrFPM98wgzYX5dShOsWSaYcYj szbxyMb55SAlZbeRXErFF5NeDW8wGTk1C1ndLfg/bAIxl01gzAdjP6l0mtihug== Received: from venus.codepro.be (venus.codepro.be [5.9.86.228]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "mx1.codepro.be", Issuer "R12" (not verified)) (Authenticated sender: kp) by smtp.freebsd.org (Postfix) with ESMTPSA id 4g58n766x2z10b7; Wed, 29 Apr 2026 07:58:19 +0000 (UTC) (envelope-from kp@FreeBSD.org) Received: by venus.codepro.be (Postfix, authenticated sender kp) id B2A0811B65; Wed, 29 Apr 2026 09:58:17 +0200 (CEST) From: Kristof Provost To: "Bjoern A. Zeeb" Cc: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org Subject: Re: git: 47c12f20bf58 - stable/15 - pf: only allow a subset of netlink calls when securelevel is set Date: Wed, 29 Apr 2026 09:58:15 +0200 X-Mailer: MailMate (2.0r6272) Message-ID: In-Reply-To: <7rsqr33-s25s-64q4-o8nn-81sn61p9s77r@mnoonqbm.arg> References: <69f0dab6.44d59.7949e6e5@gitrepo.freebsd.org> <7rsqr33-s25s-64q4-o8nn-81sn61p9s77r@mnoonqbm.arg> List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; markup=markdown Content-Transfer-Encoding: quoted-printable On 29 Apr 2026, at 0:20, Bjoern A. Zeeb wrote: > On Tue, 28 Apr 2026, Kristof Provost wrote: >> The branch stable/15 has been updated by kp: >> >> URL: https://cgit.FreeBSD.org/src/commit/?id=3D47c12f20bf58b69e7ab1707= e6e705907ad0d277e >> >> commit 47c12f20bf58b69e7ab1707e6e705907ad0d277e >> Author: Kristof Provost >> AuthorDate: 2026-04-20 06:36:17 +0000 >> Commit: Kristof Provost >> CommitDate: 2026-04-28 15:33:57 +0000 >> >> pf: only allow a subset of netlink calls when securelevel is set > > > This seems to have broken LINT-NOVIMAGE on stable/15. > > sys/netlink/netlink_generic.c:154:6: error: call to undeclared function= 'securelevel_ge'; ISO C99 and later do not support implicit function dec= larations [-Werror,-Wimplicit-function-declaration] > Thanks for the warning. We had the same issue on main, and I failed to re= member to also cherry-pick 3103d39cd99f0a49414f907459d8fd3c11dc36b8. It should be fixed now. Best regards, Kristof From nobody Wed Apr 29 14:47:46 2026 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4g5Ksb1zlhz6bkNK for ; Wed, 29 Apr 2026 14:47:47 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R13" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4g5Ksb09k6z4JHt for ; Wed, 29 Apr 2026 14:47:47 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1777474067; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Fq6djyp3gyKPViU89l7HxJodcNKwPhWSiSEOI5Vg0Lk=; b=i+MNXb6VrKGYsS2SQ5FAK4HYrgPSBaVEvPcxwiLZh6DdNAMEZxXfhvlic9cIZe7TOV2xVC Rp62AZOzBYBGY1ILIK73+4R1F8tG8FuNNrH4KHHWyM0o9GBcEMSumPGSv1A7Bz7QsAwLQc i2AZsvwRitAtMcuipNp0/GB6xVm645AyyzbnKMnmuOLvsnQXwGL3K0ohSyMJZo5rvCdTJh yB8RTc/Ne/zA54k4ueRbZlf1624urge0QuwZfVrcSDo0AMgyLKiqTk8R3TXbfT1LCGG27W BQ5eyfCCtvhiPngWgwOOaFrSsedJAYWVFY3xGd4KSvBsG054+5gcoISNRtNitw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1777474067; a=rsa-sha256; cv=none; b=c9ba91fm0ONyE5sJEQj+z5JWUD4RycmEAguhcAql2NDrNvin9i8AiYV87IN9f32JIA3jYt WnWVhrgVHGVWd5y5nQqU6lKeBZ/+hQ3+Twy8badwx/Lg41nO5TTxUtl+jsFsLOKCoXkMEl cIRJCk1SVmw2yPx4FoIrQsk8K1cP/lX0MgusU/VbzcY/obCtYAr6YO3NKJpyC4VYd2FoQf vYy7M1xphoJpWMjMCiXI6oWMVFwUKgmn7UrO8q/GkLwDJxOAfOI9GiNEgpAUtb/7zLsrMp HcvRvfkSyQ1P2lGo0ivNbI5xCMBCjK/paVrjEq4c36Zn0vbi3OGG8HCJDt7vmg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1777474067; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Fq6djyp3gyKPViU89l7HxJodcNKwPhWSiSEOI5Vg0Lk=; b=TG8WZMLClvPwjIGxKm0MbijjtzyODzvUoC+8eV6TrdDJA5y9HkMmzWamNSdvL24+w3jnH/ 7ZeEPukAfbTmdGmLgH6xWqZG+lTVJYlWk4OGzVrpJMXSI3Z6xSullPdXH+Uj94aJCerxcC 6BW5c11sVNBhnEEZJ4fdhq7NUMXE0oYZCq1iAobr+Si/L0ePXbS3YPJKBcF2Y1pv1NfBCt bmmVHu4r1sSBHJfP09dABKjCyEbyZoTfBgBroewzTV6c6BXmc2sitRpy/NWHDdXv/HYBNb CgHlhnCvat/ADvN9MZNmO3Tqfn/AUZHPr6RMwfgxeGJVb5BdEXl97SH5ZZqWOg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4g5KsZ6KLMzkK0 for ; Wed, 29 Apr 2026 14:47:46 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 3b7c0 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Wed, 29 Apr 2026 14:47:46 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Mark Johnston Subject: git: c3e943e78e06 - stable/15 - execve: Fix an operator precedence bug List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: markj X-Git-Repository: src X-Git-Refname: refs/heads/stable/15 X-Git-Reftype: branch X-Git-Commit: c3e943e78e0659724a3930e630ec35c4ef23cdf7 Auto-Submitted: auto-generated Date: Wed, 29 Apr 2026 14:47:46 +0000 Message-Id: <69f21a12.3b7c0.1720abdc@gitrepo.freebsd.org> The branch stable/15 has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=c3e943e78e0659724a3930e630ec35c4ef23cdf7 commit c3e943e78e0659724a3930e630ec35c4ef23cdf7 Author: Mark Johnston AuthorDate: 2026-04-22 17:58:35 +0000 Commit: Mark Johnston CommitDate: 2026-04-29 14:40:57 +0000 execve: Fix an operator precedence bug The buggy version allowed userspace to overflow the copy into adjacent execve KVA regions, which enables, among other things, injecting environment variables into privileged processes. Approved by: so Security: FreeBSD-SA-26:13.exec Security: CVE-2026-7270 Reported by: Ryan Austin of Calif.io Reviewed by: brooks, kib Fixes: f373437a01a3 ("Add helper functions to copy strings into struct image_args.") Differential Revision: https://reviews.freebsd.org/D56665 --- sys/kern/kern_exec.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/kern/kern_exec.c b/sys/kern/kern_exec.c index 2bdd6faa025a..0a9ae0aabb3e 100644 --- a/sys/kern/kern_exec.c +++ b/sys/kern/kern_exec.c @@ -1652,7 +1652,7 @@ exec_args_adjust_args(struct image_args *args, size_t consume, ssize_t extend) if (args->stringspace < offset) return (E2BIG); memmove(args->begin_argv + extend, args->begin_argv + consume, - args->endp - args->begin_argv + consume); + args->endp - (args->begin_argv + consume)); if (args->envc > 0) args->begin_envv += offset; args->endp += offset; From nobody Wed Apr 29 14:47:47 2026 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4g5Ksd1XKYz6bkT0 for ; Wed, 29 Apr 2026 14:47:49 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R13" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4g5Ksd03D9z4JVd for ; Wed, 29 Apr 2026 14:47:48 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1777474069; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=6WnNb5NF84nn/ZyTBYJIUpx3mmn06TrTRk/5XRksu4k=; b=ItCIFDch56+Ee/KRquCetz7hpkGUPzGxl2jSjQGzaVqYT6Ur5pCo6OIqckSEIBkCusDdGm Iktyg50cmEWsM2+fegcWUX6exsXZiWeMBSVv6erh+tNROnMc6F4w+Mu8FZVNlNJRmJmbLf nrp/4T1cScnhQlO82OYoO+kmIJKrs8dXFphKPFgkK6bAvy5R1d0WFYZCtZq4Zl2lBLXZLj ZLRfqXdrNprMFFzKykbbp5JIrnWJUw/9rCXzkiEH34biSaWOsS8Z/69PAVCTAxsDV6J5ns EAaJM4ymSfImyoGe8+p0s6Siccp/ERGvwGTk+oGi3t69TWt7kUGlywqwfualLw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1777474069; a=rsa-sha256; cv=none; b=E0++UPEpH8+Cr02Itfm7zP0VOdtDon6SOkvNNbYDJeSbJbEOC6pH3i61LWNa8rMJlR2ZBD pbhaomMkp/Zzc+MKz7ujmYnUPXQunO9dGxgu1b3CNt/6tUHiKeGTvoIQT/9MSRug9fTumM hVHzs5s1o/1l2MsrJNRpAtIiAoXD0DOGQpwDwscYXGP7BOTMivaH8pMC9wK4TaIov7fbdW IQoE/lA8SsfqdOSL1eLlBTVmwfYqmntj73x3h+sQwD8NQpVCufzeLcKxXSfZwpccb5wK5A ijzp2jfKmn4AUO+I8Rc9DCs7JRZn/iv6n+X1p/xlRdg4XQtz+fWvcYLcovTHlQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1777474069; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=6WnNb5NF84nn/ZyTBYJIUpx3mmn06TrTRk/5XRksu4k=; b=eLmlhcy0ImdqcBoDbLFHOdpuSn7UCGBhHHbEydEq/zcWe3w8qo0EHHsTD26WgwL7ef9Zn8 VS+EMdso4TMo0dsKchcVZZg31CqkVVooHCryJqtlUX7n02lo0CAyicn1skkdjxiFNkiNd6 fwoYWxfrpnsE6uoPeFWfia4x2nFW73HeKHItRqN8FcpVBEdjPi+2AKjq3sE+LdrrYBu3BD IBKKTG21u3vEvIc5PF3xskrSa/wN0si+JoVG8Usw910eqieyCUr8WXzeRcwfwwW+VUFXNE r/o+fq2t+L/fTWMhGKPXy21zUjZwHRzvFnxb2kJkONHDJM6Flozwzizwj735pQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4g5Ksc1fVrzlXt for ; Wed, 29 Apr 2026 14:47:48 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 3b7c4 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Wed, 29 Apr 2026 14:47:47 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Mark Johnston Subject: git: 2621f6c5d4ae - stable/15 - dhclient: Check for unexpected characters in some DHCP server options List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: markj X-Git-Repository: src X-Git-Refname: refs/heads/stable/15 X-Git-Reftype: branch X-Git-Commit: 2621f6c5d4aeb0cef12aab812431a1581b384e06 Auto-Submitted: auto-generated Date: Wed, 29 Apr 2026 14:47:47 +0000 Message-Id: <69f21a13.3b7c4.286ada73@gitrepo.freebsd.org> The branch stable/15 has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=2621f6c5d4aeb0cef12aab812431a1581b384e06 commit 2621f6c5d4aeb0cef12aab812431a1581b384e06 Author: Mark Johnston AuthorDate: 2026-04-27 20:03:09 +0000 Commit: Mark Johnston CommitDate: 2026-04-29 14:40:57 +0000 dhclient: Check for unexpected characters in some DHCP server options Some options are written directly to the lease file, which may be parsed by subsequent dhclient invocations. We must make sure that a malicious server can't control the "medium" field of a lease definition, otherwise they can achieve RCE by injecting one into the lease file, whereupon it will be passed to dhclient-script, which passes it through eval. Approved by: so Security: FreeBSD-SA-26:12.dhclient Security: CVE-2026-42511 Reported by: Joshua Rogers of AISLE Research Team (https://aisle.com/) --- sbin/dhclient/dhclient.c | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/sbin/dhclient/dhclient.c b/sbin/dhclient/dhclient.c index 5d2a7453578b..719e20cffad9 100644 --- a/sbin/dhclient/dhclient.c +++ b/sbin/dhclient/dhclient.c @@ -1226,6 +1226,12 @@ packet_to_lease(struct packet *packet) } memcpy(lease->server_name, packet->raw->sname, DHCP_SNAME_LEN); lease->server_name[DHCP_SNAME_LEN]='\0'; + if (strchr(lease->server_name, '"') != NULL || + strchr(lease->server_name, '\\') != NULL) { + warning("dhcpoffer: server name contains invalid characters."); + free_client_lease(lease); + return (NULL); + } } /* Ditto for the filename. */ @@ -1241,6 +1247,12 @@ packet_to_lease(struct packet *packet) } memcpy(lease->filename, packet->raw->file, DHCP_FILE_LEN); lease->filename[DHCP_FILE_LEN]='\0'; + if (strchr(lease->filename, '"') != NULL || + strchr(lease->filename, '\\') != NULL) { + warning("dhcpoffer: filename contains invalid characters."); + free_client_lease(lease); + return (NULL); + } } return lease; } From nobody Wed Apr 29 14:47:49 2026 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4g5Ksg2sZrz6bkYX for ; Wed, 29 Apr 2026 14:47:51 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R13" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4g5Ksd17Ggz4JLs for ; Wed, 29 Apr 2026 14:47:49 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1777474069; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=mBe1D6vJH23sR/WpiV+Veniyn+XUamNQ+YF3io5yhYs=; b=HgmqSs76QQk2SS/oBflRNRJdXuvtK/a0Q9lFMvRw3gELiFQomm/wLxeDAE6rQp1q/rgs2q dwCMwv5CJjCiPha7i9W3nPmdMIofnXIvZxM8eULYUZG5BaJU8AGVB5qaKIJcGDHxSX48Se Puh9DfTxF8Hm+doOktGh1oWIayOZo6y04d99JfEnEWzzBQSf54RT63yyGpGikEIFz+eclw OJCEgCGRfRbLwVxxkOHgoLP+8CRlYISL3qRxEUXrJPAleam7zcGb1o2teSWZBsMRb0Hm8n O1ctLiDGyxDIXAUmOMx3IFRXlNqmdtdWIlAZYRYV97e6NOiDIHTrPgNNhWhfWw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1777474069; a=rsa-sha256; cv=none; b=ROd7In+zTTGJE592cudp+Ng6WiePzkficCiIGVp+gTuehmQk8KJZMeqSj3t5Xiy5kfLiwk jy4CUf1gNvshza0b73GVpfAxpxqEYoPEMobVSQ01OgWI4UriZKy3GSxNy4XsYTVaZugBiG 2iJGoBnlsFtZzNH4wXv0fArxdW7ihFynDPr8otwdH0h5nTLVxc+vZ6RJDIsu9D8kV6nseT nqHNvF2QM51YpJGGbJ1zzU1v3eyXqNm9GPYPS97NMjYd4FoItvE55/BwX7zUAGF14pUcph +Q108/c+PZ42A4tzwOQ6KuUFaB468W6W9njCcZKqS2jbLATP795VG2IT0fpGwQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1777474069; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=mBe1D6vJH23sR/WpiV+Veniyn+XUamNQ+YF3io5yhYs=; b=Z2GYDs/bh3k1L+X9koVhm6n0HoWQBD7WVCpNCeDCTke8I4FMzKL4JiRmdvNH7uqFvnyfPQ 0EX+g7uyNhal/vVF/zVWX9cMSdhKnzjE3XfBYutFcJqP5e8ef6fIaUVcv9f5JOSy41hfTu LuNi2oS6QPehq0usTia15xlJyP26TEqNPvT4j2e6uYyj/LHDQrfm11LDoje/emRFHUOFi0 XMwTDBh16zgs01aitswuaTdhUttT5kJeH//5ynz7MWjUU1m38O/9S+wrnSoY9fas0LvWoP ozau5RgSIPCxbGle+0tzqMgtLm/JETJMU6oY2KlFP+U2c0JSiENdZIpMPn4D0A== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4g5Ksd0ZsyzlJ7 for ; Wed, 29 Apr 2026 14:47:49 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 3a9f5 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Wed, 29 Apr 2026 14:47:49 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Mark Johnston Subject: git: 4408b683d237 - stable/15 - dhclient: Fix reallocation of dhclient script environments List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: markj X-Git-Repository: src X-Git-Refname: refs/heads/stable/15 X-Git-Reftype: branch X-Git-Commit: 4408b683d237b71727eafb715edaace85f2122ce Auto-Submitted: auto-generated Date: Wed, 29 Apr 2026 14:47:49 +0000 Message-Id: <69f21a15.3a9f5.1708215f@gitrepo.freebsd.org> The branch stable/15 has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=4408b683d237b71727eafb715edaace85f2122ce commit 4408b683d237b71727eafb715edaace85f2122ce Author: Mark Johnston AuthorDate: 2026-04-27 20:56:21 +0000 Commit: Mark Johnston CommitDate: 2026-04-29 14:40:57 +0000 dhclient: Fix reallocation of dhclient script environments When the number of DHCP options exceeds a threshold, script_set_env() will reallocate the environment, stored as an array of pointers. The calculation of the array size failed to multiply by the pointer size, resulting in a smaller than expected buffer which admits out-of-bounds writes. Approved by: so Security: FreeBSD-SA-26:15.dhclient Security: CVE-2026-42511 Reported by: Joshua Rogers of AISLE Research Team (https://aisle.com/) --- sbin/dhclient/dhclient.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sbin/dhclient/dhclient.c b/sbin/dhclient/dhclient.c index 719e20cffad9..f671b0ab9bed 100644 --- a/sbin/dhclient/dhclient.c +++ b/sbin/dhclient/dhclient.c @@ -2438,8 +2438,8 @@ script_set_env(struct client_state *client, const char *prefix, char **newscriptEnv; int newscriptEnvsize = client->scriptEnvsize + 50; - newscriptEnv = realloc(client->scriptEnv, - newscriptEnvsize); + newscriptEnv = reallocarray(client->scriptEnv, + newscriptEnvsize, sizeof(char *)); if (newscriptEnv == NULL) { free(client->scriptEnv); client->scriptEnv = NULL; From nobody Wed Apr 29 14:47:51 2026 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4g5Ksh57PHz6bkRD for ; Wed, 29 Apr 2026 14:47:52 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R13" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4g5Ksh1DVwz4JSv for ; Wed, 29 Apr 2026 14:47:51 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1777474072; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Fs3JOf/SrhKBdciUUaY476C8wtdAiUm4KGWB2K3npsg=; b=jbPGK4ZWyEtRaqKDaNp8f1y7YljXC+VnfzEY8GSk1n3kPuyScpOQ2r1d041p0nS5qxxXzN 4c8pFubY1LiyilSsLMAXA83VlJrpc/CvzsdzNCffHVaGaDsTkB1684bNZkNDTe4Y4bLv9v KxdEEtjyqtbDe+zAFmpVpCgVtd3gqoGzrSiQaE0s9BC9jr2kI/YQw6EQVxNuROWPTzpQFb PfU6k6P5477vZa+na4zt3CuiCD315PJOWYh41Of0q7nbaMqDLdsXv4VCBSMb27YYeuzvRp pzVfNQzj8uH6SxlBAvJ4GC/tQte3eiR0VAx3IepAEkR/jyuEdlIwbJtgqaegug== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1777474072; a=rsa-sha256; cv=none; b=gfDhibSmZz2F1yvjENwMEwa7bgOzmihbCVQf3YofmU4ERXq0OqvDr4OBbO2lwhJdZLDrP0 GpwmHLTB/dPv4pqlIQ123eMGuNabmILoUh8l3RRcQG6k+PMpS7fLf9lpfPahSo3tVuhn+3 bVhopJixfspZbgp/Xqiz8cb2mUCUxNYNM0sFB8Q+EsXjfeCq5y8I/N605RPC0S7wJCkRvv 89VkO/MfRW6+6dIBiZduKFIjzfCTsUvd3oNpOgCt+cGVZWbrk/ALPJ5c+bPVa95Kp8NROF LILWeQrJKm+S/xEJL/1D+D9GNHW/qYUQYcaBAYhbDjdgfjJCYi8wFfzulDcY8w== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1777474072; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Fs3JOf/SrhKBdciUUaY476C8wtdAiUm4KGWB2K3npsg=; b=SeJ4DS4uxIxt6AcI8Sy2LFHbrDwhZKHM3gkL9BEkEupjSYsNnNzyik4Eq5u+ExsW/tPF3/ 9V2/VvUILbF0we+vHINz4bnj3JO7CDwvFLYw1c/7Rp7OS3yOQSNlMf6J71RpzET2Ro0owo diRGqSlaGgzKm35EatpCroH5dtvMKTncgGLN4rX8fSy6qHas/CAZHvf27aZ0S/K7eh/tbd VsVTjWw3Ag+5Ve74TK9dKhJRnD33RgQO9Qz0pLqWIE5tgtObPMaJWhU5kbgHr/n3LaPWBr pr0SzJL0kMq72HyEkPyGRm5nfcRDlwnoSIriXqmS6ALtzF8ay4GSj1AvvR1zNw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4g5Ksg2dLfzl2X for ; Wed, 29 Apr 2026 14:47:51 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 3d056 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Wed, 29 Apr 2026 14:47:51 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org Cc: Mariusz Zaborski From: Mark Johnston Subject: git: 025789eaa648 - stable/15 - libnv: switch fd_wait() from select(2) to poll(2) List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: markj X-Git-Repository: src X-Git-Refname: refs/heads/stable/15 X-Git-Reftype: branch X-Git-Commit: 025789eaa648bdb3f3400f3d6412947cc151ebd8 Auto-Submitted: auto-generated Date: Wed, 29 Apr 2026 14:47:51 +0000 Message-Id: <69f21a17.3d056.5fb3efcb@gitrepo.freebsd.org> The branch stable/15 has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=025789eaa648bdb3f3400f3d6412947cc151ebd8 commit 025789eaa648bdb3f3400f3d6412947cc151ebd8 Author: Mariusz Zaborski AuthorDate: 2026-04-28 14:35:10 +0000 Commit: Mark Johnston CommitDate: 2026-04-29 14:40:57 +0000 libnv: switch fd_wait() from select(2) to poll(2) The previous implementation used FD_SET() on a stack-allocated fd_set, which is an out-of-bounds write whenever the socket fd is >= FD_SETSIZE (1024). Approved by: so Security: FreeBSD-SA-26:16.libnv Security: CVE-2026-39457 Reported by: Joshua Rogers of AISLE Research Team (https://aisle.com/) Reviewed by: markj Differential Revision: https://reviews.freebsd.org/D56689 --- lib/libnv/msgio.c | 12 +++---- lib/libnv/tests/nvlist_send_recv_test.c | 56 +++++++++++++++++++++++++++++++++ 2 files changed, 62 insertions(+), 6 deletions(-) diff --git a/lib/libnv/msgio.c b/lib/libnv/msgio.c index f6f75241ff06..de2994e47fef 100644 --- a/lib/libnv/msgio.c +++ b/lib/libnv/msgio.c @@ -32,10 +32,10 @@ #include #include -#include #include #include +#include #include #include #include @@ -86,14 +86,14 @@ msghdr_add_fd(struct cmsghdr *cmsg, int fd) static void fd_wait(int fd, bool doread) { - fd_set fds; + struct pollfd pfd; PJDLOG_ASSERT(fd >= 0); - FD_ZERO(&fds); - FD_SET(fd, &fds); - (void)select(fd + 1, doread ? &fds : NULL, doread ? NULL : &fds, - NULL, NULL); + pfd.fd = fd; + pfd.events = doread ? POLLIN : POLLOUT; + pfd.revents = 0; + (void)poll(&pfd, 1, -1); } static int diff --git a/lib/libnv/tests/nvlist_send_recv_test.c b/lib/libnv/tests/nvlist_send_recv_test.c index 4a5c10df656d..d655a26a7362 100644 --- a/lib/libnv/tests/nvlist_send_recv_test.c +++ b/lib/libnv/tests/nvlist_send_recv_test.c @@ -27,6 +27,8 @@ */ #include +#include +#include #include #include #include @@ -531,6 +533,59 @@ ATF_TC_BODY(nvlist_send_recv__send_nvlist__stream, tc) nvlist_send_recv__send_nvlist(SOCK_STREAM); } +/* + * Regression test for fd_wait(): the previous select(2)-based implementation + * called FD_SET() unconditionally, which is an out-of-bounds stack write when + * the socket fd is >= FD_SETSIZE. Force the socketpair fds above FD_SETSIZE + * and verify a full nvlist round-trip still works. + */ +ATF_TC_WITHOUT_HEAD(nvlist_send_recv__highfd); +ATF_TC_BODY(nvlist_send_recv__highfd, tc) +{ + struct rlimit rl; + nvlist_t *nvl; + int socks[2], hi_send, hi_recv, status; + pid_t pid; + + hi_send = FD_SETSIZE + 5; + hi_recv = FD_SETSIZE + 6; + + rl.rlim_cur = rl.rlim_max = hi_recv + 1; + if (setrlimit(RLIMIT_NOFILE, &rl) != 0) + atf_tc_skip("cannot raise RLIMIT_NOFILE: %s", strerror(errno)); + + ATF_REQUIRE(socketpair(PF_UNIX, SOCK_STREAM, 0, socks) == 0); + ATF_REQUIRE(dup2(socks[0], hi_recv) == hi_recv); + ATF_REQUIRE(dup2(socks[1], hi_send) == hi_send); + (void)close(socks[0]); + (void)close(socks[1]); + + pid = fork(); + ATF_REQUIRE(pid >= 0); + if (pid == 0) { + /* Child: send. */ + (void)close(hi_recv); + nvl = nvlist_create(0); + nvlist_add_string(nvl, "key", "value"); + if (nvlist_send(hi_send, nvl) != 0) + err(EXIT_FAILURE, "nvlist_send"); + nvlist_destroy(nvl); + _exit(0); + } + + (void)close(hi_send); + nvl = nvlist_recv(hi_recv, 0); + ATF_REQUIRE(nvl != NULL); + ATF_REQUIRE(nvlist_error(nvl) == 0); + ATF_REQUIRE(nvlist_exists_string(nvl, "key")); + ATF_REQUIRE(strcmp(nvlist_get_string(nvl, "key"), "value") == 0); + nvlist_destroy(nvl); + + ATF_REQUIRE(waitpid(pid, &status, 0) == pid); + ATF_REQUIRE(status == 0); + (void)close(hi_recv); +} + ATF_TC_WITHOUT_HEAD(nvlist_send_recv__send_closed_fd__dgram); ATF_TC_BODY(nvlist_send_recv__send_closed_fd__dgram, tc) { @@ -734,6 +789,7 @@ ATF_TP_ADD_TCS(tp) ATF_TP_ADD_TC(tp, nvlist_send_recv__send_nvlist__dgram); ATF_TP_ADD_TC(tp, nvlist_send_recv__send_nvlist__stream); + ATF_TP_ADD_TC(tp, nvlist_send_recv__highfd); ATF_TP_ADD_TC(tp, nvlist_send_recv__send_closed_fd__dgram); ATF_TP_ADD_TC(tp, nvlist_send_recv__send_closed_fd__stream); ATF_TP_ADD_TC(tp, nvlist_send_recv__send_many_fds__dgram); From nobody Wed Apr 29 14:47:50 2026 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4g5Ksh3fxKz6bkT2 for ; Wed, 29 Apr 2026 14:47:52 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R13" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4g5Ksg2bcNz4Jf1 for ; Wed, 29 Apr 2026 14:47:51 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1777474071; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Qdb49HEw01hIQ9xPu5twpULwglxZLmpGdb7+PsI9Tjg=; b=SDkBB9iXJ1AI/uhDq86PW8q87/2o4g3rd+5dTb6PbINEyO36PaeNsEKiEuhjiy5OyodGFk ClNI7JrFQDgUcTQkXkdReRrM8S/AdlPHnYCwlC7+oeBbo/Q1oyqQTZCGmC4SUU9nxWkQo4 KFhFx9Z0uPIcneFncMc5J7DdWvNwp3o1lXHSFKBkVIAx+uSx4ZJ0RXuJYZ1egzoJZrymUc srvklLyocDHFMFF1sJKcxgPtUEodjJ8Rnifkr1b1dZ/oecOcqx7Kl8rm3SjYnr+MlA+HQn o2+7ne8D6u8Soe2Nsw6/Ih9CdfbE/qcXzL9wWasqWNFrLCK4H6TTA8fM6PVtGw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1777474071; a=rsa-sha256; cv=none; b=YrFPHYiMzQ57u9GT95ZK+nsCgcG8Ie1XSIbWsLgl/AeXvfhsjy85Vi7SH7Y6vkDgGccfu+ 3xkCr7OazZlvgFNbxBCa5DGFgM6Jl14TYrJB1ayDFAPlsokKb17vWzVR+Lq20SX7ZfwfgK v0CYow1gfuFshHx51z6HTUbKky0psoM3g5osNQ4Sj6/Ns9K090EwbCqHbdMDPHWUTKUYYW QEQlc19B6aGbfeQOpev6Rqw3m1RHwSyrgDVOz4fFwt6kcBckw5lff+J7YJTlGfnPjIkp/a 5rH9zsSMp7f+4L6rXrNMR3laDBlzLsdLqBKDL4a2Q3hqcfpmx1hcF3E1S5XsEQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1777474071; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Qdb49HEw01hIQ9xPu5twpULwglxZLmpGdb7+PsI9Tjg=; b=x+xdbWYrY+wZAY07rRGkdCC+E2Y28uG0BGAZ4yQHO//O/B9e1RDNp0eRwVUHevBMP2O9T9 rtX3IuXWbjeiamSV8y/aXOXVQerTzI50ibQ+SoT/USMUqZ0F6rhGPJFDz9i3HdSA2i0dDO 0Difyd+hzlSV96CkZm9KvC6mX/ebTukB64dTvRGoi9WhxHUmjulZsVypXT6jz9zdHIXWIs eytNnf+r/9E+mLjYVx3P+cWsZtW0rEyhEoIxh6FWgp/gBBvGXdj6Mxf8z9cmbAg0FDzOH6 ivi4WfBYQ0utNNRcjC6j2YBHFhHmnX2T2qwAO1xTpOa05NpYbg5BfZSLVGelDw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4g5Ksf4r5Pzl5l for ; Wed, 29 Apr 2026 14:47:50 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 3b8c8 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Wed, 29 Apr 2026 14:47:50 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org Cc: Kristof Provost From: Mark Johnston Subject: git: e1c9f92130e8 - stable/15 - pf: improve SCTP validation List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: markj X-Git-Repository: src X-Git-Refname: refs/heads/stable/15 X-Git-Reftype: branch X-Git-Commit: e1c9f92130e8327c52cc1953c6a9d53dfb4bb177 Auto-Submitted: auto-generated Date: Wed, 29 Apr 2026 14:47:50 +0000 Message-Id: <69f21a16.3b8c8.445c6a60@gitrepo.freebsd.org> The branch stable/15 has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=e1c9f92130e8327c52cc1953c6a9d53dfb4bb177 commit e1c9f92130e8327c52cc1953c6a9d53dfb4bb177 Author: Kristof Provost AuthorDate: 2026-04-26 09:34:55 +0000 Commit: Mark Johnston CommitDate: 2026-04-29 14:40:57 +0000 pf: improve SCTP validation As per RFC5061 "4.2. New Parameter Types" the add/delete IP address parameters (0xc001, 0xc002) may not be present in an INIT or INIT-ACK chunk. They are only allowed to be present in an ASCONF chunk. This also prevents unbounded recursion while parsing an SCTP packet. Approved by: so Security: FreeBSD-SA-26:14.pf Security: CVE-2026-7164 PR: 294799 Reported by: Igor Gabriel Sousa e Souza Sponsored by: Orange Business Services --- sys/netpfil/pf/pf.c | 16 +++++++++++----- tests/sys/netpfil/pf/sctp.py | 23 +++++++++++++++++++++++ 2 files changed, 34 insertions(+), 5 deletions(-) diff --git a/sys/netpfil/pf/pf.c b/sys/netpfil/pf/pf.c index 6349e922387b..7aee28e7b917 100644 --- a/sys/netpfil/pf/pf.c +++ b/sys/netpfil/pf/pf.c @@ -7682,7 +7682,7 @@ again: } static int -pf_multihome_scan(int start, int len, struct pf_pdesc *pd, int op) +pf_multihome_scan(int start, int len, struct pf_pdesc *pd, int op, bool asconf) { int off = 0; struct pf_sctp_multihome_job *job; @@ -7787,13 +7787,16 @@ pf_multihome_scan(int start, int len, struct pf_pdesc *pd, int op) int ret; struct sctp_asconf_paramhdr ah; + if (asconf) + return (PF_DROP); + if (!pf_pull_hdr(pd->m, start + off, &ah, sizeof(ah), NULL, NULL, pd->af)) return (PF_DROP); ret = pf_multihome_scan(start + off + sizeof(ah), ntohs(ah.ph.param_length) - sizeof(ah), pd, - SCTP_ADD_IP_ADDRESS); + SCTP_ADD_IP_ADDRESS, true); if (ret != PF_PASS) return (ret); break; @@ -7802,12 +7805,15 @@ pf_multihome_scan(int start, int len, struct pf_pdesc *pd, int op) int ret; struct sctp_asconf_paramhdr ah; + if (asconf) + return (PF_DROP); + if (!pf_pull_hdr(pd->m, start + off, &ah, sizeof(ah), NULL, NULL, pd->af)) return (PF_DROP); ret = pf_multihome_scan(start + off + sizeof(ah), ntohs(ah.ph.param_length) - sizeof(ah), pd, - SCTP_DEL_IP_ADDRESS); + SCTP_DEL_IP_ADDRESS, true); if (ret != PF_PASS) return (ret); break; @@ -7828,7 +7834,7 @@ pf_multihome_scan_init(int start, int len, struct pf_pdesc *pd) start += sizeof(struct sctp_init_chunk); len -= sizeof(struct sctp_init_chunk); - return (pf_multihome_scan(start, len, pd, SCTP_ADD_IP_ADDRESS)); + return (pf_multihome_scan(start, len, pd, SCTP_ADD_IP_ADDRESS, false)); } int @@ -7837,7 +7843,7 @@ pf_multihome_scan_asconf(int start, int len, struct pf_pdesc *pd) start += sizeof(struct sctp_asconf_chunk); len -= sizeof(struct sctp_asconf_chunk); - return (pf_multihome_scan(start, len, pd, SCTP_ADD_IP_ADDRESS)); + return (pf_multihome_scan(start, len, pd, SCTP_ADD_IP_ADDRESS, false)); } int diff --git a/tests/sys/netpfil/pf/sctp.py b/tests/sys/netpfil/pf/sctp.py index 9f1d7dea4ef6..722f7777a305 100644 --- a/tests/sys/netpfil/pf/sctp.py +++ b/tests/sys/netpfil/pf/sctp.py @@ -618,6 +618,29 @@ class TestSCTP_SRV(VnetTestTemplate): assert r.getlayer(sp.SCTPChunkInitAck) assert r.getlayer(sp.SCTP).tag == 42 + @pytest.mark.require_user("root") + @pytest.mark.require_progs(["scapy"]) + def test_too_many_add_ip(self): + import scapy.all as sp + DEPTH=90 + params=[] + for i in range(0, DEPTH): + ch = sp.SCTPChunkParamAddIPAddr(len=(DEPTH - i) * 8) + params.append(ch) + packet = sp.IP(src="192.0.2.1", dst="192.0.2.2") \ + / sp.SCTP(sport=4321, dport=1234) \ + / sp.SCTPChunkInit(init_tag=1, n_in_streams=1, n_out_streams=1, a_rwnd=1500, + params=params) + packet.show() + sp.hexdump(packet) + print("len %d" % len(packet)) + + r = sp.sr1(packet, timeout=3) + # We should not get a reply to this + if r: + r.show() + assert not r + class TestSCTPv6(VnetTestTemplate): REQUIRED_MODULES = ["sctp", "pf"] TOPOLOGY = { From nobody Wed Apr 29 14:47:52 2026 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4g5Ksk3R7Bz6bkF6 for ; Wed, 29 Apr 2026 14:47:54 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R13" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4g5Ksh5DH7z4Jbm for ; Wed, 29 Apr 2026 14:47:52 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1777474072; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=+AzKJGVEJ8Gq+tG+9qdQnKHzmlvQSbGbwXpVP1jgRNM=; b=M7Rrw8vgANe4nIGMwgSMhXrQ87fGo5UTyJMnNG4M+D4p+hCnF94TySBwu7CIL6a2myOUvT 9yYeZTgHncwg9rbMzBszOxxSAvKgnHriSCgjWmfG7kFr/9/113nP9a43rzVgde+snxZIrU X2NGyFmmDOMQnROLEP6VJHZV6hz4Za4HjQsksROjC5k9B647dEophE93nNzoJOqM5OUXfX 9uVLH4wJbptV9yNkU9t9KfSN00lyHFsevmtf4sHU/CHkbw9yFyggS/1EzjCcTxfzNCmpNn pVph9FqJ+j8kM4wMu1N4cWfYrEVhwdEiX7zn0XgU8RP66v571jPIQRDaypDIrg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1777474072; a=rsa-sha256; cv=none; b=U+LgUIjkt4TyZNGgKRZqWj2kNaNseTPJ39sWG6wr2qiC7I37d0trCCFni5VaWgnVAJ42yf GLQwDn5vyr/sIYEWEl3BC1o/lSpHJtXtunkGddAgF8HddEv7xQwe77NwR6l45j65+uMfe9 mbLdVvWm/lLx6PkF2t5EIQ3Qi6IRga7JndGM0vglMwFAzH5Xt2Nt/jcDtTjR0yAuZ/n553 U31gdJV4bWhJpEvf5zAyZfw37k+iwo5m1ya0buh8b3hhe34BE6fJzGdzPKljAI9X+rn1R7 X+WXiI+SyPDq1vEG1VRxxX4UOe3IT1xWw6z8ILA+ch028ysrHwSakvqpMTmcLw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1777474072; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=+AzKJGVEJ8Gq+tG+9qdQnKHzmlvQSbGbwXpVP1jgRNM=; b=FafmtQHEa4Jq4OQ3TBAXOj2nvMDQeU5RQ6hjx8rv4rhJY84AKldyeRqgKmAaV5KtOGyehV 2Cy4TqM86RZ8lMd5KwyDIBALZwisf6v2mScwLDyywNoE8v5JydVvlkP3ftgTOBX69QTtCC H/ynsS4lQwT5tT8qXDb69s5u6IeYOH3S5umTr8ZhYv+z5FSRm+MNLcGb4m6ioRrZm/4ABn y7tjRNDdc5++D9pnFylO2QJCW1Prpcz6/tEkfXGyDeoY+y0lqCdLGFRWM5/0YkDIs3hjkx ZvDQCS5zlM31L9VFeH6Wry/QGBSpfwJjVO1GqxcWVEh0xVCBlRezAj4PsR411A== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4g5Ksh4PvVzl5p for ; Wed, 29 Apr 2026 14:47:52 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 3b9ea by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Wed, 29 Apr 2026 14:47:52 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org Cc: Mariusz Zaborski From: Mark Johnston Subject: git: 414e25d7d512 - stable/15 - libnv: fix heap overflow in nvlist_recv() List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: markj X-Git-Repository: src X-Git-Refname: refs/heads/stable/15 X-Git-Reftype: branch X-Git-Commit: 414e25d7d5128e5d0275f18a6633a11d36fafc8c Auto-Submitted: auto-generated Date: Wed, 29 Apr 2026 14:47:52 +0000 Message-Id: <69f21a18.3b9ea.35ce74a0@gitrepo.freebsd.org> The branch stable/15 has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=414e25d7d5128e5d0275f18a6633a11d36fafc8c commit 414e25d7d5128e5d0275f18a6633a11d36fafc8c Author: Mariusz Zaborski AuthorDate: 2026-04-28 14:36:09 +0000 Commit: Mark Johnston CommitDate: 2026-04-29 14:40:57 +0000 libnv: fix heap overflow in nvlist_recv() nvlist_check_header() validated nvlh_size for overflow before performing conversion. An mallicous user can set NV_FLAG_BIG_ENDIAN in the header and craft nvlh_size so that the orginall value passes the check, but after the conversion the sizeof(nvlist_header) + size can overflow. This can lead to a heap buffer overflow. Approved by: so Security: FreeBSD-SA-26:17.libnv Security: CVE-2026-35547 Fixes: 36fa90dbde0060aacb5677d0b113ee168e839071 Reviewed by: markj Differential Revision: https://reviews.freebsd.org/D56342 --- lib/libnv/tests/nvlist_send_recv_test.c | 57 +++++++++++++++++++++++++++++++++ sys/contrib/libnv/nvlist.c | 9 +++--- 2 files changed, 62 insertions(+), 4 deletions(-) diff --git a/lib/libnv/tests/nvlist_send_recv_test.c b/lib/libnv/tests/nvlist_send_recv_test.c index d655a26a7362..306c91560400 100644 --- a/lib/libnv/tests/nvlist_send_recv_test.c +++ b/lib/libnv/tests/nvlist_send_recv_test.c @@ -1,5 +1,8 @@ /*- + * SPDX-License-Identifier: BSD-2-Clause + * * Copyright (c) 2013 The FreeBSD Foundation + * Copyright (c) 2024-2026 Mariusz Zaborski * * This software was developed by Pawel Jakub Dawidek under sponsorship from * the FreeBSD Foundation. @@ -661,6 +664,58 @@ ATF_TC_BODY(nvlist_send_recv__overflow_header_size, tc) } } +ATF_TC_WITHOUT_HEAD(nvlist_send_recv__overflow_big_endian_size); +ATF_TC_BODY(nvlist_send_recv__overflow_big_endian_size, tc) +{ + static const unsigned char payload[] = { + 0x6c, /* magic */ + 0x00, /* version */ + 0x80, /* flags: NV_FLAG_BIG_ENDIAN */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xf5, + }; + nvlist_t *nvl; + int sv[2]; + + ATF_REQUIRE_EQ(socketpair(AF_UNIX, SOCK_STREAM, 0, sv), 0); + ATF_REQUIRE_EQ(write(sv[1], payload, sizeof(payload)), + (ssize_t)sizeof(payload)); + ATF_REQUIRE_EQ(close(sv[1]), 0); + + errno = 0; + nvl = nvlist_recv(sv[0], 0); + ATF_REQUIRE(nvl == NULL); + ATF_REQUIRE_EQ(errno, EINVAL); + + ATF_REQUIRE_EQ(close(sv[0]), 0); +} + +ATF_TC_WITHOUT_HEAD(nvlist_send_recv__overflow_little_endian_size); +ATF_TC_BODY(nvlist_send_recv__overflow_little_endian_size, tc) +{ + static const unsigned char payload[] = { + 0x6c, /* magic */ + 0x00, /* version */ + 0x00, /* flags */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0xf5, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, + }; + nvlist_t *nvl; + int sv[2]; + + ATF_REQUIRE_EQ(socketpair(AF_UNIX, SOCK_STREAM, 0, sv), 0); + ATF_REQUIRE_EQ(write(sv[1], payload, sizeof(payload)), + (ssize_t)sizeof(payload)); + ATF_REQUIRE_EQ(close(sv[1]), 0); + + errno = 0; + nvl = nvlist_recv(sv[0], 0); + ATF_REQUIRE(nvl == NULL); + ATF_REQUIRE_EQ(errno, EINVAL); + + ATF_REQUIRE_EQ(close(sv[0]), 0); +} + ATF_TC_WITHOUT_HEAD(nvlist_send_recv__invalid_fd_size); ATF_TC_BODY(nvlist_send_recv__invalid_fd_size, tc) { @@ -796,6 +851,8 @@ ATF_TP_ADD_TCS(tp) ATF_TP_ADD_TC(tp, nvlist_send_recv__send_many_fds__stream); ATF_TP_ADD_TC(tp, nvlist_send_recv__overflow_header_size); + ATF_TP_ADD_TC(tp, nvlist_send_recv__overflow_big_endian_size); + ATF_TP_ADD_TC(tp, nvlist_send_recv__overflow_little_endian_size); ATF_TP_ADD_TC(tp, nvlist_send_recv__invalid_fd_size); ATF_TP_ADD_TC(tp, nvlist_send_recv__overflow_fd_size); diff --git a/sys/contrib/libnv/nvlist.c b/sys/contrib/libnv/nvlist.c index 73226ee51a78..11d9c9b49c94 100644 --- a/sys/contrib/libnv/nvlist.c +++ b/sys/contrib/libnv/nvlist.c @@ -1027,10 +1027,6 @@ static bool nvlist_check_header(struct nvlist_header *nvlhdrp) { - if (nvlhdrp->nvlh_size > SIZE_MAX - sizeof(*nvlhdrp)) { - ERRNO_SET(EINVAL); - return (false); - } if (nvlhdrp->nvlh_magic != NVLIST_HEADER_MAGIC) { ERRNO_SET(EINVAL); return (false); @@ -1050,6 +1046,11 @@ nvlist_check_header(struct nvlist_header *nvlhdrp) nvlhdrp->nvlh_descriptors = be64toh(nvlhdrp->nvlh_descriptors); } #endif + if (nvlhdrp->nvlh_size > SIZE_MAX - sizeof(*nvlhdrp)) { + ERRNO_SET(EINVAL); + return (false); + } + return (true); } From nobody Wed Apr 29 14:48:24 2026 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4g5KtL127Rz6bkRl for ; Wed, 29 Apr 2026 14:48:26 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R13" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4g5KtJ32Srz4JpP for ; Wed, 29 Apr 2026 14:48:24 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1777474104; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=3kjKKKvYR/yY9tBYPp5SmBQJm0MclfMbmhCbIUCc9ZU=; b=ElgyW3jsPjWxkRTZYM6vqS7HZxhtxwJLpuvA5RWpLJHYCUwsJY4iORe5mxzmPUNJqhxFmg nKlJN/Nt5G0zRj6neIjH2tFRkeiWO6tMdPp6BLbyPgrC1XXo5wTdB0D7l/DtKMG/EzF4nk Mi38km19LR64D7l8TegppWdZDfyw/RaLGKYqF2xlffSzXg0rGukQgaZfSp84e1WBWQd3il rF7kOmawPU7Lii+xsi+3159SkZ/d+Hm2ssNzhgg16fMp6xkmrRlI/sXv72PpM7i8+tKO7d cX0Si6YeKj3lxXdZL4NbgiKGBM1tgkpSVbpiMnruIpp6mTBmpXUm3MeGEt2ETw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1777474104; a=rsa-sha256; cv=none; b=M/odutAwVPoo36CX1el5CFUYVi6E/C8gYaOPCXcvqC76GeANZvzIPrrD0OY1GlfQ0K9Xnf 0WtpcpaPcJd5h5QJVZYH4IGSEL/Ai95pLF5BOyXhFCuK9FxkVKomBnFEaWh5loBm/p9IVt ru6XLZs1rojnetQ19ltXWtUTwHd+ZgezadKsfjtLQm8hYzB/Sq8W53EBNYtiBTkQQW5eDt 0UQ6XdUwOUixrR/uVLahx9MSzfkyfuJ2J/EFMF1q34SRoOl7Jn10TxqcW9dg3rHVxrjJqC cNJ+MADz16PriHTBhqiazWEs0OA4XK7oycmytqw8pvnQbV4eEmRMYh4a6SIzFQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1777474104; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=3kjKKKvYR/yY9tBYPp5SmBQJm0MclfMbmhCbIUCc9ZU=; b=C8ZlCWl8CNp40A3eqLW07JHq7Wv+7DsWEPHpz7oBsx9BdFbICtdfCniKvGfIKFAEoPZ2H3 n660WPnN7Ui9aOmczFUplNn9FwgYiLLYaXd5e5lQCETfkAqfXZZMOUn7wWtUFBddrmBKTw QhgdPC1jlrXfAgBfue3AEaTNZEXmkGEtTx8EEuwskgI4pl1yQYRBnEbHm/eQ303wG32law J/MTsT7xh+gLWXmCD0X+0wcOPrvoguhJoTYLSOivV+GX+wMdGMfYfIrcE0b2rHyWAYm/it cyqQ9vpoqx4eCCVF3hBm1qAXBFwec/6FE9An5+8L81YAD2SHdRjIWC2mY9FakQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4g5KtJ1x0czkK4 for ; Wed, 29 Apr 2026 14:48:24 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 3ac66 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Wed, 29 Apr 2026 14:48:24 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org Cc: Kristof Provost From: Mark Johnston Subject: git: d91d13c12484 - releng/15.0 - pf: fix duplicate rule detection for automatic tables List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: markj X-Git-Repository: src X-Git-Refname: refs/heads/releng/15.0 X-Git-Reftype: branch X-Git-Commit: d91d13c12484ebc007fdb26ebcf5950490f66d1e Auto-Submitted: auto-generated Date: Wed, 29 Apr 2026 14:48:24 +0000 Message-Id: <69f21a38.3ac66.17b79d0f@gitrepo.freebsd.org> The branch releng/15.0 has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=d91d13c12484ebc007fdb26ebcf5950490f66d1e commit d91d13c12484ebc007fdb26ebcf5950490f66d1e Author: Kristof Provost AuthorDate: 2026-04-09 16:11:41 +0000 Commit: Mark Johnston CommitDate: 2026-04-28 19:26:02 +0000 pf: fix duplicate rule detection for automatic tables We should look at the table name for automatic tables as well. These are different tables, so the rules using them are (or can be) different as well. Approved by: so Security: FreeBSD-EN-26:08.pf Reported by: Michael Sinatra Sponsored by: Rubicon Communications, LLC ("Netgate") (cherry picked from commit fb838352751767e756bd45cd2040fa464ed4de20) (cherry picked from commit fdcc60f52841708efda2582b2492b0a460496fcc) --- sys/netpfil/pf/pf_ioctl.c | 4 +--- tests/sys/netpfil/pf/pass_block.sh | 42 ++++++++++++++++++++++++++++++++++++++ 2 files changed, 43 insertions(+), 3 deletions(-) diff --git a/sys/netpfil/pf/pf_ioctl.c b/sys/netpfil/pf/pf_ioctl.c index 749c3a6d3dd7..e1778a92d234 100644 --- a/sys/netpfil/pf/pf_ioctl.c +++ b/sys/netpfil/pf/pf_ioctl.c @@ -1345,9 +1345,7 @@ pf_hash_rule_addr(MD5_CTX *ctx, struct pf_rule_addr *pfr) PF_MD5_UPD(pfr, addr.iflags); break; case PF_ADDR_TABLE: - if (strncmp(pfr->addr.v.tblname, PF_OPTIMIZER_TABLE_PFX, - strlen(PF_OPTIMIZER_TABLE_PFX))) - PF_MD5_UPD(pfr, addr.v.tblname); + PF_MD5_UPD(pfr, addr.v.tblname); break; case PF_ADDR_ADDRMASK: case PF_ADDR_RANGE: diff --git a/tests/sys/netpfil/pf/pass_block.sh b/tests/sys/netpfil/pf/pass_block.sh index f6d973de7cf4..a5cd04f1db22 100644 --- a/tests/sys/netpfil/pf/pass_block.sh +++ b/tests/sys/netpfil/pf/pass_block.sh @@ -488,6 +488,47 @@ addr_range_cleanup() pft_cleanup } +atf_test_case "auto_tables" "cleanup" +auto_tables_head() +{ + atf_set descr 'Test rulesets with different automatic tables' + atf_set require.user root +} + +auto_tables_body() +{ + pft_init + + epair=$(vnet_mkepair) + ifconfig ${epair}b 192.0.2.2/24 up + + vnet_mkjail alcatraz ${epair}a + jexec alcatraz ifconfig ${epair}a 192.0.2.1/24 up + + # Sanity check + atf_check -s exit:0 -o ignore ping -c 1 -t 1 192.0.2.1 + + jexec alcatraz pfctl -e + pft_set_rules alcatraz \ + "set ruleset-optimization basic" \ + "test_a = \"203.0.113.1 203.0.113.2 203.0.113.3 203.0.113.4 + 203.0.113.5 203.0.113.6 203.0.113.7 203.0.113.8 203.0.113.9 + 203.0.113.10\"" \ + "test_b = \"192.0.2.1 192.0.2.2 192.0.2.3 192.0.2.4 192.0.2.5 + 192.0.2.6 192.0.2.7 192.0.2.8 192.0.2.9 192.0.2.10\"" \ + "block" \ + "pass inet from any to { \$test_a }" \ + "pass inet from 198.51.100.1 to 198.51.100.2 no state" \ + "pass inet from any to { \$test_b }" + + atf_check -s exit:0 -o ignore ping -c 1 -t 1 192.0.2.1 +} + +auto_tables_cleanup() +{ + pft_cleanup +} + atf_init_test_cases() { atf_add_test_case "enable_disable" @@ -500,4 +541,5 @@ atf_init_test_cases() atf_add_test_case "optimize_any" atf_add_test_case "any_if" atf_add_test_case "addr_range" + atf_add_test_case "auto_tables" } From nobody Wed Apr 29 14:48:25 2026 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4g5KtL71cZz6bkTQ for ; Wed, 29 Apr 2026 14:48:26 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R13" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4g5KtL0Q2yz4JhP for ; Wed, 29 Apr 2026 14:48:26 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1777474106; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=HKcsj0l1BL4C91EahaAx0tj19QbyHNSeaHutHrZLCHc=; b=alGCSZiIDgm8dN7GxzxZv4fpEm+eUmHUfLu3cxlwlYB+8RGcwSJAhCbUEylO7Ta5M70T2D 0E6dxmbCA8jwbFDwhLA81EFdsRxlus0EoCJo7PJPeSBnZdurODpxRTKVqnY7beLJT76GS6 aqweXkYRhU5iaH95lR2j1bR5XgpQVrvq41jD4NK9PTRd1+GZY7bBPXBpP0MpIOM0xzTPqk BUuVpgbftrHZ6g+Igl6DXkuwE69KdHYNdkZ5T1MvaRE7drtWbJQxPZRLc0YRC5VgEbC7P6 MTYE+d8KaW2dfNeQ4sgHqiPd5HhcXhG0eT2ePptM5NIt7XIjoze8LeuuBQXocg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1777474106; a=rsa-sha256; cv=none; b=h94yqsh0ZdR/9F5InTTmSlAUGwbSJ6Ol0z1e56zQHOIk0scyHNSJd3/20nPMcwyisRMC2y 8Gauajt5bsqWznWwls0wLgPqD7JOo4EGIRql2TyxqnI7rCXF2N7xkj3VC08TJYVjmV61ld thacF7xG2iWuEFwuLu+BpbGVrWplHfPd5qw4BrxbUGo1FMC3L4HTU5KQNRzCcZlJt/h0xa XFAyQDMpuWJZTXE8hKTFKbhvl9ftmRlZnuCCY9gH+u/RnfkRCMLtHUMKV/n2CC/qqETw5Q XGarl9MFEULnGdXNV2isqqkpUmCwi6KJqm0uMdrhviGbDyAdFORe4snGsoVtNA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1777474106; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=HKcsj0l1BL4C91EahaAx0tj19QbyHNSeaHutHrZLCHc=; b=HTd7WIlElzuGs0cyriO4ovoBoI9zXzflqvGUp00cC/FZk3sVN1ECMTtNyA7kVB0j/o2Nw8 o8lJH+K3HeMlzXWpUuTSe1747EnbZnbxLzp+V+j4V4cdXlz2diwmgNKnZQFbu/DTpOc9l0 PA7xV2aevgRHEGej6qOrBezHe08zo+Ukge9XD6uAQZepYr10m5ch5aehNcTyTGaR5ZZ9hy 9YkE0bD6S/5CNcn0BoTHAxKAKf2BopYqj6PbK7uLq68hEOKDxRDv0j5yfVGYHt2mEi7kvJ YVOxWVKdbo2TdVfukmqMLTYVL2LB03PCCp9Rw1COPTES89D8KtEah1Y5YGyzkQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4g5KtK6DL6zlJB for ; Wed, 29 Apr 2026 14:48:25 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 3ba46 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Wed, 29 Apr 2026 14:48:25 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org Cc: Philip Paeps From: Mark Johnston Subject: git: 183f96697f82 - releng/15.0 - contrib/tzdata: import tzdata 2025c, 2026a and 2026b List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: markj X-Git-Repository: src X-Git-Refname: refs/heads/releng/15.0 X-Git-Reftype: branch X-Git-Commit: 183f96697f82a614a7423c031ee29735cd4e1a52 Auto-Submitted: auto-generated Date: Wed, 29 Apr 2026 14:48:25 +0000 Message-Id: <69f21a39.3ba46.45e1a5e@gitrepo.freebsd.org> The branch releng/15.0 has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=183f96697f82a614a7423c031ee29735cd4e1a52 commit 183f96697f82a614a7423c031ee29735cd4e1a52 Author: Philip Paeps AuthorDate: 2026-04-27 05:02:20 +0000 Commit: Mark Johnston CommitDate: 2026-04-28 19:26:02 +0000 contrib/tzdata: import tzdata 2025c, 2026a and 2026b Changes: https://github.com/eggert/tz/blob/2025c/NEWS Changes: https://github.com/eggert/tz/blob/2026a/NEWS Changes: https://github.com/eggert/tz/blob/2026b/NEWS Approved by: so Security: FreeBSD-EN-26:09.tzdata (cherry picked from commit a86dc94b84d177da8f00d1c9420ef0860576e4c4) (cherry picked from commit b94c971dd0cfe22c17639f18677eca92abdc5189) (cherry picked from commit 6becc3dff922476d667c15f029e520da496d4295) (cherry picked from commit 564480f108e7019a8cc8443c615f7d2b5edfb092) (cherry picked from commit 9b95cab0a2927dfe07dbe6dc0056a80d5c730414) (cherry picked from commit 1e5aff8e5bc607f6bfaaf982b9c07ce365cd9bf4) --- contrib/tzdata/CONTRIBUTING | 36 ++-- contrib/tzdata/Makefile | 236 +++++++++++++++--------- contrib/tzdata/NEWS | 269 +++++++++++++++++++++++++++ contrib/tzdata/README | 14 +- contrib/tzdata/SECURITY | 2 +- contrib/tzdata/africa | 9 +- contrib/tzdata/antarctica | 12 +- contrib/tzdata/asia | 6 +- contrib/tzdata/australasia | 10 +- contrib/tzdata/backzone | 13 +- contrib/tzdata/calendars | 27 +-- contrib/tzdata/checknow.awk | 5 + contrib/tzdata/etcetera | 3 +- contrib/tzdata/europe | 126 ++++++++++--- contrib/tzdata/leap-seconds.list | 8 +- contrib/tzdata/leapseconds | 19 +- contrib/tzdata/leapseconds.awk | 11 +- contrib/tzdata/northamerica | 109 +++++++++-- contrib/tzdata/southamerica | 6 +- contrib/tzdata/theory.html | 383 ++++++++++++++++++++------------------- contrib/tzdata/version | 2 +- contrib/tzdata/zone.tab | 2 +- contrib/tzdata/zone1970.tab | 22 +-- contrib/tzdata/zonenow.tab | 100 +++++----- 24 files changed, 970 insertions(+), 460 deletions(-) diff --git a/contrib/tzdata/CONTRIBUTING b/contrib/tzdata/CONTRIBUTING index f6edbd3be7d3..c5fa803f7275 100644 --- a/contrib/tzdata/CONTRIBUTING +++ b/contrib/tzdata/CONTRIBUTING @@ -10,26 +10,27 @@ warning, the data entries do not cover all of civil time before 1970, and undoubtedly errors remain in the code and data. Feel free to fill gaps or fix mistakes, and please email improvements to for use in the future. In your email, please give -reliable sources that reviewers can check. +reliable sources that reviewers can check. The mailing list and its +archives are public, so please do not send confidential information. ## Contributing technical changes To email small changes, please run a POSIX shell command like -'diff -u old/europe new/europe >myfix.patch', and attach -'myfix.patch' to the email. +‘diff -u old/europe new/europe >myfix.patch’, and attach +‘myfix.patch’ to the email. For more-elaborate or possibly controversial changes, such as renaming, adding or removing zones, please read -"Theory and pragmatics of the tz code and data" +“Theory and pragmatics of the tz code and data” . It is also good to browse the mailing list archives for examples of patches that tend to work well. Changes should contain commentary citing reliable sources. -Citations should use "https:" URLs if available. +Citations should use ‘https:’ URLs if available. For changes that fix sensitive security-related bugs, please see the -distribution's 'SECURITY' file. +distribution’s SECURITY file. Please submit changes against either the latest release or the main branch of the development @@ -54,11 +55,11 @@ If you use Git the following workflow may be helpful: git checkout -b mybranch - * Sleuth by using 'git blame'. For example, when fixing data for - Africa/Sao_Tome, if the command 'git blame africa' outputs a line - '2951fa3b (Paul Eggert 2018-01-08 09:03:13 -0800 1068) Zone - Africa/Sao_Tome 0:26:56 - LMT 1884', commit 2951fa3b should - provide some justification for the 'Zone Africa/Sao_Tome' line. + * Sleuth by using ‘git blame’. For example, when fixing data for + Africa/Sao_Tome, if the command ‘git blame africa’ outputs a line + ‘2951fa3b (Paul Eggert 2018-01-08 09:03:13 -0800 1068) Zone + Africa/Sao_Tome 0:26:56 - LMT 1884’, commit 2951fa3b should + provide some justification for the ‘Zone Africa/Sao_Tome’ line. * Edit source files. Include commentary that justifies the changes by citing reliable sources. @@ -69,28 +70,31 @@ If you use Git the following workflow may be helpful: ./zdump -v America/Los_Angeles Although builds assume only basic POSIX, they use extra features - if available. 'make check' accesses validator.w3.org unless you - lack 'curl' or use 'make CURL=:'. If you have the latest GCC, - "make CFLAGS='$(GCC_DEBUG_FLAGS)'" does extra checking. + if available. ‘make check’ accesses validator.w3.org unless you + lack ‘curl’ or use ‘make CURL=:’. If you have the latest GCC, + ‘make CFLAGS='$(GCC_DEBUG_FLAGS)'’ does extra checking. * For each separable change, commit it in the new branch, e.g.: git add northamerica git commit - See recent 'git log' output for the commit-message style. + See recent ‘git log’ output for the commit-message style. * Create patch files 0001-..., 0002-..., ... git format-patch main + * Check that the patch files and your email setup contain only + information that you want to make public. + * After reviewing the patch files, send the patches to for others to review. git send-email main For an archived example of such an email, see - "[PROPOSED] Fix off-by-1 error for Jamaica and T&C before 1913" + “[PROPOSED] Fix off-by-1 error for Jamaica and T&C before 1913” . * Start anew by getting current with the main branch again diff --git a/contrib/tzdata/Makefile b/contrib/tzdata/Makefile index 2130582c2deb..1e0a5903534d 100644 --- a/contrib/tzdata/Makefile +++ b/contrib/tzdata/Makefile @@ -3,17 +3,30 @@ # 2009-05-17 by Arthur David Olson. # Request POSIX conformance; this must be the first non-comment line. .POSIX: +# By default, builds of code and data assume POSIX.1-2001 or later; +# this assumption can be relaxed by tailoring the build as described below. # On older platforms you may need to scrounge for POSIX conformance. # For example, on Solaris 10 (2005) with Sun Studio 12 aka Sun C 5.9 (2007), # use 'PATH=/usr/xpg4/bin:$PATH make CC=c99'. +# Reproducible builds of distribution tarballs also need a copy of the +# Git repository, and assume the behavior of the following programs +# (or later versions): +# Git 2.7.0 (2016) +# GNU Coreutils 6.3 (2006) +# GNU Tar 1.14 (2004) +# GnuPG 1.4 (2004) +# Although tzdb does not come with a software bill of materials, +# you should be able to construct one based on the above information, +# your platform, and the way you use this Makefile. # To affect how this Makefile works, you can run a shell script like this: # # #!/bin/sh -# make CC='gcc -std=gnu23' "$@" +# make CFLAGS='-O2 -DHAVE_GETTEXT=0' "$@" # -# This example script is appropriate for a circa 2024 GNU/Linux system -# where a non-default setting enables this package's optional use of C23. +# This example script is appropriate for a GNU/Linux system +# which needs more optimization than default, and which does not want +# gettext's internationalization of diagnostics. # # Alternatively, you can simply edit this Makefile to tailor the following # macro definitions. @@ -53,28 +66,6 @@ DATAFORM= main LOCALTIME= Factory -# The POSIXRULES macro controls interpretation of POSIX-like TZ -# settings like TZ='EET-2EEST' that lack DST transition rules. -# If POSIXRULES is '-', no template is installed; this is the default. -# Any other value for POSIXRULES is obsolete and should not be relied on, as: -# * It does not work correctly in popular implementations such as GNU/Linux. -# * It does not work even in tzcode, except for historical timestamps -# that precede the last explicit transition in the POSIXRULES file. -# Hence it typically does not work for current and future timestamps. -# If, despite the above, you want a template for handling these settings, -# you can change the line below (after finding the timezone you want in the -# one of the $(TDATA) source files, or adding it to a source file). -# Alternatively, if you discover you've got the wrong timezone, you can just -# 'zic -p -' to remove it, or 'zic -p rightzone' to change it. -# Use the command -# make zonenames -# to get a list of the values you can use for POSIXRULES. - -POSIXRULES= - - -# Also see TZDEFRULESTRING below, which takes effect only -# if POSIXRULES is '-' or if the template file cannot be accessed. - # Installation locations. # @@ -150,13 +141,14 @@ TIME_T_ALTERNATIVES_TAIL = int_least32_t.ck uint_least32_t.ck \ # below. If you want both sets of data available, with leap seconds counted # normally, use # REDO= right_posix -# below. POSIX mandates that leap seconds not be counted; for compatibility -# with it, use "posix_only" or "posix_right". Use POSIX time on systems with +# below. POSIX mandates that leap seconds not be counted, and a +# nonnegative TZ_CHANGE_INTERVAL also assumes this, so to be compatible with +# these, use "posix_only" or "posix_right". Use POSIX time on systems with # leap smearing; this can work better than unsmeared "right" time with # applications that are not leap second aware, and is closer to unsmeared # "right" time than unsmeared POSIX time is (e.g., 0.5 vs 1.0 s max error). -REDO= posix_right +REDO= posix_only # Whether to put an "Expires" line in the leapseconds file. # Use EXPIRES_LINE=1 to put the line in, 0 to omit it. @@ -206,6 +198,12 @@ PACKRATLIST= UTF8_LOCALE= en_US.utf8 +# Extra flags for producing man page files like tzfile.5.txt. +# These flags are used only if groff (or mandoc) is present. +# Each option should begin with "-" and should lack shell metacharacters. +# Plausible options include -Tascii and -Tutf8. +MANFLAGS= -Tutf8 + # Non-default libraries needed to link. # On some hosts, this should have -lintl unless CFLAGS has -DHAVE_GETTEXT=0. LDLIBS= @@ -219,14 +217,19 @@ LDLIBS= # -DEPOCH_OFFSET=N if the 'time' function returns a value N greater # than what POSIX specifies, assuming local time is UT. # For example, N is 252460800 on AmigaOS. +# -DFREE_PRESERVES_ERRNO=[01] if the 'free' function munges or preserves errno +# (default is guessed) # -DHAVE_DECL_ASCTIME_R=0 if does not declare asctime_r # on POSIX platforms predating POSIX.1-2024 # -DHAVE_DECL_ENVIRON if declares 'environ' # -DHAVE_DECL_TIMEGM=0 if does not declare timegm # -DHAVE_DIRECT_H if mkdir needs (MS-Windows) +# -DHAVE_FCHMOD=0 if your system lacks the fchmod function # -DHAVE__GENERIC=0 if _Generic does not work* +# -DHAVE_GETEUID=0 if gete?[ug]id do not work # -DHAVE_GETRANDOM if getrandom works (e.g., GNU/Linux), # -DHAVE_GETRANDOM=0 to avoid using getrandom +# -DHAVE_GETRESUID=0 if getres[ug]id do not work # -DHAVE_GETTEXT if gettext works (e.g., GNU/Linux, FreeBSD, Solaris), # where LDLIBS also needs to contain -lintl on some hosts; # -DHAVE_GETTEXT=0 to avoid using gettext @@ -234,28 +237,46 @@ LDLIBS= # ctime_r and asctime_r incompatibly with POSIX.1-2017 and earlier # (Solaris when _POSIX_PTHREAD_SEMANTICS is not defined). # -DHAVE_INTTYPES_H=0 if does not work*+ +# -DHAVE_ISSETUGID=1 if issetugid works, 0 otherwise (default is guessed) +# If 0, you may also use -DHAVE_SYS_AUXV_H=1 if works, +# 0 otherwise (default is guessed). # -DHAVE_LINK=0 if your system lacks a link function # -DHAVE_LOCALTIME_R=0 if your system lacks a localtime_r function # -DHAVE_LOCALTIME_RZ=0 if you do not want zdump to use localtime_rz # localtime_rz can make zdump significantly faster, but is nonstandard. # -DHAVE_MALLOC_ERRNO=0 if malloc etc. do not set errno on failure. +# -DHAVE_MEMPCPY=1 if your system has mempcpy, 0 if not (default is guessed) # -DHAVE_POSIX_DECLS=0 if your system's include files do not declare -# functions like 'link' or variables like 'tzname' required by POSIX +# variables like 'tzname' required by POSIX +# -DHAVE_PWD_H=0 if your system lacks pwd.h, grp.h and corresponding functions +# If 0, you may also need -Dgid_t=G -Duid_t=U +# to define gid_t and uid_t to be types G and U. # -DHAVE_SETENV=0 if your system lacks the setenv function +# -DHAVE_SETMODE=[01] if your system lacks or has the setmode and getmode +# functions (default is guessed) # -DHAVE_SNPRINTF=0 if your system lacks the snprintf function+ # -DHAVE_STDCKDINT_H=0 if neither nor substitutes like # __builtin_add_overflow work* # -DHAVE_STDINT_H=0 if does not work*+ # -DHAVE_STRFTIME_L if declares locale_t and strftime_l # -DHAVE_STRDUP=0 if your system lacks the strdup function +# -DHAVE_STRNLEN=0 if your system lacks the strnlen function+ # -DHAVE_STRTOLL=0 if your system lacks the strtoll function+ +# -DHAVE_STRUCT_STAT_ST_CTIM=0 if struct stat lacks a status-change member +# of type struct timespec, so code should use st_ctime instead; +# but if the status-change member name is st_ctimespec, +# use -Dst_ctim=st_ctimespec instead (default is guessed)+ +# -DHAVE_STRUCT_TIMESPEC=0 if your system lacks struct timespec+ # -DHAVE_SYMLINK=0 if your system lacks the symlink function # -DHAVE_SYS_STAT_H=0 if does not work* +# If 0, you may also need -Dmode_t=M to define mode_t to be type M. # -DHAVE_TZSET=0 if your system lacks a tzset function # -DHAVE_UNISTD_H=0 if does not work* # -DHAVE_UTMPX_H=0 if does not work* # -Dlocale_t=XXX if your system uses XXX instead of locale_t # -DMKTIME_MIGHT_OVERFLOW if mktime might fail due to time_t overflow +# -DOPENAT_TZDIR if tzset should use openat on TZDIR then a relative open. +# See localtime.c for details. # -DPORT_TO_C89 if tzcode should also run on mostly-C89 platforms+ # Typically it is better to use a later standard. For example, # with GCC 4.9.4 (2016), prefer '-std=gnu11' to '-DPORT_TO_C89'. @@ -274,15 +295,46 @@ LDLIBS= # -DTHREAD_SAFE to make localtime.c thread-safe, as POSIX requires; # not needed by the main-program tz code, which is single-threaded. # Append other compiler flags as needed, e.g., -pthread on GNU/Linux. +# The following options can also be used: +# -DTHREAD_PREFER_SINGLE to prefer speed in single-threaded apps, +# at some cost in CPU time and energy in multi-threaded apps. +# The following options can also be used: +# -DHAVE___ISTHREADED=1 if there is an extern int __isthreaded +# variable, 0 otherwise (default is guessed) +# -DHAVE_SYS_SINGLE_THREADED_H=0 if works, +# 0 otherwise (default is guessed) +# -DTHREAD_RWLOCK to use read-write locks instead of mutexes. +# This can improve parallelism and thus save real time +# if many threads call tzcode functions simultaneously. +# It also costs CPU time and thus energy. +# -DTHREAD_TM_MULTI to have gmtime, localtime, and offtime +# return different struct tm * addresses in different threads. +# This supports nonportable programs that call +# gmtime/localtime/offtime when they should call +# gmtime_r/localtime_r/offtime_r to avoid races. +# Because the corresponding storage is freed on thread exit, +# this option is incompatible with POSIX.1-2024 and earlier. +# It also costs CPU time and memory. # -Dtime_tz=\"T\" to use T as the time_t type, rather than the system time_t # This is intended for internal use only; it mangles external names. +# -DTZ_CHANGE_INTERVAL=N if functions depending on TZ should check +# no more often than every N seconds for TZif file changes. +# If N is negative (the default), no such checking is done. +# This option is intended for platforms that want localtime etc. +# to respond to changes to a file selected by TZ, including to +# TZDEFAULT (normally /etc/localtime) if TZ is unset. +# On these platforms, REDO should be "posix_only" or "posix_right". +# This option does not affect tzalloc-allocated objects. # -DTZ_DOMAIN=\"foo\" to use "foo" for gettext domain name; default is "tz" # -DTZ_DOMAINDIR=\"/path\" to use "/path" for gettext directory; # the default is system-supplied, typically "/usr/lib/locale" +# -DTZ_RUNTIME_LEAPS=0 to disable runtime support for leap seconds. +# This conforms to POSIX, shrinks tzcode's attack surface, +# and is more efficient. However, it fails to support Internet +# RFC 9636's leap seconds. # -DTZDEFRULESTRING=\",date/time,date/time\" to default to the specified -# DST transitions for proleptic format TZ strings lacking them, -# in the usual case where POSIXRULES is '-'. If not specified, -# TZDEFRULESTRING defaults to US rules for future DST transitions. +# DST transitions for proleptic format TZ strings lacking them. +# If not specified, it defaults to US rules for future DST transitions. # This mishandles some past timestamps, as US DST rules have changed. # It also mishandles settings like TZ='EET-2EEST' for eastern Europe, # as Europe and US DST rules differ. @@ -314,7 +366,7 @@ LDLIBS= # Select instrumentation via "make GCC_INSTRUMENT='whatever'". GCC_INSTRUMENT = \ -fsanitize=undefined -fsanitize-address-use-after-scope \ - -fsanitize-undefined-trap-on-error -fstack-protector + -fsanitize-trap=all -fstack-protector # Omit -fanalyzer from GCC_DEBUG_FLAGS, as it makes GCC too slow. GCC_DEBUG_FLAGS = -DGCC_LINT -g3 -O3 \ $(GCC_INSTRUMENT) \ @@ -332,12 +384,13 @@ GCC_DEBUG_FLAGS = -DGCC_LINT -g3 -O3 \ -Wold-style-definition -Woverlength-strings -Wpointer-arith \ -Wshadow -Wshift-overflow=2 -Wstrict-overflow \ -Wstrict-prototypes -Wstringop-overflow=4 \ - -Wstringop-truncation -Wsuggest-attribute=cold \ + -Wsuggest-attribute=cold \ -Wsuggest-attribute=const -Wsuggest-attribute=format \ -Wsuggest-attribute=malloc \ -Wsuggest-attribute=noreturn -Wsuggest-attribute=pure \ -Wtrampolines -Wundef -Wunused-macros -Wuse-after-free=3 \ -Wvariadic-macros -Wvla -Wwrite-strings \ + -Wzero-as-null-pointer-constant \ -Wno-format-nonliteral -Wno-sign-compare -Wno-type-limits # # If your system has a "GMT offset" field in its "struct tm"s @@ -393,7 +446,9 @@ GCC_DEBUG_FLAGS = -DGCC_LINT -g3 -O3 \ # functions to be added to the time conversion library. # "offtime" is like "gmtime" except that it accepts a second (long) argument # that gives an offset to add to the time_t when converting it. -# I.e., "offtime" is like calling "localtime_rz" with a fixed-offset zone. +# "offtime_r" is to "offtime" what "gmtime_r" is to "gmtime". +# I.e., "offtime" and "offtime_r" are like calling "localtime_rz" +# with a fixed-offset zone. # "timelocal" is nearly equivalent to "mktime". # "timeoff" is like "timegm" except that it accepts a second (long) argument # that gives an offset to use when converting to a time_t. @@ -451,6 +506,11 @@ leaplist_URI = \ https://hpiers.obspm.fr/iers/bul/bulc/ntp/leap-seconds.list # The file is generated by the IERS Earth Orientation Centre, in Paris. leaplist_TZ = Europe/Paris +# +# To fetch leap-seconds.list from NIST via a less-secure protocol +# and with less-volatile metadata, use these settings: +#leaplist_URI = ftp://ftp.boulder.nist.gov/pub/time/leap-seconds.list +#leaplist_TZ = America/Denver # The zic command and its arguments. @@ -510,13 +570,10 @@ SAFE_CHARSET3= 'abcdefghijklmnopqrstuvwxyz{|}~' SAFE_CHARSET= $(SAFE_CHARSET1)$(SAFE_CHARSET2)$(SAFE_CHARSET3) SAFE_CHAR= '[]'$(SAFE_CHARSET)'-]' -# These non-alphabetic, non-ASCII printable characters are Latin-1, -# and so are likely displayable even in editors like XEmacs 21 -# that have limited display capabilities. -UNUSUAL_OK_LATIN_1 = ¡¢£¤¥¦§¨©«¬®¯°±²³´¶·¸¹»¼½¾¿×÷ -# Non-ASCII non-letters that OK_CHAR allows, as these characters are -# useful in commentary. -UNUSUAL_OK_CHARSET= $(UNUSUAL_OK_LATIN_1) +# These non-alphabetic, non-ASCII printable characters are +# used in commentary or in generated *.txt files +# and are not likely to cause confusion. +UNUSUAL_OK_CHARSET= §«°±»½¾×–‘’“”•→−≤★⟨⟩⯪ # Put this in a bracket expression to match spaces. s = [:space:] @@ -525,9 +582,6 @@ s = [:space:] # This is the same as SAFE_CHAR, except that UNUSUAL_OK_CHARSET and # multibyte letters are also allowed so that commentary can contain a # few safe symbols and people's names and can quote non-English sources. -# Other non-letters are limited to ASCII renderings for the -# convenience of maintainers using XEmacs 21.5.34, which by default -# mishandles Unicode characters U+0100 and greater. OK_CHAR= '[][:alpha:]$(UNUSUAL_OK_CHARSET)'$(SAFE_CHARSET)'-]' # SAFE_LINE matches a line of safe characters. @@ -654,7 +708,6 @@ install: all $(DATA) $(REDO) $(MANS) '$(DESTDIR)$(MANDIR)/man3' '$(DESTDIR)$(MANDIR)/man5' \ '$(DESTDIR)$(MANDIR)/man8' $(ZIC_INSTALL) -l $(LOCALTIME) \ - -p $(POSIXRULES) \ -t '$(DESTDIR)$(TZDEFAULT)' cp -f $(TABDATA) '$(DESTDIR)$(TZDIR)/.' cp tzselect '$(DESTDIR)$(BINDIR)/.' @@ -874,9 +927,9 @@ UTF8_LOCALE_MISSING = \ character-set.ck: $(ENCHILADA) $(UTF8_LOCALE_MISSING) || { \ sharp='#' && \ - ! grep -Env $(SAFE_LINE) $(MANS) date.1 $(MANTXTS) \ - $(MISC) $(SOURCES) $(WEB_PAGES) \ - CONTRIBUTING LICENSE README SECURITY \ + ! grep -Env $(SAFE_LINE) $(MANS) date.1 \ + $(MISC) $(SOURCES) \ + LICENSE \ version tzdata.zi && \ ! grep -Env $(SAFE_LINE)'|^UNUSUAL_OK_'$(OK_CHAR)'*$$' \ Makefile && \ @@ -888,11 +941,9 @@ character-set.ck: $(ENCHILADA) white-space.ck: $(ENCHILADA) $(UTF8_LOCALE_MISSING) || { \ - enchilada='$(ENCHILADA)' && \ patfmt=' \t|[\f\r\v]' && pat=$$(printf "$$patfmt\\n") && \ ! grep -En "$$pat|[$s]\$$" \ - $${enchilada%leap-seconds.list*} \ - $${enchilada#*leap-seconds.list}; \ + $(ENCHILADA:leap-seconds.list=); \ } touch $@ @@ -959,8 +1010,10 @@ now.ck: checknow.awk date tzdata.zi zdump zic zone1970.tab zonenow.tab ./zdump -i -t 0,$$future \ $$(find "$$PWD/$@d" -name Etc -prune \ -o -type f ! -name '*.tab' -print) \ - >$@d/zdump-1970.tab + >$@d/zdump-1970.tab && \ $(AWK) \ + -v now=$$now \ + -v now_out=$@.out \ -v zdump_table=$@d/zdump-now.tab \ -f checknow.awk zonenow.tab $(AWK) \ @@ -970,7 +1023,8 @@ now.ck: checknow.awk date tzdata.zi zdump zic zone1970.tab zonenow.tab -v zdump_table=$@d/zdump-1970.tab \ -f checknow.awk rm -fr $@d - touch $@ + touch $@.out + mv $@.out $@ tables.ck: checktab.awk $(YDATA) backward zone.tab zone1970.tab for tab in $(ZONETABLES); do \ @@ -1031,7 +1085,7 @@ zishrink-posix.ck zishrink-right.ck: \ clean_misc: rm -fr *.ckd *.dir - rm -f *.ck *.core *.o *.out core core.* \ + rm -f *.ck *.core *.o *.out *.t core core.* \ date tzdir.h tzselect version.h zdump zic libtz.a clean: clean_misc rm -fr tzdb-*/ @@ -1059,7 +1113,7 @@ zdump.8.txt: zdump.8 zic.8.txt: zic.8 $(MANTXTS): workman.sh - LC_ALL=C sh workman.sh $(@:.txt=) >$@.out + LC_ALL=C sh workman.sh $(MANFLAGS) $(@:.txt=) >$@.out mv $@.out $@ # Set file timestamps deterministically if possible, @@ -1108,7 +1162,7 @@ set-timestamps.out: $(EIGHT_YARDS) if git diff --quiet HEAD $$file; then \ time=$$(TZ=UTC0 git log -1 \ --format='tformat:%cd' \ - --date='format:%Y-%m-%dT%H:%M:%SZ' \ + --date='format-local:%Y-%m-%dT%H:%M:%SZ' \ $$file) && \ echo "+ touch -md $$time $$file" && \ touch -md $$time $$file; \ @@ -1207,12 +1261,12 @@ $(TIME_T_ALTERNATIVES): $(VERSION_DEPS) touch $@ TRADITIONAL_ASC = \ - tzcode$(VERSION).tar.gz.asc \ - tzdata$(VERSION).tar.gz.asc + tzcode$(VERSION).tar.gz.asc.t \ + tzdata$(VERSION).tar.gz.asc.t REARGUARD_ASC = \ - tzdata$(VERSION)-rearguard.tar.gz.asc + tzdata$(VERSION)-rearguard.tar.gz.asc.t ALL_ASC = $(TRADITIONAL_ASC) $(REARGUARD_ASC) \ - tzdb-$(VERSION).tar.lz.asc + tzdb-$(VERSION).tar.lz.asc.t tarballs rearguard_tarballs tailored_tarballs traditional_tarballs \ signatures rearguard_signatures traditional_signatures: \ @@ -1224,29 +1278,31 @@ signatures rearguard_signatures traditional_signatures: \ # other means. Ordinarily these rules are used only by the above # non-_version rules, which set VERSION on the 'make' command line. tarballs_version: traditional_tarballs_version rearguard_tarballs_version \ - tzdb-$(VERSION).tar.lz + tzdb-$(VERSION).tar.lz.t rearguard_tarballs_version: \ - tzdata$(VERSION)-rearguard.tar.gz + tzdata$(VERSION)-rearguard.tar.gz.t traditional_tarballs_version: \ - tzcode$(VERSION).tar.gz tzdata$(VERSION).tar.gz + tzcode$(VERSION).tar.gz.t tzdata$(VERSION).tar.gz.t tailored_tarballs_version: \ - tzdata$(VERSION)-tailored.tar.gz + tzdata$(VERSION)-tailored.tar.gz.t signatures_version: $(ALL_ASC) rearguard_signatures_version: $(REARGUARD_ASC) traditional_signatures_version: $(TRADITIONAL_ASC) -tzcode$(VERSION).tar.gz: set-timestamps.out +tzcode$(VERSION).tar.gz.t: set-timestamps.out $(SETUP_TAR) && \ $$TAR -cf - \ $(COMMON) $(DOCS) $(SOURCES) | \ - gzip $(GZIPFLAGS) >$@.out - mv $@.out $@ + gzip $(GZIPFLAGS) >$(@:.t=) + $(SET_TIMESTAMP) $(@:.t=) $(COMMON) $(DOCS) $(SOURCES) + touch $@ -tzdata$(VERSION).tar.gz: set-timestamps.out +tzdata$(VERSION).tar.gz.t: set-timestamps.out $(SETUP_TAR) && \ $$TAR -cf - $(TZDATA_DIST) | \ - gzip $(GZIPFLAGS) >$@.out - mv $@.out $@ + gzip $(GZIPFLAGS) >$(@:.t=) + $(SET_TIMESTAMP) $(@:.t=) $(TZDATA_DIST) + touch $@ # Create empty files with a reproducible timestamp. CREATE_EMPTY = TZ=UTC0 touch -mt 202010122253.00 @@ -1255,7 +1311,7 @@ CREATE_EMPTY = TZ=UTC0 touch -mt 202010122253.00 # for backwards compatibility with tz releases 2018e through 2022a. # They should go away eventually. To build rearguard tarballs you # can instead use 'make DATAFORM=rearguard tailored_tarballs'. -tzdata$(VERSION)-rearguard.tar.gz: rearguard.zi set-timestamps.out +tzdata$(VERSION)-rearguard.tar.gz.t: rearguard.zi set-timestamps.out rm -fr $@.dir mkdir $@.dir ln $(TZDATA_DIST) $@.dir @@ -1273,8 +1329,11 @@ tzdata$(VERSION)-rearguard.tar.gz: rearguard.zi set-timestamps.out (cd $@.dir && \ $$TAR -cf - \ $(TZDATA_DIST) pacificnew | \ - gzip $(GZIPFLAGS)) >$@.out - mv $@.out $@ + gzip $(GZIPFLAGS)) >$(@:.t=) + $(SET_TIMESTAMP) $(@:.t=) \ + $$(cd $@.dir && \ + ls $(TZDATA_DIST) pacificnew | sed 's,^,$@.dir/,') + touch $@ # Create a tailored tarball suitable for TZUpdater and compatible tools. # For example, 'make DATAFORM=vanguard tailored_tarballs' makes a tarball @@ -1283,7 +1342,7 @@ tzdata$(VERSION)-rearguard.tar.gz: rearguard.zi set-timestamps.out # traditional tarball, as data entries are put into 'etcetera' even if they # came from some other source file. However, the effect should be the same # for ordinary use, which reads all the source files. -tzdata$(VERSION)-tailored.tar.gz: set-timestamps.out +tzdata$(VERSION)-tailored.tar.gz.t: set-timestamps.out rm -fr $@.dir mkdir $@.dir : The dummy pacificnew pacifies TZUpdater 2.3.1 and earlier. @@ -1295,7 +1354,7 @@ tzdata$(VERSION)-tailored.tar.gz: set-timestamps.out cd $@.dir && \ $(CREATE_EMPTY) $(PRIMARY_YDATA) $(NDATA) backward \ $$pacificnew - (grep '^#' tzdata.zi && echo && cat $(DATAFORM).zi) \ + (sed '/^#/!d' tzdata.zi && echo && cat $(DATAFORM).zi) \ >$@.dir/etcetera touch -mr tzdata.zi $@.dir/etcetera sed -n \ @@ -1316,24 +1375,29 @@ tzdata$(VERSION)-tailored.tar.gz: set-timestamps.out ln $$links $@.dir $(SETUP_TAR) && \ (cd $@.dir && \ - $$TAR -cf - * | gzip $(GZIPFLAGS)) >$@.out - mv $@.out $@ + $$TAR -cf - *) | gzip $(GZIPFLAGS) >$(@:.t=) + $(SET_TIMESTAMP) $(@:.t=) \ + $$(cd $@.dir && ls * | sed 's,^,$@.dir/,') + touch $@ -tzdb-$(VERSION).tar.lz: set-timestamps.out set-tzs-timestamp.out +tzdb-$(VERSION).tar.lz.t: set-timestamps.out set-tzs-timestamp.out rm -fr tzdb-$(VERSION) mkdir tzdb-$(VERSION) ln $(ENCHILADA) tzdb-$(VERSION) $(SET_TIMESTAMP) tzdb-$(VERSION) tzdb-$(VERSION)/* $(SETUP_TAR) && \ - $$TAR -cf - tzdb-$(VERSION) | lzip -9 >$@.out - mv $@.out $@ + $$TAR -cf - tzdb-$(VERSION) | lzip -9 >$(@:.t=) + $(SET_TIMESTAMP) $(@:.t=) tzdb-$(VERSION) + touch $@ -tzcode$(VERSION).tar.gz.asc: tzcode$(VERSION).tar.gz -tzdata$(VERSION).tar.gz.asc: tzdata$(VERSION).tar.gz -tzdata$(VERSION)-rearguard.tar.gz.asc: tzdata$(VERSION)-rearguard.tar.gz -tzdb-$(VERSION).tar.lz.asc: tzdb-$(VERSION).tar.lz +tzcode$(VERSION).tar.gz.asc.t: tzcode$(VERSION).tar.gz.t +tzdata$(VERSION).tar.gz.asc.t: tzdata$(VERSION).tar.gz.t +tzdata$(VERSION)-rearguard.tar.gz.asc.t: tzdata$(VERSION)-rearguard.tar.gz.t +tzdb-$(VERSION).tar.lz.asc.t: tzdb-$(VERSION).tar.lz.t $(ALL_ASC): - $(GPG) --armor --detach-sign $? + $(GPG) --armor --detach-sign $(?:.t=) + $(SET_TIMESTAMP) $(@:.t=) $(?:.t=) + touch $@ TYPECHECK_CFLAGS = $(CFLAGS) -DTYPECHECK -D__time_t_defined -D_TIME_T typecheck: long-long.ck unsigned.ck diff --git a/contrib/tzdata/NEWS b/contrib/tzdata/NEWS index 8c0771641ef0..a0042701c687 100644 --- a/contrib/tzdata/NEWS +++ b/contrib/tzdata/NEWS @@ -1,5 +1,274 @@ News for the tz database +Release 2026a - 2026-04-22 23:06:43 -0700 + + Briefly: + British Columbia moved to permanent -07 on 2026-03-09. + Some more overflow bugs have been fixed in zic. + + Changes to future timestamps + + British Columbia’s 2026-03-08 spring forward was its last + foreseeable clock change, as it moved to permanent -07 thereafter. + (Thanks to Arthur David Olson.) Although the change to permanent + -07 legally took place on 2026-03-09, temporarily model the change + to occur on 2026-11-01 at 02:00 instead. This works around a + limitation in CLDR v48.2 (2026-03-17). This temporary hack is + planned to be removed after CLDR is fixed. + + Changes to code + + zic no longer mishandles a last transition to a new time type. + + zic no longer overflows a buffer when generating a TZ string like + "PST-167:59:58PDT-167:59:59,M11.5.6/-167:59:59,M12.5.6/-167:59:59", + which can occur with adversarial input. (Thanks to Naveed Khan.) + + zic no longer generates a longer TZif file than necessary when + an earlier time zone abbreviation is a suffix of a later one. + As a nice side effect, zic no longer overflows a buffer when given + a long series of abbreviations, each a suffix of the next. + (Buffer overflow reported by Arthur Chan.) + + zic no longer overflows an int when processing input like ‘Zone + Ouch 2147483648:00:00 - LMT’. The int overflow can lead to buffer + overflow in adversarial cases. (Thanks to Naveed Khan.) + + zic now checks for signals more often. + + +Release 2026a - 2026-03-01 22:59:49 -0800 + + Briefly: + Moldova has used EU transition times since 2022. + The “right” TZif files are no longer installed by default. + -DTZ_RUNTIME_LEAPS=0 disables runtime support for leap seconds. + TZif files are no longer limited to 50 bytes of abbreviations. + zic is no longer limited to 50 leap seconds. + Several integer overflow bugs have been fixed. + + Changes to past and future timestamps + + Since 2022 Moldova has observed EU transition times, that is, it + has sprung forward at 03:00, not 02:00, and has fallen back at + 04:00, not 03:00. (Thanks to Heitor David Pinto.) + + Changes to data + + Remove Europe/Chisinau from zonenow.tab, as it now agrees with + Europe/Athens for future timestamps. + + Changes to build procedure + + The Makefile no longer by default installs an alternate set + of TZif files for system clocks that count leap seconds. + Install with ‘make REDO=posix_right’ to get the old default, + which is rarely used in major downstream distributions. + If your system clock counts leap seconds (contrary to POSIX), + it is better to install with ‘make REDO=right_only’. + This change does not affect the leapseconds file, which is still + installed as before. + + The Makefile’s POSIXRULES option, which was declared obsolete in + release 2019b, has been removed. The Makefile’s build procedure + thus no longer optionally installs the obsolete posixrules file. + + Changes to code + + Compiling with the new option -DTZ_RUNTIME_LEAPS=0 disables + runtime support for leap seconds. Although this conforms to + POSIX, shrinks tzcode’s attack surface, and is more efficient, + it fails to support Internet RFC 9636’s leap seconds. + + zic now can generate, and localtime.c can now use, TZif files that + hold up to 256 bytes of abbreviations, counting trailing NULs. + The previous limit was 50 bytes, and some tzdata TZif files were + already consuming 40 bytes. zic -v warns if it generates a file + that exceeds the old 50-byte limit. + + zic -L can now generate TZif files with more than 50 leap seconds. + This helps test TZif readers not limited to 50 leap seconds, as + tzcode’s localtime.c is; it has little immediate need for + practical timekeeping as there have been only 27 leap seconds and + possibly there will be no more, due to planned changes to UTC. + zic -v warns if its output exceeds the old 50-second limit. + + localtime.c no longer accesses the posixrules file generated by + zic -p. Hence for obsolete and nonconforming settings like + TZ="AST4ADT" it now typically falls back on US DST rules, rather + than attempting to override this fallback with the contents of the + posixrules file. This removes library support that was declared + obsolete in release 2019b, and fixes some undefined behavior. + (Undefined behavior reported by GitHub user Naveed8951.) + + The posix2time, posix2time_z, time2posix, and time2posix_z + functions now set errno=EOVERFLOW and return ((time_t) -1) if the + result is not representable. Formerly they had undefined behavior + that could in practice result in crashing, looping indefinitely, + or returning an incorrect result. As before, these functions are + defined only when localtime.c is compiled with the -DSTD_INSPIRED + option. + + Some other undefined behavior, triggered by TZif files containing + outlandish but conforming UT offsets or leap second corrections, + has also been fixed. (Some of these bugs reported by Naveed8951.) + + localtime.c no longer rejects TZif files that exactly fit in its + internal structures, fixing off-by-one typos introduced in 2014g. + + zic no longer generates a no-op transition when + simultaneous Rule and Zone changes cancel each other out. + This occurs in tzdata only in Asia/Tbilisi on 1997-03-30. + (Thanks to Renchunhui for a test case showing the bug.) + + zic no longer assumes you can fflush a read-only stream. + (Problem reported by Christos Zoulas.) + + zic no longer generates UT offsets equal to -2**31 and localtime.c + no longer accepts them, as they can cause trouble in both + localtime.c and its callers. RFC 9636 prohibits such offsets. + + zic -p now warns that the -p option is obsolete and likely + ineffective. + + +Release 2025c - 2025-12-10 14:42:37 -0800 + + Briefly: + Several code changes for compatibility with FreeBSD. + + Changes to past timestamps + + Baja California agreed with California’s DST rules in 1953 and in + 1961 through 1975, instead of observing standard time all year. + (Thanks to Alois Treindl.) + + Changes to build procedure + + Files in distributed tarballs now have correct commit times. + Formerly, the committer’s time zone was incorrectly ignored. + + Distribution products (*.asc, *.gz, and *.lz) now have + reproducible timestamps. Formerly, only the contents of the + compressed tarballs had reproducible timestamps. + + By default, distributed formatted man pages (*.txt) now use UTF-8 + and are left-adjusted more consistently. A new Makefile macro + MANFLAGS can override these defaults. (Thanks to G. Branden + Robinson for inspiring these changes.) + + Changes to code + + An unset TZ is no longer invalid when /etc/localtime is missing, + and is abbreviated "UTC" not "-00". This reverts to 2024b behavior. + (Problem and patch reported by Dag-Erling Smørgrav.) + + New function offtime_r, short for fixed-offset localtime_rz. + It is defined if STD_INSPIRED is defined. + (Patch from Dag-Erling Smørgrav.) + + tzset etc. are now more cautious about questionable TZ settings. + Privileged programs now reject TZ settings that start with '/', + unless they are TZDEFAULT (default "/etc/localtime") or + start with TZDIR then '/' (default "/usr/share/zoneinfo/"). + Unprivileged programs now require files to be regular files + and reject relative names containing ".." directory components; + formerly, only privileged programs did those two things. + These changes were inspired by similar behavior in FreeBSD. + On NetBSD, unprivileged programs now use O_REGULAR to check + whether a TZ setting starting with '/' names a regular file, + avoiding a minor security race still present elsewhere. + TZ strings taken from tzalloc arguments are now treated with + no less caution than TZ strings taken from the environment, as + the old undocumented behavior would have been hard to explain. + tzset etc. no longer use the ‘access’ system call to check access; + instead they now use the system calls issetugid, getauxval, + getresuid/getresgid, and geteuid/getegid/getuid/getgid (whichever + first works) to test whether a program is privileged. + Compile with -DHAVE_SYS_AUXV_H=[01] to enable or disable + which (if it defines AT_SECURE) enables getauxval, + and compile with -DHAVE_ISSETUGID=[01], -DHAVE_GETRESUID=[01], and + -DHAVE_GETEUID=[01] to enable or disable the other calls’ use. + + The new CFLAGS option -DTZ_CHANGE_INTERVAL=N makes tzset etc. + check for TZif file changes if the in-memory data are N seconds + old or more, and are derived from the TZ environment variable. + This is intended for platforms that want tzset etc. to reflect + changes to whatever file TZ selects (including changes to + /etc/localtime if TZ is unset). If N is negative (the default) + these checks are omitted; this is the traditional behavior. + + The new CFLAGS options -DHAVE_STRUCT_STAT_ST_CTIM=0 and + -DHAVE_STRUCT_TIMESPEC=0 port to non-POSIX.1-2008 platforms + that lack st_ctim and struct timespec, respectively. + On these platforms, the code falls back on st_ctime to + implement -DTZ_CHANGE_INTERVAL=N. + + tzset etc. now treat ' ' like '_' in time zone abbreviations, + just as they treat other invalid bytes. This continues the + transition begun in release 96k, which removed spaces in tzdata + because the spaces break time string parsers. + + The new CFLAGS option -DTHREAD_PREFER_SINGLE causes tzcode + in single-threaded processes to avoid locks, as FreeBSD does. + This can save time in single-threaded apps. The threadedness + testing costs CPU time and energy in multi-threaded apps. + New options -DHAVE___ISTHREADED and -DHAVE_SYS_SINGLE_THREADED_H + can help configure how to test for single-threadedness. + + The new CFLAGS option -DTHREAD_RWLOCK uses read-write locks, as + macOS does, instead of mutexes. This saves real time when TZ is + rarely changing and many threads call tzcode simultaneously. + It costs more CPU time and energy. + + The new CFLAGS option -TTHREAD_TM_MULTI causes localtime to return + a pointer to thread-specific memory, as FreeBSD does, instead of + to the same memory in all threads. This supports nonportable + programs that incorrectly use localtime instead of localtime_r. + This option affects gmtime and offtime similarly to localtime. + Because the corresponding storage is freed on thread exit, this + option is incompatible with POSIX.1-2024 and earlier. It also + costs CPU time and memory. + + tzfree now preserves errno, consistently with POSIX.1-2024 ‘free’. + + tzcode now uses mempcpy if available, guessing its availability. + Compile with -DHAVE_MEMPCPY=1 or 0 to override the guess. + + tzcode now uses strnlen to improve asymptotic performance a bit. + Compile with -DHAVE_STRNLEN=0 if your platform lacks it. + + tzcode now hand-declares unistd.h-provided symbols like getopt + if HAVE_UNISTD_H=0, not if HAVE_POSIX_DECLS=0. + + tzset etc. now have an experimental OPENAT_TZDIR option; + see Makefile and localtime.c for details. + + On platforms like GNU/Hurd that do not define PATH_MAX, + exceedingly long TZ strings no longer fail merely because they + exceed an arbitrary file name length limit imposed by tzcode. + + zic has new options inspired by FreeBSD. ‘-D’ skips creation of + output ancestor directories, ‘-m MODE’ sets output files’ mode, + and ‘-u OWNER[:GROUP]’ sets output files’ owner and group. + + zic now uses the fdopen function, which was standardized by + POSIX.1-1988 and is now safe to use in portable code. + This replaces its use of the older umask function, which + complicated maintenance. + + Changes to commentary + + The leapseconds file contains commentary about the IERS and NIST + last-modified and expiration timestamps for leap second data. + (Thanks to Judah Levine.) + + Commentary now also uses characters from the set –‘’“”•≤ as this + can be useful and should work with current applications. This + also affects data in iso3166.tab and zone1970.tab, which now + contain strings like “Côte d’Ivoire” instead of “Côte d'Ivoire”. + + Release 2025b - 2025-03-22 13:40:46 -0700 Briefly: diff --git a/contrib/tzdata/README b/contrib/tzdata/README index edabd2e0690f..f22ec5492d09 100644 --- a/contrib/tzdata/README +++ b/contrib/tzdata/README @@ -1,8 +1,8 @@ README for the tz distribution -"Where do I set the hands of the clock?" -- Les Tremayne as The King -"Oh that--you can set them any place you want." -- Frank Baxter as The Scientist - (from the Bell System film "About Time") +“Where do I set the hands of the clock?” – Les Tremayne as The King +“Oh that – you can set them any place you want.” – Frank Baxter as The Scientist + (from the Bell System film “About Time”) The Time Zone Database (called tz, tzdb or zoneinfo) contains code and data that represent the history of local time for many representative @@ -13,12 +13,12 @@ and daylight-saving rules. See or the file tz-link.html for how to acquire the code and data. -Once acquired, read the leading comments in the file "Makefile" +Once acquired, read the leading comments in the file ‘Makefile’ and make any changes needed to make things right for your system, especially when using a platform other than current GNU/Linux. Then run the following commands, substituting your desired -installation directory for "$HOME/tzdir": +installation directory for ‘$HOME/tzdir’: make TOPDIR="$HOME/tzdir" install "$HOME/tzdir/usr/bin/zdump" -v America/Los_Angeles @@ -39,12 +39,12 @@ The information in the time zone data files is by no means authoritative; fixes and enhancements are welcome. Please see the file CONTRIBUTING for details. -Thanks to these Time Zone Caballeros who've made major contributions to the +Thanks to these Time Zone Caballeros who’ve made major contributions to the time conversion package: Keith Bostic; Bob Devine; Paul Eggert; Robert Elz; Guy Harris; Mark Horton; John Mackin; and Bradley White. Thanks also to Michael Bloom, Art Neilson, Stephen Prince, John Sovereign, and Frank Wales for testing work, and to Gwillim Law for checking local mean time data. -Thanks in particular to Arthur David Olson, the project's founder and first +Thanks in particular to Arthur David Olson, the project’s founder and first maintainer, to whom the time zone community owes the greatest debt of all. None of them are responsible for remaining errors. diff --git a/contrib/tzdata/SECURITY b/contrib/tzdata/SECURITY index 40128bc86dd2..dbce8bbd5d2d 100644 --- a/contrib/tzdata/SECURITY *** 2129 LINES SKIPPED *** From nobody Wed Apr 29 14:48:28 2026 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4g5KtP5B43z6bkP0 for ; Wed, 29 Apr 2026 14:48:29 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R13" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4g5KtP2GF6z4Jpd for ; Wed, 29 Apr 2026 14:48:29 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1777474109; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=iyyLuNUH2p4azF9dUwQ7A5vHKChkDV0CR6uo0dgvc4E=; b=xNyHvfyKcNaSJoWmEIjxGC35B53EiZp56IPdOQpqxfBXZGApA50J3FjWPUpQ1qiNF/Ee0l 8Ful9ppx7u8h+HWxWT2WrSSEg3/EFGhna5RN1ujFneiQETGR2Q8n+iJLyNgmaOUxna3+LX i8Pn5HsLo6zjfrN3QEbmnKAuG/voONOaUeWXCX+wNvXtH6i7NVBZIJA2sDlzAuSPml/HXZ tsVoSxcOcs1Xc0Zdtv5I18XeVxVPpGc6sBUlGVH1XBiFtgtp6OZ9tIpAd1wes99ypvStGN DccjAFh6UcAHZZN6scl+e7ZbMcf9lxSbQiCA5zTImwaD7Tc5jJ26r0IlalsjkA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1777474109; a=rsa-sha256; cv=none; b=v+wB+gjVIBXL6/CQhHsxkxIHLf1mSK9hX3ZGB2IpDYVgeyjXFZcMzkfk0CHKiO1Qjumla1 tTolbj9Hvc9DCzIeL1K8qhbzc25vdzQsCIIUBRtzTcnfqz55McF2qQVpNyJ0VeOLOZlIy0 2UlrSpND8QWyeMi4xjYdmFF9Okepg3NE0gDewCWTTVQ32q7Mgf7wjqPzRYvhvOF2rO7mLr liyO+AqMWyJbX8FL4oc9CW2hLkUtuxeUcGAuNMBpxsS6cUb8cvt63ep5R6mhQJebkGf+FT lNW4ZGQ5h9ituKesAx/B+uxd4+WzGbRX6mG9k2dEMRvr6wOBQDLhnB1pPKP4Tg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1777474109; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=iyyLuNUH2p4azF9dUwQ7A5vHKChkDV0CR6uo0dgvc4E=; b=YfgZOP1BM7GZRWghW/faVxvqI8atSfcyvX83hF9aog0hQoQR1VzzEDQw24Yr/LLdJOvP/i KUkgrLw+cKf0sz2AYFByYRyt982CzJJS0VGWz8qvojw3o5kE8rUjPzHfccj3wwlRE5eEjV L9h15xCJ2y44JRAT+Th7SKtXkD/g6w2as4RvnyyCrD/6R5QcERFp6EPlSucFC65d5tvdWQ /Ka4COXPHuC4as1AMhn41vleeGdBACIrpmJGXlCKTCNpAVr8beetK6qwM15GMmofm6CJAd VqUvU9wMBfB6T9a7wCMOmO2dcr/a6IMhSXeuB90trm0dgtUcC7/IcYc70sx5Uw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4g5KtP16nkzl2d for ; Wed, 29 Apr 2026 14:48:29 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 3c6e3 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Wed, 29 Apr 2026 14:48:28 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Mark Johnston Subject: git: e7b4fb41aafa - releng/15.0 - dhclient: Check for unexpected characters in some DHCP server options List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: markj X-Git-Repository: src X-Git-Refname: refs/heads/releng/15.0 X-Git-Reftype: branch X-Git-Commit: e7b4fb41aafaf6ccb4ff14684416223c1f6f92e8 Auto-Submitted: auto-generated Date: Wed, 29 Apr 2026 14:48:28 +0000 Message-Id: <69f21a3c.3c6e3.34f90705@gitrepo.freebsd.org> The branch releng/15.0 has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=e7b4fb41aafaf6ccb4ff14684416223c1f6f92e8 commit e7b4fb41aafaf6ccb4ff14684416223c1f6f92e8 Author: Mark Johnston AuthorDate: 2026-04-27 20:03:09 +0000 Commit: Mark Johnston CommitDate: 2026-04-28 19:27:11 +0000 dhclient: Check for unexpected characters in some DHCP server options Some options are written directly to the lease file, which may be parsed by subsequent dhclient invocations. We must make sure that a malicious server can't control the "medium" field of a lease definition, otherwise they can achieve RCE by injecting one into the lease file, whereupon it will be passed to dhclient-script, which passes it through eval. Approved by: so Security: FreeBSD-SA-26:12.dhclient Security: CVE-2026-42511 Reported by: Joshua Rogers of AISLE Research Team (https://aisle.com/) --- sbin/dhclient/dhclient.c | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/sbin/dhclient/dhclient.c b/sbin/dhclient/dhclient.c index 5d2a7453578b..719e20cffad9 100644 --- a/sbin/dhclient/dhclient.c +++ b/sbin/dhclient/dhclient.c @@ -1226,6 +1226,12 @@ packet_to_lease(struct packet *packet) } memcpy(lease->server_name, packet->raw->sname, DHCP_SNAME_LEN); lease->server_name[DHCP_SNAME_LEN]='\0'; + if (strchr(lease->server_name, '"') != NULL || + strchr(lease->server_name, '\\') != NULL) { + warning("dhcpoffer: server name contains invalid characters."); + free_client_lease(lease); + return (NULL); + } } /* Ditto for the filename. */ @@ -1241,6 +1247,12 @@ packet_to_lease(struct packet *packet) } memcpy(lease->filename, packet->raw->file, DHCP_FILE_LEN); lease->filename[DHCP_FILE_LEN]='\0'; + if (strchr(lease->filename, '"') != NULL || + strchr(lease->filename, '\\') != NULL) { + warning("dhcpoffer: filename contains invalid characters."); + free_client_lease(lease); + return (NULL); + } } return lease; } From nobody Wed Apr 29 14:48:27 2026 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4g5KtP5Bfkz6bkTf for ; Wed, 29 Apr 2026 14:48:29 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R13" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4g5KtN6mmWz4JxP for ; Wed, 29 Apr 2026 14:48:27 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1777474109; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=5aHHgm3b9JQTHw9RBtaVQ9wnP3X5gehcT1Rgr3vCXRY=; b=p3D3Lq0OmVFl7vukPzJDQYgtKNz72Y1vJ9Kl5fIBObSPoLCO3V8xUw3QVhFS3MAmtk5Y2h mmEBxLWMNTGhiYKCpIDQx+aGNblc5fQnUDYANCuTsRztix6x8/kao4N+90uB4RB3IfgGXI gd6FCRo+mXeiPwvPNl9STiS9X5XKZQaMV7m5Y60WlT4k8gOdTvHyF849ZvAaqfh+BOXxcr U0Rr3BAQGx9Vyt9gOEnwz2S4fibIpLFkxnt8SOqASTX6E02RL1CpZywe0qukeoKWLHLGWZ DWynZZYGTCNHwrt8kdsctT4TvlAc2EnNGCZSu40NmDldzV2cO/7kpe/xrxFyYg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1777474109; a=rsa-sha256; cv=none; b=pIZt2Kz8AVSyxzfAHqRua6Few5ab4K6AedfszXkAkiXcVINSWlzhYf7ejI4TcWNHEHiyv5 4U01GXbmUhlsSkjtwEVJB+ulWdyJ7edakECUhcdIlHy9q/E7tCT9Bku+iNmZQOa7PL4SKT 7NoVK4gwSN9CUuJshY+m/fGbsE+rFrxNeDVBjn5tso5VX6qu644eePwJ30z3leVa5RCCa/ Ynkd8CmfnYxHhyLoYmJopLTCn0Ixhi0N36lfrpNhsWHFiiKkRz3Oigb0XIl/obM/0BFhcv 1oqYQMB35EAI9kGLkiP1L4lvT8YwSAUN1/J06IKyIxSdzfHWdkuzaUHI0Y8Waw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1777474109; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=5aHHgm3b9JQTHw9RBtaVQ9wnP3X5gehcT1Rgr3vCXRY=; b=E9+LTFyKSY66vrL0drlFnaFHSc9tvx0ENWYAJXTRpZMbG1zZkpcjgp5iCTOJ3pTakoRwGe wAtTdEnxdJZNc5HjFU287GIqpOx0cHPkE9kZljxz0ngMsbV4Oez9SFoTpG+F4y5EPcCvsd DrVsHHFZtGYOEtmcuUlo22aFoIrzftcgzneXHlhnrAV8i6MvtxQ5X5IJahmgenDJ6oAjgE cN120aOD0BBAZazJv8iCSvnbYKj4v+hF1AG9V5bWBvJSdvCYFohMBXKtVvdlPF0JUmOg94 4VBf61uq4Iilsunzp0nc9nt0l/epuvzxHjkntBk1oZAhdRpDx8cPHLyNeXfiWw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4g5KtM4cPHzlKl for ; Wed, 29 Apr 2026 14:48:27 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 3b7c8 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Wed, 29 Apr 2026 14:48:27 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Mark Johnston Subject: git: 934b48683c4f - releng/15.0 - execve: Fix an operator precedence bug List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: markj X-Git-Repository: src X-Git-Refname: refs/heads/releng/15.0 X-Git-Reftype: branch X-Git-Commit: 934b48683c4f140cafd225518d9e056a00b46ee8 Auto-Submitted: auto-generated Date: Wed, 29 Apr 2026 14:48:27 +0000 Message-Id: <69f21a3b.3b7c8.6114f956@gitrepo.freebsd.org> The branch releng/15.0 has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=934b48683c4f140cafd225518d9e056a00b46ee8 commit 934b48683c4f140cafd225518d9e056a00b46ee8 Author: Mark Johnston AuthorDate: 2026-04-22 17:58:35 +0000 Commit: Mark Johnston CommitDate: 2026-04-28 19:27:11 +0000 execve: Fix an operator precedence bug The buggy version allowed userspace to overflow the copy into adjacent execve KVA regions, which enables, among other things, injecting environment variables into privileged processes. Approved by: so Security: FreeBSD-SA-26:13.exec Security: CVE-2026-7270 Reported by: Ryan Austin of Calif.io Reviewed by: brooks, kib Fixes: f373437a01a3 ("Add helper functions to copy strings into struct image_args.") Differential Revision: https://reviews.freebsd.org/D56665 --- sys/kern/kern_exec.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/kern/kern_exec.c b/sys/kern/kern_exec.c index b2c09b47f103..5b79b8d96fc8 100644 --- a/sys/kern/kern_exec.c +++ b/sys/kern/kern_exec.c @@ -1652,7 +1652,7 @@ exec_args_adjust_args(struct image_args *args, size_t consume, ssize_t extend) if (args->stringspace < offset) return (E2BIG); memmove(args->begin_argv + extend, args->begin_argv + consume, - args->endp - args->begin_argv + consume); + args->endp - (args->begin_argv + consume)); if (args->envc > 0) args->begin_envv += offset; args->endp += offset; From nobody Wed Apr 29 14:48:26 2026 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4g5KtP1MXtz6bkNy for ; Wed, 29 Apr 2026 14:48:29 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R13" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4g5KtM120Jz4K0n for ; Wed, 29 Apr 2026 14:48:27 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1777474107; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=IOBMr37jA7Sp5itaokV7hLgXFPQT1L5QNhaET46tOD4=; b=x4mpBJlcvUe7tT1ldsKVgz52Vz7BQizCY2ZrqAfhQZLC5mQQsEYcj1kew0IW/C1OZ/QxGg EyHSf6RTJtq+KICL/eXPjwR1darVkDhKGc78yIMB4TpJ+7pkJhJlH9Ii0+5cwGFngCjZVg wni0OmeuAUk9dly4M+PVI2STuGRiIDJ2jPdF27a85j05rsPNxMQdfEp/G9lTKikfO2uDId Exn1grAdKZxgiQyX0YETef/X3aLcpcGO7hZtPagYTL563GPY004ARMU6E4WKCmekNzalKl KJSXCtAE3C6y1XfYskJEXa6xuimEp2NxqA2BOm6dCDERch9y8zdZt4CfvW9BZw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1777474107; a=rsa-sha256; cv=none; b=rkpcrw9uUq3hVcmmlmHOWocihHAwrZKjTN/LqzKjDBHiLE+aqTluArd7/XNznGRsL2gevH 0riNebEd3cDNbLujyzEKi3hqp7gba4uRGMpPZjT17ImaME1CzMGQ2OBoKMBUqNa5tOqOMU A8X6v4zXCVT4SBai4UvcJ9f/Gr4rFvRZ6oAvgVcXN3p7fHkQgLUMQSxyoBE0O+f6SNQaLQ 8zR6hjlaRU2sItR300YOwbLfDk/2TUnCmoZWnuHQBYDUqrfyRcmYeTSQ5eUtUxh5/g6vCq AE5FWLUOO7r+IW1W9ED5nTjqQZxbjaW+7jRMuvOq3AK+VbNcP/v3Wv8jJ7Qy6g== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1777474107; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=IOBMr37jA7Sp5itaokV7hLgXFPQT1L5QNhaET46tOD4=; b=beiOapX540b/bdFj7bJK8i1kqg3SjtiEFJXPn0udzZBBrSDzecCuFX45jreiqhQAORTujE SrTJIAKOmV+qEuB7Rejc+JC7aTdGB9G0dM0J4E4/zApopwrxMWOFx0qX/ynHSH7jD5Lq70 cEFk6qTDlLqOll/4rzw9cuz0N8iQ4sjaECGKqqKHjAW0V9hxi/krDnd1+uykfuYTiWDJC9 liwBD7eC6j/aVei76vEtY9MBJHZKT3lNdYxcfL+ht3mlwsTaguW0YgP/qug+XvYtgTJ1FP bNCd5LD2Db/iBEPR/ZC9MjDj9PB6MkFiuYTD2yiFCMUAwEUK38LT+/LhAmszCg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4g5KtL6dGQzl2b for ; Wed, 29 Apr 2026 14:48:26 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 3b945 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Wed, 29 Apr 2026 14:48:26 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org Cc: Kyle Evans From: Mark Johnston Subject: git: 182c59658218 - releng/15.0 - amd64: fix INVLPGB range invalidation List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: markj X-Git-Repository: src X-Git-Refname: refs/heads/releng/15.0 X-Git-Reftype: branch X-Git-Commit: 182c59658218d9b0a889eaad56ad4c31d99323e9 Auto-Submitted: auto-generated Date: Wed, 29 Apr 2026 14:48:26 +0000 Message-Id: <69f21a3a.3b945.512e8b6f@gitrepo.freebsd.org> The branch releng/15.0 has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=182c59658218d9b0a889eaad56ad4c31d99323e9 commit 182c59658218d9b0a889eaad56ad4c31d99323e9 Author: Kyle Evans AuthorDate: 2026-04-20 20:18:17 +0000 Commit: Mark Johnston CommitDate: 2026-04-28 19:26:02 +0000 amd64: fix INVLPGB range invalidation AMD64 Architecture Programmer's Manual Volume 3 says the following: > ECX[15:0] contains a count of the number of sequential pages to > invalidate in addition to the original virtual address, starting from > the virtual address specified in rAX. A count of 0 invalidates a > single page. ECX[31]=0 indicates to increment the virtual address at > the 4K boundary. ECX[31]=1 indicates to increment the virtual address > at the 2M boundary. The maximum count supported is reported in > CPUID function 8000_0008h, EDX[15:0]. ECX[31] being what we call INVLPGB_2M_CNT, signaling to increment the VA by 2M. > This instruction invalidates the TLB entry or entries, regardless of > the page size (4 Kbytes, 2 Mbytes, 4 Mbytes, or 1 Gbyte). [...] Combined with this, my interpretation of the current code is: if is aligned on a PDE boundary, we'll use INVLPGB_2M_CNT to try and invalidate PDEs with a single call, but that only works if is the start of at least 2M pages. Otherwise, if or any of the subsequent PDEs isn't actually a superpage, then we would actually only invalidate the *first* page within the PDE before skipping to the next PDE, leaving the remainder of the 4K pages in between as they were. The implication would seem to be that we would need to inspect the range that we're trying to invalidate if we're planning on using INVLPGB_2M_CNT at all, so this patch just simplifies it to a series of 4K invalidations. My gut feeling is that we likely still come out on top vs. the TLB shootdown we're avoiding. This seems to explain some issues we've seen lately with fdgrowtable() and kqueue on recent Zen4/Zen5 EPYC hardware, where we'd experience corruption that we can't explain. Approved by: so Security: FreeBSD-EN-26:10.amd64 PR: 293382 Reviewed by: alc, kib, markj (cherry picked from commit 1b8e5c02f5c07521129e06ff8ab7c660238fd75c) (cherry picked from commit 280cfe2264d7bf2199e5a41bdcbb9acb49d059c1) --- sys/amd64/amd64/mp_machdep.c | 25 ++++++------------------- 1 file changed, 6 insertions(+), 19 deletions(-) diff --git a/sys/amd64/amd64/mp_machdep.c b/sys/amd64/amd64/mp_machdep.c index 00e99f9df192..bffe9f510216 100644 --- a/sys/amd64/amd64/mp_machdep.c +++ b/sys/amd64/amd64/mp_machdep.c @@ -726,25 +726,12 @@ smp_masked_invlpg_range(vm_offset_t addr1, vm_offset_t addr2, pmap_t pmap, addr2 = round_page(addr2); total = atop(addr2 - addr1); for (va = addr1; total > 0;) { - if ((va & PDRMASK) != 0 || total < NPDEPG) { - cnt = atop(NBPDR - (va & PDRMASK)); - if (cnt > total) - cnt = total; - if (cnt > invlpgb_maxcnt + 1) - cnt = invlpgb_maxcnt + 1; - invlpgb(INVLPGB_GLOB | INVLPGB_VA | va, 0, - cnt - 1); - va += ptoa(cnt); - total -= cnt; - } else { - cnt = total / NPTEPG; - if (cnt > invlpgb_maxcnt + 1) - cnt = invlpgb_maxcnt + 1; - invlpgb(INVLPGB_GLOB | INVLPGB_VA | va, 0, - INVLPGB_2M_CNT | (cnt - 1)); - va += cnt << PDRSHIFT; - total -= cnt * NPTEPG; - } + cnt = MIN(total, invlpgb_maxcnt + 1); + /* 4K increments because these may not be superpages. */ + invlpgb(INVLPGB_GLOB | INVLPGB_VA | va, 0, + cnt - 1); + va += ptoa(cnt); + total -= cnt; } tlbsync(); sched_unpin(); From nobody Wed Apr 29 14:48:29 2026 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4g5KtQ3QzFz6bkLs for ; Wed, 29 Apr 2026 14:48:30 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R13" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4g5KtP6Xk1z4JmS for ; Wed, 29 Apr 2026 14:48:29 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1777474109; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=xlF7RIgB+4UxJF6hci6bgteZeNJigGDW3bCzYXAori4=; b=pvxRgpFlkweishoo0eKIBRxKLNcFV35flT0amrilAZ/cU+mVlnrtBqlVImqqyKaPT8u6RS 2mQi5QP17ZKsDys8lBhdNO44HFOh8VqA5vw9Wg2iyy50vmQCN8JqOjvWHopvLesMZCGDNo lT/SKlIIeYfuhlMNuF3nigwDNkoSkADx+sHT1ACEzvOn4QIMb6lbwERewgOAVwKTYN5PVy 05LJFsDxLq5jpAnsmI3jHFakHpnNlUx5LgO7HgPNSTceWveEbVkjw90BiLRujjHHyO58Wt 24JpB9UxQ0Vep6DWafgXxxn7JIgUHK8aUwrVKd3krNoHY1q6IkNrV4zb0psZ9g== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1777474109; a=rsa-sha256; cv=none; b=lnWSk3/HLtlU7EYbhzoPGTqRvq8/gE00SQwq9ZLRyFu7Tota1bPXuOfhWdU+XAnULU9ecP SWGkAqmjnCvGcG00IbKhd2YWXqdbBnlfToMt7Hyz+zhPh96LsbXXuj3ZSY4jZxE0E3oTbp b0icpSsk5z4rI00wrE1+h/8Q8Zr/OwoenAHQ/ZmlgyHpDePoh9AETrf8DwNBn2UYEUfOZR DF9V0NuazguYHOdLbdjmWALsz++tX2r7/Bjm3su902yQAT0ysNOhpUdkQxRBM+I4EQUXB3 32tiCYIdIOPac8ziCCP985+bSUWtVFDG/oUecdA3t83WK6O6g8FDHSyoXFzaiQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1777474109; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=xlF7RIgB+4UxJF6hci6bgteZeNJigGDW3bCzYXAori4=; b=VdDhbLbCERlAppyj/DbBMY8aJFAbWQlriYKD5lkPFyDhOdZori8pyidUe33OcnjyhaTti5 rTWwtA1/4KM2zByIrdPKBrTsBSutvPFPO3OYaCUz2zlEOvov3f2CSdabyF22QLVDmgcQgt vzFB/FmY+pNDrjzCA3ugnBGkvkIa+g/vGd8jaJtYCyNv/FpkhOesxsuEdmrb7uNyxEYzHo dE8snnMveHBG4f7dHXxvI5xjN6kL5H+zK45ohmxhwtj11Hn6xNBhcRyEi8ndly4ZmjusAu L07m4z7aSsCJkgl7sQJA/NnaxgPKKYLY7N+uzQw+WzohcNMs11Zq6BLrurNrQw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4g5KtP63lVzl5t for ; Wed, 29 Apr 2026 14:48:29 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 3c89b by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Wed, 29 Apr 2026 14:48:29 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Mark Johnston Subject: git: 66d6c32ce7b8 - releng/15.0 - dhclient: Fix reallocation of dhclient script environments List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: markj X-Git-Repository: src X-Git-Refname: refs/heads/releng/15.0 X-Git-Reftype: branch X-Git-Commit: 66d6c32ce7b84172e4c6069ce3acf8f5c422d1fa Auto-Submitted: auto-generated Date: Wed, 29 Apr 2026 14:48:29 +0000 Message-Id: <69f21a3d.3c89b.617f94d5@gitrepo.freebsd.org> The branch releng/15.0 has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=66d6c32ce7b84172e4c6069ce3acf8f5c422d1fa commit 66d6c32ce7b84172e4c6069ce3acf8f5c422d1fa Author: Mark Johnston AuthorDate: 2026-04-27 20:56:21 +0000 Commit: Mark Johnston CommitDate: 2026-04-28 19:27:11 +0000 dhclient: Fix reallocation of dhclient script environments When the number of DHCP options exceeds a threshold, script_set_env() will reallocate the environment, stored as an array of pointers. The calculation of the array size failed to multiply by the pointer size, resulting in a smaller than expected buffer which admits out-of-bounds writes. Approved by: so Security: FreeBSD-SA-26:15.dhclient Security: CVE-2026-42511 Reported by: Joshua Rogers of AISLE Research Team (https://aisle.com/) --- sbin/dhclient/dhclient.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sbin/dhclient/dhclient.c b/sbin/dhclient/dhclient.c index 719e20cffad9..f671b0ab9bed 100644 --- a/sbin/dhclient/dhclient.c +++ b/sbin/dhclient/dhclient.c @@ -2438,8 +2438,8 @@ script_set_env(struct client_state *client, const char *prefix, char **newscriptEnv; int newscriptEnvsize = client->scriptEnvsize + 50; - newscriptEnv = realloc(client->scriptEnv, - newscriptEnvsize); + newscriptEnv = reallocarray(client->scriptEnv, + newscriptEnvsize, sizeof(char *)); if (newscriptEnv == NULL) { free(client->scriptEnv); client->scriptEnv = NULL; From nobody Wed Apr 29 14:48:30 2026 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4g5KtT3mCbz6bkP5 for ; Wed, 29 Apr 2026 14:48:33 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R13" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4g5KtS0nKVz4Jmb for ; Wed, 29 Apr 2026 14:48:32 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1777474112; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=PeQ2AEdKEMeWPdnDhL3QPhL4CwBGDkpXJgu8vWX7Lmk=; b=TwBycH1GJmpP3pNB/7liI/wnKDVw/A7SpcQhaQGLO6FmMryHrwK0DS+Za7IqZlbW0+y9k7 bWyMvOIs45qCSK4UXvTiF61eo/VCRKJ7OkMOAZI0gEose2G5awu1P8Pfg64PeoJO2fWwMH g/ldooOtH94vvM++H5Nd+ARImJn2lHxxrjm6XhYIbgR26+xIM7Mn6UcqbSMjBu+f6yuDRM FVDif5M7zSJzv9E3KeEuiz3kxCGYye/T2wnJReExn/4CnBd+VnejL3DvaJQt/rBkW5/3ly UftWFmFXnaYj+PZQ2GaLbfv9uaRdsuawySwEvwHuqgrdJaIYjw9wVvK5X5KbHg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1777474112; a=rsa-sha256; cv=none; b=phiFpUT3SkfuzMe47QzHVP+ZjRn9b1IOXlarHX7K7oJP76i8AZJPgWFCuHp/KuV/uW6VwX AFejdSOSOdBgPNeygbqzPNMG/5CnvlPiMnou2X72/PnzDymKn6AUvqWVhwpDKMvmfmqGsO M+OXCi+gOM9FMo4/AE5x1UL5A9+pnzhc+8UeH11IA3bbKakuWCuNjep158ZmbGO/3SWqyq 1O/+A7KojQSmBTj/7qeOZjfsOjz9HABwTNP71zK245A68fQ7zpyAxrLVY3tf95ey/2AL+O EL3HjsKeYvdvJQpWWF/4WO2dYoON5AGXgkrvdkNL4dL1r83lASovwF2lb7xMtw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1777474112; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=PeQ2AEdKEMeWPdnDhL3QPhL4CwBGDkpXJgu8vWX7Lmk=; b=jIeFKR9Ka5UTbZWb5kuR/BkTCVkPFXGATL34oX8SG0PBe2ucbnGNrYmPoJC0+n3uNEF6ao oQHcZUvvlwHNAjCE+1FMDoPkqzKm66f7KBSZH8x+1kJpHgsLl6sz6c5BffIFE5lXZNe06G a/eua3AtGr/NINlHLjfdOm/v4IFPsHvz6VfsooqpBbTFK1qBA2WBb1AMRFA7pdJZrHdfjK hslQlcukRBX/EjU/VrapPasSC50u5NiXvCpaGo+ZEKhEu81qP0JuX0dP4MtzaqlHdntPUP Y8rSpoYx+WKtlz52JpYFkN5BFxBL85AurZrbrTABX+t706Fg3Ko2WmRmxmIOjg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4g5KtR0xVBzlbQ for ; Wed, 29 Apr 2026 14:48:31 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 3b8cd by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Wed, 29 Apr 2026 14:48:30 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org Cc: Kristof Provost From: Mark Johnston Subject: git: c01d9bcf0cf6 - releng/15.0 - pf: improve SCTP validation List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: markj X-Git-Repository: src X-Git-Refname: refs/heads/releng/15.0 X-Git-Reftype: branch X-Git-Commit: c01d9bcf0cf683a0bd074383339980bcf3862be5 Auto-Submitted: auto-generated Date: Wed, 29 Apr 2026 14:48:30 +0000 Message-Id: <69f21a3e.3b8cd.18254ea7@gitrepo.freebsd.org> The branch releng/15.0 has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=c01d9bcf0cf683a0bd074383339980bcf3862be5 commit c01d9bcf0cf683a0bd074383339980bcf3862be5 Author: Kristof Provost AuthorDate: 2026-04-26 09:34:55 +0000 Commit: Mark Johnston CommitDate: 2026-04-28 19:27:11 +0000 pf: improve SCTP validation As per RFC5061 "4.2. New Parameter Types" the add/delete IP address parameters (0xc001, 0xc002) may not be present in an INIT or INIT-ACK chunk. They are only allowed to be present in an ASCONF chunk. This also prevents unbounded recursion while parsing an SCTP packet. Approved by: so Security: FreeBSD-SA-26:14.pf Security: CVE-2026-7164 PR: 294799 Reported by: Igor Gabriel Sousa e Souza Sponsored by: Orange Business Services --- sys/netpfil/pf/pf.c | 16 +++++--- tests/sys/netpfil/pf/sctp.py | 90 ++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 101 insertions(+), 5 deletions(-) diff --git a/sys/netpfil/pf/pf.c b/sys/netpfil/pf/pf.c index af0629397ea0..3c0505b250e9 100644 --- a/sys/netpfil/pf/pf.c +++ b/sys/netpfil/pf/pf.c @@ -7664,7 +7664,7 @@ again: } static int -pf_multihome_scan(int start, int len, struct pf_pdesc *pd, int op) +pf_multihome_scan(int start, int len, struct pf_pdesc *pd, int op, bool asconf) { int off = 0; struct pf_sctp_multihome_job *job; @@ -7769,13 +7769,16 @@ pf_multihome_scan(int start, int len, struct pf_pdesc *pd, int op) int ret; struct sctp_asconf_paramhdr ah; + if (asconf) + return (PF_DROP); + if (!pf_pull_hdr(pd->m, start + off, &ah, sizeof(ah), NULL, NULL, pd->af)) return (PF_DROP); ret = pf_multihome_scan(start + off + sizeof(ah), ntohs(ah.ph.param_length) - sizeof(ah), pd, - SCTP_ADD_IP_ADDRESS); + SCTP_ADD_IP_ADDRESS, true); if (ret != PF_PASS) return (ret); break; @@ -7784,12 +7787,15 @@ pf_multihome_scan(int start, int len, struct pf_pdesc *pd, int op) int ret; struct sctp_asconf_paramhdr ah; + if (asconf) + return (PF_DROP); + if (!pf_pull_hdr(pd->m, start + off, &ah, sizeof(ah), NULL, NULL, pd->af)) return (PF_DROP); ret = pf_multihome_scan(start + off + sizeof(ah), ntohs(ah.ph.param_length) - sizeof(ah), pd, - SCTP_DEL_IP_ADDRESS); + SCTP_DEL_IP_ADDRESS, true); if (ret != PF_PASS) return (ret); break; @@ -7810,7 +7816,7 @@ pf_multihome_scan_init(int start, int len, struct pf_pdesc *pd) start += sizeof(struct sctp_init_chunk); len -= sizeof(struct sctp_init_chunk); - return (pf_multihome_scan(start, len, pd, SCTP_ADD_IP_ADDRESS)); + return (pf_multihome_scan(start, len, pd, SCTP_ADD_IP_ADDRESS, false)); } int @@ -7819,7 +7825,7 @@ pf_multihome_scan_asconf(int start, int len, struct pf_pdesc *pd) start += sizeof(struct sctp_asconf_chunk); len -= sizeof(struct sctp_asconf_chunk); - return (pf_multihome_scan(start, len, pd, SCTP_ADD_IP_ADDRESS)); + return (pf_multihome_scan(start, len, pd, SCTP_ADD_IP_ADDRESS, false)); } int diff --git a/tests/sys/netpfil/pf/sctp.py b/tests/sys/netpfil/pf/sctp.py index f492f26b63a1..722f7777a305 100644 --- a/tests/sys/netpfil/pf/sctp.py +++ b/tests/sys/netpfil/pf/sctp.py @@ -551,6 +551,96 @@ class TestSCTP(VnetTestTemplate): assert re.search(r"epair.*sctp 192.0.2.1:.*192.0.2.3:1234", states) assert re.search(r"epair.*sctp 192.0.2.1:.*192.0.2.2:1234", states) +class TestSCTP_SRV(VnetTestTemplate): + REQUIRED_MODULES = ["sctp", "pf"] + TOPOLOGY = { + "vnet1": {"ifaces": ["if1"]}, + "vnet2": {"ifaces": ["if1"]}, + "if1": {"prefixes4": [("192.0.2.1/24", "192.0.2.2/24")]}, + } + + def vnet2_handler(self, vnet): + ToolsHelper.print_output("/sbin/pfctl -e") + ToolsHelper.pf_rules([ + "set state-policy if-bound", + "pass inet proto sctp", + "pass on lo"]) + + # Start an SCTP server process, pipe the ppid + data back to the other vnet? + srv = SCTPServer(socket.AF_INET, port=1234) + while True: + srv.accept(vnet) + + @pytest.mark.require_user("root") + @pytest.mark.require_progs(["scapy"]) + def test_initiate_tag_check(self): + # Ensure we don't send ABORTs in response to the other end's INIT_ACK + # That'd interfere with our test. + ToolsHelper.print_output("/sbin/sysctl net.inet.sctp.blackhole=2") + + import scapy.all as sp + + packet = sp.IP(src="192.0.2.1", dst="192.0.2.2") \ + / sp.SCTP(sport=1234, dport=1234) \ + / sp.SCTPChunkInit(init_tag=1, n_in_streams=1, n_out_streams=1, a_rwnd=1500) + packet.show() + + r = sp.sr1(packet, timeout=3) + assert r + r.show() + assert r.getlayer(sp.SCTP) + assert r.getlayer(sp.SCTPChunkInitAck) + assert r.getlayer(sp.SCTP).tag == 1 + + # Send another INIT with the same initiate tag, expect another init ack + packet = sp.IP(src="192.0.2.1", dst="192.0.2.2") \ + / sp.SCTP(sport=1234, dport=1234) \ + / sp.SCTPChunkInit(init_tag=1, n_in_streams=1, n_out_streams=1, a_rwnd=1500) + packet.show() + + r = sp.sr1(packet, timeout=3) + assert r + r.show() + assert r.getlayer(sp.SCTP) + assert r.getlayer(sp.SCTPChunkInitAck) + assert r.getlayer(sp.SCTP).tag == 1 + + # Send an INIT with a different initiate tag, expect another init ack + packet = sp.IP(src="192.0.2.1", dst="192.0.2.2") \ + / sp.SCTP(sport=1234, dport=1234) \ + / sp.SCTPChunkInit(init_tag=42, n_in_streams=1, n_out_streams=1, a_rwnd=1500) + packet.show() + + r = sp.sr1(packet, timeout=3) + assert r + r.show() + assert r.getlayer(sp.SCTP) + assert r.getlayer(sp.SCTPChunkInitAck) + assert r.getlayer(sp.SCTP).tag == 42 + + @pytest.mark.require_user("root") + @pytest.mark.require_progs(["scapy"]) + def test_too_many_add_ip(self): + import scapy.all as sp + DEPTH=90 + params=[] + for i in range(0, DEPTH): + ch = sp.SCTPChunkParamAddIPAddr(len=(DEPTH - i) * 8) + params.append(ch) + packet = sp.IP(src="192.0.2.1", dst="192.0.2.2") \ + / sp.SCTP(sport=4321, dport=1234) \ + / sp.SCTPChunkInit(init_tag=1, n_in_streams=1, n_out_streams=1, a_rwnd=1500, + params=params) + packet.show() + sp.hexdump(packet) + print("len %d" % len(packet)) + + r = sp.sr1(packet, timeout=3) + # We should not get a reply to this + if r: + r.show() + assert not r + class TestSCTPv6(VnetTestTemplate): REQUIRED_MODULES = ["sctp", "pf"] TOPOLOGY = { From nobody Wed Apr 29 14:48:32 2026 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4g5KtT5gYwz6bkRx for ; Wed, 29 Apr 2026 14:48:33 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R13" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4g5KtT3SM0z4Jmh for ; Wed, 29 Apr 2026 14:48:33 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1777474113; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=64XQjhDENomcwpbZfdT5dThBN+bH2L8nRtTsQPagzmU=; b=NrPLA5EEFWTxtJq+ldOvmtZMwsdfMmtJKWOYrO/6pe8Rqta7YHvbbjD2+f4AEF1+2ubiBU 88X8fQ0hlK0ysalkCs248RBoBBpkoI8nGvKptrNLGTIe3YG3AhjeFg+YDQyTWnt2kz0gKJ fe2SaN4FbVw6PomqPgf6wf+EP8TyePbPKqpQ10GZGaW4hTQQxvAXQ2PWC1icOGWLZBLm6u 0tINnX47kPZm5suwq6I6Lj0Q3R3uAegfSKXU4O7rBNANrv3Fxt4ImuNO4NwF7kBY9DSr2c lcg8j2+tPYSNRjFHPrpYECtgOiEoQEGhhzr20SV3BmafpDycgDmzWNxjbrfieA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1777474113; a=rsa-sha256; cv=none; b=OZxeXnw88gF40ZJjh4lKrAOvWjmSWXWlKIISNSVS2Tyv6DnpoREU/T7xf5Bf8AyuoRFl62 8n4cJMeNcBycl4LSRldJ50whQ6ekPxLZd6mnH6CxDWcbZjc6eAxI6RRv/eSAwJ1qR8utj6 KOnayXUqL7RSjUmWKJtK8QH1gonsM0C/rRO20kFiDkQIKCkB0MV8KMOHSFhh9nqqhBuz1x b5jmWDMim6y51Tx3mu8kvVyCR7as6ZICs/bnlLGI+Av7XsaKol21qjT3POYLxM4AvKcBxe EH2JHSQthrZa7NGG04/jxDArtKIHkJjO3BW9rIRAxMDs1qgjcb7jkdv+/RgPZQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1777474113; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=64XQjhDENomcwpbZfdT5dThBN+bH2L8nRtTsQPagzmU=; b=VbGBHim06UsYG2MwjxmiV0zXZwP+U9HaXLuxRUjbLGDiT+L0qVhi8KqzVFpC5lPWyynTWz vXpU1kQa9fy7FFBLaJoZIr2KwHhCIRaCa+I+nqrD+7IWz6cGzqyfCU/rzSOgLyZmNpYLnc 9aflIMLzzPrzVwxAuN101wyQYKK9acEAOBVKONFA+3uarb4Il1nqsiTKSVs4xKlLjpv35z 12JE6N887paBEpWy666IiQ+8xW06cM2a9hLj5glWSeWGJ7BizRoW9giG+sM33hA5BX0I8H J3UZfb/x+zv6TZG3Moa0DdnXxhv4Az+j76drGK1vGALxOY5ffAslfypgbIVlfg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4g5KtS0nn5zlKp for ; Wed, 29 Apr 2026 14:48:32 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 3d600 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Wed, 29 Apr 2026 14:48:32 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org Cc: Mariusz Zaborski From: Mark Johnston Subject: git: 7e4d5363ddce - releng/15.0 - libnv: switch fd_wait() from select(2) to poll(2) List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: markj X-Git-Repository: src X-Git-Refname: refs/heads/releng/15.0 X-Git-Reftype: branch X-Git-Commit: 7e4d5363ddced9578c42c46d8149e04aa1ab9fa8 Auto-Submitted: auto-generated Date: Wed, 29 Apr 2026 14:48:32 +0000 Message-Id: <69f21a40.3d600.7bef3e23@gitrepo.freebsd.org> The branch releng/15.0 has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=7e4d5363ddced9578c42c46d8149e04aa1ab9fa8 commit 7e4d5363ddced9578c42c46d8149e04aa1ab9fa8 Author: Mariusz Zaborski AuthorDate: 2026-04-28 14:35:10 +0000 Commit: Mark Johnston CommitDate: 2026-04-28 19:27:12 +0000 libnv: switch fd_wait() from select(2) to poll(2) The previous implementation used FD_SET() on a stack-allocated fd_set, which is an out-of-bounds write whenever the socket fd is >= FD_SETSIZE (1024). Approved by: so Security: FreeBSD-SA-26:16.libnv Security: CVE-2026-39457 Reported by: Joshua Rogers of AISLE Research Team (https://aisle.com/) Reviewed by: markj Differential Revision: https://reviews.freebsd.org/D56689 --- lib/libnv/msgio.c | 12 +++---- lib/libnv/tests/nvlist_send_recv_test.c | 56 +++++++++++++++++++++++++++++++++ 2 files changed, 62 insertions(+), 6 deletions(-) diff --git a/lib/libnv/msgio.c b/lib/libnv/msgio.c index f6f75241ff06..de2994e47fef 100644 --- a/lib/libnv/msgio.c +++ b/lib/libnv/msgio.c @@ -32,10 +32,10 @@ #include #include -#include #include #include +#include #include #include #include @@ -86,14 +86,14 @@ msghdr_add_fd(struct cmsghdr *cmsg, int fd) static void fd_wait(int fd, bool doread) { - fd_set fds; + struct pollfd pfd; PJDLOG_ASSERT(fd >= 0); - FD_ZERO(&fds); - FD_SET(fd, &fds); - (void)select(fd + 1, doread ? &fds : NULL, doread ? NULL : &fds, - NULL, NULL); + pfd.fd = fd; + pfd.events = doread ? POLLIN : POLLOUT; + pfd.revents = 0; + (void)poll(&pfd, 1, -1); } static int diff --git a/lib/libnv/tests/nvlist_send_recv_test.c b/lib/libnv/tests/nvlist_send_recv_test.c index 79297dfe2043..9f51c729b454 100644 --- a/lib/libnv/tests/nvlist_send_recv_test.c +++ b/lib/libnv/tests/nvlist_send_recv_test.c @@ -27,6 +27,8 @@ */ #include +#include +#include #include #include #include @@ -533,6 +535,59 @@ ATF_TC_BODY(nvlist_send_recv__send_nvlist__stream, tc) nvlist_send_recv__send_nvlist(SOCK_STREAM); } +/* + * Regression test for fd_wait(): the previous select(2)-based implementation + * called FD_SET() unconditionally, which is an out-of-bounds stack write when + * the socket fd is >= FD_SETSIZE. Force the socketpair fds above FD_SETSIZE + * and verify a full nvlist round-trip still works. + */ +ATF_TC_WITHOUT_HEAD(nvlist_send_recv__highfd); +ATF_TC_BODY(nvlist_send_recv__highfd, tc) +{ + struct rlimit rl; + nvlist_t *nvl; + int socks[2], hi_send, hi_recv, status; + pid_t pid; + + hi_send = FD_SETSIZE + 5; + hi_recv = FD_SETSIZE + 6; + + rl.rlim_cur = rl.rlim_max = hi_recv + 1; + if (setrlimit(RLIMIT_NOFILE, &rl) != 0) + atf_tc_skip("cannot raise RLIMIT_NOFILE: %s", strerror(errno)); + + ATF_REQUIRE(socketpair(PF_UNIX, SOCK_STREAM, 0, socks) == 0); + ATF_REQUIRE(dup2(socks[0], hi_recv) == hi_recv); + ATF_REQUIRE(dup2(socks[1], hi_send) == hi_send); + (void)close(socks[0]); + (void)close(socks[1]); + + pid = fork(); + ATF_REQUIRE(pid >= 0); + if (pid == 0) { + /* Child: send. */ + (void)close(hi_recv); + nvl = nvlist_create(0); + nvlist_add_string(nvl, "key", "value"); + if (nvlist_send(hi_send, nvl) != 0) + err(EXIT_FAILURE, "nvlist_send"); + nvlist_destroy(nvl); + _exit(0); + } + + (void)close(hi_send); + nvl = nvlist_recv(hi_recv, 0); + ATF_REQUIRE(nvl != NULL); + ATF_REQUIRE(nvlist_error(nvl) == 0); + ATF_REQUIRE(nvlist_exists_string(nvl, "key")); + ATF_REQUIRE(strcmp(nvlist_get_string(nvl, "key"), "value") == 0); + nvlist_destroy(nvl); + + ATF_REQUIRE(waitpid(pid, &status, 0) == pid); + ATF_REQUIRE(status == 0); + (void)close(hi_recv); +} + ATF_TC_WITHOUT_HEAD(nvlist_send_recv__send_closed_fd__dgram); ATF_TC_BODY(nvlist_send_recv__send_closed_fd__dgram, tc) { @@ -736,6 +791,7 @@ ATF_TP_ADD_TCS(tp) ATF_TP_ADD_TC(tp, nvlist_send_recv__send_nvlist__dgram); ATF_TP_ADD_TC(tp, nvlist_send_recv__send_nvlist__stream); + ATF_TP_ADD_TC(tp, nvlist_send_recv__highfd); ATF_TP_ADD_TC(tp, nvlist_send_recv__send_closed_fd__dgram); ATF_TP_ADD_TC(tp, nvlist_send_recv__send_closed_fd__stream); ATF_TP_ADD_TC(tp, nvlist_send_recv__send_many_fds__dgram); From nobody Wed Apr 29 14:48:33 2026 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4g5KtV59Tsz6bkLg for ; Wed, 29 Apr 2026 14:48:34 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R13" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4g5KtT4JyMz4Jpx for ; Wed, 29 Apr 2026 14:48:33 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1777474113; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=UWf+hfnnF98gS0krRFWTmkGQU9PilJhtiOByzm2/ACw=; b=NLsJnh3yzFm6SvCwxO1xYZQ1puSk2merKTUxjIn8rzebReHZIqLV3GS52awq5n6ujMWnVV DErivlPEwR8tHgjJEs+MmawCwoLsJh5dRobb9PHOKPsJf+ihbQuuxKt/Qyb5yd8D6kknNp ChrWgYvqK5SW+riuf/bLec4SVe5a9DKmO85YyU1CCHxirOzIRCuvHvYQf5kCSyOHVKDMzS YPndcZd7/CBMl1EuwPNgTnDnqMynkb/GRahqTK/mf6aUtR2bKeVYin6PkgZXGq6kAi7Pgt BR8Xs2I4LQzljr3k+AJC5B8ue7eTKmG4RkHxK5yFS4FHhzFggWPgE0sMHqIruQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1777474113; a=rsa-sha256; cv=none; b=txu8L0GsOMHBhZUN78+lGmtMLY0HcMN7mOor0vwlNp7Jek2J4binLp7D5YLQa+SPbjZSQL 1smU79vJbHspP8IB6nCqYIajRjU+w6gdDNbgR4kJwwitiEXVXB1MlmTRT0RzfwkBGPx3QK QNP4aRZB86AXKk9I7EMKVFI2J3UBmO24jXywzcZQCYCQgpOeRL4ZXtr8gynhPjYPt/djMU NiAhCi/eSkg6nPcFOX3dOmQc5RHKAzK3x654ek8t6s5U+Vq5nTFQYP58oSLptkbTETZSHc Oy76/Fjc+sCeCWSU/ZsTBzmvP1I6HX1UtFbmwc/L+psM6cQuyIjPEND2uCMcSw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1777474113; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=UWf+hfnnF98gS0krRFWTmkGQU9PilJhtiOByzm2/ACw=; b=SgqNbi3aJ32RrqGsvFWNnt9V3OLktqKOIxJdeljoAummJ1G1jEvNitVmjCIWCqR3U4Mhsj k34I7/VV1XSs3f/1CxqBYYK8A7c1p+D8jr29vQplwEUAcr5hb2qiZGXD1R5vj+f00qvnF4 KyUrlInCl90o6vSQguh4DEzMHhAccMeyVVjV844lBfRUX438V7m/+YT8gTrdMA4pq4tANb D6SUKYTfYgT1Bi0yrq8HNYrpN/3E+8IxArkLAIlFk3nvQiNjBY0hgmg7OmE9TKbWktFPGH Etg4JC/SlE+GrADt6BLzt64wW1QFURTEEmSf0HN88lJmFJVXLBAWEoGzKjnByA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4g5KtT2pClzlJD for ; Wed, 29 Apr 2026 14:48:33 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 3ac6b by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Wed, 29 Apr 2026 14:48:33 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org Cc: Mariusz Zaborski From: Mark Johnston Subject: git: b345e07c8d71 - releng/15.0 - libnv: fix heap overflow in nvlist_recv() List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: markj X-Git-Repository: src X-Git-Refname: refs/heads/releng/15.0 X-Git-Reftype: branch X-Git-Commit: b345e07c8d71e2c00cabe26ea2f96d65368aa1dd Auto-Submitted: auto-generated Date: Wed, 29 Apr 2026 14:48:33 +0000 Message-Id: <69f21a41.3ac6b.8bc6e7b@gitrepo.freebsd.org> The branch releng/15.0 has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=b345e07c8d71e2c00cabe26ea2f96d65368aa1dd commit b345e07c8d71e2c00cabe26ea2f96d65368aa1dd Author: Mariusz Zaborski AuthorDate: 2026-04-28 14:36:09 +0000 Commit: Mark Johnston CommitDate: 2026-04-28 19:27:12 +0000 libnv: fix heap overflow in nvlist_recv() nvlist_check_header() validated nvlh_size for overflow before performing conversion. An mallicous user can set NV_FLAG_BIG_ENDIAN in the header and craft nvlh_size so that the orginall value passes the check, but after the conversion the sizeof(nvlist_header) + size can overflow. This can lead to a heap buffer overflow. Approved by: so Security: FreeBSD-SA-26:17.libnv Security: CVE-2026-35547 Fixes: 36fa90dbde0060aacb5677d0b113ee168e839071 Reviewed by: markj Differential Revision: https://reviews.freebsd.org/D56342 --- lib/libnv/tests/nvlist_send_recv_test.c | 57 +++++++++++++++++++++++++++++++++ sys/contrib/libnv/nvlist.c | 9 +++--- 2 files changed, 62 insertions(+), 4 deletions(-) diff --git a/lib/libnv/tests/nvlist_send_recv_test.c b/lib/libnv/tests/nvlist_send_recv_test.c index 9f51c729b454..4e57fb0e3246 100644 --- a/lib/libnv/tests/nvlist_send_recv_test.c +++ b/lib/libnv/tests/nvlist_send_recv_test.c @@ -1,5 +1,8 @@ /*- + * SPDX-License-Identifier: BSD-2-Clause + * * Copyright (c) 2013 The FreeBSD Foundation + * Copyright (c) 2024-2026 Mariusz Zaborski * * This software was developed by Pawel Jakub Dawidek under sponsorship from * the FreeBSD Foundation. @@ -663,6 +666,58 @@ ATF_TC_BODY(nvlist_send_recv__overflow_header_size, tc) } } +ATF_TC_WITHOUT_HEAD(nvlist_send_recv__overflow_big_endian_size); +ATF_TC_BODY(nvlist_send_recv__overflow_big_endian_size, tc) +{ + static const unsigned char payload[] = { + 0x6c, /* magic */ + 0x00, /* version */ + 0x80, /* flags: NV_FLAG_BIG_ENDIAN */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xf5, + }; + nvlist_t *nvl; + int sv[2]; + + ATF_REQUIRE_EQ(socketpair(AF_UNIX, SOCK_STREAM, 0, sv), 0); + ATF_REQUIRE_EQ(write(sv[1], payload, sizeof(payload)), + (ssize_t)sizeof(payload)); + ATF_REQUIRE_EQ(close(sv[1]), 0); + + errno = 0; + nvl = nvlist_recv(sv[0], 0); + ATF_REQUIRE(nvl == NULL); + ATF_REQUIRE_EQ(errno, EINVAL); + + ATF_REQUIRE_EQ(close(sv[0]), 0); +} + +ATF_TC_WITHOUT_HEAD(nvlist_send_recv__overflow_little_endian_size); +ATF_TC_BODY(nvlist_send_recv__overflow_little_endian_size, tc) +{ + static const unsigned char payload[] = { + 0x6c, /* magic */ + 0x00, /* version */ + 0x00, /* flags */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0xf5, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, + }; + nvlist_t *nvl; + int sv[2]; + + ATF_REQUIRE_EQ(socketpair(AF_UNIX, SOCK_STREAM, 0, sv), 0); + ATF_REQUIRE_EQ(write(sv[1], payload, sizeof(payload)), + (ssize_t)sizeof(payload)); + ATF_REQUIRE_EQ(close(sv[1]), 0); + + errno = 0; + nvl = nvlist_recv(sv[0], 0); + ATF_REQUIRE(nvl == NULL); + ATF_REQUIRE_EQ(errno, EINVAL); + + ATF_REQUIRE_EQ(close(sv[0]), 0); +} + ATF_TC_WITHOUT_HEAD(nvlist_send_recv__invalid_fd_size); ATF_TC_BODY(nvlist_send_recv__invalid_fd_size, tc) { @@ -798,6 +853,8 @@ ATF_TP_ADD_TCS(tp) ATF_TP_ADD_TC(tp, nvlist_send_recv__send_many_fds__stream); ATF_TP_ADD_TC(tp, nvlist_send_recv__overflow_header_size); + ATF_TP_ADD_TC(tp, nvlist_send_recv__overflow_big_endian_size); + ATF_TP_ADD_TC(tp, nvlist_send_recv__overflow_little_endian_size); ATF_TP_ADD_TC(tp, nvlist_send_recv__invalid_fd_size); ATF_TP_ADD_TC(tp, nvlist_send_recv__overflow_fd_size); diff --git a/sys/contrib/libnv/nvlist.c b/sys/contrib/libnv/nvlist.c index 73226ee51a78..11d9c9b49c94 100644 --- a/sys/contrib/libnv/nvlist.c +++ b/sys/contrib/libnv/nvlist.c @@ -1027,10 +1027,6 @@ static bool nvlist_check_header(struct nvlist_header *nvlhdrp) { - if (nvlhdrp->nvlh_size > SIZE_MAX - sizeof(*nvlhdrp)) { - ERRNO_SET(EINVAL); - return (false); - } if (nvlhdrp->nvlh_magic != NVLIST_HEADER_MAGIC) { ERRNO_SET(EINVAL); return (false); @@ -1050,6 +1046,11 @@ nvlist_check_header(struct nvlist_header *nvlhdrp) nvlhdrp->nvlh_descriptors = be64toh(nvlhdrp->nvlh_descriptors); } #endif + if (nvlhdrp->nvlh_size > SIZE_MAX - sizeof(*nvlhdrp)) { + ERRNO_SET(EINVAL); + return (false); + } + return (true); } From nobody Wed Apr 29 14:48:34 2026 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4g5KtW6nl7z6bkM0 for ; Wed, 29 Apr 2026 14:48:35 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R13" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4g5KtV5NXnz4Jmp for ; Wed, 29 Apr 2026 14:48:34 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1777474114; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=iAOUWnExXNlTQx/nJuvCYdou8ECELPAqjNdUMei//8E=; b=DVRbSKsKm6yDeYMv7bpy3n0zD5HYPJKjuwtpLNFWh8m9iXZnYSmOZouLji+BO0EQ/DsxLE EB1HHUJftE2v+9UTbUDtwHGnEvPGPyDnjN8B6knGNJUMcX8nK9rFMoGZ4/DK4iFRRdKc+h tsdbB8ouqEdxq2pYyD0yK3SPZEWSgtyi2pcQeL2k0yjOVunHF9EjUv6KiPmrfvmBw9Tf0s G1lNVu4OqCv2oYShOTR7xpyv6wsBgtVMyO8DhoOUXDHgPxWR9cwbNtU7qHGGmesZ2WleBz Clsw4q/jkx29SQV4A913Cl4SviK+he/LBy6HPAoqtHF6tWpNJO+b9hoFZqKx5A== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1777474114; a=rsa-sha256; cv=none; b=U1fZtAWyGS0i1vKvY/LSEIk8jAPDJ9QxXMp/TWVgMj2PTs9rvBh077BgcmMZvcICA7fmW8 sNHjS21gHRizSeXF8UtxltnLW22Go4gjrGaVf5qPxAXu9A8drOV1O1TSvGFpSVcNuxzvQc TpUYIyBHytRG+BsmXvuk6DsYEIYJc3+ZJi4TcUJvlc/zrDZwWogmuAAUp8TA84avBzC+Mi tK5anHQXH4RY8apPn6lE+zBO/M1005DoQGOYb3tVwC5PnU59pzOwgON3/XFtVxlFVAyGxJ xaw1xpWEqiT4Zc4dUNl+k9E7ebTiGMW1l+vN7uxd4fOr83qEx3pPrfQEpObo/Q== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1777474114; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=iAOUWnExXNlTQx/nJuvCYdou8ECELPAqjNdUMei//8E=; b=JapjTb09iVtBnaZSaX6achKgP82zV8FhRIB60VyqrpD29dXNTeviLipFXd4LMbNsH5qkj5 xUxIIg2SoTwaWcpcwqfaLIAqmkToOkKnqSHEWEb6TrwGHObMbDiFKQZP1QWvOqTnxsyNGe Gk8CFnJ1UojscFdsfJqJRB++7Rrl/s45ftxDMPyqNPa/w7gir0AvQklEbfkQa4dionn1Zk bhxNhgNZ9J6THcp7vXnyqBYv8NwlPVPCFmdAQW+rcGzEGdScX+l2UsjAeZiRzhP3n24CpH WZH+AJmRBaeGJk/jGt1zl3lZKPP74fjwpgrlIXYaymdqAHYv9HrR1FB5ba+uKQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4g5KtV3qpDzlJF for ; Wed, 29 Apr 2026 14:48:34 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 3d588 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Wed, 29 Apr 2026 14:48:34 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Mark Johnston Subject: git: bbfdabc12895 - releng/15.0 - Add UPDATING entries and bump version List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: markj X-Git-Repository: src X-Git-Refname: refs/heads/releng/15.0 X-Git-Reftype: branch X-Git-Commit: bbfdabc12895ce2538444747684c6a4fe53298ba Auto-Submitted: auto-generated Date: Wed, 29 Apr 2026 14:48:34 +0000 Message-Id: <69f21a42.3d588.3106a5da@gitrepo.freebsd.org> The branch releng/15.0 has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=bbfdabc12895ce2538444747684c6a4fe53298ba commit bbfdabc12895ce2538444747684c6a4fe53298ba Author: Mark Johnston AuthorDate: 2026-04-28 20:09:31 +0000 Commit: Mark Johnston CommitDate: 2026-04-28 20:09:31 +0000 Add UPDATING entries and bump version Approved by: so --- UPDATING | 29 +++++++++++++++++++++++++++++ sys/conf/newvers.sh | 2 +- 2 files changed, 30 insertions(+), 1 deletion(-) diff --git a/UPDATING b/UPDATING index f6a6ce827ab8..48901e006793 100644 --- a/UPDATING +++ b/UPDATING @@ -12,6 +12,35 @@ Items affecting the ports and packages system can be found in /usr/ports/UPDATING. Please read that file before updating system packages and/or ports. +20260429: + 15.0-RELEASE-p7 SA-26:12.dhclient + SA-26:13.exec + SA-26:14.pf + SA-26:15.dhclient + SA-26:16.libnv + SA-26:17.libnv + EN-26:08.pf + EN-26:09.tzdata + EN-26:10.amd64 + + Remote code execution via malicious DHCP options. [SA-26:12.dhclient] + + Local privilege escalation via execve(). [SA-26:13.exec] + + pf can overflow the stack parsing crafted SCTP packets. [SA-26:14.pf] + + Remotely triggerable out-of-bounds heap write in dhclient. [SA-26:15.dhclient] + + Stack overflow via select() file descriptor set overflow. [SA-26:16.libnv] + + Heap overflow in libnv. [SA-26:17.libnv] + + Incorrect duplicate rule detection for automatic tables. [EN-26:08.pf] + + Timezone database information update. [EN-26:09.tzdata] + + TLB invalidation bug on AMD systems with INVLPGB. [EN-26:10.amd64] + 20260421: 15.0-RELEASE-p6 SA-26:10.tty SA-26:11.amd64 diff --git a/sys/conf/newvers.sh b/sys/conf/newvers.sh index 0e4301c996bb..285aadd1f763 100644 --- a/sys/conf/newvers.sh +++ b/sys/conf/newvers.sh @@ -51,7 +51,7 @@ TYPE="FreeBSD" REVISION="15.0" -BRANCH="RELEASE-p6" +BRANCH="RELEASE-p7" if [ -n "${BRANCH_OVERRIDE}" ]; then BRANCH=${BRANCH_OVERRIDE} fi From nobody Wed Apr 29 14:48:49 2026 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4g5Ktp3SfSz6bknj for ; Wed, 29 Apr 2026 14:48:50 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R13" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4g5Ktp2HgZz4JwP for ; Wed, 29 Apr 2026 14:48:50 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1777474130; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=5wC2TYnHc2wqMUfJOVssl0JrMZxDIZHvGAmIs5HwYN0=; b=PrmhiGRtr7vbhEJ+ipPQZX2iIbUdc5BrYqzC+qRSwx0Ya3uAsn5OPhcPTULdXto3Eh7ums q/ANQPU9bGHQJIjK+RqzcSed+bg6/+5a1e1v/cxYZsf+NA2yvy/l0v8IYOqGgUrad8iaXN bmZQ1n+WRnKI6ub8lVBVevV/ClSP06PSTwY/KBY+m9ZCpcu11li5MAi84a4hgWa+wD9Hq3 GxoyvF6dlpWbKD3JGhuQaJnV9/hLjzXXLq7f6+sccSMiZN5ZjzlVCwUCuWA+pD/XBOYS7V HIvk3ifw6DI+MtjYxDHuS2+DF3H+2Io9P2oJhn1cq2M24wFSUExsDkJCH7cqLg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1777474130; a=rsa-sha256; cv=none; b=cTgIqo0kkPwZ70si7Ja5lFsGQRrojrWxlutcTSnyhnFG1IPWU7Rw4F9vKwu3u12jI9ZIqt 5IWuX28FGjP9SpLOkf2h4p8IAhKDlBdxWYNRZ9xYJvoM7TQ76vXx/hLLoLuX+1y8mDAp0u ucO+t/RDLypm2TuslQHUrG+ZRY6jcfDnaPSi/pS00Lzk1qvZ3B0SKamNmIjDWnb7zEXd3v OjJsJm6QkmCvKdUQXPXLOaOBP1Gpvy/mBtLXCxTObd6F6lPzsOtAG0Egbuwymk+FXSDwO6 VpgxSPVttRG8rewyzfMD0XEOZprfTpPJfky6edo7GhOUGWHRvyfGNtviUM5KsQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1777474130; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=5wC2TYnHc2wqMUfJOVssl0JrMZxDIZHvGAmIs5HwYN0=; b=AYWEI9QF4y98s8bm8NmMNCQJMs01FSEb2+8sso0/Gql0J38gjTB7QWlq1yLB8zPutnsIMA EbBJLKwYFMPIl72+/VZr7QsFT3CmLBchdL+BXKIdypyG4+3ovh6vnjUJ2NprxtyJjNDMBb uzMLI9PsR8VJKYJeXRPtDLHSJ+ckWSO3+ZOycX9dwM04qwOhd9PcPQODVJK67CrzTYoXLB vDufYWrMPcK+oa6vZJA01aXUiDoHrPVUgrSzXJjmJ0lhJ26Qg0ciMtlg2bj6iUpF9vzAK+ AE1eRe7HpTctHVfpq2hAcEb1uU/3BEtHW96Bdfs/z6V082OLgXkMnh/CouP70g== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4g5Ktp0zHlzlbT for ; Wed, 29 Apr 2026 14:48:49 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 3ad7c by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Wed, 29 Apr 2026 14:48:49 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Mark Johnston Subject: git: ae00a52921ca - stable/14 - execve: Fix an operator precedence bug List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: markj X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: ae00a52921cafcedd04a240d444fec2076ea7771 Auto-Submitted: auto-generated Date: Wed, 29 Apr 2026 14:48:49 +0000 Message-Id: <69f21a51.3ad7c.7469ea2f@gitrepo.freebsd.org> The branch stable/14 has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=ae00a52921cafcedd04a240d444fec2076ea7771 commit ae00a52921cafcedd04a240d444fec2076ea7771 Author: Mark Johnston AuthorDate: 2026-04-22 17:58:35 +0000 Commit: Mark Johnston CommitDate: 2026-04-29 14:45:04 +0000 execve: Fix an operator precedence bug The buggy version allowed userspace to overflow the copy into adjacent execve KVA regions, which enables, among other things, injecting environment variables into privileged processes. Approved by: so Security: FreeBSD-SA-26:13.exec Security: CVE-2026-7270 Reported by: Ryan Austin of Calif.io Reviewed by: brooks, kib Fixes: f373437a01a3 ("Add helper functions to copy strings into struct image_args.") Differential Revision: https://reviews.freebsd.org/D56665 --- sys/kern/kern_exec.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/kern/kern_exec.c b/sys/kern/kern_exec.c index 7f6d9a85c6bc..349e13915b29 100644 --- a/sys/kern/kern_exec.c +++ b/sys/kern/kern_exec.c @@ -1622,7 +1622,7 @@ exec_args_adjust_args(struct image_args *args, size_t consume, ssize_t extend) if (args->stringspace < offset) return (E2BIG); memmove(args->begin_argv + extend, args->begin_argv + consume, - args->endp - args->begin_argv + consume); + args->endp - (args->begin_argv + consume)); if (args->envc > 0) args->begin_envv += offset; args->endp += offset; From nobody Wed Apr 29 14:48:50 2026 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4g5Ktr4gRtz6bknp for ; Wed, 29 Apr 2026 14:48:52 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R13" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4g5Ktr20Mrz4JtQ for ; Wed, 29 Apr 2026 14:48:52 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1777474132; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=hKIe+rxdY1Q/kk0mAEpmaTduZlZbel9z56lnOgSwPuQ=; b=FySfM2ZLAiM8wKogU2r6eaqMMGJqxh9+jxo79BKcTG9bqjHyuDaR1fnPm3EDkJ0zfh1SYF W0ucGxusY5O++OWvk5XWziyub1cf6pygCh5Ek/iPjRy9RCualA9U2cR0t2rK7pkIWnuhBL pzfdS/46jJ6x9ntYWqpHfbiV+CBsLV3Yg7HgGrfHv8/79RcgnEx3so6/3h3OI/UCtOWYS8 mX9VzskVNvpxCkV3QFnFVfZiu4x0y4ucm4S1LbNh1K+1Tmj1erCHgG5CVToDI/9GOJUB+x SVRPCCOIXiPXXZ/dL56T753ogAPSnADE7TVGrPnLM+tiEcgCYjOcwp4xgsypfQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1777474132; a=rsa-sha256; cv=none; b=rzaOdQRHA4USrMLE+2Atap6Ue2/b6Rz57T+vZoRTTysixVouIJ1PXPBbOUZ2/w3LEVUKRp whFR04qV3/BYWpSGsFOIK+mt2J4x8Xy/QJDjv2CFC/dZ7WS5h5/J9D0qWT5CQNqgRe/jJE LCLEkBpUd7W4GR7ydeDmk8MzfMel9FjHHbdaOVCUcsxj/a/oURSTpBya2oSHbxpxf90knE hPY4DkOtCBMG6QmMQMjVVfPw7J5TpOcBdP8vnzrAiPtkr8ohaIz1FEQw7NUR1dYAPofBZH d26vyu/OneYluYNn5rtn7siyxcmP291IyC2iJu6LrkBa3p+dJHwY/6BMjdJ6LQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1777474132; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=hKIe+rxdY1Q/kk0mAEpmaTduZlZbel9z56lnOgSwPuQ=; b=yVohl9g+gY6mu7k+eFHtcsJMx/AsfMwZgDx49D/AXZM4eGawrpar6R+qsaV6n1zjydWFhR lnKQfzgXREyfx7j3QxlE3t616mxQUik1WwYrAoOMbjFm7lecgtqc7aBDDgpwwOaM+s0kTx 52jmTw8GR0vDrq4DlVyNTpZPNezGS5XhJ0guoZkS9rZob3HmkctuEVDPFthgVLFQ/gxWmL HG5HdqXd6u+JPJRUMbjqNI93IXy7hPBFVR0I6OIYaI4rzcN261dLhi2i/7QBcW7h6IfxFV krjgQXTBEdgrEZNWrBgf6yqD5Mc0iIYggsMMCe9OcgHXpFbkgcYxm7ZQfYTavA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4g5Ktq4Q5yzlWk for ; Wed, 29 Apr 2026 14:48:51 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 3ae6b by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Wed, 29 Apr 2026 14:48:50 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Mark Johnston Subject: git: b3087e05e848 - stable/14 - dhclient: Check for unexpected characters in some DHCP server options List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: markj X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: b3087e05e848405c3b9c8577a86fed173f3a8a42 Auto-Submitted: auto-generated Date: Wed, 29 Apr 2026 14:48:50 +0000 Message-Id: <69f21a52.3ae6b.5b7b212b@gitrepo.freebsd.org> The branch stable/14 has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=b3087e05e848405c3b9c8577a86fed173f3a8a42 commit b3087e05e848405c3b9c8577a86fed173f3a8a42 Author: Mark Johnston AuthorDate: 2026-04-27 20:03:09 +0000 Commit: Mark Johnston CommitDate: 2026-04-29 14:45:04 +0000 dhclient: Check for unexpected characters in some DHCP server options Some options are written directly to the lease file, which may be parsed by subsequent dhclient invocations. We must make sure that a malicious server can't control the "medium" field of a lease definition, otherwise they can achieve RCE by injecting one into the lease file, whereupon it will be passed to dhclient-script, which passes it through eval. Approved by: so Security: FreeBSD-SA-26:12.dhclient Security: CVE-2026-42511 Reported by: Joshua Rogers of AISLE Research Team (https://aisle.com/) --- sbin/dhclient/dhclient.c | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/sbin/dhclient/dhclient.c b/sbin/dhclient/dhclient.c index cbab3fa2973c..01ef38530cdf 100644 --- a/sbin/dhclient/dhclient.c +++ b/sbin/dhclient/dhclient.c @@ -1226,6 +1226,12 @@ packet_to_lease(struct packet *packet) } memcpy(lease->server_name, packet->raw->sname, DHCP_SNAME_LEN); lease->server_name[DHCP_SNAME_LEN]='\0'; + if (strchr(lease->server_name, '"') != NULL || + strchr(lease->server_name, '\\') != NULL) { + warning("dhcpoffer: server name contains invalid characters."); + free_client_lease(lease); + return (NULL); + } } /* Ditto for the filename. */ @@ -1241,6 +1247,12 @@ packet_to_lease(struct packet *packet) } memcpy(lease->filename, packet->raw->file, DHCP_FILE_LEN); lease->filename[DHCP_FILE_LEN]='\0'; + if (strchr(lease->filename, '"') != NULL || + strchr(lease->filename, '\\') != NULL) { + warning("dhcpoffer: filename contains invalid characters."); + free_client_lease(lease); + return (NULL); + } } return lease; } From nobody Wed Apr 29 14:48:51 2026 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4g5Ktr4jGWz6bklG for ; Wed, 29 Apr 2026 14:48:52 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R13" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4g5Ktr2Zpqz4KC6 for ; Wed, 29 Apr 2026 14:48:52 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1777474132; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=QJ8T5Em+d28X3j0MPTbT2li30L0mSiscNsIqTB3Kabg=; b=ol0wdU5IhkLQrxhgef0zazSkPN20m0FKex12K7ugtNO3dxi1nTEIWu0YbWW8xxsK4Qebyd VtdMHWyQCaWBfOt4C8wpS74TrctUgKSMAFZF+mkNmjmb0SL5KZZnX2TTyMks14bfaEKwck YCu2E86juz4+aAUll09dOwZV+lZ67y2BFSVA/3vgHK266hBY/cZ4hAEWLn62HbNQ5sUNQF K8IGtgt9spKPSGP2b4k3bIHus2NoSEd6ajKSh8tzf+G70SrKRHZq4sR/6RsEQkYpLxJ3r5 dZ2G6cZgPovqpWk+di4jYRCFTjv2zCUSwMWl5lP4k6RhcYx8Ws/4VYKE2S+E4w== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1777474132; a=rsa-sha256; cv=none; b=J5+2XqVCbkYFl9U4LnmJb2QM+mVyFqADPbHrd/RgLMwKpleTWXMpiBvsAwD+NlD1RifOjH dKsBX8tHljCxQ1uNRVYmVxm7PcCzVYmz1xiLNVUaFmnRJWKgjcmuuty9ilT+RnL81phRIW LXbQ94jxZymh4u6ZVxppDavPqI1AYWm0phdrlRSKiVlL/BYvtbpdJl5GTUU9eEUvbfcVUP hU3ORbTz9CqRsLUz4oBrJW9tgwfbZF0oD7+19lkWH5kFQyew2cFMGiPoezYqEAkt4zE3ce rm/+06IxAPso/yq+eoIYNqUBiQVEW0tV7hcAhBMhIvvWnxWx4q2D8T9PL1GONQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1777474132; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=QJ8T5Em+d28X3j0MPTbT2li30L0mSiscNsIqTB3Kabg=; b=VqY4WFWNREOIfh/yK3yPlK68kgNserhveivoUISmHIdXQdEhW2FKtq5NE71aTHlux0JjSD BGgiWlCQ3IldAEwQ98gCrpIz+kTZqUpRltd+qV4qWRormeMvFrAWRmaRkq0bssB5D/hbDE 9smADELR2mi33uU3Xdtpk73bRyjLUDzzxXX47rWN68m4shQyy3wdtFihUkqKdgXDf9Kvvm FlAzPKhPMCq7Tq7i5RQceUilwprFqN+CfxvRvtxSpk0wWpVTOxfrkN+HjoLzgM0IuD6d45 3UVSmQ22iyedvZGKdAn/AuNr6tPQCqNP+11ujUGzPQped6nUZZnltOv7Y2LVGA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4g5Ktr21Vfzl5x for ; Wed, 29 Apr 2026 14:48:52 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 3cb9b by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Wed, 29 Apr 2026 14:48:51 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Mark Johnston Subject: git: a813012f4b76 - stable/14 - dhclient: Fix reallocation of dhclient script environments List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: markj X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: a813012f4b76444dfde03146487042133c657884 Auto-Submitted: auto-generated Date: Wed, 29 Apr 2026 14:48:51 +0000 Message-Id: <69f21a53.3cb9b.35644c5e@gitrepo.freebsd.org> The branch stable/14 has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=a813012f4b76444dfde03146487042133c657884 commit a813012f4b76444dfde03146487042133c657884 Author: Mark Johnston AuthorDate: 2026-04-27 20:56:21 +0000 Commit: Mark Johnston CommitDate: 2026-04-29 14:45:04 +0000 dhclient: Fix reallocation of dhclient script environments When the number of DHCP options exceeds a threshold, script_set_env() will reallocate the environment, stored as an array of pointers. The calculation of the array size failed to multiply by the pointer size, resulting in a smaller than expected buffer which admits out-of-bounds writes. Approved by: so Security: FreeBSD-SA-26:15.dhclient Security: CVE-2026-42511 Reported by: Joshua Rogers of AISLE Research Team (https://aisle.com/) --- sbin/dhclient/dhclient.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sbin/dhclient/dhclient.c b/sbin/dhclient/dhclient.c index 01ef38530cdf..c7a7fcca06ff 100644 --- a/sbin/dhclient/dhclient.c +++ b/sbin/dhclient/dhclient.c @@ -2438,8 +2438,8 @@ script_set_env(struct client_state *client, const char *prefix, char **newscriptEnv; int newscriptEnvsize = client->scriptEnvsize + 50; - newscriptEnv = realloc(client->scriptEnv, - newscriptEnvsize); + newscriptEnv = reallocarray(client->scriptEnv, + newscriptEnvsize, sizeof(char *)); if (newscriptEnv == NULL) { free(client->scriptEnv); client->scriptEnv = NULL; From nobody Wed Apr 29 14:48:52 2026 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4g5Ktx2r42z6bkhr for ; Wed, 29 Apr 2026 14:48:57 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R13" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4g5Ktt2t6hz4K4y for ; Wed, 29 Apr 2026 14:48:54 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1777474134; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=5ifGJ/+idAism9Dvwk6oyoSIoqKf4cPnzDUQXKB0ejs=; b=uI7ub9X7Y0cP9qRDo0KJoBnmN48YwlUiz+tpvchn1I5i27DfNY22Xsdgoe2w1RMdhNZCES U2sZGBumSiotbz1C+GAO78nQDr7Pnks4+leudAzFfbdYoK/BsWFZJTTjb26CncA36rJecT IwTX3ss0g9OxzmiKdcbdZd9CCbqCCrNVAjqBYAU/VSJU2KUhs8gMEdavrmz3OWuj04RM0R K0cFjS0fX1lOdSmaERIL5gbzHwN9qXtEQBZB0opM1rQ5d4SgDfwT9CmWz6e3cEnk9u0eni 8ixqGvQkyPI3ES73hN+acI+6Gv/sAWRLRnYi+zSmS5dhA0Ht7d8LP7jDZbRpSw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1777474134; a=rsa-sha256; cv=none; b=HBbQGQIoorEpBxylcTODZTm83Z0z+ibrPyUYIsMx0yMQGZKP9JvsKZMxWmQ2D8uT6Qx/0e uWx/TqYHnu7/WrVv/UpQzkDByWYRu6Y00Gc3vJ2V5B4+p72SgjVqRuLvs8LABMCePoyMLB FaoW/KcEiqrJEHPBqwtVObDR5oVBTA7q2Dj1X/8JiRGaUx8M/ZVjslZ0jpVZjOkl34q7ig bxpNRsG/1/HP58qvRmCJU2ujVevCV+4BddmdJEyGZZLQh8RTk0g5PQ3LpMqFl0JFNyn+SA LMmZJQDfVTaMzMDx2BT3I0CBGgQeGTyAKBRHgoRjjjJwLdhePoppoPH7tCbo7A== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1777474134; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=5ifGJ/+idAism9Dvwk6oyoSIoqKf4cPnzDUQXKB0ejs=; b=AX4oo3zgVuZaCYebqv3TqO6ChIL3l95/eH5mSbpitP1BZ7xkaCj3y3Fg7OFJdFSAbQkCX8 neR0Wg2BLiqVX3opcZZMvkxmgD4ofL5xpDeH0EIKyRrgS5nrV/YbvG3lmS9hYQYJRNoQgg c+zEycqW3LWAm1VBftadh5d+XgHmmf0oP+UCxDWzytfCR1AER5Y4pJIVC4uK4eAeGJqpg/ CdbphGIJY77wm5we/yvzpcsXepvkrJBEj71tLGww/mXHy010g1AE1tgGE/sTbgZDN+HPHb +6fmNVV8rSI6GYvXT1etkDueeJGJpS7F7BAmYBENjK+WPELA4V15YZejBzCAFw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4g5Kts47BWzlWm for ; Wed, 29 Apr 2026 14:48:53 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 3ceb7 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Wed, 29 Apr 2026 14:48:52 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org Cc: Kristof Provost From: Mark Johnston Subject: git: ba21845e94dd - stable/14 - pf: improve SCTP validation List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: markj X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: ba21845e94dd165c94d8d610d5df49b8954a405e Auto-Submitted: auto-generated Date: Wed, 29 Apr 2026 14:48:52 +0000 Message-Id: <69f21a54.3ceb7.115d067c@gitrepo.freebsd.org> The branch stable/14 has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=ba21845e94dd165c94d8d610d5df49b8954a405e commit ba21845e94dd165c94d8d610d5df49b8954a405e Author: Kristof Provost AuthorDate: 2026-04-26 09:34:55 +0000 Commit: Mark Johnston CommitDate: 2026-04-29 14:45:04 +0000 pf: improve SCTP validation As per RFC5061 "4.2. New Parameter Types" the add/delete IP address parameters (0xc001, 0xc002) may not be present in an INIT or INIT-ACK chunk. They are only allowed to be present in an ASCONF chunk. This also prevents unbounded recursion while parsing an SCTP packet. Approved by: so Security: FreeBSD-SA-26:14.pf Security: CVE-2026-7164 PR: 294799 Reported by: Igor Gabriel Sousa e Souza MFC after: 3 days Sponsored by: Orange Business Services --- sys/netpfil/pf/pf.c | 18 +++++++++++++----- tests/sys/netpfil/pf/sctp.py | 23 +++++++++++++++++++++++ 2 files changed, 36 insertions(+), 5 deletions(-) diff --git a/sys/netpfil/pf/pf.c b/sys/netpfil/pf/pf.c index 38e4cf3a6801..3eab758296a9 100644 --- a/sys/netpfil/pf/pf.c +++ b/sys/netpfil/pf/pf.c @@ -6597,7 +6597,7 @@ again: static int pf_multihome_scan(struct mbuf *m, int start, int len, struct pf_pdesc *pd, - struct pfi_kkif *kif, int op) + struct pfi_kkif *kif, int op, bool asconf) { int off = 0; struct pf_sctp_multihome_job *job; @@ -6700,13 +6700,16 @@ pf_multihome_scan(struct mbuf *m, int start, int len, struct pf_pdesc *pd, int ret; struct sctp_asconf_paramhdr ah; + if (asconf) + return (PF_DROP); + if (!pf_pull_hdr(m, start + off, &ah, sizeof(ah), NULL, NULL, pd->af)) return (PF_DROP); ret = pf_multihome_scan(m, start + off + sizeof(ah), ntohs(ah.ph.param_length) - sizeof(ah), pd, kif, - SCTP_ADD_IP_ADDRESS); + SCTP_ADD_IP_ADDRESS, true); if (ret != PF_PASS) return (ret); break; @@ -6715,12 +6718,15 @@ pf_multihome_scan(struct mbuf *m, int start, int len, struct pf_pdesc *pd, int ret; struct sctp_asconf_paramhdr ah; + if (asconf) + return (PF_DROP); + if (!pf_pull_hdr(m, start + off, &ah, sizeof(ah), NULL, NULL, pd->af)) return (PF_DROP); ret = pf_multihome_scan(m, start + off + sizeof(ah), ntohs(ah.ph.param_length) - sizeof(ah), pd, kif, - SCTP_DEL_IP_ADDRESS); + SCTP_DEL_IP_ADDRESS, true); if (ret != PF_PASS) return (ret); break; @@ -6742,7 +6748,8 @@ pf_multihome_scan_init(struct mbuf *m, int start, int len, struct pf_pdesc *pd, start += sizeof(struct sctp_init_chunk); len -= sizeof(struct sctp_init_chunk); - return (pf_multihome_scan(m, start, len, pd, kif, SCTP_ADD_IP_ADDRESS)); + return (pf_multihome_scan(m, start, len, pd, kif, SCTP_ADD_IP_ADDRESS, + false)); } int @@ -6752,7 +6759,8 @@ pf_multihome_scan_asconf(struct mbuf *m, int start, int len, start += sizeof(struct sctp_asconf_chunk); len -= sizeof(struct sctp_asconf_chunk); - return (pf_multihome_scan(m, start, len, pd, kif, SCTP_ADD_IP_ADDRESS)); + return (pf_multihome_scan(m, start, len, pd, kif, SCTP_ADD_IP_ADDRESS, + false)); } int diff --git a/tests/sys/netpfil/pf/sctp.py b/tests/sys/netpfil/pf/sctp.py index a871994ee118..30794f04fcc2 100644 --- a/tests/sys/netpfil/pf/sctp.py +++ b/tests/sys/netpfil/pf/sctp.py @@ -597,6 +597,29 @@ class TestSCTP_SRV(VnetTestTemplate): assert r.getlayer(sp.SCTPChunkInitAck) assert r.getlayer(sp.SCTP).tag == 42 + @pytest.mark.require_user("root") + @pytest.mark.require_progs(["scapy"]) + def test_too_many_add_ip(self): + import scapy.all as sp + DEPTH=90 + params=[] + for i in range(0, DEPTH): + ch = sp.SCTPChunkParamAddIPAddr(len=(DEPTH - i) * 8) + params.append(ch) + packet = sp.IP(src="192.0.2.1", dst="192.0.2.2") \ + / sp.SCTP(sport=4321, dport=1234) \ + / sp.SCTPChunkInit(init_tag=1, n_in_streams=1, n_out_streams=1, a_rwnd=1500, + params=params) + packet.show() + sp.hexdump(packet) + print("len %d" % len(packet)) + + r = sp.sr1(packet, timeout=3) + # We should not get a reply to this + if r: + r.show() + assert not r + class TestSCTPv6(VnetTestTemplate): REQUIRED_MODULES = ["sctp", "pf"] TOPOLOGY = { From nobody Wed Apr 29 14:48:53 2026 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4g5Ktx2ybgz6bkc3 for ; Wed, 29 Apr 2026 14:48:57 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R13" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4g5Ktt351jz4K50 for ; Wed, 29 Apr 2026 14:48:54 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1777474134; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=eQsGMN1ps9Xv4cmc02GH0Av/aT4HDC5uWAGr6ESoteU=; b=s+gDOiidsc46dpUH3HJ758FhaOuQvCAks/xpAbqtm2j05DP/fNRe0mqJi18RPbsDmrfRaI iJPICAHQBGhNxtujUCDHzL2RVPjgQM46tXHVUTlEAZVpSUDIz3oYwHXs4wY/CQPJyxAD4A 9Km2vogLvVSzsjjwlrfCnH4Nj6QAEopQTlvkP2raWV+fNRnXpnHFDMVMqTc20vpAp+xwze ZpI/V0m2stsY9N1xaz63Lem1d9nm0DR1JslR3vt86nYotXBuqYriEyRZjDvu0NpkJa5FXu DDIfVGOCxQb8P5PAmv/Q98zupc6YUOZvJrdx8FdBfhiohEVex+t8VqGpFE5FxQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1777474134; a=rsa-sha256; cv=none; b=buMkoEB4KTdWQ8Mlcy2rvBWVBhtaoiTW87ETShJCDhRTXaUjUfZvzJtWCBpmnpa9oUvDNg bJP4ieiPv1bi5xE9NoZcIhm4hf33lnBIAhynj8VaIByTdlAy5mcs71YaT2n099dsEXI4UT XzWODGMUUwzDS+mat+ZabSIGKRiE32f8k6dD1UMuPi2pEjxOHEAshaUKqDmmFcHv7y0+j2 oagDVQzYHS4MPe2pdH9ros8En2vqrtn6cGAhWMEft0uQv78Xf5+HGAymmlbdjrh6v2z3MU T5bbvzdLZA7InMoO/MVQ2NKBirhgpBT6tqex14eczZtaMaWOcXl3InAYNcVC1Q== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1777474134; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=eQsGMN1ps9Xv4cmc02GH0Av/aT4HDC5uWAGr6ESoteU=; b=rBcQBkfCgGVGtwBCe8HDJ8Ebc7oBMBDoLhPy53128llikMpGM+MfgDV/zynInPasi2at4N 5Luc9NHN5CG25TAbrTCCoI5IfOzHCzuCN2jeJwMsHs9XPk8GtTcGJdabBbLtiDrz20LB3u Xwh3dsnqfiHEomAtHr00Gnee5YvQjOQ1ZKXbw04jrqFHGccs9y3aq4s5M0mS042zBWRkVN Ab3683v7AcaLwDS/ODYgvEiiFIWZVZzJAMNKzu7pq3uM3cxoVPoevo5mCyyegRI59eLge9 JxP6DHg+dJq+aiTYC9sCj/4jty59QipMlVMPU7c7ZIVQ5ThfI3HYiZx5NuwvHg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4g5Ktt2SQyzlKs for ; Wed, 29 Apr 2026 14:48:54 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 3c677 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Wed, 29 Apr 2026 14:48:53 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org Cc: Mariusz Zaborski From: Mark Johnston Subject: git: 680e97f45b0f - stable/14 - libnv: add test to verify null termination of string in array List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: markj X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: 680e97f45b0ff827291a96f24c0d8edf5f7dc0c6 Auto-Submitted: auto-generated Date: Wed, 29 Apr 2026 14:48:53 +0000 Message-Id: <69f21a55.3c677.4ae7d933@gitrepo.freebsd.org> The branch stable/14 has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=680e97f45b0ff827291a96f24c0d8edf5f7dc0c6 commit 680e97f45b0ff827291a96f24c0d8edf5f7dc0c6 Author: Mariusz Zaborski AuthorDate: 2024-08-29 13:44:03 +0000 Commit: Mark Johnston CommitDate: 2026-04-29 14:45:04 +0000 libnv: add test to verify null termination of string in array Differential Revision: https://reviews.freebsd.org/D46138 (cherry picked from commit 2981431e044fae3bc87e6fa891b8230b484dc84b) --- lib/libnv/tests/nv_array_tests.cc | 58 +++++++++++++++++++++++++++++++++++++-- 1 file changed, 56 insertions(+), 2 deletions(-) diff --git a/lib/libnv/tests/nv_array_tests.cc b/lib/libnv/tests/nv_array_tests.cc index f5c448598b22..d3f23e323719 100644 --- a/lib/libnv/tests/nv_array_tests.cc +++ b/lib/libnv/tests/nv_array_tests.cc @@ -1,6 +1,5 @@ /*- - * Copyright (c) 2015 Mariusz Zaborski - * All rights reserved. + * Copyright (c) 2015-2024 Mariusz Zaborski * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions @@ -28,6 +27,7 @@ #include #include #include +#include #include #include @@ -1162,6 +1162,58 @@ ATF_TEST_CASE_BODY(nvlist_nvlist_array__pack) free(packed); } + +ATF_TEST_CASE_WITHOUT_HEAD(nvlist_string_array_nonull__pack); +ATF_TEST_CASE_BODY(nvlist_string_array_nonull__pack) +{ + nvlist_t *testnvl, *unpacked; + const char *somestr[3] = { "a", "b", "XXX" }; + uint8_t *packed, *twopages, *dataptr, *secondpage; + size_t packed_size, page_size; + bool found; + + page_size = sysconf(_SC_PAGESIZE); + testnvl = nvlist_create(0); + ATF_REQUIRE(testnvl != NULL); + ATF_REQUIRE_EQ(nvlist_error(testnvl), 0); + nvlist_add_string_array(testnvl, "nvl/string", somestr, + nitems(somestr)); + ATF_REQUIRE_EQ(nvlist_error(testnvl), 0); + + packed = (uint8_t *)nvlist_pack(testnvl, &packed_size); + ATF_REQUIRE(packed != NULL); + + twopages = (uint8_t *)mmap(NULL, page_size * 2, PROT_READ | PROT_WRITE, + MAP_PRIVATE | MAP_ANONYMOUS, -1, 0); + ATF_REQUIRE(twopages != MAP_FAILED); + dataptr = &twopages[page_size - packed_size]; + secondpage = &twopages[page_size]; + + memset(twopages, 'A', page_size * 2); + + mprotect(secondpage, page_size, PROT_NONE); + memcpy(dataptr, packed, packed_size); + + found = false; + for (size_t i = 0; i < packed_size - 3; i++) { + if (dataptr[i] == 'X' && dataptr[i + 1] == 'X' && + dataptr[i + 2] == 'X' && dataptr[i + 3] == '\0') { + dataptr[i + 3] = 'X'; + found = true; + break; + } + } + ATF_REQUIRE(found == true); + + unpacked = nvlist_unpack(dataptr, packed_size, 0); + ATF_REQUIRE(unpacked == NULL); + + nvlist_destroy(testnvl); + free(packed); + munmap(twopages, page_size * 2); +} + + ATF_INIT_TEST_CASES(tp) { @@ -1191,5 +1243,7 @@ ATF_INIT_TEST_CASES(tp) ATF_ADD_TEST_CASE(tp, nvlist_descriptor_array__pack) ATF_ADD_TEST_CASE(tp, nvlist_string_array__pack) ATF_ADD_TEST_CASE(tp, nvlist_nvlist_array__pack) + + ATF_ADD_TEST_CASE(tp, nvlist_string_array_nonull__pack) } From nobody Wed Apr 29 14:48:55 2026 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4g5Ktx3Hbzz6bkfq for ; Wed, 29 Apr 2026 14:48:57 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R13" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4g5Ktv4Cjpz4K2h for ; Wed, 29 Apr 2026 14:48:55 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1777474135; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=CSSLt6PbThHMRwZk/31dD82s8vP/jfimwkMTBNPq07s=; b=xYmCk4p7mxcyoWCRok0bzJTtURE5b1WR9vlplHM68mDtGl/R/x/56Yn5jMG13kdqqXyXN0 2+lUyeRBtTSbgzglriW6/YTmlqE1gYosHmGo5pRAYVBf7M9vcg0tsgjuN8e99ttJVOXXMJ 65aCGeBPJdM8pgToE0FfbYZoMiN5apDuBkf5ekSLKSg4p7+dU8oXazxifYN1wijQybGVr0 wRqqGUEy9l0REFA8pnaD/Jj0z5dZHzy1dGzxVSnJBwj2yQojfqveg+l6+TfEC++P+tk9T8 4BSqyoIyF79VXQgDx5SrZD+QAqoPzx0UpBIMR4xQVwQ+trJJSGY8X7/fOLajHw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1777474135; a=rsa-sha256; cv=none; b=ChtKw5avAei3FY1XFt5qZVBmqq8FXkBppL9425j4QKM5bx/IRErYnvyICqgDrMEf9oIxYX TFBlPUCyDHtPZY33tXHxSV6Tyhe1XRPiRjkJQ+dC40ZFaKI/JwceueIdS7N4Pjr8jA79xP 4Anxou0QdE+TvmGCta8xf4Q6JJeYhJ1ndnD5epwzHEMUsnRbRi16sadoX0DHFG05ZzMr7a E3e9cdQPYDuk0NfxO61m8heCZ5nnh15p3j+G6JIOuYKqJV8yM7XaSYSWI9k9pUjDfGn49/ pPIQ+g5QYTsfRabsx9r4TQnbAo7nQBYCYxSEJt2GlXdA7kIRQRDojvdVNOEiRg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1777474135; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=CSSLt6PbThHMRwZk/31dD82s8vP/jfimwkMTBNPq07s=; b=AcAhKEdaY27Ns9UUNs++Dn+Wu4ppaMwN9rIqWz6bkMLEBKOYunMk/1UEr/ClGibyKuHBUh SgfHh9pGF2Jl19abrvjrOb/z3B3pJJwu6aJmC1XQKA5U0P+elJU9kryq5jqqEpgneXEaVN 8jBdWZUH+e7PnxoAoomtWODP+hL4Ynl7E8pZO4XGvKmifzGv277C8vgOObSy+/ItvVvd2U TAsUB70UqggbFfmFWtpOyC4YCB9gKBBO6aGLBOei9wmzmvy+kugG2Xu9dOJR1o+OE/iMdR DNc6ACH+01EKG795tgjBfqHUSnfG/EeojsNiw8sJdPGOVXbkVL9wO41AeAXObA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4g5Ktv2HPHzl60 for ; Wed, 29 Apr 2026 14:48:55 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 3d58c by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Wed, 29 Apr 2026 14:48:55 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org Cc: Mariusz Zaborski From: Mark Johnston Subject: git: 07296250c728 - stable/14 - libnv: add tests to verify potential overflow issues List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: markj X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: 07296250c728644cc071fe89344ec9f0705da014 Auto-Submitted: auto-generated Date: Wed, 29 Apr 2026 14:48:55 +0000 Message-Id: <69f21a57.3d58c.4e8f8088@gitrepo.freebsd.org> The branch stable/14 has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=07296250c728644cc071fe89344ec9f0705da014 commit 07296250c728644cc071fe89344ec9f0705da014 Author: Mariusz Zaborski AuthorDate: 2024-08-29 13:46:01 +0000 Commit: Mark Johnston CommitDate: 2026-04-29 14:45:05 +0000 libnv: add tests to verify potential overflow issues Differential Revision: https://reviews.freebsd.org/D46131 (cherry picked from commit 241a7ddd7112982ed41ccdd047c1dad59ee0256e) --- lib/libnv/tests/Makefile | 9 ++ lib/libnv/tests/nvlist_send_recv_test.c | 193 ++++++++++++++++++++++++++++++++ sys/contrib/libnv/nv_impl.h | 8 ++ sys/contrib/libnv/nvlist.c | 7 -- 4 files changed, 210 insertions(+), 7 deletions(-) diff --git a/lib/libnv/tests/Makefile b/lib/libnv/tests/Makefile index fc377e38ce83..aea416539c4a 100644 --- a/lib/libnv/tests/Makefile +++ b/lib/libnv/tests/Makefile @@ -1,7 +1,16 @@ +.include ATF_TESTS_C= \ nvlist_send_recv_test +.PATH: ${SRCTOP}/lib/libnv +SRCS.nvlist_send_recv_test= msgio.c nvlist_send_recv_test.c +CFLAGS.nvlist_send_recv_test+=-I${SRCTOP}/sys/contrib/libnv +CFLAGS.nvlist_send_recv_test+=-I${SRCTOP}/lib/libnv +.if ${MK_ASAN} != "yes" +CFLAGS.nvlist_send_recv_test+=-DNO_ASAN +.endif + ATF_TESTS_CXX= \ cnv_tests \ dnv_tests \ diff --git a/lib/libnv/tests/nvlist_send_recv_test.c b/lib/libnv/tests/nvlist_send_recv_test.c index 5d4f392ed49c..cd97ccb6b9b9 100644 --- a/lib/libnv/tests/nvlist_send_recv_test.c +++ b/lib/libnv/tests/nvlist_send_recv_test.c @@ -44,6 +44,9 @@ #include +#include +#include + #define ALPHABET "abcdefghijklmnopqrstuvwxyz" #define fd_is_valid(fd) (fcntl((fd), F_GETFL) != -1 || errno != EBADF) @@ -543,6 +546,192 @@ ATF_TC_BODY(nvlist_send_recv__send_closed_fd__stream, tc) nvlist_send_recv__send_closed_fd(SOCK_STREAM); } +ATF_TC_WITHOUT_HEAD(nvlist_send_recv__overflow_header_size); +ATF_TC_BODY(nvlist_send_recv__overflow_header_size, tc) +{ + nvlist_t *nvl; + void *packed; + size_t packed_size; + struct nvlist_header *header; + int fd, socks[2], status; + pid_t pid; + +#ifdef NO_ASAN + atf_tc_skip("This test requires ASAN"); +#endif + + ATF_REQUIRE_EQ(socketpair(PF_UNIX, SOCK_STREAM, 0, socks), 0); + + pid = fork(); + ATF_REQUIRE(pid >= 0); + + if (pid == 0) { + /* Child. */ + fd = socks[0]; + close(socks[1]); + + nvl = nvlist_create(0); + ATF_REQUIRE(nvl != NULL); + ATF_REQUIRE(nvlist_empty(nvl)); + + packed = nvlist_pack(nvl, &packed_size); + ATF_REQUIRE(packed != NULL); + ATF_REQUIRE(packed_size >= sizeof(struct nvlist_header)); + + header = (struct nvlist_header *)packed; + header->nvlh_size = SIZE_MAX - sizeof(struct nvlist_header) + 2; + + ATF_REQUIRE_EQ(write(fd, packed, packed_size), + (ssize_t)sizeof(struct nvlist_header)); + + nvlist_destroy(nvl); + free(packed); + + exit(0); + } else { + /* Parent */ + fd = socks[1]; + close(socks[0]); + + errno = 0; + nvl = nvlist_recv(fd, 0); + ATF_REQUIRE(nvl == NULL); + + /* + * Make sure it has failed on EINVAL, and not on + * errors returned by malloc or recv. + */ + ATF_REQUIRE(errno == EINVAL); + + ATF_REQUIRE(waitpid(pid, &status, 0) == pid); + ATF_REQUIRE(status == 0); + close(fd); + } +} + +ATF_TC_WITHOUT_HEAD(nvlist_send_recv__invalid_fd_size); +ATF_TC_BODY(nvlist_send_recv__invalid_fd_size, tc) +{ + nvlist_t *nvl; + void *packed; + size_t packed_size; + struct nvlist_header *header; + int fd, socks[2], status; + pid_t pid; + + ATF_REQUIRE_EQ(socketpair(PF_UNIX, SOCK_STREAM, 0, socks), 0); + + pid = fork(); + ATF_REQUIRE(pid >= 0); + + if (pid == 0) { + /* Child. */ + fd = socks[0]; + close(socks[1]); + + nvl = nvlist_create(0); + ATF_REQUIRE(nvl != NULL); + ATF_REQUIRE(nvlist_empty(nvl)); + + nvlist_add_string(nvl, "nvl/string", "test"); + ATF_REQUIRE_EQ(nvlist_error(nvl), 0); + + packed = nvlist_pack(nvl, &packed_size); + ATF_REQUIRE(packed != NULL); + ATF_REQUIRE(packed_size >= sizeof(struct nvlist_header)); + + header = (struct nvlist_header *)packed; + header->nvlh_descriptors = 0x20; + + ATF_REQUIRE_EQ(write(fd, packed, packed_size), + (ssize_t)packed_size); + + nvlist_destroy(nvl); + free(packed); + + exit(0); + } else { + /* Parent */ + fd = socks[1]; + close(socks[0]); + + nvl = nvlist_recv(fd, 0); + ATF_REQUIRE(nvl == NULL); + + ATF_REQUIRE(waitpid(pid, &status, 0) == pid); + ATF_REQUIRE(status == 0); + } + + close(fd); +} + +ATF_TC_WITHOUT_HEAD(nvlist_send_recv__overflow_fd_size); +ATF_TC_BODY(nvlist_send_recv__overflow_fd_size, tc) +{ + nvlist_t *nvl; + void *packed; + size_t packed_size; + struct nvlist_header *header; + int fd, socks[2], fds[1], status; + pid_t pid; + + ATF_REQUIRE_EQ(socketpair(PF_UNIX, SOCK_STREAM, 0, socks), 0); + + pid = fork(); + ATF_REQUIRE(pid >= 0); + + if (pid == 0) { + /* Child. */ + fd = socks[0]; + close(socks[1]); + + nvl = nvlist_create(0); + ATF_REQUIRE(nvl != NULL); + ATF_REQUIRE(nvlist_empty(nvl)); + + nvlist_add_string(nvl, "nvl/string", "test"); + ATF_REQUIRE_EQ(nvlist_error(nvl), 0); + + packed = nvlist_pack(nvl, &packed_size); + ATF_REQUIRE(packed != NULL); + ATF_REQUIRE(packed_size >= sizeof(struct nvlist_header)); + + header = (struct nvlist_header *)packed; + header->nvlh_descriptors = 0x4000000000000002; + + ATF_REQUIRE_EQ(write(fd, packed, packed_size), + (ssize_t)packed_size); + + fds[0] = dup(STDERR_FILENO); + ATF_REQUIRE(fds[0] >= 0); + ATF_REQUIRE_EQ(fd_send(fd, fds, 1), 0); + + nvlist_destroy(nvl); + free(packed); + + close(fds[0]); + close(fd); + + exit(0); + } else { + /* Parent */ + fd = socks[1]; + close(socks[0]); + + nvl = nvlist_recv(fd, 0); + ATF_REQUIRE(nvl == NULL); + + /* Make sure that fd was not parsed by nvlist */ + ATF_REQUIRE(fd_recv(fd, fds, 1) == 0); + + ATF_REQUIRE(waitpid(pid, &status, 0) == pid); + ATF_REQUIRE(status == 0); + + close(fds[0]); + close(fd); + } +} + ATF_TP_ADD_TCS(tp) { @@ -553,5 +742,9 @@ ATF_TP_ADD_TCS(tp) ATF_TP_ADD_TC(tp, nvlist_send_recv__send_many_fds__dgram); ATF_TP_ADD_TC(tp, nvlist_send_recv__send_many_fds__stream); + ATF_TP_ADD_TC(tp, nvlist_send_recv__overflow_header_size); + ATF_TP_ADD_TC(tp, nvlist_send_recv__invalid_fd_size); + ATF_TP_ADD_TC(tp, nvlist_send_recv__overflow_fd_size); + return (atf_no_error()); } diff --git a/sys/contrib/libnv/nv_impl.h b/sys/contrib/libnv/nv_impl.h index e9cd3ffabc3f..4ac57fc7b497 100644 --- a/sys/contrib/libnv/nv_impl.h +++ b/sys/contrib/libnv/nv_impl.h @@ -42,6 +42,14 @@ struct nvpair; typedef struct nvpair nvpair_t; #endif +struct nvlist_header { + uint8_t nvlh_magic; + uint8_t nvlh_version; + uint8_t nvlh_flags; + uint64_t nvlh_descriptors; + uint64_t nvlh_size; +} __packed; + #define NV_TYPE_NVLIST_ARRAY_NEXT 254 #define NV_TYPE_NVLIST_UP 255 diff --git a/sys/contrib/libnv/nvlist.c b/sys/contrib/libnv/nvlist.c index 058ec032d3a3..279f31e3a7cc 100644 --- a/sys/contrib/libnv/nvlist.c +++ b/sys/contrib/libnv/nvlist.c @@ -118,13 +118,6 @@ MALLOC_DEFINE(M_NVLIST, "nvlist", "kernel nvlist"); #define NVLIST_HEADER_MAGIC 0x6c #define NVLIST_HEADER_VERSION 0x00 -struct nvlist_header { - uint8_t nvlh_magic; - uint8_t nvlh_version; - uint8_t nvlh_flags; - uint64_t nvlh_descriptors; - uint64_t nvlh_size; -} __packed; nvlist_t * nvlist_create(int flags) From nobody Wed Apr 29 14:48:56 2026 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4g5Kty4p4Lz6bkft for ; Wed, 29 Apr 2026 14:48:58 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R13" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4g5Ktx2j4kz4K53 for ; Wed, 29 Apr 2026 14:48:57 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1777474137; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=NcVTC6nWkFYeF2pQShSL4K9jThyu9wiqXLENltFEdl8=; b=wRuU9mpYp8F5hbkBAc8DDzVaiulzvmx4qt+XqJZED2RwsGxYaI27DuJu2Yy25cGgRbJkI7 t/BJEA4xswStrhJmoAim0ECNy0k3QLCvD1wLDM7v9eXe8Crcbg4b+cm+1sCWbcVfUNSoIF Ua/O9WEoFj8N0jnJw5ZLUA4qj491oYrCBuiFdlgbId8OnBZPd/YtwJqjYKTQcfxaydAcG3 Gwea4df6Y+zmqv6DfMVJ2KasiwLvOB+9+e8EXYZjGsXMx0clKGc/2KbakSya9GHlFJLC7N sIQS/lpbdAEmn90orVmSJYH8X2bKkzax/bCcW7tOwifOL1ESm1RwNEML/ujHsA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1777474137; a=rsa-sha256; cv=none; b=V/MK0W7PTK/j599MRLQW0xpurEF+Ke73mnVmr7oBbY1++8Vr8LvlRysdE589/c/Ot/xAXY NFCRC+QbYLQYip6U1rEYyalscLTL+0qh3Sk4LIv+gRS0pgjbXw67JCKBi4k0sBNwitz5w9 RTIIy5O61+h9+1eSnNx1T5BswQ2DzCY5APRvovFYto9W1ZHmmOlWspr2mF5CdTd4G7b1/z NYYj3KgdB6lkVCPaLZ8luUpuyCdf9plbB69pXoVR1nN5wiFuGULsiR2Iy87weWMP7VBhe3 FcmenIUZBh65JhSiCRxTob+H74IEwmnPif6O0pUmmtiJfarXe0+x1DnZvE5ftg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1777474137; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=NcVTC6nWkFYeF2pQShSL4K9jThyu9wiqXLENltFEdl8=; b=qhxhZh/2njgH5BKNJIY+UIq/wYp4//IQOKp+osjt3BTK38DCHY4gNR6g7Awmq4YGcYnYl3 tKaogie3msU+RTf1CMCzjgI2aU7RRaLnqBLBc9lMqAQJnNWc9co4GfbATlIURZ8Ltn6F6+ V0qXBTvp4zAsecNxWMKtoxlRbv3JBqBdoEIIqTvNhDNpiV14njkKmLT1WHN1fNZF4ZD0vY aY4//A4EOo2iZHI5e+JDzGRe+ycI7zxxqw1dcHccyxc5CqAaGZQ0sxlbu/kWRwwSxz+XPC aghjxALTWnvChrHjOmMK4JeiySd0NxaYfC9aJWD6C9eSl3pTQmNnEvKYO4YyFg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4g5Ktw3Pj2zl61 for ; Wed, 29 Apr 2026 14:48:56 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 3c67c by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Wed, 29 Apr 2026 14:48:56 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org Cc: Mariusz Zaborski From: Mark Johnston Subject: git: 45809b0e1bc1 - stable/14 - libnv: switch fd_wait() from select(2) to poll(2) List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: markj X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: 45809b0e1bc1c443b090999a589f0f31049a6484 Auto-Submitted: auto-generated Date: Wed, 29 Apr 2026 14:48:56 +0000 Message-Id: <69f21a58.3c67c.42202905@gitrepo.freebsd.org> The branch stable/14 has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=45809b0e1bc1c443b090999a589f0f31049a6484 commit 45809b0e1bc1c443b090999a589f0f31049a6484 Author: Mariusz Zaborski AuthorDate: 2026-04-28 14:35:10 +0000 Commit: Mark Johnston CommitDate: 2026-04-29 14:45:05 +0000 libnv: switch fd_wait() from select(2) to poll(2) The previous implementation used FD_SET() on a stack-allocated fd_set, which is an out-of-bounds write whenever the socket fd is >= FD_SETSIZE (1024). Approved by: so Security: FreeBSD-SA-26:16.libnv Security: CVE-2026-39457 Reported by: Joshua Rogers of AISLE Research Team (https://aisle.com/) Reviewed by: markj Differential Revision: https://reviews.freebsd.org/D56689 --- lib/libnv/msgio.c | 12 +++---- lib/libnv/tests/nvlist_send_recv_test.c | 56 +++++++++++++++++++++++++++++++++ 2 files changed, 62 insertions(+), 6 deletions(-) diff --git a/lib/libnv/msgio.c b/lib/libnv/msgio.c index 002c626647d9..d972ced3c86c 100644 --- a/lib/libnv/msgio.c +++ b/lib/libnv/msgio.c @@ -33,10 +33,10 @@ #include #include #include -#include #include #include +#include #include #include #include @@ -87,14 +87,14 @@ msghdr_add_fd(struct cmsghdr *cmsg, int fd) static void fd_wait(int fd, bool doread) { - fd_set fds; + struct pollfd pfd; PJDLOG_ASSERT(fd >= 0); - FD_ZERO(&fds); - FD_SET(fd, &fds); - (void)select(fd + 1, doread ? &fds : NULL, doread ? NULL : &fds, - NULL, NULL); + pfd.fd = fd; + pfd.events = doread ? POLLIN : POLLOUT; + pfd.revents = 0; + (void)poll(&pfd, 1, -1); } static int diff --git a/lib/libnv/tests/nvlist_send_recv_test.c b/lib/libnv/tests/nvlist_send_recv_test.c index cd97ccb6b9b9..c60428c79978 100644 --- a/lib/libnv/tests/nvlist_send_recv_test.c +++ b/lib/libnv/tests/nvlist_send_recv_test.c @@ -28,6 +28,8 @@ #include #include +#include +#include #include #include #include @@ -534,6 +536,59 @@ ATF_TC_BODY(nvlist_send_recv__send_nvlist__stream, tc) nvlist_send_recv__send_nvlist(SOCK_STREAM); } +/* + * Regression test for fd_wait(): the previous select(2)-based implementation + * called FD_SET() unconditionally, which is an out-of-bounds stack write when + * the socket fd is >= FD_SETSIZE. Force the socketpair fds above FD_SETSIZE + * and verify a full nvlist round-trip still works. + */ +ATF_TC_WITHOUT_HEAD(nvlist_send_recv__highfd); +ATF_TC_BODY(nvlist_send_recv__highfd, tc) +{ + struct rlimit rl; + nvlist_t *nvl; + int socks[2], hi_send, hi_recv, status; + pid_t pid; + + hi_send = FD_SETSIZE + 5; + hi_recv = FD_SETSIZE + 6; + + rl.rlim_cur = rl.rlim_max = hi_recv + 1; + if (setrlimit(RLIMIT_NOFILE, &rl) != 0) + atf_tc_skip("cannot raise RLIMIT_NOFILE: %s", strerror(errno)); + + ATF_REQUIRE(socketpair(PF_UNIX, SOCK_STREAM, 0, socks) == 0); + ATF_REQUIRE(dup2(socks[0], hi_recv) == hi_recv); + ATF_REQUIRE(dup2(socks[1], hi_send) == hi_send); + (void)close(socks[0]); + (void)close(socks[1]); + + pid = fork(); + ATF_REQUIRE(pid >= 0); + if (pid == 0) { + /* Child: send. */ + (void)close(hi_recv); + nvl = nvlist_create(0); + nvlist_add_string(nvl, "key", "value"); + if (nvlist_send(hi_send, nvl) != 0) + err(EXIT_FAILURE, "nvlist_send"); + nvlist_destroy(nvl); + _exit(0); + } + + (void)close(hi_send); + nvl = nvlist_recv(hi_recv, 0); + ATF_REQUIRE(nvl != NULL); + ATF_REQUIRE(nvlist_error(nvl) == 0); + ATF_REQUIRE(nvlist_exists_string(nvl, "key")); + ATF_REQUIRE(strcmp(nvlist_get_string(nvl, "key"), "value") == 0); + nvlist_destroy(nvl); + + ATF_REQUIRE(waitpid(pid, &status, 0) == pid); + ATF_REQUIRE(status == 0); + (void)close(hi_recv); +} + ATF_TC_WITHOUT_HEAD(nvlist_send_recv__send_closed_fd__dgram); ATF_TC_BODY(nvlist_send_recv__send_closed_fd__dgram, tc) { @@ -737,6 +792,7 @@ ATF_TP_ADD_TCS(tp) ATF_TP_ADD_TC(tp, nvlist_send_recv__send_nvlist__dgram); ATF_TP_ADD_TC(tp, nvlist_send_recv__send_nvlist__stream); + ATF_TP_ADD_TC(tp, nvlist_send_recv__highfd); ATF_TP_ADD_TC(tp, nvlist_send_recv__send_closed_fd__dgram); ATF_TP_ADD_TC(tp, nvlist_send_recv__send_closed_fd__stream); ATF_TP_ADD_TC(tp, nvlist_send_recv__send_many_fds__dgram); From nobody Wed Apr 29 14:48:57 2026 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4g5Kty4pVsz6bkrK for ; Wed, 29 Apr 2026 14:48:58 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R13" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4g5Ktx3rFbz4Jwv for ; Wed, 29 Apr 2026 14:48:57 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1777474137; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=zHXcpvHARG2N13DqATTJUHMQvIjuFBVP9wRcpSz7v1Y=; b=DTlRDAvebQZySSDThvDq4/Had9s6lSC1kbmHMX5u4mTdQLqjyTlgrr5YEsfNGViCXCkDih VlK/meSCq6GS/nJN3+IxLrVToZd5NAec/oY85xl/BH6ixvpAoYLvysqG3/sSm1RfmSq2BD NawAOMbG6kVXJTzohIDI/gfxJMsuVd7RmbxNDqYPouapEGxv9EbOSO++H+Maq96d+bnjaz i8FPzhT58Qf+lf//LzV6yhuh7eTUFjpAYBsEvss+4NdPk4RiG7q51X4LRiw0EAO38HAZRB oyCOIlUny9k/ZeghrPegHuvpCv29vHO+KEJizEf13Xf/Av+WUxqFpOt3iIC2fQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1777474137; a=rsa-sha256; cv=none; b=jFi4Jjt/FeqxMiHDxYtBwqA6CoGrf+lFmhwZLdAAHWOCU0H/r2r5DtmWclfNIRkom47k31 E2uE0ep+6SU11dlnAvpG8RW16H+Hhetcz2U4nkbPyCA9Zoplzo9Rz8wNMW2GGR/WfVdqeK DoRbCZw/f1ZvrkepkA9MKVW0qhRBQ8dynB95h0vZ233pIBBy1uBMw/iv9yo6kNNC+xK/yW DyjyDiDxaTeRAFVGZ+onaf+Iz/v/6yl/jceQf1xlFTwcXzpYHppUjsqTo9tkvSx2B8gE/I cz3aShNT++1kNfLES+l7V7xg5iatDf3nmeBrz9vo99bddNHhOsd3s7736cnXuA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1777474137; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=zHXcpvHARG2N13DqATTJUHMQvIjuFBVP9wRcpSz7v1Y=; b=M9Uclh9bLPKnTMvDbcdytu1z4E2hSEoe06CkjrS3PM86PdrR2qTIQ0RZnxeKARTVw9thB1 6OEk5Y0zbBSBTyo1X37icYPkV0bbLggiUJyMcal/b3sh/2yiiZKaZCIr9uYsD29KDHbyFh HTyUmVPLyw1u6R/vz2yaV2qBIDmqFf3E1L+Mxv3wej6sOmVPxIPZXpf9VwHCG1CT8bVIzG REIKe+3xnVr4NlHD0o46C47YBdqlAZALx6l0TIT9zEfyq9glrK+Hgkg0GwvvPOglW/ZJ00 N9/4J2CNVAu59KDWhe3A4vEDn/7jeX09JeAhfwP7b4J+x9hKl0gmLTKVg4y4NA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4g5Ktx2hzKzlWp for ; Wed, 29 Apr 2026 14:48:57 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 3d591 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Wed, 29 Apr 2026 14:48:57 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org Cc: Mariusz Zaborski From: Mark Johnston Subject: git: 1cbd6e148249 - stable/14 - libnv: fix heap overflow in nvlist_recv() List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: markj X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: 1cbd6e148249760df4c07c12f77a336ddad909b9 Auto-Submitted: auto-generated Date: Wed, 29 Apr 2026 14:48:57 +0000 Message-Id: <69f21a59.3d591.ba044ca@gitrepo.freebsd.org> The branch stable/14 has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=1cbd6e148249760df4c07c12f77a336ddad909b9 commit 1cbd6e148249760df4c07c12f77a336ddad909b9 Author: Mariusz Zaborski AuthorDate: 2026-04-28 14:36:09 +0000 Commit: Mark Johnston CommitDate: 2026-04-29 14:45:05 +0000 libnv: fix heap overflow in nvlist_recv() nvlist_check_header() validated nvlh_size for overflow before performing conversion. An mallicous user can set NV_FLAG_BIG_ENDIAN in the header and craft nvlh_size so that the orginall value passes the check, but after the conversion the sizeof(nvlist_header) + size can overflow. This can lead to a heap buffer overflow. Approved by: so Security: FreeBSD-SA-26:17.libnv Security: CVE-2026-35547 Fixes: 36fa90dbde0060aacb5677d0b113ee168e839071 Reviewed by: markj Differential Revision: https://reviews.freebsd.org/D56342 --- lib/libnv/tests/nvlist_send_recv_test.c | 57 +++++++++++++++++++++++++++++++++ sys/contrib/libnv/nvlist.c | 9 +++--- 2 files changed, 62 insertions(+), 4 deletions(-) diff --git a/lib/libnv/tests/nvlist_send_recv_test.c b/lib/libnv/tests/nvlist_send_recv_test.c index c60428c79978..e1dbaa4014e8 100644 --- a/lib/libnv/tests/nvlist_send_recv_test.c +++ b/lib/libnv/tests/nvlist_send_recv_test.c @@ -1,5 +1,8 @@ /*- + * SPDX-License-Identifier: BSD-2-Clause + * * Copyright (c) 2013 The FreeBSD Foundation + * Copyright (c) 2024-2026 Mariusz Zaborski * * This software was developed by Pawel Jakub Dawidek under sponsorship from * the FreeBSD Foundation. @@ -664,6 +667,58 @@ ATF_TC_BODY(nvlist_send_recv__overflow_header_size, tc) } } +ATF_TC_WITHOUT_HEAD(nvlist_send_recv__overflow_big_endian_size); +ATF_TC_BODY(nvlist_send_recv__overflow_big_endian_size, tc) +{ + static const unsigned char payload[] = { + 0x6c, /* magic */ + 0x00, /* version */ + 0x80, /* flags: NV_FLAG_BIG_ENDIAN */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xf5, + }; + nvlist_t *nvl; + int sv[2]; + + ATF_REQUIRE_EQ(socketpair(AF_UNIX, SOCK_STREAM, 0, sv), 0); + ATF_REQUIRE_EQ(write(sv[1], payload, sizeof(payload)), + (ssize_t)sizeof(payload)); + ATF_REQUIRE_EQ(close(sv[1]), 0); + + errno = 0; + nvl = nvlist_recv(sv[0], 0); + ATF_REQUIRE(nvl == NULL); + ATF_REQUIRE_EQ(errno, EINVAL); + + ATF_REQUIRE_EQ(close(sv[0]), 0); +} + +ATF_TC_WITHOUT_HEAD(nvlist_send_recv__overflow_little_endian_size); +ATF_TC_BODY(nvlist_send_recv__overflow_little_endian_size, tc) +{ + static const unsigned char payload[] = { + 0x6c, /* magic */ + 0x00, /* version */ + 0x00, /* flags */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0xf5, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, + }; + nvlist_t *nvl; + int sv[2]; + + ATF_REQUIRE_EQ(socketpair(AF_UNIX, SOCK_STREAM, 0, sv), 0); + ATF_REQUIRE_EQ(write(sv[1], payload, sizeof(payload)), + (ssize_t)sizeof(payload)); + ATF_REQUIRE_EQ(close(sv[1]), 0); + + errno = 0; + nvl = nvlist_recv(sv[0], 0); + ATF_REQUIRE(nvl == NULL); + ATF_REQUIRE_EQ(errno, EINVAL); + + ATF_REQUIRE_EQ(close(sv[0]), 0); +} + ATF_TC_WITHOUT_HEAD(nvlist_send_recv__invalid_fd_size); ATF_TC_BODY(nvlist_send_recv__invalid_fd_size, tc) { @@ -799,6 +854,8 @@ ATF_TP_ADD_TCS(tp) ATF_TP_ADD_TC(tp, nvlist_send_recv__send_many_fds__stream); ATF_TP_ADD_TC(tp, nvlist_send_recv__overflow_header_size); + ATF_TP_ADD_TC(tp, nvlist_send_recv__overflow_big_endian_size); + ATF_TP_ADD_TC(tp, nvlist_send_recv__overflow_little_endian_size); ATF_TP_ADD_TC(tp, nvlist_send_recv__invalid_fd_size); ATF_TP_ADD_TC(tp, nvlist_send_recv__overflow_fd_size); diff --git a/sys/contrib/libnv/nvlist.c b/sys/contrib/libnv/nvlist.c index 279f31e3a7cc..71fb52d9ee37 100644 --- a/sys/contrib/libnv/nvlist.c +++ b/sys/contrib/libnv/nvlist.c @@ -1028,10 +1028,6 @@ static bool nvlist_check_header(struct nvlist_header *nvlhdrp) { - if (nvlhdrp->nvlh_size > SIZE_MAX - sizeof(*nvlhdrp)) { - ERRNO_SET(EINVAL); - return (false); - } if (nvlhdrp->nvlh_magic != NVLIST_HEADER_MAGIC) { ERRNO_SET(EINVAL); return (false); @@ -1051,6 +1047,11 @@ nvlist_check_header(struct nvlist_header *nvlhdrp) nvlhdrp->nvlh_descriptors = be64toh(nvlhdrp->nvlh_descriptors); } #endif + if (nvlhdrp->nvlh_size > SIZE_MAX - sizeof(*nvlhdrp)) { + ERRNO_SET(EINVAL); + return (false); + } + return (true); } From nobody Wed Apr 29 14:49:18 2026 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4g5KvN2lhXz6bkj4 for ; Wed, 29 Apr 2026 14:49:20 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R13" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4g5KvL622pz4KH3 for ; Wed, 29 Apr 2026 14:49:18 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1777474158; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=jg7VEnm/J+nqwFPiSLGq6tnh8cRWt3YLlUIeqRrpz5Y=; b=mUatWJ9rU52TECfqarC7rxMZcib3Nt/yepeRXerZsrmgrHITrOOOVdQFI0s9sZo7pGKGMk fcFj4ekp+XwjQx2OkZ8UADdISs9sO4gYm8a2y8J6ArmPEEHgpqLl75t+/PbJM73HOViIZ9 r93W+KFEXtkgy+h/Swb314No4X5qvhN1Ar4QPhlLVIKCAUgww0l4nS2Hh2+j19lY1ufQz6 1J9FPfQsVeuP8hfwJuG2uLNvh688ZbM02qZEI+/rjUSzqo7K0Sg9M4CfkwDefSPEaMyBJ5 EYPUhfmQhYD2rIKKK39ZzxhRy2wjsXiDIRWiMh96b0rretxjf5ZqcJjBwZvivQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1777474158; a=rsa-sha256; cv=none; b=pnQcw1hzhIs+ZD9b22qrTeLJug7d9/GmIinZYRWFtQKdq17AC1j95nBu/OJS//Fydq/pv9 DINq+2XHsGySvr7dF7XUzTjUYt3IKK5mIY97MrZ7KVgoLejuxD8S5vGquirH9r0E/ldpmO ZcZZppV78ojSufQcFWS4vhH2gDoNqJRxLz/JNe2pELNifVXAcSKMYkqhg+bnyCy2gABRHq jlR53lCCiw/mttSloOvJqBucadrYUZ69hZG8SnDYS155jASYOCn9LssmmLQZKf0gV9oiur r7yNhL+J9cVQX11o0GGPAlRoNGm+RWrb7IaSTy6CkF6y0Ys/eYAbL03GZnv+Qw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1777474158; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=jg7VEnm/J+nqwFPiSLGq6tnh8cRWt3YLlUIeqRrpz5Y=; b=eSzNq1Bx54Dc8mFp1ZrZNvMz8R58bWEkKds69eFDYdymE7sxpMbCo/U8p2bG2Ku6XfBToa ZLBVrKASlpvOgqYNRn8eMRLuHzn1UfFxd2zfCkAYhiv+GGuc4EkjsmNXw5zxAgnVg9OkCR n+Q5E3vKdmSq/n4oUpL8Lttp+gnxiLrb8fG4OgGOiOXg2usHJeHF9RUZ3XBiK3wOYnOQDX BNoRq1sVycFFbV+XTx7EW9nvxk3tPFgg3K+KkhHf5IIrbiraaNRCdmhlkwaIW1P3JmTb7W kJ6YGM51GlAg5EkiAtfDCMTANNLeucLfDbJqOn4mqq5w7kPccFcu/TbOPpzWRQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4g5KvL5NYFzl65 for ; Wed, 29 Apr 2026 14:49:18 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 3ccd8 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Wed, 29 Apr 2026 14:49:18 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org Cc: Philip Paeps From: Mark Johnston Subject: git: 1d3ca32f88f2 - releng/14.3 - contrib/tzdata: import tzdata 2025c, 2026a and 2026b List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: markj X-Git-Repository: src X-Git-Refname: refs/heads/releng/14.3 X-Git-Reftype: branch X-Git-Commit: 1d3ca32f88f28fd28f9bad7f82813e5525d9f4a3 Auto-Submitted: auto-generated Date: Wed, 29 Apr 2026 14:49:18 +0000 Message-Id: <69f21a6e.3ccd8.693d7897@gitrepo.freebsd.org> The branch releng/14.3 has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=1d3ca32f88f28fd28f9bad7f82813e5525d9f4a3 commit 1d3ca32f88f28fd28f9bad7f82813e5525d9f4a3 Author: Philip Paeps AuthorDate: 2026-04-27 05:03:29 +0000 Commit: Mark Johnston CommitDate: 2026-04-28 20:33:04 +0000 contrib/tzdata: import tzdata 2025c, 2026a and 2026b Changes: https://github.com/eggert/tz/blob/2025c/NEWS Changes: https://github.com/eggert/tz/blob/2026a/NEWS Changes: https://github.com/eggert/tz/blob/2026b/NEWS Approved by: so Security: FreeBSD-EN-26:09.tzdata (cherry picked from commit a86dc94b84d177da8f00d1c9420ef0860576e4c4) (cherry picked from commit 68e2f4cc5e4ef17e64da2a25fb9918a0e1074b03) (cherry picked from commit 6becc3dff922476d667c15f029e520da496d4295) (cherry picked from commit 4830cb713ed8ae377f7143c4be204b5994c178c2) (cherry picked from commit 9b95cab0a2927dfe07dbe6dc0056a80d5c730414) (cherry picked from commit 30eb33424e74f467346319876e20a83ff71e00cd) --- contrib/tzdata/CONTRIBUTING | 36 ++-- contrib/tzdata/Makefile | 236 +++++++++++++++--------- contrib/tzdata/NEWS | 269 +++++++++++++++++++++++++++ contrib/tzdata/README | 14 +- contrib/tzdata/SECURITY | 2 +- contrib/tzdata/africa | 9 +- contrib/tzdata/antarctica | 12 +- contrib/tzdata/asia | 6 +- contrib/tzdata/australasia | 10 +- contrib/tzdata/backzone | 13 +- contrib/tzdata/calendars | 27 +-- contrib/tzdata/checknow.awk | 5 + contrib/tzdata/etcetera | 3 +- contrib/tzdata/europe | 126 ++++++++++--- contrib/tzdata/leap-seconds.list | 8 +- contrib/tzdata/leapseconds | 19 +- contrib/tzdata/leapseconds.awk | 11 +- contrib/tzdata/northamerica | 109 +++++++++-- contrib/tzdata/southamerica | 6 +- contrib/tzdata/theory.html | 383 ++++++++++++++++++++------------------- contrib/tzdata/version | 2 +- contrib/tzdata/zone.tab | 2 +- contrib/tzdata/zone1970.tab | 22 +-- contrib/tzdata/zonenow.tab | 100 +++++----- 24 files changed, 970 insertions(+), 460 deletions(-) diff --git a/contrib/tzdata/CONTRIBUTING b/contrib/tzdata/CONTRIBUTING index f6edbd3be7d3..c5fa803f7275 100644 --- a/contrib/tzdata/CONTRIBUTING +++ b/contrib/tzdata/CONTRIBUTING @@ -10,26 +10,27 @@ warning, the data entries do not cover all of civil time before 1970, and undoubtedly errors remain in the code and data. Feel free to fill gaps or fix mistakes, and please email improvements to for use in the future. In your email, please give -reliable sources that reviewers can check. +reliable sources that reviewers can check. The mailing list and its +archives are public, so please do not send confidential information. ## Contributing technical changes To email small changes, please run a POSIX shell command like -'diff -u old/europe new/europe >myfix.patch', and attach -'myfix.patch' to the email. +‘diff -u old/europe new/europe >myfix.patch’, and attach +‘myfix.patch’ to the email. For more-elaborate or possibly controversial changes, such as renaming, adding or removing zones, please read -"Theory and pragmatics of the tz code and data" +“Theory and pragmatics of the tz code and data” . It is also good to browse the mailing list archives for examples of patches that tend to work well. Changes should contain commentary citing reliable sources. -Citations should use "https:" URLs if available. +Citations should use ‘https:’ URLs if available. For changes that fix sensitive security-related bugs, please see the -distribution's 'SECURITY' file. +distribution’s SECURITY file. Please submit changes against either the latest release or the main branch of the development @@ -54,11 +55,11 @@ If you use Git the following workflow may be helpful: git checkout -b mybranch - * Sleuth by using 'git blame'. For example, when fixing data for - Africa/Sao_Tome, if the command 'git blame africa' outputs a line - '2951fa3b (Paul Eggert 2018-01-08 09:03:13 -0800 1068) Zone - Africa/Sao_Tome 0:26:56 - LMT 1884', commit 2951fa3b should - provide some justification for the 'Zone Africa/Sao_Tome' line. + * Sleuth by using ‘git blame’. For example, when fixing data for + Africa/Sao_Tome, if the command ‘git blame africa’ outputs a line + ‘2951fa3b (Paul Eggert 2018-01-08 09:03:13 -0800 1068) Zone + Africa/Sao_Tome 0:26:56 - LMT 1884’, commit 2951fa3b should + provide some justification for the ‘Zone Africa/Sao_Tome’ line. * Edit source files. Include commentary that justifies the changes by citing reliable sources. @@ -69,28 +70,31 @@ If you use Git the following workflow may be helpful: ./zdump -v America/Los_Angeles Although builds assume only basic POSIX, they use extra features - if available. 'make check' accesses validator.w3.org unless you - lack 'curl' or use 'make CURL=:'. If you have the latest GCC, - "make CFLAGS='$(GCC_DEBUG_FLAGS)'" does extra checking. + if available. ‘make check’ accesses validator.w3.org unless you + lack ‘curl’ or use ‘make CURL=:’. If you have the latest GCC, + ‘make CFLAGS='$(GCC_DEBUG_FLAGS)'’ does extra checking. * For each separable change, commit it in the new branch, e.g.: git add northamerica git commit - See recent 'git log' output for the commit-message style. + See recent ‘git log’ output for the commit-message style. * Create patch files 0001-..., 0002-..., ... git format-patch main + * Check that the patch files and your email setup contain only + information that you want to make public. + * After reviewing the patch files, send the patches to for others to review. git send-email main For an archived example of such an email, see - "[PROPOSED] Fix off-by-1 error for Jamaica and T&C before 1913" + “[PROPOSED] Fix off-by-1 error for Jamaica and T&C before 1913” . * Start anew by getting current with the main branch again diff --git a/contrib/tzdata/Makefile b/contrib/tzdata/Makefile index 2130582c2deb..1e0a5903534d 100644 --- a/contrib/tzdata/Makefile +++ b/contrib/tzdata/Makefile @@ -3,17 +3,30 @@ # 2009-05-17 by Arthur David Olson. # Request POSIX conformance; this must be the first non-comment line. .POSIX: +# By default, builds of code and data assume POSIX.1-2001 or later; +# this assumption can be relaxed by tailoring the build as described below. # On older platforms you may need to scrounge for POSIX conformance. # For example, on Solaris 10 (2005) with Sun Studio 12 aka Sun C 5.9 (2007), # use 'PATH=/usr/xpg4/bin:$PATH make CC=c99'. +# Reproducible builds of distribution tarballs also need a copy of the +# Git repository, and assume the behavior of the following programs +# (or later versions): +# Git 2.7.0 (2016) +# GNU Coreutils 6.3 (2006) +# GNU Tar 1.14 (2004) +# GnuPG 1.4 (2004) +# Although tzdb does not come with a software bill of materials, +# you should be able to construct one based on the above information, +# your platform, and the way you use this Makefile. # To affect how this Makefile works, you can run a shell script like this: # # #!/bin/sh -# make CC='gcc -std=gnu23' "$@" +# make CFLAGS='-O2 -DHAVE_GETTEXT=0' "$@" # -# This example script is appropriate for a circa 2024 GNU/Linux system -# where a non-default setting enables this package's optional use of C23. +# This example script is appropriate for a GNU/Linux system +# which needs more optimization than default, and which does not want +# gettext's internationalization of diagnostics. # # Alternatively, you can simply edit this Makefile to tailor the following # macro definitions. @@ -53,28 +66,6 @@ DATAFORM= main LOCALTIME= Factory -# The POSIXRULES macro controls interpretation of POSIX-like TZ -# settings like TZ='EET-2EEST' that lack DST transition rules. -# If POSIXRULES is '-', no template is installed; this is the default. -# Any other value for POSIXRULES is obsolete and should not be relied on, as: -# * It does not work correctly in popular implementations such as GNU/Linux. -# * It does not work even in tzcode, except for historical timestamps -# that precede the last explicit transition in the POSIXRULES file. -# Hence it typically does not work for current and future timestamps. -# If, despite the above, you want a template for handling these settings, -# you can change the line below (after finding the timezone you want in the -# one of the $(TDATA) source files, or adding it to a source file). -# Alternatively, if you discover you've got the wrong timezone, you can just -# 'zic -p -' to remove it, or 'zic -p rightzone' to change it. -# Use the command -# make zonenames -# to get a list of the values you can use for POSIXRULES. - -POSIXRULES= - - -# Also see TZDEFRULESTRING below, which takes effect only -# if POSIXRULES is '-' or if the template file cannot be accessed. - # Installation locations. # @@ -150,13 +141,14 @@ TIME_T_ALTERNATIVES_TAIL = int_least32_t.ck uint_least32_t.ck \ # below. If you want both sets of data available, with leap seconds counted # normally, use # REDO= right_posix -# below. POSIX mandates that leap seconds not be counted; for compatibility -# with it, use "posix_only" or "posix_right". Use POSIX time on systems with +# below. POSIX mandates that leap seconds not be counted, and a +# nonnegative TZ_CHANGE_INTERVAL also assumes this, so to be compatible with +# these, use "posix_only" or "posix_right". Use POSIX time on systems with # leap smearing; this can work better than unsmeared "right" time with # applications that are not leap second aware, and is closer to unsmeared # "right" time than unsmeared POSIX time is (e.g., 0.5 vs 1.0 s max error). -REDO= posix_right +REDO= posix_only # Whether to put an "Expires" line in the leapseconds file. # Use EXPIRES_LINE=1 to put the line in, 0 to omit it. @@ -206,6 +198,12 @@ PACKRATLIST= UTF8_LOCALE= en_US.utf8 +# Extra flags for producing man page files like tzfile.5.txt. +# These flags are used only if groff (or mandoc) is present. +# Each option should begin with "-" and should lack shell metacharacters. +# Plausible options include -Tascii and -Tutf8. +MANFLAGS= -Tutf8 + # Non-default libraries needed to link. # On some hosts, this should have -lintl unless CFLAGS has -DHAVE_GETTEXT=0. LDLIBS= @@ -219,14 +217,19 @@ LDLIBS= # -DEPOCH_OFFSET=N if the 'time' function returns a value N greater # than what POSIX specifies, assuming local time is UT. # For example, N is 252460800 on AmigaOS. +# -DFREE_PRESERVES_ERRNO=[01] if the 'free' function munges or preserves errno +# (default is guessed) # -DHAVE_DECL_ASCTIME_R=0 if does not declare asctime_r # on POSIX platforms predating POSIX.1-2024 # -DHAVE_DECL_ENVIRON if declares 'environ' # -DHAVE_DECL_TIMEGM=0 if does not declare timegm # -DHAVE_DIRECT_H if mkdir needs (MS-Windows) +# -DHAVE_FCHMOD=0 if your system lacks the fchmod function # -DHAVE__GENERIC=0 if _Generic does not work* +# -DHAVE_GETEUID=0 if gete?[ug]id do not work # -DHAVE_GETRANDOM if getrandom works (e.g., GNU/Linux), # -DHAVE_GETRANDOM=0 to avoid using getrandom +# -DHAVE_GETRESUID=0 if getres[ug]id do not work # -DHAVE_GETTEXT if gettext works (e.g., GNU/Linux, FreeBSD, Solaris), # where LDLIBS also needs to contain -lintl on some hosts; # -DHAVE_GETTEXT=0 to avoid using gettext @@ -234,28 +237,46 @@ LDLIBS= # ctime_r and asctime_r incompatibly with POSIX.1-2017 and earlier # (Solaris when _POSIX_PTHREAD_SEMANTICS is not defined). # -DHAVE_INTTYPES_H=0 if does not work*+ +# -DHAVE_ISSETUGID=1 if issetugid works, 0 otherwise (default is guessed) +# If 0, you may also use -DHAVE_SYS_AUXV_H=1 if works, +# 0 otherwise (default is guessed). # -DHAVE_LINK=0 if your system lacks a link function # -DHAVE_LOCALTIME_R=0 if your system lacks a localtime_r function # -DHAVE_LOCALTIME_RZ=0 if you do not want zdump to use localtime_rz # localtime_rz can make zdump significantly faster, but is nonstandard. # -DHAVE_MALLOC_ERRNO=0 if malloc etc. do not set errno on failure. +# -DHAVE_MEMPCPY=1 if your system has mempcpy, 0 if not (default is guessed) # -DHAVE_POSIX_DECLS=0 if your system's include files do not declare -# functions like 'link' or variables like 'tzname' required by POSIX +# variables like 'tzname' required by POSIX +# -DHAVE_PWD_H=0 if your system lacks pwd.h, grp.h and corresponding functions +# If 0, you may also need -Dgid_t=G -Duid_t=U +# to define gid_t and uid_t to be types G and U. # -DHAVE_SETENV=0 if your system lacks the setenv function +# -DHAVE_SETMODE=[01] if your system lacks or has the setmode and getmode +# functions (default is guessed) # -DHAVE_SNPRINTF=0 if your system lacks the snprintf function+ # -DHAVE_STDCKDINT_H=0 if neither nor substitutes like # __builtin_add_overflow work* # -DHAVE_STDINT_H=0 if does not work*+ # -DHAVE_STRFTIME_L if declares locale_t and strftime_l # -DHAVE_STRDUP=0 if your system lacks the strdup function +# -DHAVE_STRNLEN=0 if your system lacks the strnlen function+ # -DHAVE_STRTOLL=0 if your system lacks the strtoll function+ +# -DHAVE_STRUCT_STAT_ST_CTIM=0 if struct stat lacks a status-change member +# of type struct timespec, so code should use st_ctime instead; +# but if the status-change member name is st_ctimespec, +# use -Dst_ctim=st_ctimespec instead (default is guessed)+ +# -DHAVE_STRUCT_TIMESPEC=0 if your system lacks struct timespec+ # -DHAVE_SYMLINK=0 if your system lacks the symlink function # -DHAVE_SYS_STAT_H=0 if does not work* +# If 0, you may also need -Dmode_t=M to define mode_t to be type M. # -DHAVE_TZSET=0 if your system lacks a tzset function # -DHAVE_UNISTD_H=0 if does not work* # -DHAVE_UTMPX_H=0 if does not work* # -Dlocale_t=XXX if your system uses XXX instead of locale_t # -DMKTIME_MIGHT_OVERFLOW if mktime might fail due to time_t overflow +# -DOPENAT_TZDIR if tzset should use openat on TZDIR then a relative open. +# See localtime.c for details. # -DPORT_TO_C89 if tzcode should also run on mostly-C89 platforms+ # Typically it is better to use a later standard. For example, # with GCC 4.9.4 (2016), prefer '-std=gnu11' to '-DPORT_TO_C89'. @@ -274,15 +295,46 @@ LDLIBS= # -DTHREAD_SAFE to make localtime.c thread-safe, as POSIX requires; # not needed by the main-program tz code, which is single-threaded. # Append other compiler flags as needed, e.g., -pthread on GNU/Linux. +# The following options can also be used: +# -DTHREAD_PREFER_SINGLE to prefer speed in single-threaded apps, +# at some cost in CPU time and energy in multi-threaded apps. +# The following options can also be used: +# -DHAVE___ISTHREADED=1 if there is an extern int __isthreaded +# variable, 0 otherwise (default is guessed) +# -DHAVE_SYS_SINGLE_THREADED_H=0 if works, +# 0 otherwise (default is guessed) +# -DTHREAD_RWLOCK to use read-write locks instead of mutexes. +# This can improve parallelism and thus save real time +# if many threads call tzcode functions simultaneously. +# It also costs CPU time and thus energy. +# -DTHREAD_TM_MULTI to have gmtime, localtime, and offtime +# return different struct tm * addresses in different threads. +# This supports nonportable programs that call +# gmtime/localtime/offtime when they should call +# gmtime_r/localtime_r/offtime_r to avoid races. +# Because the corresponding storage is freed on thread exit, +# this option is incompatible with POSIX.1-2024 and earlier. +# It also costs CPU time and memory. # -Dtime_tz=\"T\" to use T as the time_t type, rather than the system time_t # This is intended for internal use only; it mangles external names. +# -DTZ_CHANGE_INTERVAL=N if functions depending on TZ should check +# no more often than every N seconds for TZif file changes. +# If N is negative (the default), no such checking is done. +# This option is intended for platforms that want localtime etc. +# to respond to changes to a file selected by TZ, including to +# TZDEFAULT (normally /etc/localtime) if TZ is unset. +# On these platforms, REDO should be "posix_only" or "posix_right". +# This option does not affect tzalloc-allocated objects. # -DTZ_DOMAIN=\"foo\" to use "foo" for gettext domain name; default is "tz" # -DTZ_DOMAINDIR=\"/path\" to use "/path" for gettext directory; # the default is system-supplied, typically "/usr/lib/locale" +# -DTZ_RUNTIME_LEAPS=0 to disable runtime support for leap seconds. +# This conforms to POSIX, shrinks tzcode's attack surface, +# and is more efficient. However, it fails to support Internet +# RFC 9636's leap seconds. # -DTZDEFRULESTRING=\",date/time,date/time\" to default to the specified -# DST transitions for proleptic format TZ strings lacking them, -# in the usual case where POSIXRULES is '-'. If not specified, -# TZDEFRULESTRING defaults to US rules for future DST transitions. +# DST transitions for proleptic format TZ strings lacking them. +# If not specified, it defaults to US rules for future DST transitions. # This mishandles some past timestamps, as US DST rules have changed. # It also mishandles settings like TZ='EET-2EEST' for eastern Europe, # as Europe and US DST rules differ. @@ -314,7 +366,7 @@ LDLIBS= # Select instrumentation via "make GCC_INSTRUMENT='whatever'". GCC_INSTRUMENT = \ -fsanitize=undefined -fsanitize-address-use-after-scope \ - -fsanitize-undefined-trap-on-error -fstack-protector + -fsanitize-trap=all -fstack-protector # Omit -fanalyzer from GCC_DEBUG_FLAGS, as it makes GCC too slow. GCC_DEBUG_FLAGS = -DGCC_LINT -g3 -O3 \ $(GCC_INSTRUMENT) \ @@ -332,12 +384,13 @@ GCC_DEBUG_FLAGS = -DGCC_LINT -g3 -O3 \ -Wold-style-definition -Woverlength-strings -Wpointer-arith \ -Wshadow -Wshift-overflow=2 -Wstrict-overflow \ -Wstrict-prototypes -Wstringop-overflow=4 \ - -Wstringop-truncation -Wsuggest-attribute=cold \ + -Wsuggest-attribute=cold \ -Wsuggest-attribute=const -Wsuggest-attribute=format \ -Wsuggest-attribute=malloc \ -Wsuggest-attribute=noreturn -Wsuggest-attribute=pure \ -Wtrampolines -Wundef -Wunused-macros -Wuse-after-free=3 \ -Wvariadic-macros -Wvla -Wwrite-strings \ + -Wzero-as-null-pointer-constant \ -Wno-format-nonliteral -Wno-sign-compare -Wno-type-limits # # If your system has a "GMT offset" field in its "struct tm"s @@ -393,7 +446,9 @@ GCC_DEBUG_FLAGS = -DGCC_LINT -g3 -O3 \ # functions to be added to the time conversion library. # "offtime" is like "gmtime" except that it accepts a second (long) argument # that gives an offset to add to the time_t when converting it. -# I.e., "offtime" is like calling "localtime_rz" with a fixed-offset zone. +# "offtime_r" is to "offtime" what "gmtime_r" is to "gmtime". +# I.e., "offtime" and "offtime_r" are like calling "localtime_rz" +# with a fixed-offset zone. # "timelocal" is nearly equivalent to "mktime". # "timeoff" is like "timegm" except that it accepts a second (long) argument # that gives an offset to use when converting to a time_t. @@ -451,6 +506,11 @@ leaplist_URI = \ https://hpiers.obspm.fr/iers/bul/bulc/ntp/leap-seconds.list # The file is generated by the IERS Earth Orientation Centre, in Paris. leaplist_TZ = Europe/Paris +# +# To fetch leap-seconds.list from NIST via a less-secure protocol +# and with less-volatile metadata, use these settings: +#leaplist_URI = ftp://ftp.boulder.nist.gov/pub/time/leap-seconds.list +#leaplist_TZ = America/Denver # The zic command and its arguments. @@ -510,13 +570,10 @@ SAFE_CHARSET3= 'abcdefghijklmnopqrstuvwxyz{|}~' SAFE_CHARSET= $(SAFE_CHARSET1)$(SAFE_CHARSET2)$(SAFE_CHARSET3) SAFE_CHAR= '[]'$(SAFE_CHARSET)'-]' -# These non-alphabetic, non-ASCII printable characters are Latin-1, -# and so are likely displayable even in editors like XEmacs 21 -# that have limited display capabilities. -UNUSUAL_OK_LATIN_1 = ¡¢£¤¥¦§¨©«¬®¯°±²³´¶·¸¹»¼½¾¿×÷ -# Non-ASCII non-letters that OK_CHAR allows, as these characters are -# useful in commentary. -UNUSUAL_OK_CHARSET= $(UNUSUAL_OK_LATIN_1) +# These non-alphabetic, non-ASCII printable characters are +# used in commentary or in generated *.txt files +# and are not likely to cause confusion. +UNUSUAL_OK_CHARSET= §«°±»½¾×–‘’“”•→−≤★⟨⟩⯪ # Put this in a bracket expression to match spaces. s = [:space:] @@ -525,9 +582,6 @@ s = [:space:] # This is the same as SAFE_CHAR, except that UNUSUAL_OK_CHARSET and # multibyte letters are also allowed so that commentary can contain a # few safe symbols and people's names and can quote non-English sources. -# Other non-letters are limited to ASCII renderings for the -# convenience of maintainers using XEmacs 21.5.34, which by default -# mishandles Unicode characters U+0100 and greater. OK_CHAR= '[][:alpha:]$(UNUSUAL_OK_CHARSET)'$(SAFE_CHARSET)'-]' # SAFE_LINE matches a line of safe characters. @@ -654,7 +708,6 @@ install: all $(DATA) $(REDO) $(MANS) '$(DESTDIR)$(MANDIR)/man3' '$(DESTDIR)$(MANDIR)/man5' \ '$(DESTDIR)$(MANDIR)/man8' $(ZIC_INSTALL) -l $(LOCALTIME) \ - -p $(POSIXRULES) \ -t '$(DESTDIR)$(TZDEFAULT)' cp -f $(TABDATA) '$(DESTDIR)$(TZDIR)/.' cp tzselect '$(DESTDIR)$(BINDIR)/.' @@ -874,9 +927,9 @@ UTF8_LOCALE_MISSING = \ character-set.ck: $(ENCHILADA) $(UTF8_LOCALE_MISSING) || { \ sharp='#' && \ - ! grep -Env $(SAFE_LINE) $(MANS) date.1 $(MANTXTS) \ - $(MISC) $(SOURCES) $(WEB_PAGES) \ - CONTRIBUTING LICENSE README SECURITY \ + ! grep -Env $(SAFE_LINE) $(MANS) date.1 \ + $(MISC) $(SOURCES) \ + LICENSE \ version tzdata.zi && \ ! grep -Env $(SAFE_LINE)'|^UNUSUAL_OK_'$(OK_CHAR)'*$$' \ Makefile && \ @@ -888,11 +941,9 @@ character-set.ck: $(ENCHILADA) white-space.ck: $(ENCHILADA) $(UTF8_LOCALE_MISSING) || { \ - enchilada='$(ENCHILADA)' && \ patfmt=' \t|[\f\r\v]' && pat=$$(printf "$$patfmt\\n") && \ ! grep -En "$$pat|[$s]\$$" \ - $${enchilada%leap-seconds.list*} \ - $${enchilada#*leap-seconds.list}; \ + $(ENCHILADA:leap-seconds.list=); \ } touch $@ @@ -959,8 +1010,10 @@ now.ck: checknow.awk date tzdata.zi zdump zic zone1970.tab zonenow.tab ./zdump -i -t 0,$$future \ $$(find "$$PWD/$@d" -name Etc -prune \ -o -type f ! -name '*.tab' -print) \ - >$@d/zdump-1970.tab + >$@d/zdump-1970.tab && \ $(AWK) \ + -v now=$$now \ + -v now_out=$@.out \ -v zdump_table=$@d/zdump-now.tab \ -f checknow.awk zonenow.tab $(AWK) \ @@ -970,7 +1023,8 @@ now.ck: checknow.awk date tzdata.zi zdump zic zone1970.tab zonenow.tab -v zdump_table=$@d/zdump-1970.tab \ -f checknow.awk rm -fr $@d - touch $@ + touch $@.out + mv $@.out $@ tables.ck: checktab.awk $(YDATA) backward zone.tab zone1970.tab for tab in $(ZONETABLES); do \ @@ -1031,7 +1085,7 @@ zishrink-posix.ck zishrink-right.ck: \ clean_misc: rm -fr *.ckd *.dir - rm -f *.ck *.core *.o *.out core core.* \ + rm -f *.ck *.core *.o *.out *.t core core.* \ date tzdir.h tzselect version.h zdump zic libtz.a clean: clean_misc rm -fr tzdb-*/ @@ -1059,7 +1113,7 @@ zdump.8.txt: zdump.8 zic.8.txt: zic.8 $(MANTXTS): workman.sh - LC_ALL=C sh workman.sh $(@:.txt=) >$@.out + LC_ALL=C sh workman.sh $(MANFLAGS) $(@:.txt=) >$@.out mv $@.out $@ # Set file timestamps deterministically if possible, @@ -1108,7 +1162,7 @@ set-timestamps.out: $(EIGHT_YARDS) if git diff --quiet HEAD $$file; then \ time=$$(TZ=UTC0 git log -1 \ --format='tformat:%cd' \ - --date='format:%Y-%m-%dT%H:%M:%SZ' \ + --date='format-local:%Y-%m-%dT%H:%M:%SZ' \ $$file) && \ echo "+ touch -md $$time $$file" && \ touch -md $$time $$file; \ @@ -1207,12 +1261,12 @@ $(TIME_T_ALTERNATIVES): $(VERSION_DEPS) touch $@ TRADITIONAL_ASC = \ - tzcode$(VERSION).tar.gz.asc \ - tzdata$(VERSION).tar.gz.asc + tzcode$(VERSION).tar.gz.asc.t \ + tzdata$(VERSION).tar.gz.asc.t REARGUARD_ASC = \ - tzdata$(VERSION)-rearguard.tar.gz.asc + tzdata$(VERSION)-rearguard.tar.gz.asc.t ALL_ASC = $(TRADITIONAL_ASC) $(REARGUARD_ASC) \ - tzdb-$(VERSION).tar.lz.asc + tzdb-$(VERSION).tar.lz.asc.t tarballs rearguard_tarballs tailored_tarballs traditional_tarballs \ signatures rearguard_signatures traditional_signatures: \ @@ -1224,29 +1278,31 @@ signatures rearguard_signatures traditional_signatures: \ # other means. Ordinarily these rules are used only by the above # non-_version rules, which set VERSION on the 'make' command line. tarballs_version: traditional_tarballs_version rearguard_tarballs_version \ - tzdb-$(VERSION).tar.lz + tzdb-$(VERSION).tar.lz.t rearguard_tarballs_version: \ - tzdata$(VERSION)-rearguard.tar.gz + tzdata$(VERSION)-rearguard.tar.gz.t traditional_tarballs_version: \ - tzcode$(VERSION).tar.gz tzdata$(VERSION).tar.gz + tzcode$(VERSION).tar.gz.t tzdata$(VERSION).tar.gz.t tailored_tarballs_version: \ - tzdata$(VERSION)-tailored.tar.gz + tzdata$(VERSION)-tailored.tar.gz.t signatures_version: $(ALL_ASC) rearguard_signatures_version: $(REARGUARD_ASC) traditional_signatures_version: $(TRADITIONAL_ASC) -tzcode$(VERSION).tar.gz: set-timestamps.out +tzcode$(VERSION).tar.gz.t: set-timestamps.out $(SETUP_TAR) && \ $$TAR -cf - \ $(COMMON) $(DOCS) $(SOURCES) | \ - gzip $(GZIPFLAGS) >$@.out - mv $@.out $@ + gzip $(GZIPFLAGS) >$(@:.t=) + $(SET_TIMESTAMP) $(@:.t=) $(COMMON) $(DOCS) $(SOURCES) + touch $@ -tzdata$(VERSION).tar.gz: set-timestamps.out +tzdata$(VERSION).tar.gz.t: set-timestamps.out $(SETUP_TAR) && \ $$TAR -cf - $(TZDATA_DIST) | \ - gzip $(GZIPFLAGS) >$@.out - mv $@.out $@ + gzip $(GZIPFLAGS) >$(@:.t=) + $(SET_TIMESTAMP) $(@:.t=) $(TZDATA_DIST) + touch $@ # Create empty files with a reproducible timestamp. CREATE_EMPTY = TZ=UTC0 touch -mt 202010122253.00 @@ -1255,7 +1311,7 @@ CREATE_EMPTY = TZ=UTC0 touch -mt 202010122253.00 # for backwards compatibility with tz releases 2018e through 2022a. # They should go away eventually. To build rearguard tarballs you # can instead use 'make DATAFORM=rearguard tailored_tarballs'. -tzdata$(VERSION)-rearguard.tar.gz: rearguard.zi set-timestamps.out +tzdata$(VERSION)-rearguard.tar.gz.t: rearguard.zi set-timestamps.out rm -fr $@.dir mkdir $@.dir ln $(TZDATA_DIST) $@.dir @@ -1273,8 +1329,11 @@ tzdata$(VERSION)-rearguard.tar.gz: rearguard.zi set-timestamps.out (cd $@.dir && \ $$TAR -cf - \ $(TZDATA_DIST) pacificnew | \ - gzip $(GZIPFLAGS)) >$@.out - mv $@.out $@ + gzip $(GZIPFLAGS)) >$(@:.t=) + $(SET_TIMESTAMP) $(@:.t=) \ + $$(cd $@.dir && \ + ls $(TZDATA_DIST) pacificnew | sed 's,^,$@.dir/,') + touch $@ # Create a tailored tarball suitable for TZUpdater and compatible tools. # For example, 'make DATAFORM=vanguard tailored_tarballs' makes a tarball @@ -1283,7 +1342,7 @@ tzdata$(VERSION)-rearguard.tar.gz: rearguard.zi set-timestamps.out # traditional tarball, as data entries are put into 'etcetera' even if they # came from some other source file. However, the effect should be the same # for ordinary use, which reads all the source files. -tzdata$(VERSION)-tailored.tar.gz: set-timestamps.out +tzdata$(VERSION)-tailored.tar.gz.t: set-timestamps.out rm -fr $@.dir mkdir $@.dir : The dummy pacificnew pacifies TZUpdater 2.3.1 and earlier. @@ -1295,7 +1354,7 @@ tzdata$(VERSION)-tailored.tar.gz: set-timestamps.out cd $@.dir && \ $(CREATE_EMPTY) $(PRIMARY_YDATA) $(NDATA) backward \ $$pacificnew - (grep '^#' tzdata.zi && echo && cat $(DATAFORM).zi) \ + (sed '/^#/!d' tzdata.zi && echo && cat $(DATAFORM).zi) \ >$@.dir/etcetera touch -mr tzdata.zi $@.dir/etcetera sed -n \ @@ -1316,24 +1375,29 @@ tzdata$(VERSION)-tailored.tar.gz: set-timestamps.out ln $$links $@.dir $(SETUP_TAR) && \ (cd $@.dir && \ - $$TAR -cf - * | gzip $(GZIPFLAGS)) >$@.out - mv $@.out $@ + $$TAR -cf - *) | gzip $(GZIPFLAGS) >$(@:.t=) + $(SET_TIMESTAMP) $(@:.t=) \ + $$(cd $@.dir && ls * | sed 's,^,$@.dir/,') + touch $@ -tzdb-$(VERSION).tar.lz: set-timestamps.out set-tzs-timestamp.out +tzdb-$(VERSION).tar.lz.t: set-timestamps.out set-tzs-timestamp.out rm -fr tzdb-$(VERSION) mkdir tzdb-$(VERSION) ln $(ENCHILADA) tzdb-$(VERSION) $(SET_TIMESTAMP) tzdb-$(VERSION) tzdb-$(VERSION)/* $(SETUP_TAR) && \ - $$TAR -cf - tzdb-$(VERSION) | lzip -9 >$@.out - mv $@.out $@ + $$TAR -cf - tzdb-$(VERSION) | lzip -9 >$(@:.t=) + $(SET_TIMESTAMP) $(@:.t=) tzdb-$(VERSION) + touch $@ -tzcode$(VERSION).tar.gz.asc: tzcode$(VERSION).tar.gz -tzdata$(VERSION).tar.gz.asc: tzdata$(VERSION).tar.gz -tzdata$(VERSION)-rearguard.tar.gz.asc: tzdata$(VERSION)-rearguard.tar.gz -tzdb-$(VERSION).tar.lz.asc: tzdb-$(VERSION).tar.lz +tzcode$(VERSION).tar.gz.asc.t: tzcode$(VERSION).tar.gz.t +tzdata$(VERSION).tar.gz.asc.t: tzdata$(VERSION).tar.gz.t +tzdata$(VERSION)-rearguard.tar.gz.asc.t: tzdata$(VERSION)-rearguard.tar.gz.t +tzdb-$(VERSION).tar.lz.asc.t: tzdb-$(VERSION).tar.lz.t $(ALL_ASC): - $(GPG) --armor --detach-sign $? + $(GPG) --armor --detach-sign $(?:.t=) + $(SET_TIMESTAMP) $(@:.t=) $(?:.t=) + touch $@ TYPECHECK_CFLAGS = $(CFLAGS) -DTYPECHECK -D__time_t_defined -D_TIME_T typecheck: long-long.ck unsigned.ck diff --git a/contrib/tzdata/NEWS b/contrib/tzdata/NEWS index 8c0771641ef0..a0042701c687 100644 --- a/contrib/tzdata/NEWS +++ b/contrib/tzdata/NEWS @@ -1,5 +1,274 @@ News for the tz database +Release 2026a - 2026-04-22 23:06:43 -0700 + + Briefly: + British Columbia moved to permanent -07 on 2026-03-09. + Some more overflow bugs have been fixed in zic. + + Changes to future timestamps + + British Columbia’s 2026-03-08 spring forward was its last + foreseeable clock change, as it moved to permanent -07 thereafter. + (Thanks to Arthur David Olson.) Although the change to permanent + -07 legally took place on 2026-03-09, temporarily model the change + to occur on 2026-11-01 at 02:00 instead. This works around a + limitation in CLDR v48.2 (2026-03-17). This temporary hack is + planned to be removed after CLDR is fixed. + + Changes to code + + zic no longer mishandles a last transition to a new time type. + + zic no longer overflows a buffer when generating a TZ string like + "PST-167:59:58PDT-167:59:59,M11.5.6/-167:59:59,M12.5.6/-167:59:59", + which can occur with adversarial input. (Thanks to Naveed Khan.) + + zic no longer generates a longer TZif file than necessary when + an earlier time zone abbreviation is a suffix of a later one. + As a nice side effect, zic no longer overflows a buffer when given + a long series of abbreviations, each a suffix of the next. + (Buffer overflow reported by Arthur Chan.) + + zic no longer overflows an int when processing input like ‘Zone + Ouch 2147483648:00:00 - LMT’. The int overflow can lead to buffer + overflow in adversarial cases. (Thanks to Naveed Khan.) + + zic now checks for signals more often. + + +Release 2026a - 2026-03-01 22:59:49 -0800 + + Briefly: + Moldova has used EU transition times since 2022. + The “right” TZif files are no longer installed by default. + -DTZ_RUNTIME_LEAPS=0 disables runtime support for leap seconds. + TZif files are no longer limited to 50 bytes of abbreviations. + zic is no longer limited to 50 leap seconds. + Several integer overflow bugs have been fixed. + + Changes to past and future timestamps + + Since 2022 Moldova has observed EU transition times, that is, it + has sprung forward at 03:00, not 02:00, and has fallen back at + 04:00, not 03:00. (Thanks to Heitor David Pinto.) + + Changes to data + + Remove Europe/Chisinau from zonenow.tab, as it now agrees with + Europe/Athens for future timestamps. + + Changes to build procedure + + The Makefile no longer by default installs an alternate set + of TZif files for system clocks that count leap seconds. + Install with ‘make REDO=posix_right’ to get the old default, + which is rarely used in major downstream distributions. + If your system clock counts leap seconds (contrary to POSIX), + it is better to install with ‘make REDO=right_only’. + This change does not affect the leapseconds file, which is still + installed as before. + + The Makefile’s POSIXRULES option, which was declared obsolete in + release 2019b, has been removed. The Makefile’s build procedure + thus no longer optionally installs the obsolete posixrules file. + + Changes to code + + Compiling with the new option -DTZ_RUNTIME_LEAPS=0 disables + runtime support for leap seconds. Although this conforms to + POSIX, shrinks tzcode’s attack surface, and is more efficient, + it fails to support Internet RFC 9636’s leap seconds. + + zic now can generate, and localtime.c can now use, TZif files that + hold up to 256 bytes of abbreviations, counting trailing NULs. + The previous limit was 50 bytes, and some tzdata TZif files were + already consuming 40 bytes. zic -v warns if it generates a file + that exceeds the old 50-byte limit. + + zic -L can now generate TZif files with more than 50 leap seconds. + This helps test TZif readers not limited to 50 leap seconds, as + tzcode’s localtime.c is; it has little immediate need for + practical timekeeping as there have been only 27 leap seconds and + possibly there will be no more, due to planned changes to UTC. + zic -v warns if its output exceeds the old 50-second limit. + + localtime.c no longer accesses the posixrules file generated by + zic -p. Hence for obsolete and nonconforming settings like + TZ="AST4ADT" it now typically falls back on US DST rules, rather + than attempting to override this fallback with the contents of the + posixrules file. This removes library support that was declared + obsolete in release 2019b, and fixes some undefined behavior. + (Undefined behavior reported by GitHub user Naveed8951.) + + The posix2time, posix2time_z, time2posix, and time2posix_z + functions now set errno=EOVERFLOW and return ((time_t) -1) if the + result is not representable. Formerly they had undefined behavior + that could in practice result in crashing, looping indefinitely, + or returning an incorrect result. As before, these functions are + defined only when localtime.c is compiled with the -DSTD_INSPIRED + option. + + Some other undefined behavior, triggered by TZif files containing + outlandish but conforming UT offsets or leap second corrections, + has also been fixed. (Some of these bugs reported by Naveed8951.) + + localtime.c no longer rejects TZif files that exactly fit in its + internal structures, fixing off-by-one typos introduced in 2014g. + + zic no longer generates a no-op transition when + simultaneous Rule and Zone changes cancel each other out. + This occurs in tzdata only in Asia/Tbilisi on 1997-03-30. + (Thanks to Renchunhui for a test case showing the bug.) + + zic no longer assumes you can fflush a read-only stream. + (Problem reported by Christos Zoulas.) + + zic no longer generates UT offsets equal to -2**31 and localtime.c + no longer accepts them, as they can cause trouble in both + localtime.c and its callers. RFC 9636 prohibits such offsets. + + zic -p now warns that the -p option is obsolete and likely + ineffective. + + +Release 2025c - 2025-12-10 14:42:37 -0800 + + Briefly: + Several code changes for compatibility with FreeBSD. + + Changes to past timestamps + + Baja California agreed with California’s DST rules in 1953 and in + 1961 through 1975, instead of observing standard time all year. + (Thanks to Alois Treindl.) + + Changes to build procedure + + Files in distributed tarballs now have correct commit times. + Formerly, the committer’s time zone was incorrectly ignored. + + Distribution products (*.asc, *.gz, and *.lz) now have + reproducible timestamps. Formerly, only the contents of the + compressed tarballs had reproducible timestamps. + + By default, distributed formatted man pages (*.txt) now use UTF-8 + and are left-adjusted more consistently. A new Makefile macro + MANFLAGS can override these defaults. (Thanks to G. Branden + Robinson for inspiring these changes.) + + Changes to code + + An unset TZ is no longer invalid when /etc/localtime is missing, + and is abbreviated "UTC" not "-00". This reverts to 2024b behavior. + (Problem and patch reported by Dag-Erling Smørgrav.) + + New function offtime_r, short for fixed-offset localtime_rz. + It is defined if STD_INSPIRED is defined. + (Patch from Dag-Erling Smørgrav.) + + tzset etc. are now more cautious about questionable TZ settings. + Privileged programs now reject TZ settings that start with '/', + unless they are TZDEFAULT (default "/etc/localtime") or + start with TZDIR then '/' (default "/usr/share/zoneinfo/"). + Unprivileged programs now require files to be regular files + and reject relative names containing ".." directory components; + formerly, only privileged programs did those two things. + These changes were inspired by similar behavior in FreeBSD. + On NetBSD, unprivileged programs now use O_REGULAR to check + whether a TZ setting starting with '/' names a regular file, + avoiding a minor security race still present elsewhere. + TZ strings taken from tzalloc arguments are now treated with + no less caution than TZ strings taken from the environment, as + the old undocumented behavior would have been hard to explain. + tzset etc. no longer use the ‘access’ system call to check access; + instead they now use the system calls issetugid, getauxval, + getresuid/getresgid, and geteuid/getegid/getuid/getgid (whichever + first works) to test whether a program is privileged. + Compile with -DHAVE_SYS_AUXV_H=[01] to enable or disable + which (if it defines AT_SECURE) enables getauxval, + and compile with -DHAVE_ISSETUGID=[01], -DHAVE_GETRESUID=[01], and + -DHAVE_GETEUID=[01] to enable or disable the other calls’ use. + + The new CFLAGS option -DTZ_CHANGE_INTERVAL=N makes tzset etc. + check for TZif file changes if the in-memory data are N seconds + old or more, and are derived from the TZ environment variable. + This is intended for platforms that want tzset etc. to reflect + changes to whatever file TZ selects (including changes to + /etc/localtime if TZ is unset). If N is negative (the default) + these checks are omitted; this is the traditional behavior. + + The new CFLAGS options -DHAVE_STRUCT_STAT_ST_CTIM=0 and + -DHAVE_STRUCT_TIMESPEC=0 port to non-POSIX.1-2008 platforms + that lack st_ctim and struct timespec, respectively. + On these platforms, the code falls back on st_ctime to + implement -DTZ_CHANGE_INTERVAL=N. + + tzset etc. now treat ' ' like '_' in time zone abbreviations, + just as they treat other invalid bytes. This continues the + transition begun in release 96k, which removed spaces in tzdata + because the spaces break time string parsers. + + The new CFLAGS option -DTHREAD_PREFER_SINGLE causes tzcode + in single-threaded processes to avoid locks, as FreeBSD does. + This can save time in single-threaded apps. The threadedness + testing costs CPU time and energy in multi-threaded apps. + New options -DHAVE___ISTHREADED and -DHAVE_SYS_SINGLE_THREADED_H + can help configure how to test for single-threadedness. + + The new CFLAGS option -DTHREAD_RWLOCK uses read-write locks, as + macOS does, instead of mutexes. This saves real time when TZ is + rarely changing and many threads call tzcode simultaneously. + It costs more CPU time and energy. + + The new CFLAGS option -TTHREAD_TM_MULTI causes localtime to return + a pointer to thread-specific memory, as FreeBSD does, instead of + to the same memory in all threads. This supports nonportable + programs that incorrectly use localtime instead of localtime_r. + This option affects gmtime and offtime similarly to localtime. + Because the corresponding storage is freed on thread exit, this + option is incompatible with POSIX.1-2024 and earlier. It also + costs CPU time and memory. + + tzfree now preserves errno, consistently with POSIX.1-2024 ‘free’. + + tzcode now uses mempcpy if available, guessing its availability. + Compile with -DHAVE_MEMPCPY=1 or 0 to override the guess. + + tzcode now uses strnlen to improve asymptotic performance a bit. + Compile with -DHAVE_STRNLEN=0 if your platform lacks it. + + tzcode now hand-declares unistd.h-provided symbols like getopt + if HAVE_UNISTD_H=0, not if HAVE_POSIX_DECLS=0. + + tzset etc. now have an experimental OPENAT_TZDIR option; + see Makefile and localtime.c for details. + + On platforms like GNU/Hurd that do not define PATH_MAX, + exceedingly long TZ strings no longer fail merely because they + exceed an arbitrary file name length limit imposed by tzcode. + + zic has new options inspired by FreeBSD. ‘-D’ skips creation of + output ancestor directories, ‘-m MODE’ sets output files’ mode, + and ‘-u OWNER[:GROUP]’ sets output files’ owner and group. + + zic now uses the fdopen function, which was standardized by + POSIX.1-1988 and is now safe to use in portable code. + This replaces its use of the older umask function, which + complicated maintenance. + + Changes to commentary + + The leapseconds file contains commentary about the IERS and NIST + last-modified and expiration timestamps for leap second data. + (Thanks to Judah Levine.) + + Commentary now also uses characters from the set –‘’“”•≤ as this + can be useful and should work with current applications. This + also affects data in iso3166.tab and zone1970.tab, which now + contain strings like “Côte d’Ivoire” instead of “Côte d'Ivoire”. + + Release 2025b - 2025-03-22 13:40:46 -0700 Briefly: diff --git a/contrib/tzdata/README b/contrib/tzdata/README index edabd2e0690f..f22ec5492d09 100644 --- a/contrib/tzdata/README +++ b/contrib/tzdata/README @@ -1,8 +1,8 @@ README for the tz distribution -"Where do I set the hands of the clock?" -- Les Tremayne as The King -"Oh that--you can set them any place you want." -- Frank Baxter as The Scientist - (from the Bell System film "About Time") +“Where do I set the hands of the clock?” – Les Tremayne as The King +“Oh that – you can set them any place you want.” – Frank Baxter as The Scientist + (from the Bell System film “About Time”) The Time Zone Database (called tz, tzdb or zoneinfo) contains code and data that represent the history of local time for many representative @@ -13,12 +13,12 @@ and daylight-saving rules. See or the file tz-link.html for how to acquire the code and data. -Once acquired, read the leading comments in the file "Makefile" +Once acquired, read the leading comments in the file ‘Makefile’ and make any changes needed to make things right for your system, especially when using a platform other than current GNU/Linux. Then run the following commands, substituting your desired -installation directory for "$HOME/tzdir": +installation directory for ‘$HOME/tzdir’: make TOPDIR="$HOME/tzdir" install "$HOME/tzdir/usr/bin/zdump" -v America/Los_Angeles @@ -39,12 +39,12 @@ The information in the time zone data files is by no means authoritative; fixes and enhancements are welcome. Please see the file CONTRIBUTING for details. -Thanks to these Time Zone Caballeros who've made major contributions to the +Thanks to these Time Zone Caballeros who’ve made major contributions to the time conversion package: Keith Bostic; Bob Devine; Paul Eggert; Robert Elz; Guy Harris; Mark Horton; John Mackin; and Bradley White. Thanks also to Michael Bloom, Art Neilson, Stephen Prince, John Sovereign, and Frank Wales for testing work, and to Gwillim Law for checking local mean time data. -Thanks in particular to Arthur David Olson, the project's founder and first +Thanks in particular to Arthur David Olson, the project’s founder and first maintainer, to whom the time zone community owes the greatest debt of all. None of them are responsible for remaining errors. diff --git a/contrib/tzdata/SECURITY b/contrib/tzdata/SECURITY index 40128bc86dd2..dbce8bbd5d2d 100644 --- a/contrib/tzdata/SECURITY *** 2129 LINES SKIPPED *** From nobody Wed Apr 29 14:49:19 2026 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4g5KvN4wrMz6bkgH for ; Wed, 29 Apr 2026 14:49:20 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R13" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4g5KvN3CFbz4K7v for ; Wed, 29 Apr 2026 14:49:20 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1777474160; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=QLcxoy77E5bluS1hNgQjjF3TduSgMJPF3WDX3si50ak=; b=jCAH0W31sUq+kd0M9iWkIMWu1UOREChVk4rcwwc2xAcQuUKofEwz/413JBjlimuGqdYxoZ yDr1n62JeF1mmEPID/hP0c+aGA4G58bkXaAZNqTj56qAFvMJ49gYJ/ZcQXW7M4iNdSlEYk uk0Tt8xLybAc7zxc6ANQfEzVxUsdyebVYigzcgJ1zMuHO3NmA3oeoQNctSRw+Fzk++38Ma VH3qItaHIcSaGq/OL7GUe7pMf35dc0o9TGzmImZqLGFRYxZlI+/MNeKTi9GpyMNX0FoBXr ob8bxtrmoCrg8ET4c6JBtUYL6vPVgkFFrUiDywbVpue663vz/JKpgHz9xwzCzA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1777474160; a=rsa-sha256; cv=none; b=xmgziTkznQGYSPX/lXFrdIcpaUAFb62vbLVjrXgpXlB8uCgps0SYEKy3ceLHVRyj1xO3wT aehLXSseqQSe+qo9RqpwU5cC4mldiL3+mH7lU5Ceys4V+nhtPCRROjuKecZuHEe/bEiSK3 MexTZY+CmH9aANcvG/jAirimpX0Di3dFIJT+l5/uiJmxoBrb6mDfYsp3Vi1YJPcnQgkLgm 4mtXRH000sb+ovnEzRH3xj7uwuI00GA9YLy9aKIwRVu7aKnXkzAxvS1cissk6J6RdB6MnC kSlKxETryP47nvg1xiLiDBcQEW7Q/kkODZ5lk/1HIwW1QWMcH7w+R2H7NV6rTQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1777474160; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=QLcxoy77E5bluS1hNgQjjF3TduSgMJPF3WDX3si50ak=; b=Ade9TNzrBFG2EWoCRn8sUrtb2rQ3RJJNxHzLk9g9FuLVoQhA4k/56JbkNA9REYTE7+oFlc sa74IcR4xq/thm089dPlxBSHQtYpS9b9NUV635WFaWQUro5ToMwFhxcIDeaZ/5R5ljWK+X MZSo2u6+XHypRhAdG+UpDgFCCfI0PIEXPoFv7L/lTAOlg+vwvmUQswkX6/qgJrFSsTLUKY vVijtwl6rlrvF2XVDR32NCMjby9Hwld1RBXtSNIoxqyIvFNopyVVAivFL4UkZeZY6hyfHi NI1cgzCFlGVvGzFas0cFitl4Jk8AlwfcIT2Wilaf9S9wN8XPCz0GMRQE7AlMCQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4g5KvN2jb0zlJJ for ; Wed, 29 Apr 2026 14:49:20 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 3ccdd by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Wed, 29 Apr 2026 14:49:19 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org Cc: Kyle Evans From: Mark Johnston Subject: git: 3b1365cb816e - releng/14.3 - amd64: fix INVLPGB range invalidation List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: markj X-Git-Repository: src X-Git-Refname: refs/heads/releng/14.3 X-Git-Reftype: branch X-Git-Commit: 3b1365cb816e18969244ffdab0861d70ec2a4dc8 Auto-Submitted: auto-generated Date: Wed, 29 Apr 2026 14:49:19 +0000 Message-Id: <69f21a6f.3ccdd.5f20d9e5@gitrepo.freebsd.org> The branch releng/14.3 has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=3b1365cb816e18969244ffdab0861d70ec2a4dc8 commit 3b1365cb816e18969244ffdab0861d70ec2a4dc8 Author: Kyle Evans AuthorDate: 2026-04-20 20:18:17 +0000 Commit: Mark Johnston CommitDate: 2026-04-28 20:33:04 +0000 amd64: fix INVLPGB range invalidation AMD64 Architecture Programmer's Manual Volume 3 says the following: > ECX[15:0] contains a count of the number of sequential pages to > invalidate in addition to the original virtual address, starting from > the virtual address specified in rAX. A count of 0 invalidates a > single page. ECX[31]=0 indicates to increment the virtual address at > the 4K boundary. ECX[31]=1 indicates to increment the virtual address > at the 2M boundary. The maximum count supported is reported in > CPUID function 8000_0008h, EDX[15:0]. ECX[31] being what we call INVLPGB_2M_CNT, signaling to increment the VA by 2M. > This instruction invalidates the TLB entry or entries, regardless of > the page size (4 Kbytes, 2 Mbytes, 4 Mbytes, or 1 Gbyte). [...] Combined with this, my interpretation of the current code is: if is aligned on a PDE boundary, we'll use INVLPGB_2M_CNT to try and invalidate PDEs with a single call, but that only works if is the start of at least 2M pages. Otherwise, if or any of the subsequent PDEs isn't actually a superpage, then we would actually only invalidate the *first* page within the PDE before skipping to the next PDE, leaving the remainder of the 4K pages in between as they were. The implication would seem to be that we would need to inspect the range that we're trying to invalidate if we're planning on using INVLPGB_2M_CNT at all, so this patch just simplifies it to a series of 4K invalidations. My gut feeling is that we likely still come out on top vs. the TLB shootdown we're avoiding. This seems to explain some issues we've seen lately with fdgrowtable() and kqueue on recent Zen4/Zen5 EPYC hardware, where we'd experience corruption that we can't explain. Approved by: so Security: FreeBSD-EN-26:10.amd64 PR: 293382 Reviewed by: alc, kib, markj (cherry picked from commit 1b8e5c02f5c07521129e06ff8ab7c660238fd75c) (cherry picked from commit ff11ae166cd9f8ae16a5c384d46aa1218f3ff013) --- sys/amd64/amd64/mp_machdep.c | 25 ++++++------------------- 1 file changed, 6 insertions(+), 19 deletions(-) diff --git a/sys/amd64/amd64/mp_machdep.c b/sys/amd64/amd64/mp_machdep.c index 00e99f9df192..bffe9f510216 100644 --- a/sys/amd64/amd64/mp_machdep.c +++ b/sys/amd64/amd64/mp_machdep.c @@ -726,25 +726,12 @@ smp_masked_invlpg_range(vm_offset_t addr1, vm_offset_t addr2, pmap_t pmap, addr2 = round_page(addr2); total = atop(addr2 - addr1); for (va = addr1; total > 0;) { - if ((va & PDRMASK) != 0 || total < NPDEPG) { - cnt = atop(NBPDR - (va & PDRMASK)); - if (cnt > total) - cnt = total; - if (cnt > invlpgb_maxcnt + 1) - cnt = invlpgb_maxcnt + 1; - invlpgb(INVLPGB_GLOB | INVLPGB_VA | va, 0, - cnt - 1); - va += ptoa(cnt); - total -= cnt; - } else { - cnt = total / NPTEPG; - if (cnt > invlpgb_maxcnt + 1) - cnt = invlpgb_maxcnt + 1; - invlpgb(INVLPGB_GLOB | INVLPGB_VA | va, 0, - INVLPGB_2M_CNT | (cnt - 1)); - va += cnt << PDRSHIFT; - total -= cnt * NPTEPG; - } + cnt = MIN(total, invlpgb_maxcnt + 1); + /* 4K increments because these may not be superpages. */ + invlpgb(INVLPGB_GLOB | INVLPGB_VA | va, 0, + cnt - 1); + va += ptoa(cnt); + total -= cnt; } tlbsync(); sched_unpin(); From nobody Wed Apr 29 14:49:20 2026 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4g5KvQ5tlpz6bkrd for ; Wed, 29 Apr 2026 14:49:22 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R13" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4g5KvP4PmCz4KK0 for ; Wed, 29 Apr 2026 14:49:21 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1777474161; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=61UOgfCLYcAP4azp2gdnfNjdUHUXKQAZSprtoaE6ezo=; b=Eq8WhbBrWFOS+hS2kkwbxFoG+4+DvtJlOROC1z/nYxwOo4Ate20OeSQQZdx7QaygfhZJf7 npZEF5yxulVsyK66e7dzcxen/2SRacAa/Pksujolo9I8QnrobpMU5GWxVe91+j5ok68BaZ j20dTjKEMwyavJ1XQ2g/4UhX9yaTwKCYVpX61O+rYdIOaRX+LreNP5iDBLZL0ufS0PmdaV 7ybEu4I5p6+WbWJR4pgGybiFRmEhv/CYRkuNF1GqH8e7/XylNEcqiTfhmSOmIPLDOAkT35 zzxxsE90tnd/376Uzj5w3j3xydyQQcfMxqufFd4F2TGUR+ol7gaJjfI3w8Pi1A== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1777474161; a=rsa-sha256; cv=none; b=V+B+mi7cGMMzQrD7SiLRD5KxJ8OcXx/FrHUJ/uQW1/lf2fPMLKMIcai//Qyrhz9McScFeC Nr/whvxQFKMV0GZJzbdRFA7BGrChYDbrwlFf4BiNAqxIJD3k2G9xJCwVlGa4oNcucYF59D ye8JzGKCygdRYMJBFOiQOfM4ztRFMHanrL2bqgeymX1PTywni9xcwbHClcdhklb3+ovCme Ew3J4RJMMrABE84pSkO7Q+aZBtc/BE5B5n+/Ruz7nux10kB6fX+6xny85fvdnBneMW3Lzy xZNQkzjl5L+iDmhMMWVApc70l6pdW0dewuOy+k+D31uLDgNi3EH6Y0cMHtOopw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1777474161; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=61UOgfCLYcAP4azp2gdnfNjdUHUXKQAZSprtoaE6ezo=; b=N/s6+UjZ7WOdq+fEDnthaFvCjgyIQBi4PJjatuS8vZG0q5pStGSxf4gbLxE0Zwdqz9/Z7B ZtRFzFCJGNVZWOSghccvdmzpPH7L4lOdGygPDUCW3ZyfjyXy/s0gEbCBMNZuZWjo+rosdV GmQfQBQNtNg6kS0wFyikG2PNGWDE8vCxIl5vQtAl+2lK2W3I8tZJxRkccetPfcHf7rFOZB UAVQe/CFpt/J5dYUh+qLHtsO9RUD5lRpqmqcyAn8QWHjhpgNtntBFGiCU5TsoV0PhKpmTV eXmRQAgQ4ZWQ0zcObDaECxP/FLR9t07ADW76fiYhAtlVLxnq0TFPRgmY2LAxsg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4g5KvP3cxmzl2m for ; Wed, 29 Apr 2026 14:49:21 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 3cb9f by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Wed, 29 Apr 2026 14:49:20 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org Cc: Kristof Provost From: Mark Johnston Subject: git: 63495b09ccf5 - releng/14.3 - pf: improve SCTP validation List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: markj X-Git-Repository: src X-Git-Refname: refs/heads/releng/14.3 X-Git-Reftype: branch X-Git-Commit: 63495b09ccf53bfc87fd1e13658f0dba38f0d2ac Auto-Submitted: auto-generated Date: Wed, 29 Apr 2026 14:49:20 +0000 Message-Id: <69f21a70.3cb9f.66250006@gitrepo.freebsd.org> The branch releng/14.3 has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=63495b09ccf53bfc87fd1e13658f0dba38f0d2ac commit 63495b09ccf53bfc87fd1e13658f0dba38f0d2ac Author: Kristof Provost AuthorDate: 2026-04-26 09:34:55 +0000 Commit: Mark Johnston CommitDate: 2026-04-28 20:33:04 +0000 pf: improve SCTP validation As per RFC5061 "4.2. New Parameter Types" the add/delete IP address parameters (0xc001, 0xc002) may not be present in an INIT or INIT-ACK chunk. They are only allowed to be present in an ASCONF chunk. This also prevents unbounded recursion while parsing an SCTP packet. Approved by: so Security: FreeBSD-SA-26:14.pf Security: CVE-2026-7164 PR: 294799 Reported by: Igor Gabriel Sousa e Souza Sponsored by: Orange Business Services --- sys/netpfil/pf/pf.c | 18 ++++++--- tests/sys/netpfil/pf/sctp.py | 90 ++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 103 insertions(+), 5 deletions(-) diff --git a/sys/netpfil/pf/pf.c b/sys/netpfil/pf/pf.c index 8201d3e24db7..00853d5210fc 100644 --- a/sys/netpfil/pf/pf.c +++ b/sys/netpfil/pf/pf.c @@ -6581,7 +6581,7 @@ again: static int pf_multihome_scan(struct mbuf *m, int start, int len, struct pf_pdesc *pd, - struct pfi_kkif *kif, int op) + struct pfi_kkif *kif, int op, bool asconf) { int off = 0; struct pf_sctp_multihome_job *job; @@ -6684,13 +6684,16 @@ pf_multihome_scan(struct mbuf *m, int start, int len, struct pf_pdesc *pd, int ret; struct sctp_asconf_paramhdr ah; + if (asconf) + return (PF_DROP); + if (!pf_pull_hdr(m, start + off, &ah, sizeof(ah), NULL, NULL, pd->af)) return (PF_DROP); ret = pf_multihome_scan(m, start + off + sizeof(ah), ntohs(ah.ph.param_length) - sizeof(ah), pd, kif, - SCTP_ADD_IP_ADDRESS); + SCTP_ADD_IP_ADDRESS, true); if (ret != PF_PASS) return (ret); break; @@ -6699,12 +6702,15 @@ pf_multihome_scan(struct mbuf *m, int start, int len, struct pf_pdesc *pd, int ret; struct sctp_asconf_paramhdr ah; + if (asconf) + return (PF_DROP); + if (!pf_pull_hdr(m, start + off, &ah, sizeof(ah), NULL, NULL, pd->af)) return (PF_DROP); ret = pf_multihome_scan(m, start + off + sizeof(ah), ntohs(ah.ph.param_length) - sizeof(ah), pd, kif, - SCTP_DEL_IP_ADDRESS); + SCTP_DEL_IP_ADDRESS, true); if (ret != PF_PASS) return (ret); break; @@ -6726,7 +6732,8 @@ pf_multihome_scan_init(struct mbuf *m, int start, int len, struct pf_pdesc *pd, start += sizeof(struct sctp_init_chunk); len -= sizeof(struct sctp_init_chunk); - return (pf_multihome_scan(m, start, len, pd, kif, SCTP_ADD_IP_ADDRESS)); + return (pf_multihome_scan(m, start, len, pd, kif, SCTP_ADD_IP_ADDRESS, + false)); } int @@ -6736,7 +6743,8 @@ pf_multihome_scan_asconf(struct mbuf *m, int start, int len, start += sizeof(struct sctp_asconf_chunk); len -= sizeof(struct sctp_asconf_chunk); - return (pf_multihome_scan(m, start, len, pd, kif, SCTP_ADD_IP_ADDRESS)); + return (pf_multihome_scan(m, start, len, pd, kif, SCTP_ADD_IP_ADDRESS, + false)); } int diff --git a/tests/sys/netpfil/pf/sctp.py b/tests/sys/netpfil/pf/sctp.py index 230dbae0d327..1dd07d46b7eb 100644 --- a/tests/sys/netpfil/pf/sctp.py +++ b/tests/sys/netpfil/pf/sctp.py @@ -502,6 +502,96 @@ class TestSCTP(VnetTestTemplate): assert re.search(r"epair.*sctp 192.0.2.1:.*192.0.2.3:1234", states) assert re.search(r"epair.*sctp 192.0.2.1:.*192.0.2.2:1234", states) +class TestSCTP_SRV(VnetTestTemplate): + REQUIRED_MODULES = ["sctp", "pf"] + TOPOLOGY = { + "vnet1": {"ifaces": ["if1"]}, + "vnet2": {"ifaces": ["if1"]}, + "if1": {"prefixes4": [("192.0.2.1/24", "192.0.2.2/24")]}, + } + + def vnet2_handler(self, vnet): + ToolsHelper.print_output("/sbin/pfctl -e") + ToolsHelper.pf_rules([ + "set state-policy if-bound", + "pass inet proto sctp", + "pass on lo"]) + + # Start an SCTP server process, pipe the ppid + data back to the other vnet? + srv = SCTPServer(socket.AF_INET, port=1234) + while True: + srv.accept(vnet) + + @pytest.mark.require_user("root") + @pytest.mark.require_progs(["scapy"]) + def test_initiate_tag_check(self): + # Ensure we don't send ABORTs in response to the other end's INIT_ACK + # That'd interfere with our test. + ToolsHelper.print_output("/sbin/sysctl net.inet.sctp.blackhole=2") + + import scapy.all as sp + + packet = sp.IP(src="192.0.2.1", dst="192.0.2.2") \ + / sp.SCTP(sport=1234, dport=1234) \ + / sp.SCTPChunkInit(init_tag=1, n_in_streams=1, n_out_streams=1, a_rwnd=1500) + packet.show() + + r = sp.sr1(packet, timeout=3) + assert r + r.show() + assert r.getlayer(sp.SCTP) + assert r.getlayer(sp.SCTPChunkInitAck) + assert r.getlayer(sp.SCTP).tag == 1 + + # Send another INIT with the same initiate tag, expect another init ack + packet = sp.IP(src="192.0.2.1", dst="192.0.2.2") \ + / sp.SCTP(sport=1234, dport=1234) \ + / sp.SCTPChunkInit(init_tag=1, n_in_streams=1, n_out_streams=1, a_rwnd=1500) + packet.show() + + r = sp.sr1(packet, timeout=3) + assert r + r.show() + assert r.getlayer(sp.SCTP) + assert r.getlayer(sp.SCTPChunkInitAck) + assert r.getlayer(sp.SCTP).tag == 1 + + # Send an INIT with a different initiate tag, expect another init ack + packet = sp.IP(src="192.0.2.1", dst="192.0.2.2") \ + / sp.SCTP(sport=1234, dport=1234) \ + / sp.SCTPChunkInit(init_tag=42, n_in_streams=1, n_out_streams=1, a_rwnd=1500) + packet.show() + + r = sp.sr1(packet, timeout=3) + assert r + r.show() + assert r.getlayer(sp.SCTP) + assert r.getlayer(sp.SCTPChunkInitAck) + assert r.getlayer(sp.SCTP).tag == 42 + + @pytest.mark.require_user("root") + @pytest.mark.require_progs(["scapy"]) + def test_too_many_add_ip(self): + import scapy.all as sp + DEPTH=90 + params=[] + for i in range(0, DEPTH): + ch = sp.SCTPChunkParamAddIPAddr(len=(DEPTH - i) * 8) + params.append(ch) + packet = sp.IP(src="192.0.2.1", dst="192.0.2.2") \ + / sp.SCTP(sport=4321, dport=1234) \ + / sp.SCTPChunkInit(init_tag=1, n_in_streams=1, n_out_streams=1, a_rwnd=1500, + params=params) + packet.show() + sp.hexdump(packet) + print("len %d" % len(packet)) + + r = sp.sr1(packet, timeout=3) + # We should not get a reply to this + if r: + r.show() + assert not r + class TestSCTPv6(VnetTestTemplate): REQUIRED_MODULES = ["sctp", "pf"] TOPOLOGY = { From nobody Wed Apr 29 14:49:21 2026 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4g5KvS1vsVz6bkpB for ; Wed, 29 Apr 2026 14:49:24 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R13" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4g5KvR3gDlz4KQH for ; Wed, 29 Apr 2026 14:49:23 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1777474163; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=SSU1zrBR4yFk/7lszo6SkeaJSOnEShlnia/zVnpU//s=; b=u9bHME04vdQKNn4aTEkHsmf4hTXBNpMH4/fiEeXRfGf0/CbQdhMQb6TaZZ1qKxc9no0RvS CiUVu8deomjYl6uJq63ljSpgjFfwbXGzq53g4lDEnik9+EXOewr1ACWLeDKz4zDl+lkkm/ Um+Jg5ZrRjvnaD5AlkSwSRoKV4f96vaqr3jBC+JSZ71J5Ube82t+HCFuMuqTrWLWHc7q7W eVG1cpVQ2IGENtBW9onOreJ2GMbOwkHz5F5ESPULf8d2Ni9WY8lZfgAdZkPwQylYdz3hOQ r/GLk1zw3RFPf3+3DYToxqB1YEUsm1sxkfmo1AbNFde3hd4gW0c251STIy5rFQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1777474163; a=rsa-sha256; cv=none; b=v/3cW9317YUowCqsIjCbf/sEl2U6HtDSbKvQNSWYtJH6lwOOlpgEpkCLal/7aPd6j0qtxr dP8h92IO9lHuz0YtWG1zOvGw8ZywswiOfIEE+/MOtmVVQvHM3qDGwdhg8QvMxSw0vOONSq hJKmLl05VYaLIBoxUZwQl+yr+afl2DT+zGH2LAKMphubEIi04DZj5ieFxS3o2Nm2tCBRni HA/eYl4xL4Ffs28RKwgpSIjsI0zDRoUG/lXlcp6WLM+RpMX89HL/oUYqaSDqK9f8u6s3gK wJxpmbDHlOLrurg91Ppq+ovt2lWtee/0WwOK5RaFwVpPGclWMpMz4afFie1Khg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1777474163; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=SSU1zrBR4yFk/7lszo6SkeaJSOnEShlnia/zVnpU//s=; b=WPWwDv4C1SrG06MW2LZcXwD/hEx6QMxFWZf4dPjxfx/0T69fI7hEb4hDHG7ozIVy03QnRh f61Rm9Qn+54u0dA3B3mktllCh77TLrvUeWlAljKRgL6EXEt9iVtom38lkc3yRwtI0x3ZjM fs6YY3Onb/4acNVekJBAPSEl+dKyxhZQxumUtYxO2Q1HpQcx1UtV/XjcvO4ri5l4nYimdX 8fwhrK1lXQjIbj45HNsxj7vcp5aJp9pmVGFiULfGGHWcJm02S9rhAC+Th8PBRSWv4psps6 +FBB8MX8TCdJQKMIVSJPG+kIvgsrWL2QUdT626lTkBmJsgq0nIS5UOHvENMYwA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4g5KvQ6wpwzl66 for ; Wed, 29 Apr 2026 14:49:22 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 3ae6f by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Wed, 29 Apr 2026 14:49:21 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Mark Johnston Subject: git: f04c40607b8f - releng/14.3 - execve: Fix an operator precedence bug List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: markj X-Git-Repository: src X-Git-Refname: refs/heads/releng/14.3 X-Git-Reftype: branch X-Git-Commit: f04c40607b8fb38720d57631c674f07d4207c976 Auto-Submitted: auto-generated Date: Wed, 29 Apr 2026 14:49:21 +0000 Message-Id: <69f21a71.3ae6f.7016221a@gitrepo.freebsd.org> The branch releng/14.3 has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=f04c40607b8fb38720d57631c674f07d4207c976 commit f04c40607b8fb38720d57631c674f07d4207c976 Author: Mark Johnston AuthorDate: 2026-04-22 17:58:35 +0000 Commit: Mark Johnston CommitDate: 2026-04-28 20:33:04 +0000 execve: Fix an operator precedence bug The buggy version allowed userspace to overflow the copy into adjacent execve KVA regions, which enables, among other things, injecting environment variables into privileged processes. Approved by: so Security: FreeBSD-SA-26:13.exec Security: CVE-2026-7270 Reported by: Ryan Austin of Calif.io Reviewed by: brooks, kib Fixes: f373437a01a3 ("Add helper functions to copy strings into struct image_args.") Differential Revision: https://reviews.freebsd.org/D56665 --- sys/kern/kern_exec.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/kern/kern_exec.c b/sys/kern/kern_exec.c index 6727872b5b10..484adaac91ec 100644 --- a/sys/kern/kern_exec.c +++ b/sys/kern/kern_exec.c @@ -1625,7 +1625,7 @@ exec_args_adjust_args(struct image_args *args, size_t consume, ssize_t extend) if (args->stringspace < offset) return (E2BIG); memmove(args->begin_argv + extend, args->begin_argv + consume, - args->endp - args->begin_argv + consume); + args->endp - (args->begin_argv + consume)); if (args->envc > 0) args->begin_envv += offset; args->endp += offset; From nobody Wed Apr 29 14:49:22 2026 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4g5KvS1rdgz6bkp9 for ; Wed, 29 Apr 2026 14:49:24 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R13" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4g5KvR4YWHz4KMY for ; Wed, 29 Apr 2026 14:49:23 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1777474163; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=jiyqGvurskZmcq8L+ZzljFex08Ro9w79z/oYG39v3Ow=; b=O2pFBPqNrITvF1bqFXqQ+RKEr1k3wrzMiqUoSo/QrqHdDMoSlhzkjvoA1Wyr6gDsH6eBc7 Ni3x4wmrtGZbQz9e7hDtW8DxZJmXtineVr0GHpGzkMriw5v+McpN/acLUqiFT4AVvEcMdY qCcSh42Q+aexXhG9OsUZjcyol5iZbvmbXH3d+ruuOigmerwS2rXuo721k/zwgQ3UyOwuYt m2RN5PIvteFU9LwEDZH2A2Ia/hF7kCsnm6cUzg/+F52I4cMEvmGQ+Oui4aVVpcijVlmhKZ FD/7hAfbzMcUi/icZNjJZlKDP/dym5Mll0KG0TMKNigmxhYqcd0P7wsuggCXmg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1777474163; a=rsa-sha256; cv=none; b=LAV/KwaI3lfxHc5eW3z+3ea4UaWE/q2X8fAjyJi8FdbXSun4EMRVmSyikhtLHP0UzIoH+m xopZNQbDsrlBysipKFN6jaRvJhRiON+k+82DcOr0/w3m0JRMOvd8+8xPs2Wb7Ckr/NJLxc p77/PfVRXmFOGr0oFSJ08+Z6K8/URG00vNEMHfwgxGnjWwn3F73xeg9G7QGiXXG8Z5mC1Z oWz26UVB8BlIKRbHvf4c7zhVnMrLZDC6tZmj3AEcSvG/b3JMJ/tnsqW5UsaWSPLoPnRuHu 7Zt98pQ+HWTVvZBHk4hvdw45EoFrO5FoULJ2TFWb36kYXKohDlC70YwE/lQvDw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1777474163; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=jiyqGvurskZmcq8L+ZzljFex08Ro9w79z/oYG39v3Ow=; b=eWgG4TfWAiaOrxnq9IV2Udi3mZ2xUSwDeR5gbV5W9BcotIwMSXXzONz1ibgyK+QyhF+IjY ZUZHNkbH54ZPrxTd65Y0rU2MfJTPUBhJQVv03wnjThysLvB0dse1BiBm7GlNtUJ3vkTne+ xxWDnO3XPxNpRHONF2j/YkF448EmnbQ8ivm57GIziStDvOoSvdQtrUZY9zlBgbEeLr+gAd zQ+fcMSVL3kMpDbqfeN1lSdh4v4c2Tfx5qlUeOlRnDusgV6Yxp6BRqC9TJAGj4GD+k1elN mPi9Ff8tjJOkqQeD87Vs02kETYq2ouY+T0tdw1KUpTKhOfaGidgzBRignn22tw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4g5KvR2zySzlL5 for ; Wed, 29 Apr 2026 14:49:23 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 3c7a1 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Wed, 29 Apr 2026 14:49:22 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Mark Johnston Subject: git: dda71167a101 - releng/14.3 - dhclient: Check for unexpected characters in some DHCP server options List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: markj X-Git-Repository: src X-Git-Refname: refs/heads/releng/14.3 X-Git-Reftype: branch X-Git-Commit: dda71167a1013aceb1c4236a9297a24dd62754ac Auto-Submitted: auto-generated Date: Wed, 29 Apr 2026 14:49:22 +0000 Message-Id: <69f21a72.3c7a1.5d8245e7@gitrepo.freebsd.org> The branch releng/14.3 has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=dda71167a1013aceb1c4236a9297a24dd62754ac commit dda71167a1013aceb1c4236a9297a24dd62754ac Author: Mark Johnston AuthorDate: 2026-04-27 20:03:09 +0000 Commit: Mark Johnston CommitDate: 2026-04-28 20:33:04 +0000 dhclient: Check for unexpected characters in some DHCP server options Some options are written directly to the lease file, which may be parsed by subsequent dhclient invocations. We must make sure that a malicious server can't control the "medium" field of a lease definition, otherwise they can achieve RCE by injecting one into the lease file, whereupon it will be passed to dhclient-script, which passes it through eval. Approved by: so Security: FreeBSD-SA-26:12.dhclient Security: CVE-2026-42511 Reported by: Joshua Rogers of AISLE Research Team (https://aisle.com/) --- sbin/dhclient/dhclient.c | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/sbin/dhclient/dhclient.c b/sbin/dhclient/dhclient.c index cbab3fa2973c..01ef38530cdf 100644 --- a/sbin/dhclient/dhclient.c +++ b/sbin/dhclient/dhclient.c @@ -1226,6 +1226,12 @@ packet_to_lease(struct packet *packet) } memcpy(lease->server_name, packet->raw->sname, DHCP_SNAME_LEN); lease->server_name[DHCP_SNAME_LEN]='\0'; + if (strchr(lease->server_name, '"') != NULL || + strchr(lease->server_name, '\\') != NULL) { + warning("dhcpoffer: server name contains invalid characters."); + free_client_lease(lease); + return (NULL); + } } /* Ditto for the filename. */ @@ -1241,6 +1247,12 @@ packet_to_lease(struct packet *packet) } memcpy(lease->filename, packet->raw->file, DHCP_FILE_LEN); lease->filename[DHCP_FILE_LEN]='\0'; + if (strchr(lease->filename, '"') != NULL || + strchr(lease->filename, '\\') != NULL) { + warning("dhcpoffer: filename contains invalid characters."); + free_client_lease(lease); + return (NULL); + } } return lease; } From nobody Wed Apr 29 14:49:25 2026 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4g5KvT5XSmz6bkVV for ; Wed, 29 Apr 2026 14:49:25 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R13" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4g5KvT3Wmzz4KKB for ; Wed, 29 Apr 2026 14:49:25 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1777474165; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Tp+tVWlGD3QrdEPWMgpUuX+YStwsxrBmYmJ7AR9Ajcc=; b=OCp+vBh016zF4pztT4dthxaew9v4NGkdI9/a4R8uljR5rTEJRqrH9ZC9ibxQhh+ffvMlSz dAec+e3Ymwabel6vgLWKyX1aQ3/ugNgHNgbu4cwdDZOQryKIsMt2Oryc10lgiVUr13YEor RRfg/WaiS/oJEnCxoWWF1vdIc7XRHrusSUzZFHsbTqnzNT2/zHbONEO1qiuBXs8qEo0Q7h zxP778n1Llr10iV2YT8lZL4wl2f42+UlJzOTF7Cjc99TWIVDMdeGV4ycfSPi6ZyGOAxzE2 VSiIcqunPIsErN+kwJ0l7AAIFi/ojHi4zVqJIWzJ5qoa5rK3iBaJOH174Aykuw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1777474165; a=rsa-sha256; cv=none; b=kWKwgIauIshFTuwIpPhcAsUVNWVbuA7CmFNYBwShpW/A7mE/S3+MbEjtOHrboSI/f2cK7B Rkz6ohh1jtfhx9vJFGSIVD1hOlf7byS1/jpKWkt90u/m19AhGNdvB45Rc8hrud+/ONF141 9yyyx3ah50qwzje+5m4U8d9zHzGXw2b5wcQEOVzHVxOji7Ma1X0rfM4mzOsBqh+eOdxY/O 5BQ0T6ybWpsS4Wlysy2AsTxA2mUyEwUW9u5Dr7jS1pIv0MqiHT4gDnTGOCA3Ormve1w+50 pajG8N9gbW6XHP5xsODmujwow6vvX7X8COJWLgtbrscc3vVZndbzKoTLFz68IA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1777474165; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Tp+tVWlGD3QrdEPWMgpUuX+YStwsxrBmYmJ7AR9Ajcc=; b=f3HI3vvPXqtDmEMZw1AwcBZ5/xok/vGjmnIjkbKf9GuJog/pWDjg+GyIOJN2qLmensyGqN nw8F9TPpjOj9vEOp4NCgv27fWxW4aRJGINuUNx4rjyshZAkZNmS1QqApqb1jFdGYO0U0cz 6xHfwwC71fsKpMmLT8mNGZf9Qfk2p2ytsPUUgRdjEvF0sS7adnnE+vfwh5b6B7tHI54fqy 01wgT5UOsdaC/ur5bin71v0An/tu9dWm3vka0+PoromBq+Dm/cu9ubvZj2uW6J80DD9xN+ BXZKbf7rfBObRhOlTMui/fj4L3JYQigKixbnxOe6qp18CMSIxJ3SJDXRp3UerQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4g5KvT1gQNzldx for ; Wed, 29 Apr 2026 14:49:25 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 3c6e9 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Wed, 29 Apr 2026 14:49:25 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org Cc: Mariusz Zaborski From: Mark Johnston Subject: git: bba29d772b10 - releng/14.3 - libnv: add test to verify null termination of string in array List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: markj X-Git-Repository: src X-Git-Refname: refs/heads/releng/14.3 X-Git-Reftype: branch X-Git-Commit: bba29d772b1006579b365405a34fa107b11670df Auto-Submitted: auto-generated Date: Wed, 29 Apr 2026 14:49:25 +0000 Message-Id: <69f21a75.3c6e9.5d006f8@gitrepo.freebsd.org> The branch releng/14.3 has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=bba29d772b1006579b365405a34fa107b11670df commit bba29d772b1006579b365405a34fa107b11670df Author: Mariusz Zaborski AuthorDate: 2024-08-29 13:44:03 +0000 Commit: Mark Johnston CommitDate: 2026-04-28 20:33:04 +0000 libnv: add test to verify null termination of string in array Approved by: so Differential Revision: https://reviews.freebsd.org/D46138 (cherry picked from commit 2981431e044fae3bc87e6fa891b8230b484dc84b) --- lib/libnv/tests/nv_array_tests.cc | 58 +++++++++++++++++++++++++++++++++++++-- 1 file changed, 56 insertions(+), 2 deletions(-) diff --git a/lib/libnv/tests/nv_array_tests.cc b/lib/libnv/tests/nv_array_tests.cc index f5c448598b22..d3f23e323719 100644 --- a/lib/libnv/tests/nv_array_tests.cc +++ b/lib/libnv/tests/nv_array_tests.cc @@ -1,6 +1,5 @@ /*- - * Copyright (c) 2015 Mariusz Zaborski - * All rights reserved. + * Copyright (c) 2015-2024 Mariusz Zaborski * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions @@ -28,6 +27,7 @@ #include #include #include +#include #include #include @@ -1162,6 +1162,58 @@ ATF_TEST_CASE_BODY(nvlist_nvlist_array__pack) free(packed); } + +ATF_TEST_CASE_WITHOUT_HEAD(nvlist_string_array_nonull__pack); +ATF_TEST_CASE_BODY(nvlist_string_array_nonull__pack) +{ + nvlist_t *testnvl, *unpacked; + const char *somestr[3] = { "a", "b", "XXX" }; + uint8_t *packed, *twopages, *dataptr, *secondpage; + size_t packed_size, page_size; + bool found; + + page_size = sysconf(_SC_PAGESIZE); + testnvl = nvlist_create(0); + ATF_REQUIRE(testnvl != NULL); + ATF_REQUIRE_EQ(nvlist_error(testnvl), 0); + nvlist_add_string_array(testnvl, "nvl/string", somestr, + nitems(somestr)); + ATF_REQUIRE_EQ(nvlist_error(testnvl), 0); + + packed = (uint8_t *)nvlist_pack(testnvl, &packed_size); + ATF_REQUIRE(packed != NULL); + + twopages = (uint8_t *)mmap(NULL, page_size * 2, PROT_READ | PROT_WRITE, + MAP_PRIVATE | MAP_ANONYMOUS, -1, 0); + ATF_REQUIRE(twopages != MAP_FAILED); + dataptr = &twopages[page_size - packed_size]; + secondpage = &twopages[page_size]; + + memset(twopages, 'A', page_size * 2); + + mprotect(secondpage, page_size, PROT_NONE); + memcpy(dataptr, packed, packed_size); + + found = false; + for (size_t i = 0; i < packed_size - 3; i++) { + if (dataptr[i] == 'X' && dataptr[i + 1] == 'X' && + dataptr[i + 2] == 'X' && dataptr[i + 3] == '\0') { + dataptr[i + 3] = 'X'; + found = true; + break; + } + } + ATF_REQUIRE(found == true); + + unpacked = nvlist_unpack(dataptr, packed_size, 0); + ATF_REQUIRE(unpacked == NULL); + + nvlist_destroy(testnvl); + free(packed); + munmap(twopages, page_size * 2); +} + + ATF_INIT_TEST_CASES(tp) { @@ -1191,5 +1243,7 @@ ATF_INIT_TEST_CASES(tp) ATF_ADD_TEST_CASE(tp, nvlist_descriptor_array__pack) ATF_ADD_TEST_CASE(tp, nvlist_string_array__pack) ATF_ADD_TEST_CASE(tp, nvlist_nvlist_array__pack) + + ATF_ADD_TEST_CASE(tp, nvlist_string_array_nonull__pack) } From nobody Wed Apr 29 14:49:24 2026 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4g5KvT1k3hz6bkpN for ; Wed, 29 Apr 2026 14:49:25 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R13" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4g5KvS2Tn2z4KQK for ; Wed, 29 Apr 2026 14:49:24 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1777474164; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=OrSl3ZH4jyjWn3nRhlUxkoYbRd7Tp2xWBDDr2JygHos=; b=g4A1AmWNwdC5MLnU3k17+GuOk/MLngpk02CB6Sa4XZ4gmDfsBbfpnvp9fDljjd9zGv76PW ABM9Bm02YVp20PQJDsdvXbgx6PZqGLCboiwxoFVQ1IzDl+GJ/jP+LocCfMBGdZDTn4zQeN iaRVDTIZnMhp+CHE/G0xY2NEvWKNAZRquwllCKHcncT7lwHx0e4BkhNJ2EwH5Y3gJN0sck fsPohiCQIV2UUvxjQjlGI0kUEE+mH3JGrxfrUrogULOMAhhew3z2JfKHrjRhIvVn21QFqn bs0dwj4w5mBYYJysk/q0DI8Yrk8r4nhmNSLa2OTs7jFpBaqPbNkddykhmqnXpQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1777474164; a=rsa-sha256; cv=none; b=XBiZfFG7KjyIT//K69aw1qpQo4hkNFAlBSAp+WdQSzZLivqlyQ/V2zCq+/9UsKVfhhXPXV 6b57ACEbN6LkEBI7KUSlv7bw9TwuBgtygXFrRZgoh+6K/RLN0QREYzTFyZ+gsk7f+YbeQW AG6+dbzMBLU+SLgmkaKpIWnd2ZKd0i0c2XzEtTRPQ11OTnTSSiyOHe3BcTpl+OZO06JFI3 Z3sN6wlbbt1zyKUlxY4wqX1LJyw2SnXbZZieuCJjsEVA++kMw2A/fIO/sy5iwACeItdfdR pBhX/sdpMERbu6jlwiGKu1NcAadVjsRb1DWH/NJMN319kFD1iBo7SX7Hf4LdxA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1777474164; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=OrSl3ZH4jyjWn3nRhlUxkoYbRd7Tp2xWBDDr2JygHos=; b=RBykIKoe30BHCtodvsq43R5nMpohBZ7+rp6gJXNvJ4ZadRtwZlquWruU/vlBDpWUFkIqUC AL3/Mbr5acxlinXiq6cE6YTEOXAwy8sIt0c9F/oI2pqNM2zjUFo2eoRZyOY5NL8B66o9Fd 0YY8nKPIiZ1aYFUV0eAq6cb422D9xQj/foCxnh5fUM3fxj0DrPuZ8MBu2R3ZYRCZEYSx1e Pazc9a09/+tKbXwZFyZwnZYF+VidcBWDmq2lLSZixzes1sf3Osdk7o7c2Tq+DL3Ndp5+bf VNE0zou/SMLuePOr4n/KWkbIsYcBxVSa+mYXo3+nD0UbrKBfA4YifFczaT0XIg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4g5KvS1FDFzlWw for ; Wed, 29 Apr 2026 14:49:24 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 3ba4b by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Wed, 29 Apr 2026 14:49:24 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Mark Johnston Subject: git: 76734958a098 - releng/14.3 - dhclient: Fix reallocation of dhclient script environments List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: markj X-Git-Repository: src X-Git-Refname: refs/heads/releng/14.3 X-Git-Reftype: branch X-Git-Commit: 76734958a0986bdd4cf7edfe845b5e7b4e152360 Auto-Submitted: auto-generated Date: Wed, 29 Apr 2026 14:49:24 +0000 Message-Id: <69f21a74.3ba4b.6dda83c1@gitrepo.freebsd.org> The branch releng/14.3 has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=76734958a0986bdd4cf7edfe845b5e7b4e152360 commit 76734958a0986bdd4cf7edfe845b5e7b4e152360 Author: Mark Johnston AuthorDate: 2026-04-27 20:56:21 +0000 Commit: Mark Johnston CommitDate: 2026-04-28 20:33:04 +0000 dhclient: Fix reallocation of dhclient script environments When the number of DHCP options exceeds a threshold, script_set_env() will reallocate the environment, stored as an array of pointers. The calculation of the array size failed to multiply by the pointer size, resulting in a smaller than expected buffer which admits out-of-bounds writes. Approved by: so Security: FreeBSD-SA-26:15.dhclient Security: CVE-2026-42511 Reported by: Joshua Rogers of AISLE Research Team (https://aisle.com/) --- sbin/dhclient/dhclient.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sbin/dhclient/dhclient.c b/sbin/dhclient/dhclient.c index 01ef38530cdf..c7a7fcca06ff 100644 --- a/sbin/dhclient/dhclient.c +++ b/sbin/dhclient/dhclient.c @@ -2438,8 +2438,8 @@ script_set_env(struct client_state *client, const char *prefix, char **newscriptEnv; int newscriptEnvsize = client->scriptEnvsize + 50; - newscriptEnv = realloc(client->scriptEnv, - newscriptEnvsize); + newscriptEnv = reallocarray(client->scriptEnv, + newscriptEnvsize, sizeof(char *)); if (newscriptEnv == NULL) { free(client->scriptEnv); client->scriptEnv = NULL; From nobody Wed Apr 29 14:49:27 2026 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4g5KvX1MBlz6bkgs for ; Wed, 29 Apr 2026 14:49:28 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R13" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4g5KvW59JHz4KXW for ; Wed, 29 Apr 2026 14:49:27 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1777474167; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=miijKIk4IPBgLkVvoVylgf6alVHy5E93vg1D3TWzGkU=; b=HQanqL2B02wYb0oPnfQUn+gRjm2ZsKubExJjXcukUvdnSwH2C78NMf7g6+rOVGnKpKNJAU QaAqHh8L4dXO+K61YxmuY/jxtMM+seTNGLVldKdnoB8Tl8dK9KBClmugDUwnObN/x4E+8l UZ+JMva2WwekmGF/OLfQISrhNsM6iGH1OBmBFy/kYeinfmCR6JgPwKJw4Xj5rhuRRF+s7F 11AZBTzj4j6YSH5HG/UKjYw1woukiQxaU5x0oO1n9Yay5r76PNbzFyU5sd9ah5uqKjX21c mKUuBxzScDY4eUhGal7Vw7tEPuVXilrKgiDEfqjIELyF8CIQibJaDMtw0tZQcw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1777474167; a=rsa-sha256; cv=none; b=f3mw16B/BkMa6ywLLFASszxuST/WUW5psdUqmADO94xlo4ElY90ZsssgN7K3mgelOPv84F WdS8UzjFYzkyDDRxOkc5yi5nXv+19kHWoUme6Aj+OcoDX1iSe5dPO+ssazV3lwUEj00DlA Du1NII4aK0ffUHIcvaI8KUOAk5B2xR91ADmrvv9QhEjPPniYaXfdYDh21w46v6no6DGURT rNeVL+g3U8buEFdVh+ud0srvzcdmmOutAYRAcvHKneKcMfsVIO46Hj0rEIuCWF9Su5PfsS ZPLyWnj4IeV2MHQAgDqJtjc1qgvOh84EIrck51hsW/jfkCvAXKk7Sk8Dc0ZciA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1777474167; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=miijKIk4IPBgLkVvoVylgf6alVHy5E93vg1D3TWzGkU=; b=NpExNkDBTQpUC3h0DBOZrpPat81Zv6DWSH4djj7EPj2oi4O+nT0BA6rMHLCAXVU3zAwYTQ +GaMtem2LLo/3h2hwb2OzRcQyMKzGdL/D5kiaYRuIsCwwV+SDpS82+srZDzV9jL/FPUcAz Dx2jpGtakJZtqwnkO74vuPHPoKpuMaOFz1gEMrk4Mw3Tf+aac/+4FQn4ikYm/y87t7aqsQ /XxmE9Nwnp2xvPHYVH5LTfzPn5BWox6bvi/ZdQ4qX7Y0gKj1vzW17nbyVgXchgxr9DeF34 Wfs0rdJlKN4c66AFlLRDFOoRAeNJayDA99cfm/dtqVAT+Pl3lh5AJdHBT33Guw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4g5KvW4Gdpzl6B for ; Wed, 29 Apr 2026 14:49:27 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 3a9f9 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Wed, 29 Apr 2026 14:49:27 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org Cc: Mariusz Zaborski From: Mark Johnston Subject: git: a872c32f389e - releng/14.3 - libnv: switch fd_wait() from select(2) to poll(2) List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: markj X-Git-Repository: src X-Git-Refname: refs/heads/releng/14.3 X-Git-Reftype: branch X-Git-Commit: a872c32f389eb855f1a2caae69485c834c4c1d5c Auto-Submitted: auto-generated Date: Wed, 29 Apr 2026 14:49:27 +0000 Message-Id: <69f21a77.3a9f9.344b8d10@gitrepo.freebsd.org> The branch releng/14.3 has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=a872c32f389eb855f1a2caae69485c834c4c1d5c commit a872c32f389eb855f1a2caae69485c834c4c1d5c Author: Mariusz Zaborski AuthorDate: 2026-04-28 14:35:10 +0000 Commit: Mark Johnston CommitDate: 2026-04-28 20:33:04 +0000 libnv: switch fd_wait() from select(2) to poll(2) The previous implementation used FD_SET() on a stack-allocated fd_set, which is an out-of-bounds write whenever the socket fd is >= FD_SETSIZE (1024). Approved by: so Security: FreeBSD-SA-26:16.libnv Security: CVE-2026-39457 Reported by: Joshua Rogers of AISLE Research Team (https://aisle.com/) Reviewed by: markj Differential Revision: https://reviews.freebsd.org/D56689 --- lib/libnv/msgio.c | 12 +++---- lib/libnv/tests/nvlist_send_recv_test.c | 56 +++++++++++++++++++++++++++++++++ 2 files changed, 62 insertions(+), 6 deletions(-) diff --git a/lib/libnv/msgio.c b/lib/libnv/msgio.c index 002c626647d9..d972ced3c86c 100644 --- a/lib/libnv/msgio.c +++ b/lib/libnv/msgio.c @@ -33,10 +33,10 @@ #include #include #include -#include #include #include +#include #include #include #include @@ -87,14 +87,14 @@ msghdr_add_fd(struct cmsghdr *cmsg, int fd) static void fd_wait(int fd, bool doread) { - fd_set fds; + struct pollfd pfd; PJDLOG_ASSERT(fd >= 0); - FD_ZERO(&fds); - FD_SET(fd, &fds); - (void)select(fd + 1, doread ? &fds : NULL, doread ? NULL : &fds, - NULL, NULL); + pfd.fd = fd; + pfd.events = doread ? POLLIN : POLLOUT; + pfd.revents = 0; + (void)poll(&pfd, 1, -1); } static int diff --git a/lib/libnv/tests/nvlist_send_recv_test.c b/lib/libnv/tests/nvlist_send_recv_test.c index cd97ccb6b9b9..c60428c79978 100644 --- a/lib/libnv/tests/nvlist_send_recv_test.c +++ b/lib/libnv/tests/nvlist_send_recv_test.c @@ -28,6 +28,8 @@ #include #include +#include +#include #include #include #include @@ -534,6 +536,59 @@ ATF_TC_BODY(nvlist_send_recv__send_nvlist__stream, tc) nvlist_send_recv__send_nvlist(SOCK_STREAM); } +/* + * Regression test for fd_wait(): the previous select(2)-based implementation + * called FD_SET() unconditionally, which is an out-of-bounds stack write when + * the socket fd is >= FD_SETSIZE. Force the socketpair fds above FD_SETSIZE + * and verify a full nvlist round-trip still works. + */ +ATF_TC_WITHOUT_HEAD(nvlist_send_recv__highfd); +ATF_TC_BODY(nvlist_send_recv__highfd, tc) +{ + struct rlimit rl; + nvlist_t *nvl; + int socks[2], hi_send, hi_recv, status; + pid_t pid; + + hi_send = FD_SETSIZE + 5; + hi_recv = FD_SETSIZE + 6; + + rl.rlim_cur = rl.rlim_max = hi_recv + 1; + if (setrlimit(RLIMIT_NOFILE, &rl) != 0) + atf_tc_skip("cannot raise RLIMIT_NOFILE: %s", strerror(errno)); + + ATF_REQUIRE(socketpair(PF_UNIX, SOCK_STREAM, 0, socks) == 0); + ATF_REQUIRE(dup2(socks[0], hi_recv) == hi_recv); + ATF_REQUIRE(dup2(socks[1], hi_send) == hi_send); + (void)close(socks[0]); + (void)close(socks[1]); + + pid = fork(); + ATF_REQUIRE(pid >= 0); + if (pid == 0) { + /* Child: send. */ + (void)close(hi_recv); + nvl = nvlist_create(0); + nvlist_add_string(nvl, "key", "value"); + if (nvlist_send(hi_send, nvl) != 0) + err(EXIT_FAILURE, "nvlist_send"); + nvlist_destroy(nvl); + _exit(0); + } + + (void)close(hi_send); + nvl = nvlist_recv(hi_recv, 0); + ATF_REQUIRE(nvl != NULL); + ATF_REQUIRE(nvlist_error(nvl) == 0); + ATF_REQUIRE(nvlist_exists_string(nvl, "key")); + ATF_REQUIRE(strcmp(nvlist_get_string(nvl, "key"), "value") == 0); + nvlist_destroy(nvl); + + ATF_REQUIRE(waitpid(pid, &status, 0) == pid); + ATF_REQUIRE(status == 0); + (void)close(hi_recv); +} + ATF_TC_WITHOUT_HEAD(nvlist_send_recv__send_closed_fd__dgram); ATF_TC_BODY(nvlist_send_recv__send_closed_fd__dgram, tc) { @@ -737,6 +792,7 @@ ATF_TP_ADD_TCS(tp) ATF_TP_ADD_TC(tp, nvlist_send_recv__send_nvlist__dgram); ATF_TP_ADD_TC(tp, nvlist_send_recv__send_nvlist__stream); + ATF_TP_ADD_TC(tp, nvlist_send_recv__highfd); ATF_TP_ADD_TC(tp, nvlist_send_recv__send_closed_fd__dgram); ATF_TP_ADD_TC(tp, nvlist_send_recv__send_closed_fd__stream); ATF_TP_ADD_TC(tp, nvlist_send_recv__send_many_fds__dgram); From nobody Wed Apr 29 14:49:26 2026 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4g5KvW5RNlz6bkmB for ; Wed, 29 Apr 2026 14:49:27 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R13" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4g5KvV64mrz4KXT for ; Wed, 29 Apr 2026 14:49:26 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1777474166; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=LIV4RnW/OEKoCZNOHCN8Bg8NWp3Hki0O3/vRnjbObqA=; b=YHCJ6kN6IdqM1r5bjYNpCPnFBsL0maslUsZ3FHLXn2a5ZXEQhA7G7s0X0tvvMtqH0qMUzs K45BkuNFj53nciMxAAzMY1FLNUD6ODh6L7Gayb+S5XTfK9xOuK1TLWXzLL0QeR2UFJYOP5 8NoYlWYjn3V7wbZYRxLPRPl+kXm9Xb5LsaqJ1apZpTxLqhexOUV+XTYsrxVsze33j+fX1Q BX0l46yMgjAsPs5SdcbkCh9ws3GiWG+90BE6HqYPWIud2fyX1XszIOfdzmkpMR1GQC4JFS 2e6+RfwfhINXD/Nv/7ac0aBqvmKHG4RTC0INK/cL+sdqZ0J+XolaLROx9Xbeaw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1777474166; a=rsa-sha256; cv=none; b=ZnKh7WaysCWxotIcgnkAFody+BLUg4Y4kxVhP3xt6LKNd/2pKXIS41rm9c/3RnokwSh/NE 0/cu1nemJG/TMnUla8MkdLwETQ9E+0brp8qPyz0y4EbBPnH4jagaR+AMVnXyZa+r0Vg1LZ wO3vQ0i62XsRrFXBMDTBQ/nnyhR1tSBV3xiHYeTb1NNTsvCoHVl8yhyDH/CkznLnPlhsTI 14bIXF4dIy/YHRJhqqybdZ+TO91M+BqjicmKJwr9oLA7A4tF5h8mx1C6ZVVSRGN7jJzaWM 8adcQALutNOoYVH7huvEkft0KqbxaeiKnMrTEcZzJzvwlzQ6FJKbOWqU60a0eA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1777474166; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=LIV4RnW/OEKoCZNOHCN8Bg8NWp3Hki0O3/vRnjbObqA=; b=uo5Auqei7ac407rMH5QkDl2W0b5mLJNUTC6zthFSE4PkAlSPYd63ZiTDtaSg7uu5obs6jX 2pRAnbgwoSQV/N7oTNMwEen5wM9T7EiGi3gyT3Os7jDgSejcmfm1vg2El5PgmAWwV1IYl4 WJ7BABs7Rhgc/RaITy7nmOM+tWfQVKV27C2bvtRP3O8+OdfGTJDpi+mBrvFYafz0Mbfnkc 4Q1vFS87kctxLnfeAJkMLrgoWvJE0ugq+njpOYJE2ykmbl+CabPGmQpPNvKYZW6FZ1sVwb fCkkvjXHse4L7W7/8JNdONBwq21UO30x/nYz1FwHqW80ECiLMimmNnINIk/RMg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4g5KvV5199zl69 for ; Wed, 29 Apr 2026 14:49:26 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 3cb76 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Wed, 29 Apr 2026 14:49:26 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org Cc: Mariusz Zaborski From: Mark Johnston Subject: git: 0963be1dbf88 - releng/14.3 - libnv: add tests to verify potential overflow issues List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: markj X-Git-Repository: src X-Git-Refname: refs/heads/releng/14.3 X-Git-Reftype: branch X-Git-Commit: 0963be1dbf8886423c0c4efade79661989db9a77 Auto-Submitted: auto-generated Date: Wed, 29 Apr 2026 14:49:26 +0000 Message-Id: <69f21a76.3cb76.236c649e@gitrepo.freebsd.org> The branch releng/14.3 has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=0963be1dbf8886423c0c4efade79661989db9a77 commit 0963be1dbf8886423c0c4efade79661989db9a77 Author: Mariusz Zaborski AuthorDate: 2024-08-29 13:46:01 +0000 Commit: Mark Johnston CommitDate: 2026-04-28 20:33:04 +0000 libnv: add tests to verify potential overflow issues Approved by: so Differential Revision: https://reviews.freebsd.org/D46131 (cherry picked from commit 241a7ddd7112982ed41ccdd047c1dad59ee0256e) --- lib/libnv/tests/Makefile | 9 ++ lib/libnv/tests/nvlist_send_recv_test.c | 193 ++++++++++++++++++++++++++++++++ sys/contrib/libnv/nv_impl.h | 8 ++ sys/contrib/libnv/nvlist.c | 7 -- 4 files changed, 210 insertions(+), 7 deletions(-) diff --git a/lib/libnv/tests/Makefile b/lib/libnv/tests/Makefile index fc377e38ce83..aea416539c4a 100644 --- a/lib/libnv/tests/Makefile +++ b/lib/libnv/tests/Makefile @@ -1,7 +1,16 @@ +.include ATF_TESTS_C= \ nvlist_send_recv_test +.PATH: ${SRCTOP}/lib/libnv +SRCS.nvlist_send_recv_test= msgio.c nvlist_send_recv_test.c +CFLAGS.nvlist_send_recv_test+=-I${SRCTOP}/sys/contrib/libnv +CFLAGS.nvlist_send_recv_test+=-I${SRCTOP}/lib/libnv +.if ${MK_ASAN} != "yes" +CFLAGS.nvlist_send_recv_test+=-DNO_ASAN +.endif + ATF_TESTS_CXX= \ cnv_tests \ dnv_tests \ diff --git a/lib/libnv/tests/nvlist_send_recv_test.c b/lib/libnv/tests/nvlist_send_recv_test.c index 5d4f392ed49c..cd97ccb6b9b9 100644 --- a/lib/libnv/tests/nvlist_send_recv_test.c +++ b/lib/libnv/tests/nvlist_send_recv_test.c @@ -44,6 +44,9 @@ #include +#include +#include + #define ALPHABET "abcdefghijklmnopqrstuvwxyz" #define fd_is_valid(fd) (fcntl((fd), F_GETFL) != -1 || errno != EBADF) @@ -543,6 +546,192 @@ ATF_TC_BODY(nvlist_send_recv__send_closed_fd__stream, tc) nvlist_send_recv__send_closed_fd(SOCK_STREAM); } +ATF_TC_WITHOUT_HEAD(nvlist_send_recv__overflow_header_size); +ATF_TC_BODY(nvlist_send_recv__overflow_header_size, tc) +{ + nvlist_t *nvl; + void *packed; + size_t packed_size; + struct nvlist_header *header; + int fd, socks[2], status; + pid_t pid; + +#ifdef NO_ASAN + atf_tc_skip("This test requires ASAN"); +#endif + + ATF_REQUIRE_EQ(socketpair(PF_UNIX, SOCK_STREAM, 0, socks), 0); + + pid = fork(); + ATF_REQUIRE(pid >= 0); + + if (pid == 0) { + /* Child. */ + fd = socks[0]; + close(socks[1]); + + nvl = nvlist_create(0); + ATF_REQUIRE(nvl != NULL); + ATF_REQUIRE(nvlist_empty(nvl)); + + packed = nvlist_pack(nvl, &packed_size); + ATF_REQUIRE(packed != NULL); + ATF_REQUIRE(packed_size >= sizeof(struct nvlist_header)); + + header = (struct nvlist_header *)packed; + header->nvlh_size = SIZE_MAX - sizeof(struct nvlist_header) + 2; + + ATF_REQUIRE_EQ(write(fd, packed, packed_size), + (ssize_t)sizeof(struct nvlist_header)); + + nvlist_destroy(nvl); + free(packed); + + exit(0); + } else { + /* Parent */ + fd = socks[1]; + close(socks[0]); + + errno = 0; + nvl = nvlist_recv(fd, 0); + ATF_REQUIRE(nvl == NULL); + + /* + * Make sure it has failed on EINVAL, and not on + * errors returned by malloc or recv. + */ + ATF_REQUIRE(errno == EINVAL); + + ATF_REQUIRE(waitpid(pid, &status, 0) == pid); + ATF_REQUIRE(status == 0); + close(fd); + } +} + +ATF_TC_WITHOUT_HEAD(nvlist_send_recv__invalid_fd_size); +ATF_TC_BODY(nvlist_send_recv__invalid_fd_size, tc) +{ + nvlist_t *nvl; + void *packed; + size_t packed_size; + struct nvlist_header *header; + int fd, socks[2], status; + pid_t pid; + + ATF_REQUIRE_EQ(socketpair(PF_UNIX, SOCK_STREAM, 0, socks), 0); + + pid = fork(); + ATF_REQUIRE(pid >= 0); + + if (pid == 0) { + /* Child. */ + fd = socks[0]; + close(socks[1]); + + nvl = nvlist_create(0); + ATF_REQUIRE(nvl != NULL); + ATF_REQUIRE(nvlist_empty(nvl)); + + nvlist_add_string(nvl, "nvl/string", "test"); + ATF_REQUIRE_EQ(nvlist_error(nvl), 0); + + packed = nvlist_pack(nvl, &packed_size); + ATF_REQUIRE(packed != NULL); + ATF_REQUIRE(packed_size >= sizeof(struct nvlist_header)); + + header = (struct nvlist_header *)packed; + header->nvlh_descriptors = 0x20; + + ATF_REQUIRE_EQ(write(fd, packed, packed_size), + (ssize_t)packed_size); + + nvlist_destroy(nvl); + free(packed); + + exit(0); + } else { + /* Parent */ + fd = socks[1]; + close(socks[0]); + + nvl = nvlist_recv(fd, 0); + ATF_REQUIRE(nvl == NULL); + + ATF_REQUIRE(waitpid(pid, &status, 0) == pid); + ATF_REQUIRE(status == 0); + } + + close(fd); +} + +ATF_TC_WITHOUT_HEAD(nvlist_send_recv__overflow_fd_size); +ATF_TC_BODY(nvlist_send_recv__overflow_fd_size, tc) +{ + nvlist_t *nvl; + void *packed; + size_t packed_size; + struct nvlist_header *header; + int fd, socks[2], fds[1], status; + pid_t pid; + + ATF_REQUIRE_EQ(socketpair(PF_UNIX, SOCK_STREAM, 0, socks), 0); + + pid = fork(); + ATF_REQUIRE(pid >= 0); + + if (pid == 0) { + /* Child. */ + fd = socks[0]; + close(socks[1]); + + nvl = nvlist_create(0); + ATF_REQUIRE(nvl != NULL); + ATF_REQUIRE(nvlist_empty(nvl)); + + nvlist_add_string(nvl, "nvl/string", "test"); + ATF_REQUIRE_EQ(nvlist_error(nvl), 0); + + packed = nvlist_pack(nvl, &packed_size); + ATF_REQUIRE(packed != NULL); + ATF_REQUIRE(packed_size >= sizeof(struct nvlist_header)); + + header = (struct nvlist_header *)packed; + header->nvlh_descriptors = 0x4000000000000002; + + ATF_REQUIRE_EQ(write(fd, packed, packed_size), + (ssize_t)packed_size); + + fds[0] = dup(STDERR_FILENO); + ATF_REQUIRE(fds[0] >= 0); + ATF_REQUIRE_EQ(fd_send(fd, fds, 1), 0); + + nvlist_destroy(nvl); + free(packed); + + close(fds[0]); + close(fd); + + exit(0); + } else { + /* Parent */ + fd = socks[1]; + close(socks[0]); + + nvl = nvlist_recv(fd, 0); + ATF_REQUIRE(nvl == NULL); + + /* Make sure that fd was not parsed by nvlist */ + ATF_REQUIRE(fd_recv(fd, fds, 1) == 0); + + ATF_REQUIRE(waitpid(pid, &status, 0) == pid); + ATF_REQUIRE(status == 0); + + close(fds[0]); + close(fd); + } +} + ATF_TP_ADD_TCS(tp) { @@ -553,5 +742,9 @@ ATF_TP_ADD_TCS(tp) ATF_TP_ADD_TC(tp, nvlist_send_recv__send_many_fds__dgram); ATF_TP_ADD_TC(tp, nvlist_send_recv__send_many_fds__stream); + ATF_TP_ADD_TC(tp, nvlist_send_recv__overflow_header_size); + ATF_TP_ADD_TC(tp, nvlist_send_recv__invalid_fd_size); + ATF_TP_ADD_TC(tp, nvlist_send_recv__overflow_fd_size); + return (atf_no_error()); } diff --git a/sys/contrib/libnv/nv_impl.h b/sys/contrib/libnv/nv_impl.h index e9cd3ffabc3f..4ac57fc7b497 100644 --- a/sys/contrib/libnv/nv_impl.h +++ b/sys/contrib/libnv/nv_impl.h @@ -42,6 +42,14 @@ struct nvpair; typedef struct nvpair nvpair_t; #endif +struct nvlist_header { + uint8_t nvlh_magic; + uint8_t nvlh_version; + uint8_t nvlh_flags; + uint64_t nvlh_descriptors; + uint64_t nvlh_size; +} __packed; + #define NV_TYPE_NVLIST_ARRAY_NEXT 254 #define NV_TYPE_NVLIST_UP 255 diff --git a/sys/contrib/libnv/nvlist.c b/sys/contrib/libnv/nvlist.c index 92d6e655876a..00ba3b41f3a3 100644 --- a/sys/contrib/libnv/nvlist.c +++ b/sys/contrib/libnv/nvlist.c @@ -118,13 +118,6 @@ MALLOC_DEFINE(M_NVLIST, "nvlist", "kernel nvlist"); #define NVLIST_HEADER_MAGIC 0x6c #define NVLIST_HEADER_VERSION 0x00 -struct nvlist_header { - uint8_t nvlh_magic; - uint8_t nvlh_version; - uint8_t nvlh_flags; - uint64_t nvlh_descriptors; - uint64_t nvlh_size; -} __packed; nvlist_t * nvlist_create(int flags) From nobody Wed Apr 29 14:49:28 2026 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4g5KvX6nxqz6bksF for ; Wed, 29 Apr 2026 14:49:28 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R13" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4g5KvX3l1Vz4KXX for ; Wed, 29 Apr 2026 14:49:28 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1777474168; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=XTyx8t0G+YC1k0VCGb8lEq76a/hr9PAqfCOoQ7fnmcI=; b=NUi0VMfc05L2CW6iu2fLA6HHJAWo4hP0V9geqo5udajXcWjXJDwfmVdfGPi9UJXU7oBMn0 VOT04jHhZC+oswZMNIhnMS/uRBs0dOI2SD3ZV/CJIV7KIe7+SVYHSZNGeEk20/gHjctfRq jzH3Oi88c/RvE52IFsVN8mMiPM9GS/TF+W9WkDJ0sIAJNv+bMJcXF4FTCb90Zs2e4AOf7k 9eHdIBZHM4URXAhs2XRlk07v8ja7cqf4ApZlNVE7k4C3DQ5V3ZAfShywYKl5j+DfXQSYXB WhCDOV1sjgjjN6KgPblbljysVO6BB/YJJViToi9ttoQv6wOSjNwjS3TdspHezQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1777474168; a=rsa-sha256; cv=none; b=L85KH+wIDkGNvzbL9FFmVEGBaqq2LGh9Mf/1MzrobZsldSnJctSf7lxR6QM1TZjZunzL+1 hNS8nxQ+2z67LkyV46Zvl0cWtFe3bi2fcvHs2gqa/FguTDX5yKQu2nnxH/BbcevEi0D6eM Ehn1kpQ97b3A5sA+jQyKhznq6tiCpSw/6kI2ngNWa2mCs0TIZIdSSk3FausqZso1POavTp hZ/spKl77cl/LUa43Um156EaQDfzBmT1ObYdjcJtFs8Mk3JG3Q+pwIaaQe8GjHW0KC4seh 4ACcYMqCB6eqNodA6cFPETax3TX7mVTgc4QYDJwXDotP2Kn9IMrIBLhePH01Iw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1777474168; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=XTyx8t0G+YC1k0VCGb8lEq76a/hr9PAqfCOoQ7fnmcI=; b=IaX0SEL06DDd8uH/knaRjGddltYqoa2npCj6nFlgaLIsvdIkbdtl+fOYvJltV8IIholq2y EgQnwPfuhjfq9cDkTHTNWhGub4IwgXgZ8SooJC/adYEIdCJC18P/aVdpC1TGUGDs4x9+Uq BPp08+BjsaCJ5YlgGEZafj9FAeqxfl1X4mlrwYGYh2CwRZSfvJ9atF6D906yaLoCfHwjxb rFFJ/Q9q97uq1KY108nJ2n8DvtmDq/sARwFmMNyr4YeYYSBHpwX7IeZ0/KdER5VxpcEmJ4 Ga1074lAE8nKHa7rn+99lJDdp4QsBqasCRVup1IaIV4MkMOJD18QQONzvSoTCw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4g5KvX31l0zl2p for ; Wed, 29 Apr 2026 14:49:28 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 3cba4 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Wed, 29 Apr 2026 14:49:28 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org Cc: Mariusz Zaborski From: Mark Johnston Subject: git: aa15809f85de - releng/14.3 - libnv: fix heap overflow in nvlist_recv() List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: markj X-Git-Repository: src X-Git-Refname: refs/heads/releng/14.3 X-Git-Reftype: branch X-Git-Commit: aa15809f85deef33167bf74f82144d714a884548 Auto-Submitted: auto-generated Date: Wed, 29 Apr 2026 14:49:28 +0000 Message-Id: <69f21a78.3cba4.e8ebe00@gitrepo.freebsd.org> The branch releng/14.3 has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=aa15809f85deef33167bf74f82144d714a884548 commit aa15809f85deef33167bf74f82144d714a884548 Author: Mariusz Zaborski AuthorDate: 2026-04-28 14:36:09 +0000 Commit: Mark Johnston CommitDate: 2026-04-28 20:33:04 +0000 libnv: fix heap overflow in nvlist_recv() nvlist_check_header() validated nvlh_size for overflow before performing conversion. An mallicous user can set NV_FLAG_BIG_ENDIAN in the header and craft nvlh_size so that the orginall value passes the check, but after the conversion the sizeof(nvlist_header) + size can overflow. This can lead to a heap buffer overflow. Approved by: so Security: FreeBSD-SA-26:17.libnv Security: CVE-2026-35547 Fixes: 36fa90dbde0060aacb5677d0b113ee168e839071 Reviewed by: markj Differential Revision: https://reviews.freebsd.org/D56342 --- lib/libnv/tests/nvlist_send_recv_test.c | 57 +++++++++++++++++++++++++++++++++ sys/contrib/libnv/nvlist.c | 9 +++--- 2 files changed, 62 insertions(+), 4 deletions(-) diff --git a/lib/libnv/tests/nvlist_send_recv_test.c b/lib/libnv/tests/nvlist_send_recv_test.c index c60428c79978..e1dbaa4014e8 100644 --- a/lib/libnv/tests/nvlist_send_recv_test.c +++ b/lib/libnv/tests/nvlist_send_recv_test.c @@ -1,5 +1,8 @@ /*- + * SPDX-License-Identifier: BSD-2-Clause + * * Copyright (c) 2013 The FreeBSD Foundation + * Copyright (c) 2024-2026 Mariusz Zaborski * * This software was developed by Pawel Jakub Dawidek under sponsorship from * the FreeBSD Foundation. @@ -664,6 +667,58 @@ ATF_TC_BODY(nvlist_send_recv__overflow_header_size, tc) } } +ATF_TC_WITHOUT_HEAD(nvlist_send_recv__overflow_big_endian_size); +ATF_TC_BODY(nvlist_send_recv__overflow_big_endian_size, tc) +{ + static const unsigned char payload[] = { + 0x6c, /* magic */ + 0x00, /* version */ + 0x80, /* flags: NV_FLAG_BIG_ENDIAN */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xf5, + }; + nvlist_t *nvl; + int sv[2]; + + ATF_REQUIRE_EQ(socketpair(AF_UNIX, SOCK_STREAM, 0, sv), 0); + ATF_REQUIRE_EQ(write(sv[1], payload, sizeof(payload)), + (ssize_t)sizeof(payload)); + ATF_REQUIRE_EQ(close(sv[1]), 0); + + errno = 0; + nvl = nvlist_recv(sv[0], 0); + ATF_REQUIRE(nvl == NULL); + ATF_REQUIRE_EQ(errno, EINVAL); + + ATF_REQUIRE_EQ(close(sv[0]), 0); +} + +ATF_TC_WITHOUT_HEAD(nvlist_send_recv__overflow_little_endian_size); +ATF_TC_BODY(nvlist_send_recv__overflow_little_endian_size, tc) +{ + static const unsigned char payload[] = { + 0x6c, /* magic */ + 0x00, /* version */ + 0x00, /* flags */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0xf5, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, + }; + nvlist_t *nvl; + int sv[2]; + + ATF_REQUIRE_EQ(socketpair(AF_UNIX, SOCK_STREAM, 0, sv), 0); + ATF_REQUIRE_EQ(write(sv[1], payload, sizeof(payload)), + (ssize_t)sizeof(payload)); + ATF_REQUIRE_EQ(close(sv[1]), 0); + + errno = 0; + nvl = nvlist_recv(sv[0], 0); + ATF_REQUIRE(nvl == NULL); + ATF_REQUIRE_EQ(errno, EINVAL); + + ATF_REQUIRE_EQ(close(sv[0]), 0); +} + ATF_TC_WITHOUT_HEAD(nvlist_send_recv__invalid_fd_size); ATF_TC_BODY(nvlist_send_recv__invalid_fd_size, tc) { @@ -799,6 +854,8 @@ ATF_TP_ADD_TCS(tp) ATF_TP_ADD_TC(tp, nvlist_send_recv__send_many_fds__stream); ATF_TP_ADD_TC(tp, nvlist_send_recv__overflow_header_size); + ATF_TP_ADD_TC(tp, nvlist_send_recv__overflow_big_endian_size); + ATF_TP_ADD_TC(tp, nvlist_send_recv__overflow_little_endian_size); ATF_TP_ADD_TC(tp, nvlist_send_recv__invalid_fd_size); ATF_TP_ADD_TC(tp, nvlist_send_recv__overflow_fd_size); diff --git a/sys/contrib/libnv/nvlist.c b/sys/contrib/libnv/nvlist.c index 00ba3b41f3a3..cbd35ab67dd2 100644 --- a/sys/contrib/libnv/nvlist.c +++ b/sys/contrib/libnv/nvlist.c @@ -1022,10 +1022,6 @@ static bool nvlist_check_header(struct nvlist_header *nvlhdrp) { - if (nvlhdrp->nvlh_size > SIZE_MAX - sizeof(*nvlhdrp)) { - ERRNO_SET(EINVAL); - return (false); - } if (nvlhdrp->nvlh_magic != NVLIST_HEADER_MAGIC) { ERRNO_SET(EINVAL); return (false); @@ -1045,6 +1041,11 @@ nvlist_check_header(struct nvlist_header *nvlhdrp) nvlhdrp->nvlh_descriptors = be64toh(nvlhdrp->nvlh_descriptors); } #endif + if (nvlhdrp->nvlh_size > SIZE_MAX - sizeof(*nvlhdrp)) { + ERRNO_SET(EINVAL); + return (false); + } + return (true); } From nobody Wed Apr 29 14:49:29 2026 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4g5Kvb1bRZz6bkvv for ; Wed, 29 Apr 2026 14:49:31 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R13" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4g5KvZ11vZz4KVQ for ; Wed, 29 Apr 2026 14:49:30 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1777474170; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=V9mE+Hm1nezKL4Qi20dgqxJfKBPiR/hjfSUf/Jgnk4Y=; b=XLdRfVwd3RKoqRMgXUT/z0yuu+Atbj0sXA37hqZFEO4LlB30l5yAHuanGtic27h/VTrUDD cQQjZBvpRT57IvIWyRH9yzCUF+CpKNWRYphMvcHpodT+f+DAzkMFYRvi/drE1MXkfPckN1 cD+HqBnmIqykXCkxCYbFYN9HRq6mXoYZmwqHjielKUNwWLH8u00560YoqgE4YnGNQbbz+n ndG2EtCVcv+KZ5u+VpQTZlmAs8VpEZa1z6pGRUR0KiYrT0uvti9f+KZRCdyzcFmDvTlBJr tiCkBJRwF9VDKYAkfOhJquQ0/enMoGR7slKkAo+tI6jbe8Y0ySEC9Ur1PD8dzQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1777474170; a=rsa-sha256; cv=none; b=r7ggX7ckhh3/ukIvEkdrk1mgC2bK98cI4gA6KIBukPm3WUhJuysN2yOTivdMEhoSCLWC0z duY03OwVs9ynGoTekXFvxVv/KWhxlSqi/8izC2AhFmYur5YCj8GGTf6P4rPJuy9nZSbC6u +kTfUdIVKT6LGxUSDl4i9TTqkLugX5yOese1YOikjc5BoE6LAyWsaKK00Th+o5zgifiaw4 nwbrb1fixDloAtCNEjktdDYSUaFGyQ1VpmJdYUSYoNY/8Q2rF8JYItDGvWbV+VxhLrOO8m mQBvivrntVoLwJeNM9V0IrQQZH3HoK1elXghRmvWHOSBjS+iopmwcKpwRtCMdg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1777474170; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=V9mE+Hm1nezKL4Qi20dgqxJfKBPiR/hjfSUf/Jgnk4Y=; b=kGFi+h9HxjbWFTnwaiMWh5vrIgm/WgRCguk3+okXq8gCrccjD9UREfzK5TbM9S0a/5kL/w 4K115AHlIk/71I5q67g7e7aLpsIsdeLl1xDxHviYUN9HUZUcPJ/Yb8QA9h0QSwM+R5m4YT m4XhiWchyQxVQlTEp7ado6732R/ADo/1sSl77BiM4LFGvu1KyDXpRnsQauwF1wEhqygcQS LBbiLzdW/SOhTEeS6XAFMKKhFo56NFGg689mTHhZBx7WYEaJWCZ321jAdVZbFeddZlNLoN eCsV05Zfet0rswVpWG2ukahOsGgeMumVr9wLFs9mxLFisgnXKjlubBv6AbZhQQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4g5KvY6BYxzlL9 for ; Wed, 29 Apr 2026 14:49:29 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 3d05d by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Wed, 29 Apr 2026 14:49:29 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Mark Johnston Subject: git: 31900fbe281f - releng/14.3 - Add UPDATING entries and bump version List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: markj X-Git-Repository: src X-Git-Refname: refs/heads/releng/14.3 X-Git-Reftype: branch X-Git-Commit: 31900fbe281f595718d20c0aa26b10ab2efa138d Auto-Submitted: auto-generated Date: Wed, 29 Apr 2026 14:49:29 +0000 Message-Id: <69f21a79.3d05d.15c7ffb0@gitrepo.freebsd.org> The branch releng/14.3 has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=31900fbe281f595718d20c0aa26b10ab2efa138d commit 31900fbe281f595718d20c0aa26b10ab2efa138d Author: Mark Johnston AuthorDate: 2026-04-28 20:29:58 +0000 Commit: Mark Johnston CommitDate: 2026-04-28 20:33:05 +0000 Add UPDATING entries and bump version Approved by: so --- UPDATING | 26 ++++++++++++++++++++++++++ sys/conf/newvers.sh | 2 +- 2 files changed, 27 insertions(+), 1 deletion(-) diff --git a/UPDATING b/UPDATING index 2481d0187180..ae6ab355ce23 100644 --- a/UPDATING +++ b/UPDATING @@ -12,6 +12,32 @@ Items affecting the ports and packages system can be found in /usr/ports/UPDATING. Please read that file before updating system packages and/or ports. +20260429: + 14.3-RELEASE-p12 SA-26:12.dhclient + SA-26:13.exec + SA-26:14.pf + SA-26:15.dhclient + SA-26:16.libnv + SA-26:17.libnv + EN-26:09.tzdata + EN-26:10.amd64 + + Remote code execution via malicious DHCP options. [SA-26:12.dhclient] + + Local privilege escalation via execve(). [SA-26:13.exec] + + pf can overflow the stack parsing crafted SCTP packets. [SA-26:14.pf] + + Remotely triggerable out-of-bounds heap write in dhclient. [SA-26:15.dhclient] + + Stack overflow via select() file descriptor set overflow. [SA-26:16.libnv] + + Heap overflow in libnv. [SA-26:17.libnv] + + Timezone database information update. [EN-26:09.tzdata] + + TLB invalidation bug on AMD systems with INVLPGB. [EN-26:10.amd64] + 20260421: 14.3-RELEASE-p11 SA-26:10.tty SA-26:11.amd64 diff --git a/sys/conf/newvers.sh b/sys/conf/newvers.sh index e4d9bf1b464b..95f605916ed3 100644 --- a/sys/conf/newvers.sh +++ b/sys/conf/newvers.sh @@ -53,7 +53,7 @@ TYPE="FreeBSD" REVISION="14.3" -BRANCH="RELEASE-p11" +BRANCH="RELEASE-p12" if [ -n "${BRANCH_OVERRIDE}" ]; then BRANCH=${BRANCH_OVERRIDE} fi From nobody Wed Apr 29 14:49:39 2026 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4g5Kvn0zZVz6bkjV for ; Wed, 29 Apr 2026 14:49:41 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R13" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4g5Kvm0X0Dz4Kbv for ; Wed, 29 Apr 2026 14:49:40 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1777474180; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=zjJ0TwXgHZ577qIsofK34t++Mz8H0vqByqa/R3DvJqg=; b=HQVw3iaTxsZcc6cz8fL6byU2qmKu58Z7HdkzCFZeUXzxSMF+Q/oMyldV7MHUPYVFPqHEBp 4P+zPi/LT/31FmOHvqGUFV84oDrYlRTkz31dgKVyEzfjeSfJ8wm3wEkJok8DeabDytJHWW j0CQOuRHK1vzqykgkMpicse8Cr9xr0/6NliSQCSriDQNiN+P4WjMuJ6dyURv9dfezyvq5T jRo25Fx5TUyLgdVNuj8FZVxqAhrRHaTOCCpcfinMggjKAahhwb++qKuGl5KCx6kiRIKiUU KosJ0qzCESIVrRzyr3zJiPjfMz662m4de+zDdW7shPoCXHUF9mnn02K9yGZP9Q== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1777474180; a=rsa-sha256; cv=none; b=nb8sblpNNyhhyTiylBzp03n/SZ5rFwfi92590hsH+XSa6IUMtGrZTLxFufMkAKpbLh39KA 0ybXTuF66duTRy3BlnnL8ZMhtXhX4tG/+qHoSQ+1DWQE/1kkXAIDv+r6t34oxhPNgrenoh DJlQibezR96uKm+9c7ZFwxHOJsuTt44PIcm5akdw8yrLq0AvxHie4Ht38NtqdkaPsfQjWl ck0a6y7lSl5eEH2OR4qMlG1CsHhDYM303HsLmHDRdXnnCpoYYzdyQr0MCll8lsjBcgLjGY xb6Y4cINvnrvTF86t8itu/0jnorwelo3Ydh3WlSZpW9GPrDVyGj9tya4LC0mGg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1777474180; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=zjJ0TwXgHZ577qIsofK34t++Mz8H0vqByqa/R3DvJqg=; b=DgUKIVAcDESgKL6P0PreWDQWhXvj/l28W/n5ew3jhCwzfKssdjybSd8ENYXb7CxwBoynFn 3E5DZwrHIMxFGSw+WftPwHM37T6huQ2LaSqMWuL/mPPIJSR69oNyEVnYD2P/pOGFNA+Xgs X/grffQm4161IC5cEl2boEDT/A/tnIYAfN3OkMQhGT89mPwKmAoyAkGNNilkgOSQBMo8if cfLTWynYIQ3fXvcWJ8Py4p+mUGQc5o6EkWvOl9+fbBLwnqSxua5SB7srAkSFuRJ+ka3MrL uy7znMyidXSNH9w2VXcK/rY9qrIpbE4b1e3417nFL7e3q2Rfu3ZV66fZRJrWxA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4g5Kvl54pZzlWy for ; Wed, 29 Apr 2026 14:49:39 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 3cebc by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Wed, 29 Apr 2026 14:49:39 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org Cc: Kyle Evans From: Mark Johnston Subject: git: b00785205990 - releng/14.4 - amd64: fix INVLPGB range invalidation List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: markj X-Git-Repository: src X-Git-Refname: refs/heads/releng/14.4 X-Git-Reftype: branch X-Git-Commit: b00785205990ca193feafff9ae4e3a3084a9bfb8 Auto-Submitted: auto-generated Date: Wed, 29 Apr 2026 14:49:39 +0000 Message-Id: <69f21a83.3cebc.43886504@gitrepo.freebsd.org> The branch releng/14.4 has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=b00785205990ca193feafff9ae4e3a3084a9bfb8 commit b00785205990ca193feafff9ae4e3a3084a9bfb8 Author: Kyle Evans AuthorDate: 2026-04-20 20:18:17 +0000 Commit: Mark Johnston CommitDate: 2026-04-28 20:33:58 +0000 amd64: fix INVLPGB range invalidation AMD64 Architecture Programmer's Manual Volume 3 says the following: > ECX[15:0] contains a count of the number of sequential pages to > invalidate in addition to the original virtual address, starting from > the virtual address specified in rAX. A count of 0 invalidates a > single page. ECX[31]=0 indicates to increment the virtual address at > the 4K boundary. ECX[31]=1 indicates to increment the virtual address > at the 2M boundary. The maximum count supported is reported in > CPUID function 8000_0008h, EDX[15:0]. ECX[31] being what we call INVLPGB_2M_CNT, signaling to increment the VA by 2M. > This instruction invalidates the TLB entry or entries, regardless of > the page size (4 Kbytes, 2 Mbytes, 4 Mbytes, or 1 Gbyte). [...] Combined with this, my interpretation of the current code is: if is aligned on a PDE boundary, we'll use INVLPGB_2M_CNT to try and invalidate PDEs with a single call, but that only works if is the start of at least 2M pages. Otherwise, if or any of the subsequent PDEs isn't actually a superpage, then we would actually only invalidate the *first* page within the PDE before skipping to the next PDE, leaving the remainder of the 4K pages in between as they were. The implication would seem to be that we would need to inspect the range that we're trying to invalidate if we're planning on using INVLPGB_2M_CNT at all, so this patch just simplifies it to a series of 4K invalidations. My gut feeling is that we likely still come out on top vs. the TLB shootdown we're avoiding. This seems to explain some issues we've seen lately with fdgrowtable() and kqueue on recent Zen4/Zen5 EPYC hardware, where we'd experience corruption that we can't explain. Approved by: so Security: FreeBSD-EN-26:10.amd64 PR: 293382 Reviewed by: alc, kib, markj (cherry picked from commit 1b8e5c02f5c07521129e06ff8ab7c660238fd75c) (cherry picked from commit ff11ae166cd9f8ae16a5c384d46aa1218f3ff013) --- sys/amd64/amd64/mp_machdep.c | 25 ++++++------------------- 1 file changed, 6 insertions(+), 19 deletions(-) diff --git a/sys/amd64/amd64/mp_machdep.c b/sys/amd64/amd64/mp_machdep.c index 00e99f9df192..bffe9f510216 100644 --- a/sys/amd64/amd64/mp_machdep.c +++ b/sys/amd64/amd64/mp_machdep.c @@ -726,25 +726,12 @@ smp_masked_invlpg_range(vm_offset_t addr1, vm_offset_t addr2, pmap_t pmap, addr2 = round_page(addr2); total = atop(addr2 - addr1); for (va = addr1; total > 0;) { - if ((va & PDRMASK) != 0 || total < NPDEPG) { - cnt = atop(NBPDR - (va & PDRMASK)); - if (cnt > total) - cnt = total; - if (cnt > invlpgb_maxcnt + 1) - cnt = invlpgb_maxcnt + 1; - invlpgb(INVLPGB_GLOB | INVLPGB_VA | va, 0, - cnt - 1); - va += ptoa(cnt); - total -= cnt; - } else { - cnt = total / NPTEPG; - if (cnt > invlpgb_maxcnt + 1) - cnt = invlpgb_maxcnt + 1; - invlpgb(INVLPGB_GLOB | INVLPGB_VA | va, 0, - INVLPGB_2M_CNT | (cnt - 1)); - va += cnt << PDRSHIFT; - total -= cnt * NPTEPG; - } + cnt = MIN(total, invlpgb_maxcnt + 1); + /* 4K increments because these may not be superpages. */ + invlpgb(INVLPGB_GLOB | INVLPGB_VA | va, 0, + cnt - 1); + va += ptoa(cnt); + total -= cnt; } tlbsync(); sched_unpin(); From nobody Wed Apr 29 14:49:38 2026 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4g5Kvm2ClCz6bkh2 for ; Wed, 29 Apr 2026 14:49:40 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R13" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4g5Kvl66hhz4Kbm for ; Wed, 29 Apr 2026 14:49:39 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1777474179; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=NUmOmNu1PsldjqMQKpdfQv7ovE24xCUVAQRSk9L+Bf0=; b=lw2C9+/Onnz88mRb2AzfK9Vc3/2Rpbue/bOTBkHvkw7jAsg2c4y3zkSMWqHHO5T/YiT6Ou kalGDglE51c4d/+bMgAXoVk5r68KBRNOGFsCFY7OAiDbIYiKJM3TvWvuOcI8bQ2ge3d58I FnIm0E9RdnJaiBthdRRU4WSqHDYJqSDJ1WabfZ3ia7QDl3+s4AiNUJvz262uPHiM5LT4pt YoJgMBdl48tM8lwTShWotoVwN+9BHopGqfHIUKuEyBhNqvefc+KOysAdZ1gkqJYD791zKs /a84DgW3vLpKAX3LITFucRJN3AiqK+0wKlc2NbxEyh17Xl+7IMbMVRI/Ah2tiw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1777474179; a=rsa-sha256; cv=none; b=jsDxJwIfIR6jS4bQQADOjNn86dfk8OWxvsMu+2bEvDlirR0lAIlKi0mSjwtceEWKxr2vxR Ouv0KsvrDJeQHvghzEnhnPJXsPSIDUMCzpWbw9zDKp8BkBBxe8hLZZ1n1scrdK5biLakjE MlC3xYL3azFjNtNzqBYPJrrs9kuvgzccKQK3SjKLGxG4DAz9BijXq0Nmcfnov16mUt4Ed3 oeEpqzVHEbw42EqVTDsBihG60v7B0V2rGRNrkcBRikqWRii1mi+AB41GWLBJsAvp2Lo6qg bZ5WyJu/3wWLpqzFRWAXI7Lp6q+gYkcizh+0vGSKB4tc34FPfqXSwHwoVSqbkQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1777474179; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=NUmOmNu1PsldjqMQKpdfQv7ovE24xCUVAQRSk9L+Bf0=; b=osSxWrUNKlat8utuIctr7wBexVGLyj5lG+sFA6i0XFM/z17RysS7N1YjaOV4zE7qvCoU7F To0V1H0qY7We9/GmHioGRFL2/IxmM0TG1QVZbma2sF9bsuS0ovwlUuULeKlmckfEfKAKI+ SaH0ZC7h4b8BFOPzzmOLp19VzPqMNXpKXsp6y7tO5tQ7X9mNWokCBMNLIKqu2eJqmtAugl uEjzRFfU5o/RbPLzOopFo68tH9zmKXMMGbMkTSdRKe769v4d2UqwID4e+l7NICrW3subhF jI5bZ4dGAPpnKcktfCjE1pmZrG0mEJvFDIryxpNIZ2t+/SlmeM/md5Ok19uwyA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4g5Kvk693nzl2t for ; Wed, 29 Apr 2026 14:49:38 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 3d533 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Wed, 29 Apr 2026 14:49:38 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org Cc: Philip Paeps From: Mark Johnston Subject: git: 677aeab69b13 - releng/14.4 - contrib/tzdata: import tzdata 2026a and 2026b List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: markj X-Git-Repository: src X-Git-Refname: refs/heads/releng/14.4 X-Git-Reftype: branch X-Git-Commit: 677aeab69b135a3aae8da64770892c67880319d2 Auto-Submitted: auto-generated Date: Wed, 29 Apr 2026 14:49:38 +0000 Message-Id: <69f21a82.3d533.5f02dd26@gitrepo.freebsd.org> The branch releng/14.4 has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=677aeab69b135a3aae8da64770892c67880319d2 commit 677aeab69b135a3aae8da64770892c67880319d2 Author: Philip Paeps AuthorDate: 2026-04-27 05:03:00 +0000 Commit: Mark Johnston CommitDate: 2026-04-28 20:33:58 +0000 contrib/tzdata: import tzdata 2026a and 2026b Changes: https://github.com/eggert/tz/blob/2026a/NEWS Changes: https://github.com/eggert/tz/blob/2026b/NEWS Approved by: so Security: FreeBSD-EN-26:09.tzdata (cherry picked from commit 6becc3dff922476d667c15f029e520da496d4295) (cherry picked from commit 4830cb713ed8ae377f7143c4be204b5994c178c2) (cherry picked from commit 9b95cab0a2927dfe07dbe6dc0056a80d5c730414) (cherry picked from commit 30eb33424e74f467346319876e20a83ff71e00cd) --- contrib/tzdata/Makefile | 48 +++++--------- contrib/tzdata/NEWS | 136 ++++++++++++++++++++++++++++++++++++++- contrib/tzdata/backzone | 5 +- contrib/tzdata/etcetera | 3 +- contrib/tzdata/europe | 74 +++++++++++++++++++-- contrib/tzdata/leap-seconds.list | 8 +-- contrib/tzdata/leapseconds | 8 +-- contrib/tzdata/northamerica | 56 +++++++++++++++- contrib/tzdata/theory.html | 22 ++++--- contrib/tzdata/version | 2 +- contrib/tzdata/zone.tab | 2 +- contrib/tzdata/zone1970.tab | 2 +- contrib/tzdata/zonenow.tab | 6 +- 13 files changed, 304 insertions(+), 68 deletions(-) diff --git a/contrib/tzdata/Makefile b/contrib/tzdata/Makefile index bb7cb1014f73..1e0a5903534d 100644 --- a/contrib/tzdata/Makefile +++ b/contrib/tzdata/Makefile @@ -66,28 +66,6 @@ DATAFORM= main LOCALTIME= Factory -# The POSIXRULES macro controls interpretation of POSIX-like TZ -# settings like TZ='EET-2EEST' that lack DST transition rules. -# If POSIXRULES is '-', no template is installed; this is the default. -# Any other value for POSIXRULES is obsolete and should not be relied on, as: -# * It does not work correctly in popular implementations such as GNU/Linux. -# * It does not work even in tzcode, except for historical timestamps -# that precede the last explicit transition in the POSIXRULES file. -# Hence it typically does not work for current and future timestamps. -# If, despite the above, you want a template for handling these settings, -# you can change the line below (after finding the timezone you want in the -# one of the $(TDATA) source files, or adding it to a source file). -# Alternatively, if you discover you've got the wrong timezone, you can just -# 'zic -p -' to remove it, or 'zic -p rightzone' to change it. -# Use the command -# make zonenames -# to get a list of the values you can use for POSIXRULES. - -POSIXRULES= - - -# Also see TZDEFRULESTRING below, which takes effect only -# if POSIXRULES is '-' or if the template file cannot be accessed. - # Installation locations. # @@ -170,7 +148,7 @@ TIME_T_ALTERNATIVES_TAIL = int_least32_t.ck uint_least32_t.ck \ # applications that are not leap second aware, and is closer to unsmeared # "right" time than unsmeared POSIX time is (e.g., 0.5 vs 1.0 s max error). -REDO= posix_right +REDO= posix_only # Whether to put an "Expires" line in the leapseconds file. # Use EXPIRES_LINE=1 to put the line in, 0 to omit it. @@ -284,7 +262,10 @@ LDLIBS= # -DHAVE_STRDUP=0 if your system lacks the strdup function # -DHAVE_STRNLEN=0 if your system lacks the strnlen function+ # -DHAVE_STRTOLL=0 if your system lacks the strtoll function+ -# -DHAVE_STRUCT_STAT_ST_CTIM=0 if struct stat lacks a member st_ctim+ +# -DHAVE_STRUCT_STAT_ST_CTIM=0 if struct stat lacks a status-change member +# of type struct timespec, so code should use st_ctime instead; +# but if the status-change member name is st_ctimespec, +# use -Dst_ctim=st_ctimespec instead (default is guessed)+ # -DHAVE_STRUCT_TIMESPEC=0 if your system lacks struct timespec+ # -DHAVE_SYMLINK=0 if your system lacks the symlink function # -DHAVE_SYS_STAT_H=0 if does not work* @@ -322,13 +303,13 @@ LDLIBS= # variable, 0 otherwise (default is guessed) # -DHAVE_SYS_SINGLE_THREADED_H=0 if works, # 0 otherwise (default is guessed) -# -DTHREAD_RWLOCK to use read-write locks intead of mutexes. -# This can improve paralellism and thus save real time +# -DTHREAD_RWLOCK to use read-write locks instead of mutexes. +# This can improve parallelism and thus save real time # if many threads call tzcode functions simultaneously. # It also costs CPU time and thus energy. # -DTHREAD_TM_MULTI to have gmtime, localtime, and offtime # return different struct tm * addresses in different threads. -# This supports unportable programs that call +# This supports nonportable programs that call # gmtime/localtime/offtime when they should call # gmtime_r/localtime_r/offtime_r to avoid races. # Because the corresponding storage is freed on thread exit, @@ -347,10 +328,13 @@ LDLIBS= # -DTZ_DOMAIN=\"foo\" to use "foo" for gettext domain name; default is "tz" # -DTZ_DOMAINDIR=\"/path\" to use "/path" for gettext directory; # the default is system-supplied, typically "/usr/lib/locale" +# -DTZ_RUNTIME_LEAPS=0 to disable runtime support for leap seconds. +# This conforms to POSIX, shrinks tzcode's attack surface, +# and is more efficient. However, it fails to support Internet +# RFC 9636's leap seconds. # -DTZDEFRULESTRING=\",date/time,date/time\" to default to the specified -# DST transitions for proleptic format TZ strings lacking them, -# in the usual case where POSIXRULES is '-'. If not specified, -# TZDEFRULESTRING defaults to US rules for future DST transitions. +# DST transitions for proleptic format TZ strings lacking them. +# If not specified, it defaults to US rules for future DST transitions. # This mishandles some past timestamps, as US DST rules have changed. # It also mishandles settings like TZ='EET-2EEST' for eastern Europe, # as Europe and US DST rules differ. @@ -400,12 +384,13 @@ GCC_DEBUG_FLAGS = -DGCC_LINT -g3 -O3 \ -Wold-style-definition -Woverlength-strings -Wpointer-arith \ -Wshadow -Wshift-overflow=2 -Wstrict-overflow \ -Wstrict-prototypes -Wstringop-overflow=4 \ - -Wstringop-truncation -Wsuggest-attribute=cold \ + -Wsuggest-attribute=cold \ -Wsuggest-attribute=const -Wsuggest-attribute=format \ -Wsuggest-attribute=malloc \ -Wsuggest-attribute=noreturn -Wsuggest-attribute=pure \ -Wtrampolines -Wundef -Wunused-macros -Wuse-after-free=3 \ -Wvariadic-macros -Wvla -Wwrite-strings \ + -Wzero-as-null-pointer-constant \ -Wno-format-nonliteral -Wno-sign-compare -Wno-type-limits # # If your system has a "GMT offset" field in its "struct tm"s @@ -723,7 +708,6 @@ install: all $(DATA) $(REDO) $(MANS) '$(DESTDIR)$(MANDIR)/man3' '$(DESTDIR)$(MANDIR)/man5' \ '$(DESTDIR)$(MANDIR)/man8' $(ZIC_INSTALL) -l $(LOCALTIME) \ - -p $(POSIXRULES) \ -t '$(DESTDIR)$(TZDEFAULT)' cp -f $(TABDATA) '$(DESTDIR)$(TZDIR)/.' cp tzselect '$(DESTDIR)$(BINDIR)/.' diff --git a/contrib/tzdata/NEWS b/contrib/tzdata/NEWS index eef59a2b095b..a0042701c687 100644 --- a/contrib/tzdata/NEWS +++ b/contrib/tzdata/NEWS @@ -1,5 +1,137 @@ News for the tz database +Release 2026a - 2026-04-22 23:06:43 -0700 + + Briefly: + British Columbia moved to permanent -07 on 2026-03-09. + Some more overflow bugs have been fixed in zic. + + Changes to future timestamps + + British Columbia’s 2026-03-08 spring forward was its last + foreseeable clock change, as it moved to permanent -07 thereafter. + (Thanks to Arthur David Olson.) Although the change to permanent + -07 legally took place on 2026-03-09, temporarily model the change + to occur on 2026-11-01 at 02:00 instead. This works around a + limitation in CLDR v48.2 (2026-03-17). This temporary hack is + planned to be removed after CLDR is fixed. + + Changes to code + + zic no longer mishandles a last transition to a new time type. + + zic no longer overflows a buffer when generating a TZ string like + "PST-167:59:58PDT-167:59:59,M11.5.6/-167:59:59,M12.5.6/-167:59:59", + which can occur with adversarial input. (Thanks to Naveed Khan.) + + zic no longer generates a longer TZif file than necessary when + an earlier time zone abbreviation is a suffix of a later one. + As a nice side effect, zic no longer overflows a buffer when given + a long series of abbreviations, each a suffix of the next. + (Buffer overflow reported by Arthur Chan.) + + zic no longer overflows an int when processing input like ‘Zone + Ouch 2147483648:00:00 - LMT’. The int overflow can lead to buffer + overflow in adversarial cases. (Thanks to Naveed Khan.) + + zic now checks for signals more often. + + +Release 2026a - 2026-03-01 22:59:49 -0800 + + Briefly: + Moldova has used EU transition times since 2022. + The “right” TZif files are no longer installed by default. + -DTZ_RUNTIME_LEAPS=0 disables runtime support for leap seconds. + TZif files are no longer limited to 50 bytes of abbreviations. + zic is no longer limited to 50 leap seconds. + Several integer overflow bugs have been fixed. + + Changes to past and future timestamps + + Since 2022 Moldova has observed EU transition times, that is, it + has sprung forward at 03:00, not 02:00, and has fallen back at + 04:00, not 03:00. (Thanks to Heitor David Pinto.) + + Changes to data + + Remove Europe/Chisinau from zonenow.tab, as it now agrees with + Europe/Athens for future timestamps. + + Changes to build procedure + + The Makefile no longer by default installs an alternate set + of TZif files for system clocks that count leap seconds. + Install with ‘make REDO=posix_right’ to get the old default, + which is rarely used in major downstream distributions. + If your system clock counts leap seconds (contrary to POSIX), + it is better to install with ‘make REDO=right_only’. + This change does not affect the leapseconds file, which is still + installed as before. + + The Makefile’s POSIXRULES option, which was declared obsolete in + release 2019b, has been removed. The Makefile’s build procedure + thus no longer optionally installs the obsolete posixrules file. + + Changes to code + + Compiling with the new option -DTZ_RUNTIME_LEAPS=0 disables + runtime support for leap seconds. Although this conforms to + POSIX, shrinks tzcode’s attack surface, and is more efficient, + it fails to support Internet RFC 9636’s leap seconds. + + zic now can generate, and localtime.c can now use, TZif files that + hold up to 256 bytes of abbreviations, counting trailing NULs. + The previous limit was 50 bytes, and some tzdata TZif files were + already consuming 40 bytes. zic -v warns if it generates a file + that exceeds the old 50-byte limit. + + zic -L can now generate TZif files with more than 50 leap seconds. + This helps test TZif readers not limited to 50 leap seconds, as + tzcode’s localtime.c is; it has little immediate need for + practical timekeeping as there have been only 27 leap seconds and + possibly there will be no more, due to planned changes to UTC. + zic -v warns if its output exceeds the old 50-second limit. + + localtime.c no longer accesses the posixrules file generated by + zic -p. Hence for obsolete and nonconforming settings like + TZ="AST4ADT" it now typically falls back on US DST rules, rather + than attempting to override this fallback with the contents of the + posixrules file. This removes library support that was declared + obsolete in release 2019b, and fixes some undefined behavior. + (Undefined behavior reported by GitHub user Naveed8951.) + + The posix2time, posix2time_z, time2posix, and time2posix_z + functions now set errno=EOVERFLOW and return ((time_t) -1) if the + result is not representable. Formerly they had undefined behavior + that could in practice result in crashing, looping indefinitely, + or returning an incorrect result. As before, these functions are + defined only when localtime.c is compiled with the -DSTD_INSPIRED + option. + + Some other undefined behavior, triggered by TZif files containing + outlandish but conforming UT offsets or leap second corrections, + has also been fixed. (Some of these bugs reported by Naveed8951.) + + localtime.c no longer rejects TZif files that exactly fit in its + internal structures, fixing off-by-one typos introduced in 2014g. + + zic no longer generates a no-op transition when + simultaneous Rule and Zone changes cancel each other out. + This occurs in tzdata only in Asia/Tbilisi on 1997-03-30. + (Thanks to Renchunhui for a test case showing the bug.) + + zic no longer assumes you can fflush a read-only stream. + (Problem reported by Christos Zoulas.) + + zic no longer generates UT offsets equal to -2**31 and localtime.c + no longer accepts them, as they can cause trouble in both + localtime.c and its callers. RFC 9636 prohibits such offsets. + + zic -p now warns that the -p option is obsolete and likely + ineffective. + + Release 2025c - 2025-12-10 14:42:37 -0800 Briefly: @@ -69,6 +201,8 @@ Release 2025c - 2025-12-10 14:42:37 -0800 The new CFLAGS options -DHAVE_STRUCT_STAT_ST_CTIM=0 and -DHAVE_STRUCT_TIMESPEC=0 port to non-POSIX.1-2008 platforms that lack st_ctim and struct timespec, respectively. + On these platforms, the code falls back on st_ctime to + implement -DTZ_CHANGE_INTERVAL=N. tzset etc. now treat ' ' like '_' in time zone abbreviations, just as they treat other invalid bytes. This continues the @@ -89,7 +223,7 @@ Release 2025c - 2025-12-10 14:42:37 -0800 The new CFLAGS option -TTHREAD_TM_MULTI causes localtime to return a pointer to thread-specific memory, as FreeBSD does, instead of - to the same memory in all threads. This supports unportable + to the same memory in all threads. This supports nonportable programs that incorrectly use localtime instead of localtime_r. This option affects gmtime and offtime similarly to localtime. Because the corresponding storage is freed on thread exit, this diff --git a/contrib/tzdata/backzone b/contrib/tzdata/backzone index 3c7e720ab4e7..b7fd57bfaea3 100644 --- a/contrib/tzdata/backzone +++ b/contrib/tzdata/backzone @@ -1757,13 +1757,12 @@ Zone Pacific/Majuro 11:24:48 - LMT 1901 # Midway # # From Mark Brader (2005-01-23): -# [Fallacies and Fantasies of Air Transport History, by R.E.G. Davies, -# published 1994 by Paladwr Press, McLean, VA, USA; ISBN 0-9626483-5-3] +# [] # reproduced a Pan American Airways timetable from 1936, for their weekly # "Orient Express" flights between San Francisco and Manila, and connecting # flights to Chicago and the US East Coast. As it uses some time zone # designations that I've never seen before:.... -# Fri. 6:30A Lv. HONOLOLU (Pearl Harbor), H.I. H.L.T. Ar. 5:30P Sun. +# Fri. 6:30A Lv. HONOLULU (Pearl Harbor), H.I. . H.L.T. Ar. 5:30P Sun. # " 3:00P Ar. MIDWAY ISLAND . . . . . . . . . M.L.T. Lv. 6:00A " # Zone Pacific/Midway -11:49:28 - LMT 1901 diff --git a/contrib/tzdata/etcetera b/contrib/tzdata/etcetera index 948531c8d862..d78f04133c36 100644 --- a/contrib/tzdata/etcetera +++ b/contrib/tzdata/etcetera @@ -20,7 +20,8 @@ # which load the "UTC" file to handle seconds properly. Zone Etc/UTC 0 - UTC -# Functions like gmtime load the "GMT" file to handle leap seconds properly. +# If leap second support is enabled, functions like gmtime +# load the "GMT" file to handle leap seconds properly. # Vanguard section, which works with most .zi parsers. #Zone GMT 0 - GMT # Rearguard section, for TZUpdater 2.3.2 and earlier. diff --git a/contrib/tzdata/europe b/contrib/tzdata/europe index af5217103845..4127ec9dcf13 100644 --- a/contrib/tzdata/europe +++ b/contrib/tzdata/europe @@ -1041,9 +1041,19 @@ Zone Atlantic/Faroe -0:27:04 - LMT 1908 Jan 11 # Tórshavn # Greenland # -# From Paul Eggert (2004-10-31): +# From Paul Eggert (2026-01-22): +# During World War II, Greenland was effectively independent of Denmark and +# observed daylight saving time. TIME, volume 37, page 23 (1941-04-21) +# says, +# "Penfield and West made their way to the U.S.'s most northerly consulate. +# They were astonished to find that Greenlanders, with almost 24 hours of +# sunlight a day during the summer, have daylight saving time." +# As the details are unknown they are omitted from the data for now. +# # During World War II, Germany maintained secret manned weather stations in # East Greenland and Franz Josef Land, but we don't know their time zones. +# Also, they're likely out of scope for the database +# as we lack resources to track every bit of military activity. # My source for this is Wilhelm Dege's book mentioned under Svalbard. # # From Paul Eggert (2017-12-10): @@ -1957,7 +1967,6 @@ Zone Europe/Malta 0:58:04 - LMT 1893 Nov 2 # Valletta # From Stepan Golosunov (2016-03-07): # the act of the government of the Republic of Moldova Nr. 132 from 1990-05-04 -# http://lex.justice.md/viewdoc.php?action=view&view=doc&id=298782&lang=2 # ... says that since 1990-05-06 on the territory of the Moldavian SSR # time would be calculated as the standard time of the second time belt # plus one hour of the "summer" time. To implement that clocks would be @@ -2012,9 +2021,61 @@ Zone Europe/Malta 0:58:04 - LMT 1893 Nov 2 # Valletta # says the 2014-03-30 spring-forward transition was at 02:00 local time. # Guess that since 1997 Moldova has switched one hour before the EU. +# From Heitor David Pinto (2026-02-22): +# Soviet Moldovan resolution 132 of 1990 defined the summer time period from +# the last Sunday in March at 2:00 to the last Sunday in September at 3:00, +# matching the dates used in most of Europe at the time: +# https://web.archive.org/web/20211107050832/http://lex.justice.md/viewdoc.php?action=view&view=doc&id=298782&lang=1 +# +# It seems that in 1996 Moldova changed the end date to October like most of +# Europe, but kept the transitions at 2:00 and 3:00 rather than 1:00 UTC, +# which would have been locally 3:00 and 4:00.... +# +# The notices in the Moldovan government website and broadcaster showed the +# transitions at 2:00 and 3:00 until 2021: +# 2015 https://old.gov.md/en/node/7304 +# 2016 https://old.gov.md/en/node/12587 +# 2017 https://old.gov.md/en/node/20654 +# 2017 https://old.gov.md/en/content/moldova-upholds-winter-time-night-28-29-october +# 2018 https://old.gov.md/en/content/moldova-switch-summer-time +# 2018 https://old.gov.md/en/content/cabinet-ministers-informs-about-switch-winter-time-28-october +# 2019 https://old.gov.md/en/content/moldova-switch-summer-time-31-march +# 2019 https://old.gov.md/en/node/31122 +# 2020 https://old.gov.md/en/node/32771 +# 2020 https://old.gov.md/en/node/34497 +# 2021 https://trm.md/ro/social/moldova-trece-in-aceasta-noapte-la-ora-de-vara +# 2021 https://trm.md/en/social/republica-moldova-trece-la-ora-de-iarna1 +# +# However, since 2022, the notices showed the transitions at 3:00 and 4:00, +# matching the EU rule at 1:00 UTC: +# 2022 https://trm.md/en/social/in-acest-weekend-republica-moldova-trece-la-ora-de-vara +# 2022 https://old.gov.md/en/content/moldova-switch-winter-time +# 2023 https://moldova1.md/p/6587/ora-de-vara-2023-cum-schimbam-acele-ceasornicelor-si-cand-trecem-la-ora-de-vara +# 2023 https://old.gov.md/en/node/46662 +# 2024 https://moldova1.md/p/26535/republica-moldova-trece-la-ora-de-vara-in-acest-weekend +# 2024 https://moldova1.md/p/37768/republica-moldova-trece-in-aceasta-noapte-la-ora-de-iarna +# 2025 https://moldova1.md/p/46349/republica-moldova-trece-la-ora-de-vara-pe-30-martie-cum-ne-afecteaza-si-ce-recomanda-medicii +# 2025 https://moldova1.md/p/60469/republica-moldova-trece-la-ora-de-iarna-ceasurile-se-dau-inapoi-cu-o-ora +# +# It seems that the changes to the end date and transition times were just +# done in practice without formally changing the resolution. In late 2025, the +# government said that the Soviet resolution was still in force, and proposed +# a new resolution to replace it and formally establish the EU rule: +# ... based on the notices, it seems that in practice Moldova already +# uses the EU rule since 2022. This was also the year when Moldova applied to +# join the EU. +# +# From Robert Bastian (2026-02-26): +# This has been approved and published in the government gazette: +# https://monitorul.gov.md/ro/monitorul/view/pdf/3234/part/2#page=27 +# +# From Paul Eggert (2026-02-24): +# Also see Svetlana Rudenko, "Moldova abandons the 'Soviet era'", Logos Press, +# 2026-02-21 . + # Rule NAME FROM TO - IN ON AT SAVE LETTER/S -Rule Moldova 1997 max - Mar lastSun 2:00 1:00 S -Rule Moldova 1997 max - Oct lastSun 3:00 0 - +Rule Moldova 1997 2021 - Mar lastSun 2:00 1:00 S +Rule Moldova 1997 2021 - Oct lastSun 3:00 0 - # Zone NAME STDOFF RULES FORMAT [UNTIL] Zone Europe/Chisinau 1:55:20 - LMT 1880 @@ -2027,7 +2088,8 @@ Zone Europe/Chisinau 1:55:20 - LMT 1880 2:00 Russia EE%sT 1992 2:00 E-Eur EE%sT 1997 # See Romania commentary for the guessed 1997 transition to EU rules. - 2:00 Moldova EE%sT + 2:00 Moldova EE%sT 2022 + 2:00 EU EE%sT # Poland @@ -2413,7 +2475,7 @@ Zone Atlantic/Madeira -1:07:36 - LMT 1884 # Funchal # Nine O'clock # (1998-10-23) reports that the switch occurred at # 04:00 local time in fall 1998. For lack of better info, -# assume that Romania and Moldova switched to EU rules in 1997, +# assume that Romania switched to EU rules in 1997, # the same year as Bulgaria. # # Rule NAME FROM TO - IN ON AT SAVE LETTER/S diff --git a/contrib/tzdata/leap-seconds.list b/contrib/tzdata/leap-seconds.list index 649a22c6278f..0a111845eae4 100644 --- a/contrib/tzdata/leap-seconds.list +++ b/contrib/tzdata/leap-seconds.list @@ -60,15 +60,15 @@ # # The following line shows the last update of this file in NTP timestamp: # -#$ 3960835200 +#$ 3976686858 # # 2) Expiration date of the file given on a semi-annual basis: last June or last December # -# File expires on 28 June 2026 +# File expires on 28 December 2026 # # Expire date in NTP timestamp: # -#@ 3991593600 +#@ 4007404800 # # # LIST OF LEAP SECONDS @@ -117,4 +117,4 @@ # please see the readme file in the 'source' directory : # https://hpiers.obspm.fr/iers/bul/bulc/ntp/sources/README # -#h 49db2447 571e5e1b 2f002a53 9c8da8e4 39b8e49e +#h 2e101270 4e6749f8 2f1792b7 14a0c188 36bb19d6 diff --git a/contrib/tzdata/leapseconds b/contrib/tzdata/leapseconds index 2a42c83efe16..a796e4b4e22e 100644 --- a/contrib/tzdata/leapseconds +++ b/contrib/tzdata/leapseconds @@ -70,7 +70,7 @@ Leap 2016 Dec 31 23:59:60 + S # Any additional leap seconds will come after this. # This Expires line is commented out for now, # so that pre-2020a zic implementations do not reject this file. -#Expires 2026 Jun 28 00:00:00 +#Expires 2026 Dec 28 00:00:00 # Here are POSIX timestamps for the data in this file. # "#updated" gives the last time the leap seconds data changed @@ -79,8 +79,8 @@ Leap 2016 Dec 31 23:59:60 + S # "#expires" gives the first time this file might be wrong; # if this file was derived from the IERS leap-seconds.list, # this is typically a bit less than one year after "updated". -#updated 1751846400 (2025-07-07 00:00:00 UTC) -#expires 1782604800 (2026-06-28 00:00:00 UTC) +#updated 1767698058 (2026-01-06 11:14:18 UTC) +#expires 1798416000 (2026-12-28 00:00:00 UTC) # Updated through IERS Bulletin C (https://hpiers.obspm.fr/iers/bul/bulc/bulletinc.dat) -# File expires on 28 June 2026 +# File expires on 28 December 2026 diff --git a/contrib/tzdata/northamerica b/contrib/tzdata/northamerica index 16b79af29b55..3e8641e1c20a 100644 --- a/contrib/tzdata/northamerica +++ b/contrib/tzdata/northamerica @@ -1957,6 +1957,56 @@ Zone America/Edmonton -7:33:52 - LMT 1906 Sep # https://searcharchives.vancouver.ca/daylight-saving-1918-starts-again-july-7-1941-start-d-s-sept-27-end-of-d-s-1941 # We have no further details, so omit them for now. +# From Arthur David Olson (2026-03-02): +# B. C. Gov News: “Adopting permanent daylight saving time: ‘Spring forward’ +# on March 8 will be the last time change, ending twice-yearly clock changes.” +# https://news.gov.bc.ca/releases/2026AG0013-000209 +# +# From Paul Eggert (2026-03-07): +# The law says that 21 hours after the usual 2026-03-08 02:00 switch from +# PST to PDT, the next day inaugurates the new standard time Pacific Time, +# i.e., just one clock change but two name changes separated by 21 hours. +# PT, the obvious abbreviation for Pacific Time, is one letter too short +# to conform to TZDB’s (and POSIX’s) [-+[:alnum:]]{3,6} requirements. +# I asked the BC government for advice, with no response. For now, do this: +# 1. As a temporary hack, pretend that the BC law takes effect +# not on 2026-03-09 at 00:00, but on 2026-11-01 at 02:00. +# This pretense works around a limitation in CLDR v48.2 (2026-03-17), +# which would otherwise say the interval uses “Pacific Standard Time”. +# (Below, this temporary hack is marked “Temporary hack; see above.”) +# Strictly speaking this hack is incorrect since the interval uses +# standard time, but it does have the right UT offset and it +# works around the CLDR limitation. We should be able to remove +# the temporary hack after CLDR is fixed. +# 2. After the BC law takes effect, model the time as MST sans DST. +# We can change this later if another conforming non-numeric abbreviation +# for Pacific Time becomes more popular. Possibilities include: +# MST - the most compatible with existing software and practice, +# and already used in parts of BC and in Yukon +# PDT - almost as software-friendly, but confusing because it implies +# it is DST and is paired with PST, whereas PT is standard time +# PST - straightforward but even more confusing, +# and will likely break much software that assumes PST is -08 +# -07 - accurate and clear in itself, but makes BC look odd vs neighbors +# CPT, CPST - for Canadian Pacific (Standard) Time, +# by analogy with AEST in Australia +# P-T - conforming approximation to “PT” +# PT+ - like P-T but suggesting one-hour advance over PST + +# From Chris Walton (2026-03-15): +# The Regional District of East Kootenay is planning to move to year-round +# Mountain Standard Time (MST) on November 1, 2026.... +# https://www.rdek.bc.ca/news/entry/rdek_board_moves_to_transition_to_year_round_mountain_standard_time +# (2026-03-17): +# The final decision East Kootenay made a few days ago may turn out not to +# be final after all. They are going to reopen the debate next month! +# https://www.cbc.ca/news/canada/british-columbia/what-time-is-it-in-the-east-kootenay-debate-9.7132624 +# From Paul Eggert (2026-03-17): +# Mayor Steve Fairbairn of Elkford asked the question be called a second time, +# saying, “Pardon the pun, but this is not a time-sensitive issue.” +# For now, merely mention the potential change in these comments. +# If it happens it would likely affect clocks starting 2027-03-14 at 02:00. + # Rule NAME FROM TO - IN ON AT SAVE LETTER/S Rule Vanc 1918 only - Apr 14 2:00 1:00 D Rule Vanc 1918 only - Oct 27 2:00 0 S @@ -1970,7 +2020,11 @@ Rule Vanc 1962 2006 - Oct lastSun 2:00 0 S # Zone NAME STDOFF RULES FORMAT [UNTIL] Zone America/Vancouver -8:12:28 - LMT 1884 -8:00 Vanc P%sT 1987 - -8:00 Canada P%sT + -8:00 Canada P%sT 2026 Mar 9 + # Temporary hack; see above. + -8:00 1:00 PDT 2026 Nov 1 02:00 + # End of temporary hack. + -7:00 - MST Zone America/Dawson_Creek -8:00:56 - LMT 1884 -8:00 Canada P%sT 1947 -8:00 Vanc P%sT 1972 Aug 30 2:00 diff --git a/contrib/tzdata/theory.html b/contrib/tzdata/theory.html index 6e52a929d335..12f4f7f4b439 100644 --- a/contrib/tzdata/theory.html +++ b/contrib/tzdata/theory.html @@ -3,14 +3,16 @@ Theory and pragmatics of the tz code and data +

Theory and pragmatics of the tz code and data

-

Outline