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

Submitted by:  Egmont Koblinger <egmont>
Submitted on:  Fri 16 Jul 2004 09:32:47 PM UTC  
 
Category: Disk & PartitionSeverity: Major
Priority: 5 - NormalItem Group: Software Error
Status: NonePrivacy: Public
Assigned to: NoneOriginator Name: egmont
Open/Closed: ClosedRelease: 0.95
Release: NoneReproducibility: 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>
Project 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>

 

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
  • -unavailable- added by robertmh (Posted a comment)
  •  

    Do you think this task is very important?
    If so, you can click here to add your encouragement to it.
    This task has 0 encouragements so far.

    Only logged-in users can vote.

     

    Please enter the title of George Orwell's famous dystopian book (it's a date):

     

     

    Follow 2 latest changes.

    Date Changed By Updated Field Previous Value => Replaced By
    Sat 15 Dec 2007 12:59:45 PM UTCrobertmhOpen/ClosedOpen=>Closed
    Fri 16 Jul 2004 09:32:47 PM UTCegmontAttached File-=>Added limit-number-of-disks.patch, #1500

    Back to the top


    Powered by Savane 3.1-cleanup1