From nobody Fri Mar 22 18:45:25 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 4V1WVF1hKsz5F4dH; Fri, 22 Mar 2024 18:45:25 +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 "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4V1WVF0sTFz4tMs; Fri, 22 Mar 2024 18:45:25 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1711133125; 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=2HFImihndat1Cn6QTkhlcg/aL+zuA4O35uyRJOTLRaI=; b=pvNbEctlqUs3KvNndKVfuimlZnnHNY7Q5RSK7oHydX7az3Oyin1Y6lygWvPCJRa3WjIs8S 5iHKmJd52FnDgQLjqhx0pN0nQI/gB+yk0W63qMn3iSlzRIWaEl81O7jCMgq52NRgh1+dev bWGJmk8ZSePTKtA4MwArVP5AhEg32GTFgqh+LAyMj/7C5rJoV83e5fxhtC2+E+vW8daMcY Rs7RcPPtMrmN1aGYi2H5rFLBe+lF7SFTgCvx3//vTKmrNCqbBNZHdbCY9+4UBvfykB4NbK d4qP/yXt1Wy9thB0YUBh4kHVZbarC+8eoThStUm2uruKPd0P2NxwiRa26kWdjg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1711133125; a=rsa-sha256; cv=none; b=ooqQ3YKX97kgT95gPaZ9ONx9nZCXkW8vKp6BdgYg/W+Bqh06MeVaXnRK8w/LgyvOsGyA2f yd7ZnhIKeO7HUvpbdd6dy5dEjnh+TcXnRWRuCsWJtm/vohXGONRNk5IxsuIwyyyUjKtHOU srQ90i1SF5TfUNAXTwWXQuv0izgHyEbzZuykSEpjZbMEnybxXrVNFrNBHzDNrsBOvFIqC6 XlF6xIjn3+stO5YtsoC5rRnANvjTo6/8ldNKlGq0rFqbyVksaytATUWNJ8BevMZjKwu+Oi 8DBLqeoL1LRT3xvzgBdirjbH8QjpHygDYC/LENEurI09906TzRkJmRPrKi1c4Q== 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=1711133125; 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=2HFImihndat1Cn6QTkhlcg/aL+zuA4O35uyRJOTLRaI=; b=xV99o84Zdo0B/4P/HCsNH7U6vE15aMOV05vuS7RpXNImUn2lKQvFSi8gCvgAoOcBDsBPv3 J5qJUquP6/ciVLvRC96iPwBQirZ33TSH3LP3Y1A76VQr3WU055MPjD9imlEq3s+i/gt8qA zV1AXavU+0N3YlGGaLQMQnhmVDLqiErNrc8dT9qyB+tkoiqlaUb7+yIK57oEpHH6G9ucbG 3jtMkiNgPB/0Wz4vNebvF4whNRY8YRBC31dyotxpPj4cfsjUzAcOgmHinkIVI8j/tVkxa1 PUr1n2PD7QntgGt4cP0HDzwAFkMtVieVzzOHQdl4Ov5Zs0A8R8Q6ilDRGFL5Ow== 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 4V1WVF0TmyzFyb; Fri, 22 Mar 2024 18:45:25 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 42MIjPgH029960; Fri, 22 Mar 2024 18:45:25 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 42MIjPaB029957; Fri, 22 Mar 2024 18:45:25 GMT (envelope-from git) Date: Fri, 22 Mar 2024 18:45:25 GMT Message-Id: <202403221845.42MIjPaB029957@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: a59eba2caacf - stable/13 - bsdlabel: limit to 8 partitions 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: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: 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/13 X-Git-Reftype: branch X-Git-Commit: a59eba2caacf82f741e8bbc334b2382c615744df Auto-Submitted: auto-generated The branch stable/13 has been updated by emaste: URL: https://cgit.FreeBSD.org/src/commit/?id=a59eba2caacf82f741e8bbc334b2382c615744df commit a59eba2caacf82f741e8bbc334b2382c615744df Author: Ed Maste AuthorDate: 2024-01-23 02:05:58 +0000 Commit: Ed Maste CommitDate: 2024-03-22 18:45:13 +0000 bsdlabel: limit to 8 partitions bsdlabel is intended to support up to 20 partitions, but the disklabel struct has a d_partitions array with only BSD_NPARTS_MIN (8) entries. Previously, an attempt to operate on a bsdlabel with more than eight partitions resulted in a buffer overflow. As a stopgap limit bsdlabel to 8 partitions until this is fixed properly. PR: 276517 (cherry picked from commit 3f4f82c0d7791bddf2d6f2c29d9f2f8c48c712e2) (cherry picked from commit a323dd42bcacdcd6b710fb90ba6691c6ce60cd3d) --- sbin/bsdlabel/bsdlabel.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sbin/bsdlabel/bsdlabel.c b/sbin/bsdlabel/bsdlabel.c index 7c7a5bbd6219..5f45039caecb 100644 --- a/sbin/bsdlabel/bsdlabel.c +++ b/sbin/bsdlabel/bsdlabel.c @@ -63,7 +63,7 @@ static char sccsid[] = "@(#)disklabel.c 8.2 (Berkeley) 1/7/94"; #include #define DKTYPENAMES #define FSTYPENAMES -#define MAXPARTITIONS 20 +#define MAXPARTITIONS 8 /* XXX should be 20, but see PR276517 */ #include #include