summaryrefslogtreecommitdiff
path: root/components/rust
diff options
context:
space:
mode:
authorbernard <[email protected]>2026-11-03 07:17:49 +0800
committerRbb666 <[email protected]>2026-11-04 21:30:29 +0800
commitd59285201ac87c2a4942c1185b60e9c586fc1382 (patch)
tree3860ec4135d04dbfcba2072398e7f03ce3bd98ee /components/rust
parent1f024e372ba4a26478e28dfd54657d87689b2e96 (diff)
[drivers][block] reject GPT entries with ending_lba before starting_lba
is_pte_valid() accepted a GPT entry as long as both LBAs were inside the disk, so a crafted image could set ending_lba < starting_lba. The size computed in efi_partition() then underflowed to a huge value and was registered as the logical partition size. Reject entries whose end LBA is below the start LBA, and compute the partition start/size only after the entry passed validation. This avoids evaluating the underflow at all and reuses the validated start value for the size calculation. Fixes RT-Thread/rt-thread#11271. Co-authored-by: DeepSeek 4.1 Flash <[email protected]>
Diffstat (limited to 'components/rust')
0 files changed, 0 insertions, 0 deletions