Laszlo Ersek
7b5e00f036
daemon/listfs: don't call "sgdisk -i" on bogus MBR partition table entry
...
The "is_partition_can_hold_filesystem" function calls
"Parted.part_get_gpt_type" on the partition if:
- the partition table type is GPT,
- or the partition table type is MBR, and the partition is primary or
logical.
The one entry in the fake MBR partition table described in the previous
patch passes the second branch of this check, therefore
"Parted.part_get_gpt_type" is reached, and it invokes "sgdisk -i 1" on the
disk.
Surprisingly (not), while "sgdisk -i" copes fine with valid MBR partition
tables, it chokes on the fake one. The output does not contain the
"Partition GUID code" line, and so "sgdisk_info_extract_field" throws an
exception.
Prevent calling "Parted.part_get_gpt_type" on a bogus MBR partition table,
similarly to the "extended entry in MBR partition table" case; the
difference is that the bogus primary entry, unlike a valid extended entry,
*can* hold a filesystem.
Bugzilla: https://bugzilla.redhat.com/show_bug.cgi?id=1931821
Signed-off-by: Laszlo Ersek <lersek@redhat.com >
Acked-by: Richard W.M. Jones <rjones@redhat.com >
Message-Id: <20211125094954.9713-6-lersek@redhat.com >
2021-12-09 13:54:15 +00:00
..
2021-12-09 13:54:15 +00:00
2019-05-30 09:12:32 +02:00
2017-07-27 17:31:41 +01:00
2017-07-27 17:31:41 +01:00
2017-07-27 22:31:22 +01:00
2020-03-06 19:32:32 +00:00
2017-07-27 17:31:41 +01:00
2021-03-22 14:26:57 +00:00
2020-03-06 19:32:32 +00:00
2020-03-06 19:32:32 +00:00
2020-03-06 19:32:32 +00:00
2021-03-26 16:06:03 +00:00
2020-03-06 19:32:32 +00:00
2017-07-10 17:01:59 +01:00
2017-07-27 17:31:41 +01:00
2021-04-08 11:36:40 +01:00
2016-01-22 09:12:17 +00:00
2017-07-27 17:31:41 +01:00
2016-07-26 10:43:45 +01:00
2019-11-28 13:09:21 +01:00
2020-03-06 19:32:32 +00:00
2020-10-12 10:44:08 +01:00
2018-02-06 17:27:23 +01:00
2018-02-06 17:27:23 +01:00
2020-03-06 19:32:32 +00:00
2021-03-16 11:24:37 +00:00
2017-09-16 22:27:16 +01:00
2018-01-09 12:17:53 +00:00
2020-03-30 10:40:13 +01:00
2020-03-06 19:32:32 +00:00
2020-03-06 19:32:32 +00:00
2017-08-08 17:50:23 +01:00
2021-02-22 10:37:49 +00:00
2020-03-06 19:32:32 +00:00
2021-03-22 14:56:10 +00:00
2020-03-06 19:32:32 +00:00
2017-07-27 17:31:41 +01:00
2017-07-27 17:31:41 +01:00
2017-07-27 17:31:41 +01:00
2020-03-06 19:32:32 +00:00
2017-07-10 17:01:59 +01:00
2020-03-06 19:32:32 +00:00
2018-04-19 11:30:29 +02:00
2016-07-26 10:43:45 +01:00
2020-03-06 19:32:32 +00:00
2020-03-06 19:32:32 +00:00
2020-03-06 19:32:32 +00:00
2016-07-26 10:43:45 +01:00
2020-03-06 19:32:32 +00:00
2020-03-06 19:32:32 +00:00
2020-03-06 19:32:32 +00:00
2015-10-27 17:25:49 +00:00
2017-07-27 17:31:41 +01:00
2017-07-27 17:31:41 +01:00
2016-02-04 11:25:56 +01:00
2020-03-06 19:32:32 +00:00
2021-04-08 11:36:40 +01:00
2020-03-06 19:32:32 +00:00
2017-09-16 22:27:16 +01:00
2017-07-27 17:31:41 +01:00
2017-07-27 17:31:41 +01:00
2021-09-07 14:48:03 +01:00
2020-03-06 19:32:32 +00:00
2020-03-06 19:32:32 +00:00
2020-03-06 19:32:32 +00:00
2020-03-06 19:32:32 +00:00
2020-03-06 19:32:32 +00:00
2020-03-06 19:32:32 +00:00
2021-04-15 09:41:35 +01:00
2020-03-06 19:32:32 +00:00
2020-03-06 19:32:32 +00:00
2020-03-06 19:32:32 +00:00
2020-03-06 19:32:32 +00:00
2020-03-06 19:32:32 +00:00
2021-04-15 09:41:35 +01:00
2016-04-12 20:59:40 +01:00
2020-03-06 19:32:32 +00:00
2020-03-06 19:32:32 +00:00
2021-05-13 09:19:31 +01:00
2017-07-27 17:31:41 +01:00
2018-02-12 11:24:06 +01:00
2020-03-06 19:32:32 +00:00
2021-05-13 12:04:41 +01:00
2020-03-06 19:32:32 +00:00
2021-12-09 13:54:15 +00:00
2017-07-27 17:31:41 +01:00
2021-09-07 14:53:06 +01:00
2020-10-12 10:44:29 +01:00
2020-03-06 19:32:32 +00:00
2020-03-06 19:32:32 +00:00
2018-07-26 12:02:59 +01:00
2021-02-22 11:04:15 +00:00
2020-03-06 19:32:32 +00:00
2021-09-09 14:52:03 +02:00
2021-12-09 13:54:15 +00:00
2021-12-09 13:54:15 +00:00
2021-12-09 13:54:15 +00:00
2017-03-03 11:32:37 +00:00
2017-07-27 17:31:41 +01:00
2020-03-06 19:32:32 +00:00
2020-03-06 19:32:32 +00:00
2017-08-08 17:50:23 +01:00
2020-03-06 19:32:32 +00:00
2020-03-06 19:32:32 +00:00
2020-03-06 19:32:32 +00:00
2020-03-06 19:32:32 +00:00
2021-01-05 10:31:00 +00:00
2021-12-09 13:54:15 +00:00
2021-12-09 13:54:15 +00:00
2020-03-06 19:32:32 +00:00
2020-03-06 19:32:32 +00:00
2021-03-27 09:31:00 +00:00
2021-03-26 16:26:00 +00:00
2017-07-27 17:31:41 +01:00
2017-07-27 17:31:41 +01:00
2017-07-27 17:31:41 +01:00
2020-07-30 13:58:35 +01:00
2017-07-27 17:31:41 +01:00
2017-07-27 17:31:41 +01:00
2017-07-27 17:31:41 +01:00
2017-07-27 17:31:41 +01:00
2017-07-10 17:01:59 +01:00
2020-03-06 19:32:32 +00:00
2020-03-06 19:32:32 +00:00
2017-07-27 17:31:41 +01:00
2020-03-06 19:32:32 +00:00
2017-07-27 17:31:41 +01:00
2017-07-27 22:31:22 +01:00
2020-03-06 19:32:32 +00:00
2020-03-06 19:32:32 +00:00
2021-02-22 10:38:19 +00:00
2018-05-15 11:15:54 +01:00
2015-07-02 16:08:44 +01:00
2020-03-06 19:32:32 +00:00
2021-12-09 13:54:15 +00:00
2021-09-07 15:55:48 +01:00
2021-12-09 13:54:15 +00:00
2021-12-09 13:54:15 +00:00
2015-10-05 14:28:33 +01:00
2021-09-07 15:55:43 +01:00
2021-03-30 12:56:58 +01:00
2021-12-09 13:54:15 +00:00
2020-03-06 19:32:32 +00:00
2017-07-27 17:31:41 +01:00