From nobody Wed Apr 29 14:50:07 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 4g5KwJ6hrqz6bkwc for ; Wed, 29 Apr 2026 14:50:08 +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 4g5KwJ0lNwz4Kk6 for ; Wed, 29 Apr 2026 14:50:08 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1777474208; 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=GsSgoW/huiao/K/g4lDOe6HhU30BpMwztEwljBvCcPY=; b=ckxPOGYDHDYDXJmoxsQ4ObZ4rfNdN+biHf4F30trjZEDZq1ToiQBb480ki/fFfnusw0VcE cW/niMbQqeYt20YA6WqiFgJ4tKfTvZ0fP6MovwxGNxR6y6pH3rVSrm7H4z4iJMCaSxps+Y fmniK9Lg7LKaiKoJ4drnHyJAEy86pxgRfqcrU9kWUGwoqdVR/ji5N8NCzR56V2vMo96Lk2 rw5F0JXKVdyZb6QuXp/kFNSSl+M17iBCo4qYF5P2qCSWAgPKk0DM5po0Oua0297mfzcKuB mZ/YNX1legf6oZ4L91k22oMKBgCBivD+npGOQsJd1scvUHCVGyH1XegNUkirHA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1777474208; a=rsa-sha256; cv=none; b=rUmi0nRw8b5AmFZ7xdN57Bjpk1/dDTUwX872NLIRwTIC7YY8zu8y6JYcZPmTCXkMhHj6b6 PlvWb7wobJwuIAzTXA/w8oQ/DFuhY3ZuugPfRmxQIjvv/fw3h2HeftRNGFIzLpHlPhBNol rODeT3NMxvFt0XSDYRRt8sv+T+48v2LwoXo6JkbQo8ETyswny92Yq4DoCc7ROXLNd1dg+h fc8d3ReOpW7+SnnkDovQaZsNlz8KBo4KGnLiM9kIdCtTXS9z2HFw4mosohbm1YjMWtTZ+4 SWMMPswj7w6l6fnnX+4yNMazB31W9TA9p/ADQTOnM6Vc7YeLQpIsokUWgKY+bw== 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=1777474208; 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=GsSgoW/huiao/K/g4lDOe6HhU30BpMwztEwljBvCcPY=; b=RZu/P4X2VSPOOa4rCcObVa9C2RiCFf5EbHPOg6+ejgaD34wnhWfS/eK/n5owpI0UqkBLBW yBHa53RbYjZYJ2FLxPsg6qBupzRYgg60pbeGWkE8QrGg53q29CSlwuJK7KQvERx4vwLU8p QgraRvoPJSmOXrbgET8Ln3ZCJmhuq/9hU+0J9JHn3+yF+n/jyYK02TYYDqr4c+IDTPKc0O H8Lk/n/QwJ5YIU2I7hrNYgW+wbq8Z1+5NuWHWGNNuAmE3s52KbEF6WqjKYrw+TXmPkTNhf 3S7J3QqWAz1butx8BgY9dqblpN3E8S9YxOIdu5zDWljTA+M59znzbJCJLhhflQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4g5KwH6fNYzlbn for ; Wed, 29 Apr 2026 14:50:07 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 3d73e by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Wed, 29 Apr 2026 14:50:07 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Mark Johnston Subject: git: 5d3e93fda7ce - stable/13 - 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/stable/13 X-Git-Reftype: branch X-Git-Commit: 5d3e93fda7cead5e8106be748cb8828f18f0aadc Auto-Submitted: auto-generated Date: Wed, 29 Apr 2026 14:50:07 +0000 Message-Id: <69f21a9f.3d73e.345d6577@gitrepo.freebsd.org> The branch stable/13 has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=5d3e93fda7cead5e8106be748cb8828f18f0aadc commit 5d3e93fda7cead5e8106be748cb8828f18f0aadc Author: Mark Johnston AuthorDate: 2026-04-27 20:56:21 +0000 Commit: Mark Johnston CommitDate: 2026-04-28 17:06:01 +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 1af89a534605..6a2683fec92a 100644 --- a/sbin/dhclient/dhclient.c +++ b/sbin/dhclient/dhclient.c @@ -2429,8 +2429,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;