bugGNU GRUB - Bugs: bug #26789, Multiboot Loader Fixes (Patch...

 
 

You are not allowed to post comments on this tracker with your current authentication level.

bug #26789: Multiboot Loader Fixes (Patch attached)

Submitted by:  Owen Shepherd <tcowens>
Submitted on:  Fri 12 Jun 2009 01:38:29 PM UTC  
Votes:  100  
 
Category: BootingSeverity: Major
Priority: 5 - NormalItem Group: Software Error
Status: FixedPrivacy: Public
Assigned to: NoneOriginator Name: 
Open/Closed: ClosedRelease: HEAD
Release: Bazaar - trunkReproducibility: Every Time
Planned Release: None

Thu 21 Jan 2010 12:02:42 AM UTC, comment #1:

this code was reorgaised

Vladimir Serbinenko <phcoder>
Project Administrator
Fri 12 Jun 2009 01:38:29 PM UTC, original submission:

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

Owen Shepherd <tcowens>

 

Attached Files
file #18255:  multiboot_fix.diff added by tcowens (2KiB - application/octet-stream - Apply against head, trunk/grub2/)

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -unavailable- added by phcoder (Posted a comment)
  • -unavailable- added by sothis
  • -unavailable- added by tcowens (Submitted the item)
  •  

    Do you think this task is very important?
    If so, you can click here to add your encouragement to it.
    This task has 100 encouragements so far.

    Only logged-in users can vote.

     

    Please enter the title of George Orwell's famous dystopian book (it's a date):

     

     

    Follow 5 latest changes.

    Date Changed By Updated Field Previous Value => Replaced By
    Thu 21 Jan 2010 12:02:56 AM UTCphcoderOpen/ClosedOpen=>Closed
    Thu 21 Jan 2010 12:02:42 AM UTCphcoderStatusNone=>Fixed
      ReleaseNone=>Bazaar - trunk
    Tue 10 Nov 2009 12:23:58 AM UTCsothisCarbon-Copy-=>Added sothis
    Fri 12 Jun 2009 01:38:29 PM UTCtcowensAttached File-=>Added multiboot_fix.diff, #18255

    Back to the top


    Powered by Savane 3.1-cleanup1