[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[bug #38035] Off by one error in enumerating MSDOS partitions
From: |
Andrey Borzenkov |
Subject: |
[bug #38035] Off by one error in enumerating MSDOS partitions |
Date: |
Mon, 07 Jan 2013 14:24:40 +0000 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/17.0 Firefox/17.0 |
URL:
<http://savannah.gnu.org/bugs/?38035>
Summary: Off by one error in enumerating MSDOS partitions
Project: GNU GRUB
Submitted by: arvidjaar
Submitted on: Mon 07 Jan 2013 02:24:39 PM GMT
Category: Disk & Partition
Severity: Major
Priority: 5 - Normal
Item Group: Software Error
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:
As reported in https://bugzilla.novell.com/show_bug.cgi?id=779534#c19 under
some conditions GRUB2 includes extended partition in total partition numbering
causing wrong numbers to be assigned. This happens under following conditions
- extended primary partition exists
- the very first next extended boot record has extended partition as the first
entry (usually first entry points to normal partition)
Depending on number of primary partitions, it could also possibly happen for
next EBR as well.
Full partitions dump is available as
https://bugzilla.novell.com/attachment.cgi?id=519076
The reason is off by one error in grub_partition_msdos_iterate(). p.number
starts counting partitions with 0, so primary partitions have number 0..3 and
at the point p.number is incremented it still points to *previous* partition.
So it should be p.number < 3 to apply to primary partitions only.
Patch against trunk attached. It is confirmed as working by original reporter.
_______________________________________________________
File Attachments:
-------------------------------------------------------
Date: Mon 07 Jan 2013 02:24:39 PM GMT Name:
grub2-fix-enumeration-of-extended-partition.patch Size: 2kB By: arvidjaar
<http://savannah.gnu.org/bugs/download.php?file_id=27215>
_______________________________________________________
Reply to this item at:
<http://savannah.gnu.org/bugs/?38035>
_______________________________________________
Message sent via/by Savannah
http://savannah.gnu.org/
- [bug #38035] Off by one error in enumerating MSDOS partitions,
Andrey Borzenkov <=
- [bug #38035] Off by one error in enumerating MSDOS partitions, Vladimir Serbinenko, 2013/01/09
- [bug #38035] Off by one error in enumerating MSDOS partitions, Vladimir Serbinenko, 2013/01/09
- [bug #38035] Off by one error in enumerating MSDOS partitions, Vladimir Serbinenko, 2013/01/09
- [bug #38035] Off by one error in enumerating MSDOS partitions, Vladimir Serbinenko, 2013/01/09
- [bug #38035] Off by one error in enumerating MSDOS partitions, Vladimir Serbinenko, 2013/01/09
- Re: [bug #38035] Off by one error in enumerating MSDOS partitions, Vladimir 'φ-coder/phcoder' Serbinenko, 2013/01/20
- Re: [bug #38035] Off by one error in enumerating MSDOS partitions, Andrey Borzenkov, 2013/01/20
- Re: [bug #38035] Off by one error in enumerating MSDOS partitions, Vladimir 'φ-coder/phcoder' Serbinenko, 2013/01/20
- Re: [bug #38035] Off by one error in enumerating MSDOS partitions, Andrey Borzenkov, 2013/01/20
- Re: [bug #38035] Off by one error in enumerating MSDOS partitions, Michael Chang, 2013/01/21