[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[bug #38800] x86-64: overflowing relocation crashes GRUB

From: qwertial
Subject: [bug #38800] x86-64: overflowing relocation crashes GRUB
Date: Mon, 22 Apr 2013 05:46:10 +0000
User-agent: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.31 (KHTML, like Gecko) Chrome/26.0.1410.63 Safari/537.31


                 Summary: x86-64: overflowing relocation crashes GRUB
                 Project: GNU GRUB
            Submitted by: qwertial
            Submitted on: Mon 22 Apr 2013 05:46:08 AM GMT
                Category: None
                Severity: Major
                Priority: 5 - Normal
              Item Group: None
                  Status: None
                 Privacy: Public
             Assigned to: None
         Originator Name: 
        Originator Email: 
             Open/Closed: Open
         Discussion Lock: Any
                 Release: Bazaar - trunk
         Reproducibility: Every Time
         Planned Release: None



The x86-64 version of grub_arch_dl_relocate_symbols() does not check whether
an R_X86_64_PC32 relocation fits into 32 bits. This makes grub-emu-lite crash
(with default compiler options) when trying to execute the module, since
module code is loaded above 0x7ffff0000000, while grub-emu-lite code is loaded
around 0x400000.

Possible solutions:

0. Add an overflow check to grub_arch_dl_relocate_symbols().
1. Try to allocate module code near core code.
2. Use the system's dlopen() and dlsym() calls for loading modules in
grub-emu-lite instead of the built-in loader.
3. Compile with -mcmodel=large, which makes 32-bit relocations disappear.


Reply to this item at:


  Message sent via/by Savannah

reply via email to

[Prev in Thread] Current Thread [Next in Thread]