Bug 496093 - [PATCH] Fix memory corruption in grub
Summary: [PATCH] Fix memory corruption in grub
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: grub
Version: 10
Hardware: All
OS: Linux
low
medium
Target Milestone: ---
Assignee: Peter Jones
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2009-04-16 15:26 UTC by Thomas Jarosch
Modified: 2010-01-30 22:07 UTC (History)
5 users (show)

Fixed In Version: 0.97-51.fc11
Clone Of:
Environment:
Last Closed: 2009-08-25 04:42:59 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)
Fix for memory corruption (787 bytes, patch)
2009-04-16 15:26 UTC, Thomas Jarosch
no flags Details | Diff

Description Thomas Jarosch 2009-04-16 15:26:33 UTC
Created attachment 339859 [details]
Fix for memory corruption

Hello together,

attached is a simple patch for a memory corruption in grub I discovered a while ago. This patch will make reliable booting from RAID1 discs possible again, atleast that's how I discovered the problem back then.

Cheers,
Thomas

Comment 1 Michael Schwendt 2009-05-29 15:30:01 UTC
OMG! Unbelievable! :-(  It's the

  s1[n - 1] = 0;

in grub_strncat(..) that corrupts the memory whenever n is out of bounds. In the place you've found, n is 256 instead of the target array size 16, and in turn the memory is corrupted *always*. (The generated device id string itself is never longer than 16, though)

Comment 2 Peter Jones 2009-06-04 13:52:24 UTC
Thanks for this patch; it'll be in grub-0.97-51 .

Comment 3 Fedora Update System 2009-06-04 14:03:26 UTC
grub-0.97-51.fc11 has been submitted as an update for Fedora 11.
http://admin.fedoraproject.org/updates/grub-0.97-51.fc11

Comment 4 Fedora Update System 2009-06-16 02:16:10 UTC
grub-0.97-51.fc11 has been pushed to the Fedora 11 testing repository.  If problems still persist, please make note of it in this bug report.
 If you want to test the update, you can install it with 
 su -c 'yum --enablerepo=updates-testing update grub'.  You can provide feedback for this update here: http://admin.fedoraproject.org/updates/F11/FEDORA-2009-6351

Comment 5 Fedora Update System 2009-08-25 04:42:55 UTC
grub-0.97-51.fc11 has been pushed to the Fedora 11 stable repository.  If problems still persist, please make note of it in this bug report.


Note You need to log in before you can comment on or make changes to this bug.