[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20120205220950.259230674@pcw.home.local>
Date: Sun, 05 Feb 2012 23:10:08 +0100
From: Willy Tarreau <w@....eu>
To: linux-kernel@...r.kernel.org, stable@...r.kernel.org
Cc: Timo Warns <warns@...-sense.de>,
Linus Torvalds <torvalds@...ux-foundation.org>,
Greg KH <gregkh@...uxfoundation.org>
Subject: [PATCH 19/91] Validate size of EFI GUID partition entries.
2.6.27-longterm review patch. If anyone has any objections, please let us know.
------------------
commit fa039d5f6b126fbd65eefa05db2f67e44df8f121 upstream.
Otherwise corrupted EFI partition tables can cause total confusion.
Signed-off-by: Timo Warns <warns@...-sense.de>
Signed-off-by: Linus Torvalds <torvalds@...ux-foundation.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@...e.de>
---
fs/partitions/efi.c | 6 ++++++
1 files changed, 6 insertions(+), 0 deletions(-)
Index: longterm-2.6.27/fs/partitions/efi.c
===================================================================
--- longterm-2.6.27.orig/fs/partitions/efi.c 2012-02-05 22:34:34.453915054 +0100
+++ longterm-2.6.27/fs/partitions/efi.c 2012-02-05 22:34:37.590915121 +0100
@@ -343,6 +343,12 @@
goto fail;
}
+ /* Check that sizeof_partition_entry has the correct value */
+ if (le32_to_cpu((*gpt)->sizeof_partition_entry) != sizeof(gpt_entry)) {
+ pr_debug("GUID Partitition Entry Size check failed.\n");
+ goto fail;
+ }
+
if (!(*ptes = alloc_read_gpt_entries(bdev, *gpt)))
goto fail;
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists