From nobody Thu Sep 19 13:30:20 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 4X8bx824Nrz5WcM1; Thu, 19 Sep 2024 13:30: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 "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4X8bx81CjPz45sG; Thu, 19 Sep 2024 13:30:20 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1726752620; 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=jgSmvRIlMb9Ikw9Sv+Vn3nCj6GKOCL+W7wjovrEr9Qk=; b=Vg1ewrVg5SLqGLR1ogb4QgXOmdN7c6QJh3awK1M5/+pAYMRcGfoSlc5PjSYTmZCfVYVIKs GELtxljZaOTHd1NOSL4lkxaupD89fiD909s8hT90WsO3y3B08K40GzHx0fxOrL7RQ407sd tAD3jIx+pKRcpOcMxgxdlMCnNrN8jZ3DU1yUthUMqi+m9xqZrThu5C3jvrtxCbtyAylH5P IvUrdncnVCjOg5JaRcgz+/mMnGONYrcFyCNIMqnM3MNWgQJxBOsVx58ZZlXox93932sNRr bji5UjjOUluNQIbSmM+lluwAI7JgErs8qrqBb3+X3FN4veipqp4ubdv/0/ILsg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1726752620; a=rsa-sha256; cv=none; b=Ye7eEhGfbhd3/CfslyPGwaTn2nBsVQLAu1ctRI5sximRqb4/mgBOe3voHb4gQ1FU0v7yjn vUZYYdCcTAepeirKS20US2oLTAAXNvzovdnbojdjrfWq+qjLUIole22cy7+CR/oNoQCBvv mQE3tvIe+TDw2KPM66se7xOKiT19TBh3nQxJ3GQrjwiS0annkj4arQlTfCQ/ZjRVb9lluD q71EG48BUHmGeorlJykmJ3S/AJKR6W7hFE7Pv+N76Cg2A9SvUPczNbs12ImyQtbeUHsIxz evlJdp+qfnnCllfg7EeM7K++Ie6glY83Gz4qG4yNx8Rr1gjKwXILmFGM97fJNQ== 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=1726752620; 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=jgSmvRIlMb9Ikw9Sv+Vn3nCj6GKOCL+W7wjovrEr9Qk=; b=bPcI96H730XswnD4OX4b3C3DhXhk/xY2o3mpowO0mG/NbtQpsJbt5n5wUBaJLZuhnvh8Oz c8gjyzVNytxU9u9yzAREAR2sG2Jf6f2mHaLJRTikjO9IvneEsNkN0yej5ldJMRVPiR6X6t HB9X9gWqjB4sO2le9yhEj4ZtSMqQvJaxjxxP0ABl0xIThi7cAVPO1i1ZsQHHZjNRH0rvXc Yi+IHjsd+S4J/UBUauzpXT0JYZaE/Ck+l2fwX6tFvHfa28SHkFZslFlIFS/ECBgT8YLvrw VC9BdtRciE6dynadC1sTZW1twFjNRvZF2p2XY9BKxVObvXY9pCR5pXN5xxhkXA== 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 4X8bx80qG3z16yp; Thu, 19 Sep 2024 13:30:20 +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 48JDUKe6045479; Thu, 19 Sep 2024 13:30:20 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 48JDUKXZ045476; Thu, 19 Sep 2024 13:30:20 GMT (envelope-from git) Date: Thu, 19 Sep 2024 13:30:20 GMT Message-Id: <202409191330.48JDUKXZ045476@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: f67468e6e5e2 - releng/14.1 - 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/14.1 X-Git-Reftype: branch X-Git-Commit: f67468e6e5e27661e18561a3bcff9448d055b95e Auto-Submitted: auto-generated The branch releng/14.1 has been updated by gordon: URL: https://cgit.FreeBSD.org/src/commit/?id=f67468e6e5e27661e18561a3bcff9448d055b95e commit f67468e6e5e27661e18561a3bcff9448d055b95e Author: Mariusz Zaborski AuthorDate: 2024-09-11 14:43:43 +0000 Commit: Gordon Tetlow CommitDate: 2024-09-19 13:10:29 +0000 libnv: correct the calculation of the structure's size Reported by: Milosz Kaniewski Approved by: so Security: FreeBSD-SA-24:16.libnv Security: CVE-2024-45287 (cherry picked from commit 7f4731ab67f1d3345aee6626eb83cc5ce00010f0) (cherry picked from commit 056c50c48be3e3828ef740d2fcce988a545e52aa) --- 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 64078b10973e..92d6e655876a 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); }