[MONGOCRYPT-186] Implement entry points suitable for libfuzzer Created: 01/Oct/19  Updated: 07/Nov/23

Status: Backlog
Project: Libmongocrypt
Component/s: C library
Affects Version/s: None
Fix Version/s: None

Type: Task Priority: Major - P3
Reporter: Roberto Sanchez Assignee: Unassigned
Resolution: Unresolved Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Depends
is depended on by MONGOCRYPT-119 Add fuzz testing to libmongocrypt Backlog
Epic Link: PM-3042

 Description   

As described in MONGOCRYPT-119, implementation of fuzz testing for libmongocrypt is needed. In order to support libfuzzer testing, however, it is necessary to implement one or more suitable entry points. The general requirements are that the program to be fuzzed, rather than a main() function, must have a function with the signature int LLVMFuzzerTestOneInput(const uint8_t *Data, size_t Size) and then be compiled/linked with clang using the flag -fsanitize=address,fuzzer. This may require writing additional functions that support processing a stream of bytes rather than reading from a file. An example patch for implementing suitable entry points for libbson is attached to MONGOCRYPT-119 as are instructions for how to run libfuzzer testing.


Generated at Thu Feb 08 09:08:10 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.