Description
In the Linux kernel, the following vulnerability has been resolved: block: partitions: reject GPT entries with starting_lba > ending_lba A GPT entry whose starting_lba is greater than its ending_lba is accepted, and the kernel creates a partition with a bogus size. The bogus sector count defeats the end-of-device check, so I/O through that partition is not confined to it and can access sectors outside the partition on the same disk. is_pte_valid() only rejects an entry when its type is NULL or when starting_lba or ending_lba is greater than lastlba; it never checks that starting_lba <= ending_lba. For a reversed entry both field checks still pass, but efi_partition() computes size = ending_lba - starting_lba + 1 in u64, which underflows to a huge value. That value also wraps in the end-of-device check in blk_add_partition() (from + size) and does not fit the signed i_size, which turns negative. Reject entries with starting_lba > ending_lba in is_pte_valid(), matching the head-level check against last_usable_lba < first_usable_lba.
Affected products
Version statuses are supplied by the assigning organization. Consult the original record for detailed ranges and platform conditions.
Linux Linux
Default version status: unaffected
1da177e4c3f41524e886b7f1b8a0c1fc7321cac2 to < 8dd4d1f8f052ae5156c19c552285aaec92557626affected1da177e4c3f41524e886b7f1b8a0c1fc7321cac2 to < c39f4ac239381969140fc4e115c9ede418846ebeaffected1da177e4c3f41524e886b7f1b8a0c1fc7321cac2 to < 4e8faf6e16e77854ff6c594565387d5ed1ff3fb2affected1da177e4c3f41524e886b7f1b8a0c1fc7321cac2 to < 01a81e1de660c69e8ec699c5cce16984ce8bc940affected1da177e4c3f41524e886b7f1b8a0c1fc7321cac2 to < c48b839c32a3f45e1cdfe86ab21be2585f3420bdaffected1da177e4c3f41524e886b7f1b8a0c1fc7321cac2 to < 7e3801d12ebabaa3db6e2685ccc80b6e6f6d1ff7affected
Linux Linux
Default version status: affected
2.6.12affected0 to < 2.6.12unaffected5.10.276 to ≤ 5.10.*unaffected5.15.227 to ≤ 5.15.*unaffected6.12.120 to ≤ 6.12.*unaffected6.18.66 to ≤ 6.18.*unaffected7.3.7 to ≤ 7.3.*unaffected7.4-rc2 to ≤ *unaffected
References
- https://git.kernel.org/stable/c/8dd4d1f8f052ae5156c19c552285aaec92557626 ↗
- https://git.kernel.org/stable/c/c39f4ac239381969140fc4e115c9ede418846ebe ↗
- https://git.kernel.org/stable/c/4e8faf6e16e77854ff6c594565387d5ed1ff3fb2 ↗
- https://git.kernel.org/stable/c/01a81e1de660c69e8ec699c5cce16984ce8bc940 ↗
- https://git.kernel.org/stable/c/c48b839c32a3f45e1cdfe86ab21be2585f3420bd ↗
- https://git.kernel.org/stable/c/7e3801d12ebabaa3db6e2685ccc80b6e6f6d1ff7 ↗