Bug 496093 - [PATCH] Fix memory corruption in grub
[PATCH] Fix memory corruption in grub
Status: CLOSED ERRATA
Product: Fedora
Classification: Fedora
Component: grub (Show other bugs)
10
All Linux
low Severity medium
: ---
: ---
Assigned To: Peter Jones
Fedora Extras Quality Assurance
: EasyFix
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2009-04-16 11:26 EDT by Thomas Jarosch
Modified: 2010-01-30 17:07 EST (History)
5 users (show)

See Also:
Fixed In Version: 0.97-51.fc11
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2009-08-25 00:42:59 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


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

  None (edit)
Description Thomas Jarosch 2009-04-16 11:26:33 EDT
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 11:30:01 EDT
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 09:52:24 EDT
Thanks for this patch; it'll be in grub-0.97-51 .
Comment 3 Fedora Update System 2009-06-04 10:03:26 EDT
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-15 22:16:10 EDT
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 00:42:55 EDT
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.