Commit Graph

17 Commits

Author SHA1 Message Date
Elliott Hughes
2d39d3e54a Upgrade gptfdisk to cb4bf32074
This project was upgraded with external_updater.
Usage: tools/external_updater/updater.sh update gptfdisk
For more info, check https://cs.android.com/android/platform/superproject/+/master:tools/external_updater/README.md

Test: TreeHugger
Change-Id: Ie0d104dec8963b4a0c698f97843fdbf76d0d6fda
2023-03-15 19:10:32 +00:00
Rod Smith
edc67b66db Patch set from Bin Meng to clean up some code & support building sgdisk for Windows 2022-04-10 09:28:08 -04:00
Jeff Sharkey
83fdc99960 Add a fuzzer for gptfdisk.
Since gptfdisk is used to parse MBR and GPT partition tables from
untrusted USB and SD card storage devices, we should get a fuzzer
wired up to hunt for security issues.

To enable the fuzzer, we create a new "diskio-heap" implementation
for backing I/O operations, which allows us to treat the fuzzer
input as a fake block device.  These changes are as minimal as
possible to avoid future merge conflicts.

The single corpus input is a sample block device with a single
empty GPT partition created using these commands:

$ losetup /dev/loop0 typical.bin
$ gdisk /dev/loop0

And the final table is:

Number  Start (sector)    End (sector)  Size       Code  Name
   1              34              38   2.5 KiB     8300  Linux filesystem

Bug: 170783842
Test: SANITIZE_HOST=address make ${FUZZER_NAME} && ${ANDROID_HOST_OUT}/fuzz/$(get_build_var HOST_ARCH)/${FUZZER_NAME}/${FUZZER_NAME}
Change-Id: I21a2a5f7f1019365accf8fd74c958aaafe7f7ff7
2020-10-13 19:55:52 -06:00
Rod Smith
7dfc896734 Added support for showing the disk's model name under Linux. 2017-07-26 19:45:51 -04:00
Rod Smith
fc0e014bea Added code to read physical block size on Linux. 2017-07-25 21:33:18 -04:00
srs5694
0741fa21ac 0.8.6 release. 2013-01-09 12:55:40 -05:00
srs5694
a6297b8a2c Fix Ctrl+D problems; 0.8.4 release 2012-03-25 16:13:16 -04:00
srs5694
a17fe69ec0 Changes for version 0.8.0 2011-09-10 20:30:20 -04:00
srs5694
bf8950cad0 Version 0.7.0 2011-03-12 01:23:12 -05:00
srs5694
64cbd17106 Misc. bug fixes & restructuring. 2011-03-01 22:03:54 -05:00
srs5694
8a4ddfc919 Bring git up to 0.6.6 release version. 2010-03-21 19:05:49 -04:00
srs5694
a8582cfe6c Changes to sector alignment policies and behavior when restoring a
backup fails
2010-03-19 14:21:59 -04:00
srs5694
08bb0da079 Version 0.6.4 2010-02-19 17:19:55 -05:00
srs5694
cb76c673ee A few minor bug fixes; backup function now accepts dd output of MBR,
main header, and main partition table, as well as gdisk-generated
backups.
2010-02-11 22:22:22 -05:00
srs5694
0a6973119c Nearing 0.6.2 release; Windows version now works. 2010-01-28 21:10:52 -05:00
srs5694
fed16d043a Misc. updates and bug fixes 2010-01-27 23:03:40 -05:00
srs5694
add79a6e1b New files to support I/O restructuring and (currently broken) Windows
version.
2010-01-26 15:59:58 -05:00