From nobody Wed Apr 29 14:47:22 2026 X-Original-To: dev-commits-src-all@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 4g5Ks65SL7z6bkQW for ; Wed, 29 Apr 2026 14:47: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 4g5Ks63JmFz4J5J for ; Wed, 29 Apr 2026 14:47:22 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1777474042; 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=p2ncHCmHGxOH3zmkZAe5LXmZyStKcWPaCVrtH6+f5R8=; b=OgvSOuvGBJ/u7Ilquo0wQEOmspLEIdBCK/s6wqDVynPHJxh2/a/wFanlwdRryLyN3ngaeV Odpact4EZd2fgFF9qIvw7KrgXZmXWfVqz57Mn1roHMc/fwWRiYbD31hZqqUeja0h1A3n9l 0Juq+c4xBv3y623VPZpzSgEzktncFXV1pIyYNg9L1pMgzvsHWFpNl4NOfUXNnfjB5P16Yx 67CK2ug/i6y2B9aIMAebQ99bvDf3qwvi/JqrPcnFeL7cMEpFTtck8lkipb7lbxZ3Seskrq TqQUUNHAfd1Ie/Jk02Q2UDi9zmloosPs9cL1l03S5/6QdKYjNGyPAZuauoKdOA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1777474042; a=rsa-sha256; cv=none; b=slq0HM2MWZ9CHadCBB++SjDTmBPFPESId5t4Hv7Sa4u05mDgMTphf70WGjadLRCndd8VwI MgySkyBF64dUS1MB8fkqWPtNY1vZMyAP3N4WBL56tM10Xfk6HCKvoaO0NDM50zLFP/JL3M yG+qzTQOP2qMm+UwviYjASOxDcV62nerugnJvu3Yis9lo+MCaEVM60TyoHVbzsTZ3a6oVu 0hND3+Tj3oNYOQPOBtSeiyXdpPHjmrRTjYM+MKeY4fkOXH+Mh3Nefia5DC1ZCyoITI0gRg 1pcAuWk4RbVkMOsbqemvm/fX11zRGfj+QJh0U3BgU1rLET2hr9Zo/xDgH2mRtQ== 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=1777474042; 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=p2ncHCmHGxOH3zmkZAe5LXmZyStKcWPaCVrtH6+f5R8=; b=g8NkLw/3tKG5J+XkHZ4gWGNoKxQwrDzaf3t6Y1YGugod3Tm6F3Ibxql/YKbxYHsOk94Xcl s/ol5zGwTOnRJlbyTfEoBULEkXr66pbVkxfkmQUZ79TBvqQkTfk9/JLUhLX5i8QbxcuTc3 BBUMLVGY6YcoFnRqps5IhmJdH69FNN/crRi2rD/1mnq1uk28awdlf6rWVoA3FrUIwDdcqD auIN/JFAVcjgg1lzwPK7pdinMQTABbf4hlULcw+v3P1qe6oARIBNpxmvJLoZtNFXfxwtFC MmL+A4GJVPwNHudmF+1vGhA/SvIsWts1jb0SFDJ1VnPtqyIsFgo3CTYY+7cyxA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4g5Ks62q82zl5g for ; Wed, 29 Apr 2026 14:47:22 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 3c9fa by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Wed, 29 Apr 2026 14:47:22 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Mark Johnston Subject: git: 5d8e32aad2a8 - main - dhclient: Fix reallocation of dhclient script environments List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@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/main X-Git-Reftype: branch X-Git-Commit: 5d8e32aad2a8316b0aab8a93a677a63e4c3df422 Auto-Submitted: auto-generated Date: Wed, 29 Apr 2026 14:47:22 +0000 Message-Id: <69f219fa.3c9fa.1698d8e9@gitrepo.freebsd.org> The branch main has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=5d8e32aad2a8316b0aab8a93a677a63e4c3df422 commit 5d8e32aad2a8316b0aab8a93a677a63e4c3df422 Author: Mark Johnston AuthorDate: 2026-04-27 20:56:21 +0000 Commit: Mark Johnston CommitDate: 2026-04-29 14:39:27 +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;