Resolved PR comments and added more fuzz targets.
This commit is contained in:
@@ -1,9 +1,11 @@
|
||||
#![no_main]
|
||||
|
||||
use fuzz_helper::{process_input, InputType};
|
||||
use fuzz_helper::{process_ctap_specific_type, InputType};
|
||||
use libfuzzer_sys::fuzz_target;
|
||||
|
||||
// Fuzz inputs as CTAP1 U2F raw message.
|
||||
// Fuzz inputs as CTAP1 U2F raw messages.
|
||||
// For a more generic fuzz target including all CTAP commands, you can use
|
||||
// fuzz_target_process_ctap_command.
|
||||
fuzz_target!(|data: &[u8]| {
|
||||
process_input(data, InputType::Ctap1);
|
||||
process_ctap_specific_type(data, InputType::Ctap1);
|
||||
});
|
||||
|
||||
11
fuzz/fuzz_targets/fuzz_target_process_ctap2_client_pin.rs
Normal file
11
fuzz/fuzz_targets/fuzz_target_process_ctap2_client_pin.rs
Normal file
@@ -0,0 +1,11 @@
|
||||
#![no_main]
|
||||
|
||||
use fuzz_helper::{process_ctap_specific_type, InputType};
|
||||
use libfuzzer_sys::fuzz_target;
|
||||
|
||||
// Fuzz inputs as CTAP2 client pin command parameters encoded in cbor.
|
||||
// For a more generic fuzz target including all CTAP commands, you can use
|
||||
// fuzz_target_process_ctap_command.
|
||||
fuzz_target!(|data: &[u8]| {
|
||||
process_ctap_specific_type(data, InputType::CborClientPinParameter);
|
||||
});
|
||||
11
fuzz/fuzz_targets/fuzz_target_process_ctap2_get_assertion.rs
Normal file
11
fuzz/fuzz_targets/fuzz_target_process_ctap2_get_assertion.rs
Normal file
@@ -0,0 +1,11 @@
|
||||
#![no_main]
|
||||
|
||||
use fuzz_helper::{process_ctap_specific_type, InputType};
|
||||
use libfuzzer_sys::fuzz_target;
|
||||
|
||||
// Fuzz inputs as CTAP2 get assertion command parameters encoded in cbor.
|
||||
// For a more generic fuzz target including all CTAP commands, you can use
|
||||
// fuzz_target_process_ctap_command.
|
||||
fuzz_target!(|data: &[u8]| {
|
||||
process_ctap_specific_type(data, InputType::CborGetAssertionParameter);
|
||||
});
|
||||
@@ -1,9 +1,11 @@
|
||||
#![no_main]
|
||||
|
||||
use fuzz_helper::{process_input, InputType};
|
||||
use fuzz_helper::{process_ctap_specific_type, InputType};
|
||||
use libfuzzer_sys::fuzz_target;
|
||||
|
||||
// Fuzz inputs as CTAP2 make credential command parameters encoded in cbor.
|
||||
// For a more generic fuzz target including all CTAP commands, you can use
|
||||
// fuzz_target_process_ctap_command.
|
||||
fuzz_target!(|data: &[u8]| {
|
||||
process_input(data, InputType::CborMakeCredentialParameter);
|
||||
process_ctap_specific_type(data, InputType::CborMakeCredentialParameter);
|
||||
});
|
||||
|
||||
9
fuzz/fuzz_targets/fuzz_target_process_ctap_command.rs
Normal file
9
fuzz/fuzz_targets/fuzz_target_process_ctap_command.rs
Normal file
@@ -0,0 +1,9 @@
|
||||
#![no_main]
|
||||
|
||||
use fuzz_helper::process_ctap_any_type;
|
||||
use libfuzzer_sys::fuzz_target;
|
||||
|
||||
// Generically fuzz inputs as CTAP commands.
|
||||
fuzz_target!(|data: &[u8]| {
|
||||
process_ctap_any_type(data);
|
||||
});
|
||||
@@ -1,9 +1,9 @@
|
||||
#![no_main]
|
||||
|
||||
use fuzz_helper::split_assemble;
|
||||
use fuzz_helper::split_assemble_hid_packets;
|
||||
use libfuzzer_sys::fuzz_target;
|
||||
|
||||
// Fuzzing HID packets splitting and assembling functions.
|
||||
fuzz_target!(|data: &[u8]| {
|
||||
split_assemble(data);
|
||||
split_assemble_hid_packets(data);
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user