URL:
<http://savannah.gnu.org/bugs/?26789>
Summary: Multiboot Loader Fixes (Patch attached)
Project: GNU GRUB
Submitted by: tcowens
Submitted on: Fri 12 Jun 2009 13:38:29 GMT
Category: Booting
Severity: Major
Priority: 5 - Normal
Item Group: Software Error
Status: None
Privacy: Public
Assigned to: None
Originator Name:
Originator Email:
Open/Closed: Open
Discussion Lock: Any
Release: HEAD
Reproducibility: Every Time
Planned Release:
_______________________________________________________
Details:
Grub2 currently does the following when attempting to load a Multiboot file:
Read 8192 bytes, and check for a Multiboot 1 header
Read another 8192 bytes, and check for a Multiboot 2 header.
There is a bug here: The multiboot 2 header is read from the wrong location.
There is also, in my opinion, a deficiency here in addition: It checks for a
Multiboot 1 header first.
The attached patch does two things:
Firstly, it reads the first 8192 bytes into a buffer shared between both
header checks, fixing the bug.
Secondly, it checks for a Multiboot 2 header first. This allows kernels to
take advantage of Multiboot 2 if available, and fall back to Multiboot 1 if
not.
The patch was generated against HEAD from my Git mirror of trunk/grub2/. If
it needs generating another way, please let me know (Though it's so trivial it
should be easy to apply by hand).
It touches only loader/multiboot_loader.c
_______________________________________________________
File Attachments:
-------------------------------------------------------
Date: Fri 12 Jun 2009 13:38:29 GMT Name: multiboot_fix.diff Size: 2kB By:
tcowens
Apply against head, trunk/grub2/
<http://savannah.gnu.org/bugs/download.php?file_id=18255>
_______________________________________________________
Reply to this item at:
<http://savannah.gnu.org/bugs/?26789>
_______________________________________________
Message sent via/by Savannah
http://savannah.gnu.org/
_______________________________________________
Bug-grub mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/bug-grub