mirror of
https://github.com/Evolution-X/hardware_interfaces
synced 2026-02-01 22:04:26 +00:00
This cl adds verifications to the IRPC VTS to check that: - RKP VM DICE chains have a continuous presence of RKP VM markers till the last DICE certificate. - Non-RKP VM DICE chains do not have such continuous presence of RKP VM markers. Test: atest VtsHalRemotelyProvisionedComponentTargetTest Test: atest libkeymint_remote_prov_support_test Bug: 314128697 Change-Id: Ib966b4bd584f1f931b7f19b4b58a1a37b5266f5e
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
- keymint_attestation_fuzzer
- keymint_authSet_fuzzer
- keymint_remote_prov_fuzzer
- keymint_rkpsupport_fuzzer
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
Fuzzer for KeyMintRemoteProv
KeyMintRemoteProv supports the following parameters:
- ChallengeSize(parameter name: "challengeSize")
- Challenge(parameter name: "challenge")
- NumKeys(parameter name: "numKeys")
| Parameter | Valid Values | Configured Value |
|---|---|---|
challengeSize |
uint8_t |
Value obtained from FuzzedDataProvider |
challenge |
std::vector<uint8_t> |
Value obtained from FuzzedDataProvider |
numKeys |
uint8_t |
Value obtained from FuzzedDataProvider |
Steps to run
- Build the fuzzer
$ mm -j$(nproc) keymint_remote_prov_fuzzer
- Run on device
$ adb sync data
$ adb shell /data/fuzz/arm64/keymint_remote_prov_fuzzer/keymint_remote_prov_fuzzer
Fuzzer for KeyMintRemoteKeyProvSupport
KeyMintRemoteKeyProvSupport supports the following parameters:
- SupportedEekCurve(parameter name: "supportedEekCurve")
- Length(parameter name: "length")
- SerialNumberProp(parameter name: "serialNoProp")
- InstanceName(parameter name: "instanceName")
- Value(parameter name: "value")
| Parameter | Valid Values | Configured Value |
|---|---|---|
supportedEekCurve |
uint8_t |
Value obtained from FuzzedDataProvider |
length |
uint8_t |
Value obtained from FuzzedDataProvider |
serialNoProp |
string |
Value obtained from FuzzedDataProvider |
instanceName |
string |
Value obtained from FuzzedDataProvider |
value |
uint8_t |
Value obtained from FuzzedDataProvider |
Steps to run
- Build the fuzzer
$ mm -j$(nproc) keymint_rkpsupport_fuzzer
- Run on device
$ adb sync data
$ adb shell /data/fuzz/arm64/keymint_rkpsupport_fuzzer/keymint_rkpsupport_fuzzer