tree: ab2a7bf4837ba9138181182d10635fafc4cf2657 [path history] [tgz]
  1. Android.bp
  2. image_gen_rand.py
  3. liblp_apis_fuzzer.cpp
  4. liblp_builder_fuzzer.cpp
  5. liblp_super_layout_builder_fuzzer.cpp
  6. README.md
fs_mgr/liblp/fuzzer/README.md

Fuzzers for liblp

Table of contents

Fuzzer for LiblpBuilder

LiblpBuilder supports the following parameters:

  1. kAttributeTypes (parameter name: "attribute")
  2. blockDevSize (parameter name: "blockdev_size")
  3. metadataMaxSize (parameter name: "metadata_max_size")
  4. metadataSlotCount (parameter name: "metadata_slot_count")
  5. partitionName (parameter name: "partition_name")
  6. superBlockDeviceName (parameter name: "block_device_name")
  7. blockDeviceInfoSize (parameter name: "block_device_info_size")
  8. alignment (parameter name: "alignment")
  9. alignmentOffset (parameter name: "alignment_offset")
  10. logicalBlockSize (parameter name: "logical_block_size")
  11. maxMetadataSize (parameter name: "max_metadata_size")
  12. deviceIndex (parameter name: "device_index")
  13. start (parameter name: "start")
  14. end (parameter name: "end")
  15. addedGroupName (parameter name: "group_name")
  16. partitionGroupName (parameter name: "partition_name")
  17. numSectors (parameter name: "num_sectors")
  18. physicalSector (parameter name: "physical_sector")
  19. resizedPartitionSize (parameter name: "requested_size")
ParameterValid ValuesConfigured Value
kAttributeTypes1.LP_PARTITION_ATTR_NONE,
2.LP_PARTITION_ATTR_READONLY,
3.LP_PARTITION_ATTR_SLOT_SUFFIXED,
4.LP_PARTITION_ATTR_UPDATED,
5.LP_PARTITION_ATTR_DISABLED
Value obtained from FuzzedDataProvider
blockDevSizeInteger value from 0 to 100000Value obtained from FuzzedDataProvider
metadataMaxSizeInteger value from 0 to 10000Value obtained from FuzzedDataProvider
metadataSlotCountInteger value from 0 to 2Value obtained from FuzzedDataProvider
partitionNameStringValue obtained from FuzzedDataProvider
superBlockDeviceNameStringValue obtained from FuzzedDataProvider
blockDeviceInfoSizeIntegerValue obtained from FuzzedDataProvider
alignmentIntegerValue obtained from FuzzedDataProvider
alignmentOffsetIntegerValue obtained from FuzzedDataProvider
logicalBlockSizeIntegerValue obtained from FuzzedDataProvider
maxMetadataSizeInteger value from 0 to 10000Value obtained from FuzzedDataProvider
deviceIndexIntegerValue obtained from FuzzedDataProvider
startIntegerValue obtained from FuzzedDataProvider
endIntegerValue obtained from FuzzedDataProvider
partitionGroupNameStringValue obtained from FuzzedDataProvider
numSectorsInteger value from 1 to 1000000Value obtained from FuzzedDataProvider
physicalSectorInteger value from 1 to 1000000Value obtained from FuzzedDataProvider
resizedPartitionSizeInteger value from 0 to 10000Value obtained from FuzzedDataProvider

Steps to run

  1. Build the fuzzer
  $ mm -j$(nproc) liblp_builder_fuzzer
  1. Run on device
  $ adb sync data
  $ adb shell /data/fuzz/arm64/liblp_builder_fuzzer/liblp_builder_fuzzer

Fuzzer for LiblpSuperLayoutBuilder

SuperLayoutBuilder supports the following parameters:

  1. kAttributeTypes (parameter name: "attribute")
  2. blockDevSize (parameter name: "blockdev_size")
  3. metadataMaxSize (parameter name: "metadata_max_size")
  4. partitionName (parameter name: "partition_name")
  5. data (parameter name: "data")
  6. imageName (parameter name: "image_name")
ParameterValid ValuesConfigured Value
kAttributeTypes1.LP_PARTITION_ATTR_NONE,
2.LP_PARTITION_ATTR_READONLY,
3.LP_PARTITION_ATTR_SLOT_SUFFIXED,
4.LP_PARTITION_ATTR_UPDATED,
5.LP_PARTITION_ATTR_DISABLED
Value obtained from FuzzedDataProvider
blockDevSizeInteger value from 0 to 100000Value obtained from FuzzedDataProvider
metadataMaxSizeInteger value from 0 to 10000Value obtained from FuzzedDataProvider
partitionNameStringValue obtained from FuzzedDataProvider
dataStringValue obtained from FuzzedDataProvider
imageNameStringValue obtained from FuzzedDataProvider

Steps to run

  1. Build the fuzzer
  $ mm -j$(nproc) liblp_super_layout_builder_fuzzer
  1. Run on device
  $ adb sync data
  $ adb shell /data/fuzz/arm64/liblp_super_layout_builder_fuzzer/liblp_super_layout_builder_fuzzer

Fuzzer for LiblpApis

LiblpAPIs supports the following parameters:

  1. blockDeviceInfoSize (parameter name: "block_device_info_size")
  2. alignment (parameter name: "alignment")
  3. alignmentOffset (parameter name: "alignment_offset")
  4. logicalBlockSize (parameter name: "logical_block_size")
  5. blockDevSize (parameter name: "blockdev_size")
  6. metadataMaxSize (parameter name: "metadata_max_size")
  7. blockDeviceInfoName (parameter name: "block_device_info_name")
  8. numSectors (parameter name: "num_sectors")
  9. physicalSector (parameter name: "physical_sector")
  10. sparsify (parameter name: "sparsify")
  11. buffer (parameter name: "data")
ParameterValid ValuesConfigured Value
blockDeviceInfoSizeIntegerValue obtained from FuzzedDataProvider
alignmentIntegerValue obtained from FuzzedDataProvider
alignmentOffsetIntegerValue obtained from FuzzedDataProvider
logicalBlockSizeIntegerValue obtained from FuzzedDataProvider
blockDevSizeInteger value in multiples of LP_SECTOR_SIZEValue obtained from FuzzedDataProvider
metadataMaxSizeInteger value from 0 to 10000Value obtained from FuzzedDataProvider
blockDeviceInfoNameStringValue obtained from FuzzedDataProvider
numSectorsInteger value from 1 to 1000000Value obtained from FuzzedDataProvider
physicalSectorInteger value from 1 to 1000000Value obtained from FuzzedDataProvider
alignmentBoolValue obtained from FuzzedDataProvider
alignmentVectorValue obtained from FuzzedDataProvider

Steps to run

  1. Build the fuzzer
  $ mm -j$(nproc) liblp_apis_fuzzer
  1. Run on device
  $ adb sync data
  $ adb shell /data/fuzz/arm64/liblp_apis_fuzzer/liblp_apis_fuzzer