tree: 0bcb8d94d2153dfeed43f1a4c1b7f6ca911da47b [path history] [tgz]
  1. Android.bp
  2. mediaresourcemanager_fuzzer.cpp
  3. README.md
  4. resourcemanager_service_fuzzer.cpp
  5. resourceobserver_service_fuzzer.cpp
services/mediaresourcemanager/fuzzer/README.md

Fuzzer for libresourcemanagerservice

Plugin Design Considerations

The fuzzer plugin for libresourcemanagerservice is designed based on the understanding of the service and tries to achieve the following:

Maximize code coverage

The configuration parameters are not hardcoded, but instead selected based on incoming data. This ensures more code paths are reached by the fuzzer.

Media Resource Manager supports the following parameters:

  1. Media Resource Type (parameter name: mediaResourceType)
  2. Media Resource SubType (parameter name: mediaResourceSubType)
ParameterValid ValuesConfigured Value
mediaResourceType0.MediaResource::kSecureCodec 1.MediaResource::kNonSecureCodecC 2.MediaResource::kGraphicMemory 3.MediaResource::kCpuBoost 4.MediaResource::kBattery 5.MediaResource::kDrmSessionValue obtained from FuzzedDataProvider
mediaResourceSubType0.MediaResource::kAudioCodec 1.MediaResource::kVideoCodec 2.MediaResource::kUnspecifiedSubTypeValue obtained from FuzzedDataProvider

This also ensures that the plugin is always deterministic for any given input.

Build

This describes steps to build mediaresourcemanager_fuzzer binary.

Android

Steps to build

Build the fuzzer

  $ mm -j$(nproc) mediaresourcemanager_fuzzer

Steps to run

Create a directory CORPUS_DIR and copy some files to that folder Push this directory to device.

To run on device

  $ adb sync data
  $ adb shell /data/fuzz/arm64/mediaresourcemanager_fuzzer/mediaresourcemanager_fuzzer CORPUS_DIR

References: