From nobody Sun Sep 15 14:59:39 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 4X6B636KvMz5WmLR; Sun, 15 Sep 2024 14:59:39 +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 4X6B6356h0z4Nrd; Sun, 15 Sep 2024 14:59:39 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1726412379; 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=BYoUMbG5tc5aGN7t+KLmbxlnzj3nUqL6rNZm9zHkArw=; b=RFZgCpZiADJ1r5QMeuloHOnSwuqxKTeUiIZ2BwV+gCNy8R1CCNJzozgfAo9BEeJwUjllR9 9c07ZfyCE9ZrDd43pUPXWw9IR6ag2VI4EWat1c5TUSf/Qgmwl7DWcRTuXxhl2JR1/1qeF4 ku12+qrQptGp5fmzavtOjYPVkumxtVPjIsSVaYbVqwnGcCwZu8YJzVImj5uetZ0ENxQQMb lYYAlJPKx1zA+Q/uzGQQJDKj0hDuw4um48Y8F3yJ7b7OoPwAiClFAS89Ku27fsgX2RNs9k yPwJsPLA8/TLMZ8i3p4nhPF6t4/LOObXF8Rzeim4QZh6N8AeqXcSzfkUOVylEQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1726412379; a=rsa-sha256; cv=none; b=C8ljZuhzrAoBNwZicN1f3D0vNM4r4X0iDsVr4lwxNZ0I7Of3R6qJAEPQLmi8/iz0KGDcZ1 RVnnrBB68fGItTPJd8vLOPcWjEs5YlnwQLGAXlpTo/iCVjBfh+pdqIHoqfKpVK5iXXWJCf ePq5D4nPVktxybu3w/qC8bNJyVc1H8DRPAVkDQjBRTEbiY2SsPNdU1YYc0f2wY2Mpz7QJq qyvXc8Fivb7cVl+2bgZDP8Gs0u9VdzJRzmtkoKHrNE572n26Ljo/ZdtF9kbCpLE+WvsXi1 oCf9fQ1OT8eLoeTyUeM5bj3qgqWXDSPUFL363PY1nUgRkbMSURGDAF0zN6El4A== 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=1726412379; 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=BYoUMbG5tc5aGN7t+KLmbxlnzj3nUqL6rNZm9zHkArw=; b=LpkQvSWqNXmVMSdEFGMVS1e4m3LrKsFSLtg5rd71Zxoo9mQucAiuISUkXVY5ONxGck98qr m4GDldE5a5JclnbXeu3rYs2JiF0xhntsHOkYxKVmvuyGVwLBGD5MsZ1wkLbmjcbpoW07st y1vlRbp+FpFGJK/t3INE5ha8cuM5ZrRHFC2G+PnvWMYeCaZdTq1gvRkFqMG43HRu9/wfAG qjJfHPc18wMyRayz5i1y+DBEsIUlBzFj+lplttgTk2i8QuS6WVFj1VBfnrIVCQePjoojep /XszGLzNh1mQY4EtDgzFWSIHh5JQ1yxXt8OkKHechDPf/xwjrzCMKhECDiD+9A== 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 4X6B632S5gzFgc; Sun, 15 Sep 2024 14:59:39 +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 48FExdpo031937; Sun, 15 Sep 2024 14:59:39 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 48FExd2u031934; Sun, 15 Sep 2024 14:59:39 GMT (envelope-from git) Date: Sun, 15 Sep 2024 14:59:39 GMT Message-Id: <202409151459.48FExd2u031934@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Ed Maste Subject: git: 056c50c48be3 - stable/14 - 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: emaste X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: 056c50c48be3e3828ef740d2fcce988a545e52aa Auto-Submitted: auto-generated The branch stable/14 has been updated by emaste: URL: https://cgit.FreeBSD.org/src/commit/?id=056c50c48be3e3828ef740d2fcce988a545e52aa commit 056c50c48be3e3828ef740d2fcce988a545e52aa Author: Mariusz Zaborski AuthorDate: 2024-09-11 14:43:43 +0000 Commit: Ed Maste CommitDate: 2024-09-15 14:59:15 +0000 libnv: correct the calculation of the structure's size Reported by: Milosz Kaniewski (cherry picked from commit 7f4731ab67f1d3345aee6626eb83cc5ce00010f0) --- 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); }