multipath-tools/kpartx gpt.c
CVSROOT: /cvs/dm
Module name: multipath-tools
Branch: RHEL5_FC6
Changes by: [email protected] 2011-10-24 13:37:18
Modified files:
kpartx : gpt.c
Log message:
Fix for bz #719575. Validate size of GPT partitions.
kpartx/gpt.c +9 -0
@@ -358,6 +358,15 @@return 0 ; } +/* Check that sizeof_partition_entry has the correct value */ +if (__le32_to_cpu ((*gpt)->sizeof_partition_entry) !=sizeof (gpt_entry)) { +// printf("GUID partition entry size check failed.\n"); +free (*gpt); + *gpt =NULL ; +return 0 ; + } + +if (!(*ptes =alloc_read_gpt_entries (fd, *gpt))) {free (*gpt); *gpt =NULL ;
Quoted 10 lines
kpartx/gpt.c +2
-0@@ -358,6 +358,15 @@return 0 ; } +/* Check that sizeof_partition_entry has the correct value */ +if (__le32_to_cpu ((*gpt)->sizeof_partition_entry) !=sizeof (gpt_entry)) {
kpartx/gpt.c line 372
Quoted 10 lines
kpartx/gpt.c +7
-0+// printf("GUID partition entry size check failed.\n"); +free (*gpt); + *gpt =NULL ; +return 0 ; + } + +if (!(*ptes =alloc_read_gpt_entries (fd, *gpt))) {free (*gpt); *gpt =NULL ;
Do you want this enhancement applied to upstream kpartx ? It seems the hole is open there at the moment.
Regards,
Signature · 3 lines
Christophe Varoqui OpenSVC - Tools to scale http://www.opensvc.com/