From nobody Thu Sep 19 13:35:07 2024 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 4X8c2h02CGz5Wcqm; Thu, 19 Sep 2024 13:35: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 "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4X8c2g5DTjz483x; Thu, 19 Sep 2024 13:35:07 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1726752907; 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=8cqpVVmNlFLG2SS0BGmU0q9n8mKiHNc5ZTTk82VFWX0=; b=g7bJAHEj6m7p+5gZWrOIrrxuNDeAxXlop5I5JDY0Z6dUwg5TcNes/OH7tpEJUgl593s6ES J7O1RA8IbPWVOWXpNipkzXBRbrUDb6VQZ1FoHqWKeeZNQ6h/O1cbSL+TNay9RdUwJHMBCp mAflXQGED9vWAbUAq2HdBw1mMwN+byqUbDJ8JVHXKr3yTNTqWTEOl2+Iq/sU198JsbRPlG 71cqcxeVOPVZQepGjbiZ1OucYM8UrBZ+4m3RHnzH55sbIaht1u61PkZE3MyJ+n7acUTz8h NeF6gN1sTuCrZJxGOodrdJIPxMrFjZrGv1BjS1EPioRHnjN6xssspRcFnsDtUg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1726752907; a=rsa-sha256; cv=none; b=wEZY2rh3+k+E4/IAUyda+X3O5aakCmEszmDR3HQK2JTHHGs1so2mVyLXm6OzEuAkaRirtp GgFb1UUhnPTDdss5qUvfVLDAi2hkCeh2GTsSc79gn+mysu3OUCz+XjIVp89fdmJKuxbAO3 NttHQKnIgZJf8bTsgzve66C+cb6cDelnhWdZq9PQ1RYq+K93W1HiXsDFI7aNPJM/I4R4g7 yqv0MCRKBFJDjcRWBm/weAQKn8oKBw+Vs5JO434k7bOs7S1CX6keM7DUrtCleRt6zODgkq CWtIfVYaXVY2Rrpae+J4klOVlIN3J1h0xF0W8iNLMi+D/O2Xy9J93yVrq2j3Nw== 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=1726752907; 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=8cqpVVmNlFLG2SS0BGmU0q9n8mKiHNc5ZTTk82VFWX0=; b=mYEzdpj3J8vh1DA/OOQrNKtvotBn/4IDxkJo6eqU/eRj3sTlIsds22I0T6f1Z286uH0zl5 bwim5Rt8BENkAOZ0p1f5Sqa6/sZAaizJeRTGreqVwTHXGKABRkiyjs9vqvLBfgy8GAmI1v uURlwMz7mS0hPexrIILeYPwliKQYAcxvdZei6NqYNOqaja0FECB0s/AABYZLKb2CMIQO7b MEKszg5+CyyzFv8T0/vIY9b/BbiRZP/9HKCf73A/N7dLuwq3rozYuSkG3b8iHO/2TN7bWG E/PrnlehvJxDaqGsnNxJ/NmbgHzEM62B/RBxWx0ankTXH0STHPdkuIORgKSfFw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (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 did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4X8c2g4qYWz170c; Thu, 19 Sep 2024 13:35:07 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 48JDZ76D053610; Thu, 19 Sep 2024 13:35:07 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 48JDZ7cq053607; Thu, 19 Sep 2024 13:35:07 GMT (envelope-from git) Date: Thu, 19 Sep 2024 13:35:07 GMT Message-Id: <202409191335.48JDZ7cq053607@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Gordon Tetlow Subject: git: 2cffa6354d9f - releng/13.4 - libnv: correct the calculation of the structure's size 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: gordon X-Git-Repository: src X-Git-Refname: refs/heads/releng/13.4 X-Git-Reftype: branch X-Git-Commit: 2cffa6354d9f9180b865a5bc210ab78f9f8ec00b Auto-Submitted: auto-generated The branch releng/13.4 has been updated by gordon: URL: https://cgit.FreeBSD.org/src/commit/?id=2cffa6354d9f9180b865a5bc210ab78f9f8ec00b commit 2cffa6354d9f9180b865a5bc210ab78f9f8ec00b Author: Mariusz Zaborski AuthorDate: 2024-09-11 14:43:43 +0000 Commit: Gordon Tetlow CommitDate: 2024-09-19 13:34:07 +0000 libnv: correct the calculation of the structure's size Reported by: Milosz Kaniewski Approved by: so Approved by: re (cperciva) Security: FreeBSD-SA-24:16.libnv Security: CVE-2024-45287 (cherry picked from commit 7f4731ab67f1d3345aee6626eb83cc5ce00010f0) (cherry picked from commit 056c50c48be3e3828ef740d2fcce988a545e52aa) (cherry picked from commit d84fced6b468a637b5a47bad747730fa344d68d8) --- sys/contrib/libnv/nvlist.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/contrib/libnv/nvlist.c b/sys/contrib/libnv/nvlist.c index e399d610a7ce..6934da0df00a 100644 --- a/sys/contrib/libnv/nvlist.c +++ b/sys/contrib/libnv/nvlist.c @@ -1029,7 +1029,7 @@ static bool nvlist_check_header(struct nvlist_header *nvlhdrp) { - if (nvlhdrp->nvlh_size > SIZE_MAX - sizeof(nvlhdrp)) { + if (nvlhdrp->nvlh_size > SIZE_MAX - sizeof(*nvlhdrp)) { ERRNO_SET(EINVAL); return (false); }