mirror of
https://github.com/Evolution-X/hardware_interfaces
synced 2026-02-03 08:25:17 +00:00
exec/s: 490 Test: ./keymint_authSet_fuzzer Bug: 337985606 Change-Id: I47ee42e6e97b98110bab8f923a94ed7b6e8b992d
Fuzzers for libkeymint_support
Plugin Design Considerations
The fuzzer plugins for libkeymint_support are designed based on the understanding of the source code and try 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 fuzzers.
Maximize utilization of input data
The plugins feed the entire input data to the module. This ensures that the plugins tolerate any kind of input (empty, huge, malformed, etc) and dont exit() on any input and thereby increasing the chance of identifying vulnerabilities.
Table of contents
Fuzzer for KeyMintAttestation
KeyMintAttestation supports the following parameters:
- PaddingMode(parameter name: "padding")
- Digest(parameter name: "digest")
- Index(parameter name: "idx")
- Timestamp(parameter name: "timestamp")
- AuthSet(parameter name: "authSet")
- IssuerSubjectName(parameter name: "issuerSubjectName")
- AttestationChallenge(parameter name: "challenge")
- AttestationApplicationId(parameter name: "id")
- EcCurve(parameter name: "ecCurve")
- BlockMode(parameter name: "blockmode")
- minMacLength(parameter name: "minMacLength")
- macLength(parameter name: "macLength")
| Parameter | Valid Values | Configured Value |
|---|---|---|
padding |
PaddingMode |
Value obtained from FuzzedDataProvider |
digest |
Digest |
Value obtained from FuzzedDataProvider |
idx |
size_t |
Value obtained from FuzzedDataProvider |
timestamp |
uint64_t |
Value obtained from FuzzedDataProvider |
authSet |
uint32_t |
Value obtained from FuzzedDataProvider |
issuerSubjectName |
uint8_t |
Value obtained from FuzzedDataProvider |
AttestationChallenge |
string |
Value obtained from FuzzedDataProvider |
AttestationApplicationId |
string |
Value obtained from FuzzedDataProvider |
blockmode |
BlockMode |
Value obtained from FuzzedDataProvider |
minMacLength |
uint32_t |
Value obtained from FuzzedDataProvider |
macLength |
uint32_t |
Value obtained from FuzzedDataProvider |
Steps to run
- Build the fuzzer
$ mm -j$(nproc) keymint_attestation_fuzzer
- Run on device
$ adb sync data
$ adb shell /data/fuzz/arm64/keymint_attestation_fuzzer/keymint_attestation_fuzzer
Fuzzer for KeyMintAuthSet
KeyMintAuthSet supports the following parameters:
- AuthorizationSet(parameter name: "authSet")
- AuthorizationSet(parameter name: "params")
- KeyParameters(parameter name: "numKeyParam")
- Tag(parameter name: "tag")
| Parameter | Valid Values | Configured Value |
|---|---|---|
authSet |
AuthorizationSet |
Value obtained from FuzzedDataProvider |
params |
AuthorizationSet |
Value obtained from FuzzedDataProvider |
numKeyParam |
size_t |
Value obtained from FuzzedDataProvider |
tag |
Tag |
Value obtained from FuzzedDataProvider |
Steps to run
- Build the fuzzer
$ mm -j$(nproc) keymint_authSet_fuzzer
- Run on device
$ adb sync data
$ adb shell /data/fuzz/arm64/keymint_authSet_fuzzer/keymint_authSet_fuzzer