From nobody Wed Apr 29 14:47:49 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 4g5Ksg2fYxz6bkT1 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 4g5Ksd19sHz4JN9 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 4g5Ksd0ZX7zlXw 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: 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/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;