HomeFreeBSD

bsdlabel: limit to 8 partitions

Description

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)

Details

Provenance
emasteAuthored on Jan 23 2024, 2:05 AM
Parents
rG806e51f81dba: if_wg: use proper barriers around pkt->p_state
Branches
Unknown
Tags
Unknown