Debian Bug report logs - #504099
gnu-fdisk: fails to display GPT partition properly

version graph

Package: gnu-fdisk; Maintainer for gnu-fdisk is (unknown);

Reported by: Osamu Aoki <osamu@debian.org>

Date: Fri, 31 Oct 2008 12:54:02 UTC

Severity: critical

Found in version gnu-fdisk/1.0-3

Fixed in version 1.3.0a-2+rm

Done: Debian FTP Masters <ftpmaster@ftp-master.debian.org>

Bug is archived. No further changes may be made.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to debian-bugs-dist@lists.debian.org, Aurélien GÉRÔME <ag@debian.org>:
Bug#504099; Package gnu-fdisk. (Fri, 31 Oct 2008 12:54:04 GMT) (full text, mbox, link).


Acknowledgement sent to Osamu Aoki <osamu@debian.org>:
New Bug report received and forwarded. Copy sent to Aurélien GÉRÔME <ag@debian.org>. (Fri, 31 Oct 2008 12:54:04 GMT) (full text, mbox, link).


Message #5 received at submit@bugs.debian.org (full text, mbox, reply):

From: Osamu Aoki <osamu@debian.org>
To: Debian Bug Tracking System <submit@bugs.debian.org>
Subject: gnu-fdisk: fails to display GPT partition properly
Date: Fri, 31 Oct 2008 21:45:57 +0900
Package: gnu-fdisk
Version: 1.0-3+b1
Severity: grave

data loss + security

On GPT partioned MacBook(Intel Mac), gnu-fdisk read GPT partition
properly for:
  Device Boot      Start         End      Blocks

But values displayed for:
  Id  System
are bogus.  GPT (http://en.wikipedia.org/wiki/GUID_Partition_Table)
Partition type GUIDs but it is not like old MBR type info.  Filesystem
needs to be identified with different method like one used by parted.

gptsync just print phrase based on "Partition type GUID".

Also this is not a tool maintained by upstream and the maintainer is not
willing to fix http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=461888

If maintainer admits as unmaintained software, there is big security
risk. grave bug.

I am wondering why this package is kept.  People need to have access
to libparted, they can do so with parted.   Tricking user with fdisk
while presenting wrong partition type info confuses people with no gain.

It may cause data loss due to wrong imprssion this software gives and
freitend user may do funny thing. data loss is grave bug

Based on this observation, I am filing this as RC bug to keep this away
from lenny release.

As for bug 461888, use of update-alternatives may not be good idea.  Its
backend is perl.  fdisk is a program is sometimes used in early
installation phase or system recovery, it is not good idea to use such
complicated method as alternative either.  (diversion is also not so
nice)  Thus if you think about maintaining this for squeeze, please
consider to pick different command names which does not overrap with
normail fdisk. 

Please see below how this displays partitions.

=========================

osamu@snoopy:~$ sudo fdisk /dev/sda
[sudo] password for osamu: 
GNU Fdisk 1.0
Copyright (C) 1998 - 2006 Free Software Foundation, Inc.
This program is free software, covered by the GNU General Public License.

This program is distributed in the hope that it will be useful, but WITHOUT ANY
WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
PARTICULAR PURPOSE.  See the GNU General Public License for more details.

Using /dev/sda
Command (m for help): p                                                   

Disk /dev/sda: 80 GB, 80023749120 bytes
255 heads, 63 sectors/track, 9729 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

   Device Boot      Start         End      Blocks   Id  System 
/dev/sda1   *           1          26      208813   83  Linux 
/dev/sda2              26        2098    16643340   83  Linux 
/dev/sda3   *        2115        6276    33423232   83  Linux 
/dev/sda4   *        6292        8364    16643340   83  Linux 
/dev/sda5   *        8381        8887     4064445   83  Linux 
/dev/sda6   *        8903        9164     2096482   83  Linux 
/dev/sda7            9164        9730     4546395   82  Linux Swap / Solaris 
Command (m for help): q                                                   
osamu@snoopy:~$ sudo gptsync /dev/sda

Current GPT partition table:
 #      Start LBA      End LBA  Type
 1             40       409639  EFI System (FAT)
 2         409640     33701927  Mac OS X HFS+
 3       33964072    100810791  EFI System (FAT)
 4      101072936    134365223  EFI System (FAT)
 5      134627368    142753831  EFI System (FAT)
 6      143015976    147210279  EFI System (FAT)
 7      147210280    156301447  Linux Swap

Current MBR partition table:
 # A    Start LBA      End LBA  Type
 1              1       409639  ee  EFI Protective
 2         409640     33701927  af  Mac OS X HFS+
 3 *     33964072    100810791  83  Linux
 4      101072936    134365223  83  Linux

Status: Tables are synchronized, no need to sync.

osamu@snoopy:~$ sudo parted /dev/sda print
Model: ATA FUJITSU MHV2080B (scsi)
Disk /dev/sda: 80.0GB
Sector size (logical/physical): 512B/512B
Partition Table: gpt

Number  Start   End     Size    File system  Name                  Flags
 1      20.5kB  210MB   210MB   fat32        EFI System Partition  boot 
 2      210MB   17.3GB  17.0GB  hfs+         Apple_HFS_Untitled_1       
 3      17.4GB  51.6GB  34.2GB  ext3         Linux64               boot 
 4      51.7GB  68.8GB  17.0GB  ext3         Linux32               boot 
 5      68.9GB  73.1GB  4161MB  ext3         Linux_test            boot 
 6      73.2GB  75.4GB  2147MB  ext3         linuxxxx              boot 
 7      75.4GB  80.0GB  4655MB  linux-swap   SWAP             




-- System Information:
Debian Release: lenny/sid
  APT prefers unstable
  APT policy: (800, 'unstable'), (500, 'testing')
Architecture: amd64 (x86_64)

Kernel: Linux 2.6.26-1-amd64 (SMP w/2 CPU cores)
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/bash

Versions of packages gnu-fdisk depends on:
ii  libc6            2.7-15                  GNU C Library: Shared libraries
ii  libncurses5      5.6+20081025-1          shared libraries for terminal hand
ii  libparted1.8-10  1.8.8.git.2008.03.24-11 The GNU Parted disk partitioning s
ii  libuuid1         1.41.3-1                universally unique id library

gnu-fdisk recommends no packages.

gnu-fdisk suggests no packages.

-- no debconf information




Information forwarded to debian-bugs-dist@lists.debian.org:
Bug#504099; Package gnu-fdisk. (Sat, 01 Nov 2008 14:39:02 GMT) (full text, mbox, link).


Acknowledgement sent to Aurélien GÉRÔME <ag@debian.org>:
Extra info received and forwarded to list. (Sat, 01 Nov 2008 14:39:02 GMT) (full text, mbox, link).


Message #10 received at 504099@bugs.debian.org (full text, mbox, reply):

From: Aurélien GÉRÔME <ag@debian.org>
To: Osamu Aoki <osamu@debian.org>, 504099@bugs.debian.org
Subject: Re: Bug#504099: gnu-fdisk: fails to display GPT partition properly
Date: Sat, 1 Nov 2008 15:35:50 +0100
[Message part 1 (text/plain, inline)]
severity 504099 important
thanks

Hi,

On Fri, Oct 31, 2008 at 09:45:57PM +0900, Osamu Aoki wrote:
> It may cause data loss due to wrong imprssion this software gives and
> freitend user may do funny thing. data loss is grave bug

You use the verb "may", hence you have no valid claim of a security
bug. Please show some proof, instead of writing down hypotheses.

> Based on this observation, I am filing this as RC bug to keep this away
> from lenny release.

I disagree, this is indeed an important bug, but it does no harm as
you present it.

Cheers,
-- 
 .''`.   Aurélien GÉRÔME
: :'  :
`. `'`   Debian Developer
  `-     Unix Sys & Net Admin
[signature.asc (application/pgp-signature, inline)]

Severity set to `important' from `grave' Request was from Aurélien GÉRÔME <ag@debian.org> to control@bugs.debian.org. (Sat, 01 Nov 2008 14:39:03 GMT) (full text, mbox, link).


Information forwarded to debian-bugs-dist@lists.debian.org, Parted Maintainer Team <parted-maintainers@lists.alioth.debian.org>:
Bug#504099; Package gnu-fdisk. (Sat, 29 Jun 2013 01:42:04 GMT) (full text, mbox, link).


Acknowledgement sent to Christoph Anton Mitterer <calestyo@scientia.net>:
Extra info received and forwarded to list. Copy sent to Parted Maintainer Team <parted-maintainers@lists.alioth.debian.org>. (Sat, 29 Jun 2013 01:42:05 GMT) (full text, mbox, link).


Message #17 received at 504099@bugs.debian.org (full text, mbox, reply):

From: Christoph Anton Mitterer <calestyo@scientia.net>
To: 504099@bugs.debian.org
Subject: gnu-fdisk: fails to display GPT partition properly
Date: Sat, 29 Jun 2013 03:38:47 +0200
[Message part 1 (text/plain, inline)]
severity 504099 critical
stop

Hi.

I can't quite understand why you've lowered the severity of this, as
this is really critical and has easily the potential to destroy all
data.

It's even more critical that gnu fdisk makes itself the default fdisk
over the utillinux one (which at least detects GPT and warns)... why
don't you use the alternatives mechanism?!


Anyway... GNU fdisk fails even more than not just understanding GPT or
at least warn that GPT is in place... it also seems to detect completely
bogus MBR data:
GNU Fdisk
     Device Boot      Start         End      Blocks   Id  System 
/dev/loop0p1   *          17        7808      499440   83  Linux 
/dev/loop0p2            7809   167755808 10735871936   83  Linux 
/dev/loop0p3       167755809   167772144     1045440   82  Linux Swap /
Solaris 


But the MBR of a GPT contains (per default) only one overall partition
of type EE... so called protective MBR.

utillinux fdisk shows at least this correctly.
      Device Boot      Start         End      Blocks   Id  System
/dev/loop0p1               1  4294967295  2147483647+  ee  GPT



I'm raising the severity (critical - "makes unrelated software on the
system (or the whole system) break, or causes serious data loss") again,
as users should be warned by this (apt-listbugs)... since every (write)
operation with GNU fdisk on a GPT system will most likely destroy
everything on it.


Having a GPT is not even unlikely... at least the Debian wheezy
installer already creates them for HDDs that needs it (i.e. all HDDs > 2
TB)... and these are more or less standard nowadays.


I guess no one demands that GNU-fdisk is able to create/modify GPTs...
but it should correctly identify the protective MBR... and if found
never write anything.
Actually it should generally assume a GPT in place, if any partition in
the MBR with type EE is found...
While the GPT specification demands that there is only one! overall!
partition with type EE... there are setups with hybrid GPT/MBR where
this is not the case... therefore... better assume GPT if any EE type
partition is found.



Cheers,
Chris.
[smime.p7s (application/x-pkcs7-signature, attachment)]

Severity set to 'critical' from 'important' Request was from Christoph Anton Mitterer <calestyo@scientia.net> to control@bugs.debian.org. (Sat, 29 Jun 2013 01:42:10 GMT) (full text, mbox, link).


Reply sent to Debian FTP Masters <ftpmaster@ftp-master.debian.org>:
You have taken responsibility. (Sun, 10 Sep 2017 15:57:51 GMT) (full text, mbox, link).


Notification sent to Osamu Aoki <osamu@debian.org>:
Bug acknowledged by developer. (Sun, 10 Sep 2017 15:57:51 GMT) (full text, mbox, link).


Message #24 received at 504099-done@bugs.debian.org (full text, mbox, reply):

From: Debian FTP Masters <ftpmaster@ftp-master.debian.org>
To: 442332-done@bugs.debian.org,461888-done@bugs.debian.org,494394-done@bugs.debian.org,504099-done@bugs.debian.org,504756-done@bugs.debian.org,519532-done@bugs.debian.org,535448-done@bugs.debian.org,563531-done@bugs.debian.org,580866-done@bugs.debian.org,611011-done@bugs.debian.org,614577-done@bugs.debian.org,622945-done@bugs.debian.org,632039-done@bugs.debian.org,643623-done@bugs.debian.org,660657-done@bugs.debian.org,684904-done@bugs.debian.org,696371-done@bugs.debian.org,703973-done@bugs.debian.org,704292-done@bugs.debian.org,714586-done@bugs.debian.org,744318-done@bugs.debian.org,770201-done@bugs.debian.org,824296-done@bugs.debian.org,826863-done@bugs.debian.org,
Cc: gnu-fdisk@packages.debian.org, gnu-fdisk@packages.qa.debian.org
Subject: Bug#870970: Removed package(s) from unstable
Date: Sun, 10 Sep 2017 15:55:43 +0000
Version: 1.3.0a-2+rm

Dear submitter,

as the package gnu-fdisk has just been removed from the Debian archive
unstable we hereby close the associated bug reports.  We are sorry
that we couldn't deal with your issue properly.

For details on the removal, please see https://bugs.debian.org/870970

The version of this package that was in Debian prior to this removal
can still be found using http://snapshot.debian.org/.

This message was generated automatically; if you believe that there is
a problem with it please contact the archive administrators by mailing
ftpmaster@ftp-master.debian.org.

Debian distribution maintenance software
pp.
Scott Kitterman (the ftpmaster behind the curtain)



Bug archived. Request was from Debbugs Internal Request <owner@bugs.debian.org> to internal_control@bugs.debian.org. (Mon, 09 Oct 2017 08:06:54 GMT) (full text, mbox, link).


Send a report that this bug log contains spam.


Debian bug tracking system administrator <owner@bugs.debian.org>. Last modified: Thu Nov 21 22:50:25 2024; Machine Name: buxtehude

Debian Bug tracking system

Debbugs is free software and licensed under the terms of the GNU Public License version 2. The current version can be obtained from https://bugs.debian.org/debbugs-source/.

Copyright © 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson, 2005-2017 Don Armstrong, and many other contributors.