bugGNU GRUB - Bugs: bug #9673, segfault at startup due to too...

 
 

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

bug #9673: segfault at startup due to too many disks

Submitter:  Egmont Koblinger <egmont>
Submitted:  Fri 16 Jul 2004 09:32:47 PM UTC
   
 
Category:  Disk & Partition Severity:  Major
Priority:  5 - Normal Item Group:  Software Error
Status:  None Privacy:  Public
Assigned to:  None Originator Name:  egmont
Open/Closed:  Closed Release:  None
Release:  0.95 Reproducibility:  Every Time
Planned Release:  None

Sat 15 Dec 2007 12:59:45 PM UTC, comment #1: 

We've moved to GRUB 2 as a development platform. Please can you check if this bug still applies there, and if it does, reopen it?

Thanks

Robert Millan <robertmh>
Group administrator
Fri 16 Jul 2004 09:32:47 PM UTC, original submission:  


Suddenly I noticed that an interactive startup of the grub
os shell exitst with a segmentation fault. It took about
two hours for me to locate the issue. The segfault only
occurs if I don't give an existing device.map to grub.

lib/device.c starts to put entries of hard disks to a
buffer of size 256, starting at offset 128 (0x80), counting
the number of hard disks in num_hd. And it doesn't check
for overrun.

I have two disks, /dev/discs/disc[01] point to them, and
I have 256 more files under /dev/discs (disc2 ... disc257)
all pointing to "../" . So no wonder grub segfaults while
filling up (well, actually not when filling up, but later
when accessing) this array.

Yes, I know, it is a bug in my kernel or devfsd or whatever,
not in GRUB.

However, I guess a limit check in GRUB cannot hurt anyone.
Patch attached. Don't ask my why the limit for the number
of hard disks is 0x40. Could be 0x7f or whatsoever. Maybe
an expert knows the maximum number of disks any BIOS may
handle.

Egmont Koblinger <egmont>

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attached Files
file #1563:  limit-number-of-disks.patch added by egmont (538B - application/octet-stream)

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by robertmh (Posted a comment)
  •  

    There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.

     

    Follow 2 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2007-12-15 robertmh Open/ClosedOpen Closed
    2004-07-16 egmont Attached File- Added limit-number-of-disks.patch, #1500

    Back to the top

    Powered by Savane 3.13-02a9.
    Corresponding source code