URL:
  <http://savannah.gnu.org/bugs/?38800>

                 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: 
                 Release: Bazaar - trunk
         Reproducibility: Every Time
         Planned Release: None

    _______________________________________________________

Details:

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:

  <http://savannah.gnu.org/bugs/?38800>

_______________________________________________
  Message sent via/by Savannah
  http://savannah.gnu.org/


_______________________________________________
Bug-grub mailing list
[email protected]
https://lists.gnu.org/mailman/listinfo/bug-grub

Reply via email to