From nobody Tue Jan 23 02:17:53 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 4TJrN20XfHz58gbs; Tue, 23 Jan 2024 02:17:54 +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 4TJrN16nglz44yk; Tue, 23 Jan 2024 02:17:53 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1705976274; 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=V3gYiN/nnw8qA21v2MnhSof3Fz7sPpqe13cvcHlUBoI=; b=W3Gpsdzfbi0gn2hXIolt8F/5bS/4RMEd25XB3CQndudFTqoMGKjVqhhtCo9Vg90jDsJ9zD kMvZ0/zqNGRbGVhfbtByPLahAjt5Z/2emdG33r1YAVmu31aO04alhe6GNN8h/bDEfEWcaz 8CbCLS5/KVvStCA5iMc9Dw42BC7AhotI1bc8EM0THqu1NL5x9ziC4qLI+f34ElnziTKYzp yuIZ7H/XECcvvo/m+B+otC5Az8dBDfT/Qo/GV3V6KfIyinsScRfLthTbjvo7URx85nMWrQ ZHvU7OS2zvhoDba1VMPXh9kMJtd3TjNnhmyS+k6Du6Ojt/BS82KVTmm7+5xdkQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1705976274; 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=V3gYiN/nnw8qA21v2MnhSof3Fz7sPpqe13cvcHlUBoI=; b=coIqkyFh6dzcC1Ld6LfxdQMNOeAYBcZvfZ+yHb2Ke69F0GgQcVUMfGdK/hEvm7g86SqaqI 36aQz50Png102Plje9R3kFgD/1vVtu4QhExmu6wt6KGCSPm50U3Yu3WEr6+iu3i5q3Gy9f ZvUikntHh8wLOBFEwnoKQC9Xe5V/HiC+e9Cx+qmOyHYmJDWanSaVLGvS6NZsmqtWSFRPo2 el27csJoiDaN/cDQnQRrq89KFZQfxXSAOo0445KW/wXO8J/Z/kzAfx4JvdgQtolnrYapPh RWRjGancg45mMRC71Oo0CTag8MU+JZN8BCFMGAAcu4JX/7xd8y9SDujHzhPnyQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1705976274; a=rsa-sha256; cv=none; b=RJAW94uk9sw4PgmVD1jYiSGXaTdzkr0FFqdoHY04Ia7SEDchfKHRFk+BG9Zccp+BbN605R Q1TWCXd5cda5bzVu0oS3KdHDqpCDtVPCuCu9OHKCbFY+bByr+1I8KsGufh9bDvl7mS4ovk cFULpdHkylwjacxPjhKyhyjVOc0464N/w5izughxY23Vdnnh525voI5ps1FtqD+GZUl6sA Fzj5EZr7dMeEYYn+u6fKkFTkpFkp+US5Gg+K3ZSBb+MNvjDtud0BWu/eYlhqP1PWKISASP OioHrthpEBGf9/jIaUTEJwRE8iPtysHnJuQ0Djl/BLlSi1DiYxvNqTxd9oasnA== 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 4TJrN15rtTz1Q8d; Tue, 23 Jan 2024 02:17:53 +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 40N2HrGP004495; Tue, 23 Jan 2024 02:17:53 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 40N2HrJN004492; Tue, 23 Jan 2024 02:17:53 GMT (envelope-from git) Date: Tue, 23 Jan 2024 02:17:53 GMT Message-Id: <202401230217.40N2HrJN004492@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Ed Maste Subject: git: 3f4f82c0d779 - main - 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/main X-Git-Reftype: branch X-Git-Commit: 3f4f82c0d7791bddf2d6f2c29d9f2f8c48c712e2 Auto-Submitted: auto-generated The branch main has been updated by emaste: URL: https://cgit.FreeBSD.org/src/commit/?id=3f4f82c0d7791bddf2d6f2c29d9f2f8c48c712e2 commit 3f4f82c0d7791bddf2d6f2c29d9f2f8c48c712e2 Author: Ed Maste AuthorDate: 2024-01-23 02:05:58 +0000 Commit: Ed Maste CommitDate: 2024-01-23 02:17:23 +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 --- 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 2c03117e344a..b831c8ba4ec6 100644 --- a/sbin/bsdlabel/bsdlabel.c +++ b/sbin/bsdlabel/bsdlabel.c @@ -50,7 +50,7 @@ #include #define DKTYPENAMES #define FSTYPENAMES -#define MAXPARTITIONS 20 +#define MAXPARTITIONS 8 /* XXX should be 20, but see PR276517 */ #include #include