fdisk fails silently if extended partition is outside of disk

Bug #1084718 reported by Phillip Susi
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
util-linux (Ubuntu)
Triaged
Medium
Unassigned

Bug Description

While diagnosing bug #1078407, I ran into a bug in fdisk. The user's partition table includes an extended partition whose EBR lies beyond the end of the disk. This causes fdisk to exit without printing any output, even to display the size of the drive. I have reproduced this behavior myself using the user's MBR:

0000000: eb63 9010 8ed0 bc00 b0b8 0000 8ed8 8ec0 .c..............
0000010: fbbe 007c bf00 06b9 0002 f3a4 ea21 0600 ...|.........!..
0000020: 00be be07 3804 750b 83c6 1081 fefe 0775 ....8.u........u
0000030: f3eb 16b4 02b0 01bb 007c b280 8a74 018b .........|...t..
0000040: 4c02 cd13 ea00 7c00 00eb fe00 0000 0000 L.....|.........
0000050: 0000 0000 0000 0000 0000 0080 0100 0000 ................
0000060: 0000 0000 fffa 9090 f6c2 8074 05f6 c270 ...........t...p
0000070: 7402 b280 ea79 7c00 0031 c08e d88e d0bc t....y|..1......
0000080: 0020 fba0 647c 3cff 7402 88c2 52bb 1704 . ..d|<.t...R...
0000090: 8027 0374 06be 887d e817 01be 057c b441 .'.t...}.....|.A
00000a0: bbaa 55cd 135a 5272 3d81 fb55 aa75 3783 ..U..ZRr=..U.u7.
00000b0: e101 7432 31c0 8944 0440 8844 ff89 4402 ..t21..D.@.D..D.
00000c0: c704 1000 668b 1e5c 7c66 895c 0866 8b1e ....f..\|f.\.f..
00000d0: 607c 6689 5c0c c744 0600 70b4 42cd 1372 `|f.\..D..p.B..r
00000e0: 05bb 0070 eb76 b408 cd13 730d f6c2 800f ...p.v....s.....
00000f0: 84d0 00be 937d e982 0066 0fb6 c688 64ff .....}...f....d.
0000100: 4066 8944 040f b6d1 c1e2 0288 e888 f440 @f.D...........@
0000110: 8944 080f b6c2 c0e8 0266 8904 66a1 607c .D.......f..f.`|
0000120: 6609 c075 4e66 a15c 7c66 31d2 66f7 3488 f..uNf.\|f1.f.4.
0000130: d131 d266 f774 043b 4408 7d37 fec1 88c5 .1.f.t.;D.}7....
0000140: 30c0 c1e8 0208 c188 d05a 88c6 bb00 708e 0........Z....p.
0000150: c331 dbb8 0102 cd13 721e 8cc3 601e b900 .1......r...`...
0000160: 018e db31 f6bf 0080 8ec6 fcf3 a51f 61ff ...1..........a.
0000170: 265a 7cbe 8e7d eb03 be9d 7de8 3400 bea2 &Z|..}....}.4...
0000180: 7de8 2e00 cd18 ebfe 4752 5542 2000 4765 }.......GRUB .Ge
0000190: 6f6d 0048 6172 6420 4469 736b 0052 6561 om.Hard Disk.Rea
00001a0: 6400 2045 7272 6f72 0d0a 00bb 0100 b40e d. Error........
00001b0: cd10 ac3c 0075 f4c3 f0a9 0200 0000 0004 ...<.u..........
00001c0: 0500 83fe ffff 0001 0000 00f9 941b 00fe ................
00001d0: ffff 05fe ffff fefa 941b 02f8 1f00 0000 ................
00001e0: 0000 0000 0000 0000 0000 0000 0000 0000 ................
00001f0: 0000 0000 0000 0000 0000 0000 0000 55aa ..............U.

Phillip Susi (psusi)
Changed in util-linux (Ubuntu):
status: New → Triaged
importance: Undecided → Medium
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.