From nobody Fri Mar 22 18:43:13 2024 X-Original-To: dev-commits-src-branches@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 4V1WRj6vwFz5F4gH; Fri, 22 Mar 2024 18:43:13 +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 4V1WRj65nfz4snF; Fri, 22 Mar 2024 18:43:13 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1711132993; 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=POI/p/ja7DDIPakQ/G6a7FP3D8Td/2enYlA3jxkJq78=; b=GXIQdlWgYzeKOYntN65NVod90JgQw92Zf1MOP3WOsZh3kISyJAtPGlg7yTHW6hUajvuAHJ e3QLZ6+rWSedrgCSS4CNkR5nyvao3xu5SiFsWl18Qa0efPVmG1k9r4UIKJ9XecT0UgIY/v yukfZHHw9jvBfpXaKQbZGGy9orTPYpG7ybV7cC8a2orEZfCD6WNUWgdh3HyLOdtzTA+u8I fNYARGAeN3dsY8WyMbcwz8s5XH76F71vSIQd+BYL7MT9rgPTlIzNjlYCU3e/+JfKbupzvV kN4NdwXTx395kApmFvTR2rskrCpCQxhyT1XVPohSDub1I+hfNZslkbZGFWw3Xw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1711132993; a=rsa-sha256; cv=none; b=kuEg9vspbZi3wa8B67o8bcPGlD4iFAKBm6HsKtz3kJUOOWtad/jBmHP1O/J9kgke76lGTT pe1u4/HylMNWgZXu6ZM5VogyXALZQ2VXnA3OyWLRDfaqDHyeUWV4/ALD50c4zWUDFUEUGN UZ1mp4Hh5+9Cz3dhGwcoPeUQtIT1pFy9OptkprHYTbkD8s1KdO6Cm03WE8iFqZf8E2PUXh OitXo1FQeQFMEXjxeDLfNcEQsfN6FfjjJLp8AGoI6WF3aR50y8XsiWzHNln+9cuYtMMjqE NlUQVEM55huhm8D890JW1Iy2u7ofld+fc/EhX3pUutRADnzDoup1odtX6ZpkeQ== 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=1711132993; 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=POI/p/ja7DDIPakQ/G6a7FP3D8Td/2enYlA3jxkJq78=; b=E/MgFbZgRaaniDx1x559vDj9FzBe2Lk4R5XaN6dlbK+q8Mdk3DHlJvf2qiV+eth79sfQlz Lx9NxSQqcLvw0TNOAPHsaSeZBX/IFa7Jnkbp3Bd35Esv9nloGeK769FviGGi9mk3N2K+a9 CY9PstRXi+/bIuruDHfgMuk6JkDHqX2sEDSNcPRJeJmzeASzwNVd19JlmECLUiacm4E+3I gkgQ+80pvejTGwhmNdw4ryjtaiHludkmZ8Y5tS8O12V6ZziM98LKPOBMeApuGPXegXtOHr gAa2AETAPVAojAXuT0rShEw9qRHiawWc/HpYHj1ZGLN1gf4kUP3qwOp+fjUIKQ== 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 4V1WRj5g6WzG8t; Fri, 22 Mar 2024 18:43:13 +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 42MIhDox029279; Fri, 22 Mar 2024 18:43:13 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 42MIhDrv029276; Fri, 22 Mar 2024 18:43:13 GMT (envelope-from git) Date: Fri, 22 Mar 2024 18:43:13 GMT Message-Id: <202403221843.42MIhDrv029276@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: a323dd42bcac - stable/14 - bsdlabel: limit to 8 partitions List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-branches@freebsd.org X-BeenThere: dev-commits-src-branches@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: a323dd42bcacdcd6b710fb90ba6691c6ce60cd3d Auto-Submitted: auto-generated The branch stable/14 has been updated by emaste: URL: https://cgit.FreeBSD.org/src/commit/?id=a323dd42bcacdcd6b710fb90ba6691c6ce60cd3d commit a323dd42bcacdcd6b710fb90ba6691c6ce60cd3d Author: Ed Maste AuthorDate: 2024-01-23 02:05:58 +0000 Commit: Ed Maste CommitDate: 2024-03-22 18:42:59 +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) --- 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 766def59ffe9..56190bbf6858 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