Files
rt-thread/components
bernardandDeepSeek 4.1 Flash d59285201a [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 <noreply@deepseek.com>
2026-11-04 21:30:29 +08:00
..
…
2026-10-17 09:44:26 +08:00
…