* multipath-tools/kpartx gpt.c
@ 2011-10-24 13:37 bmarzins
2011-11-02 21:53 ` Christophe Varoqui
0 siblings, 1 reply; 2+ messages in thread
From: bmarzins @ 2011-10-24 13:37 UTC (permalink / raw)
To: dm-cvs, dm-devel
CVSROOT: /cvs/dm
Module name: multipath-tools
Branch: RHEL5_FC6
Changes by: bmarzins@sourceware.org 2011-10-24 13:37:18
Modified files:
kpartx : gpt.c
Log message:
Fix for bz #719575. Validate size of GPT partitions.
Patches:
http://sourceware.org/cgi-bin/cvsweb.cgi/multipath-tools/kpartx/gpt.c.diff?cvsroot=dm&only_with_tag=RHEL5_FC6&r1=1.3&r2=1.3.2.1
--- multipath-tools/kpartx/gpt.c 2006/10/13 23:28:47 1.3
+++ multipath-tools/kpartx/gpt.c 2011/10/24 13:37:18 1.3.2.1
@@ -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;
^ permalink raw reply [flat|nested] 2+ messages in thread* Re: multipath-tools/kpartx gpt.c
2011-10-24 13:37 multipath-tools/kpartx gpt.c bmarzins
@ 2011-11-02 21:53 ` Christophe Varoqui
0 siblings, 0 replies; 2+ messages in thread
From: Christophe Varoqui @ 2011-11-02 21:53 UTC (permalink / raw)
To: device-mapper development; +Cc: dm-cvs
> --- multipath-tools/kpartx/gpt.c 2006/10/13 23:28:47 1.3
> +++ multipath-tools/kpartx/gpt.c 2011/10/24 13:37:18 1.3.2.1
> @@ -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;
>
Do you want this enhancement applied to upstream kpartx ? It seems the
hole is open there at the moment.
Regards,
--
Christophe Varoqui
OpenSVC - Tools to scale
http://www.opensvc.com/
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2011-11-02 21:53 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-10-24 13:37 multipath-tools/kpartx gpt.c bmarzins
2011-11-02 21:53 ` Christophe Varoqui
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.