FAQ Search Today's Posts Mark Forums Read
» Video Reviews

» Linux Archive

Linux-archive is a website aiming to archive linux email lists and to make them easily accessible for linux users/developers.


» Sponsor

» Partners

» Sponsor

Go Back   Linux Archive > Redhat > Device-mapper Development

 
 
LinkBack Thread Tools
 
Old 10-24-2011, 01:37 PM
 
Default multipath-tools/kpartx gpt.c

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.
");
+ free(*gpt);
+ *gpt = NULL;
+ return 0;
+ }
+
+
if (!(*ptes = alloc_read_gpt_entries(fd, *gpt))) {
free(*gpt);
*gpt = NULL;

--
dm-devel mailing list
dm-devel@redhat.com
https://www.redhat.com/mailman/listinfo/dm-devel
 
Old 11-02-2011, 08:53 PM
Christophe Varoqui
 
Default multipath-tools/kpartx gpt.c

> --- 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.
");
> + 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/

--
dm-devel mailing list
dm-devel@redhat.com
https://www.redhat.com/mailman/listinfo/dm-devel
 

Thread Tools




All times are GMT. The time now is 04:23 PM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright 2007 - 2008, www.linux-archive.org