Revision ba2a3bf0925103ded2dcfe56d9ce26e58d17b60d authored by davkor on 07 December 2020, 22:01:05 UTC, committed by Facebook GitHub Bot on 07 December 2020, 22:02:20 UTC
Summary:
This PR adds a fuzzer to the project and infrastructure to integrate Rocksdb with OSS-Fuzz. OSS-Fuzz is a service run by Google that performs continuous fuzzing of important open source projects. The LevelDB project is also in being fuzzed by OSS-Fuzz (https://github.com/google/oss-fuzz/tree/master/projects/leveldb). Essentially, OSS-Fuzz will perform the fuzzing for you and email you bug reports, coverage reports etc. All we need is a set of email addresses that will receive this information.

For cross-referencing, the PR that adds the OSS-Fuzz logic is here: https://github.com/google/oss-fuzz/pull/4642

The `db_fuzzer` of the PR performs stateful fuzzing of Rocksdb by calling a sequence of Rockdb's APIs with random input in each fuzz iteration. Each fuzz iteration, thus, creates a new instance of Rocksdb and operates on this given instance. The goal is to test diverse states of Rocksdb and ensure no state lead to error conditions, e.g. memory corruption vulnerabilities.

The fuzzer is similar (although more complex) to the fuzzer that is currently being used to analyse Leveldb (https://github.com/google/oss-fuzz/blob/master/projects/leveldb/fuzz_db.cc)

Pull Request resolved: https://github.com/facebook/rocksdb/pull/7674

Reviewed By: pdillinger

Differential Revision: D25238536

Pulled By: cheng-chang

fbshipit-source-id: 610331c49a77eb68d3b1d7d5ef1b0ce230ac0630
1 parent 20c7d7c
History
File Mode Size
aligned_buffer.h -rw-r--r-- 7.7 KB
autovector.h -rw-r--r-- 9.7 KB
autovector_test.cc -rw-r--r-- 9.4 KB
bloom_impl.h -rw-r--r-- 21.1 KB
bloom_test.cc -rw-r--r-- 38.6 KB
build_version.cc.in -rw-r--r-- 305 bytes
build_version.h -rw-r--r-- 600 bytes
cast_util.h -rw-r--r-- 868 bytes
channel.h -rw-r--r-- 1.5 KB
coding.cc -rw-r--r-- 2.5 KB
coding.h -rw-r--r-- 13.8 KB
coding_lean.h -rw-r--r-- 3.1 KB
coding_test.cc -rw-r--r-- 6.1 KB
compaction_job_stats_impl.cc -rw-r--r-- 2.5 KB
comparator.cc -rw-r--r-- 6.6 KB
compression.h -rw-r--r-- 48.8 KB
compression_context_cache.cc -rw-r--r-- 3.6 KB
compression_context_cache.h -rw-r--r-- 1.7 KB
concurrent_task_limiter_impl.cc -rw-r--r-- 2.2 KB
concurrent_task_limiter_impl.h -rw-r--r-- 2.0 KB
core_local.h -rw-r--r-- 2.4 KB
crc32c.cc -rw-r--r-- 44.1 KB
crc32c.h -rw-r--r-- 1.7 KB
crc32c_arm64.cc -rw-r--r-- 4.3 KB
crc32c_arm64.h -rw-r--r-- 1.8 KB
crc32c_ppc.c -rw-r--r-- 2.5 KB
crc32c_ppc.h -rw-r--r-- 547 bytes
crc32c_ppc_asm.S -rw-r--r-- 13.6 KB
crc32c_ppc_constants.h -rw-r--r-- 34.3 KB
crc32c_test.cc -rw-r--r-- 5.1 KB
defer.h -rw-r--r-- 1.4 KB
defer_test.cc -rw-r--r-- 880 bytes
duplicate_detector.h -rw-r--r-- 2.3 KB
dynamic_bloom.cc -rw-r--r-- 2.3 KB
dynamic_bloom.h -rw-r--r-- 7.5 KB
dynamic_bloom_test.cc -rw-r--r-- 9.1 KB
fastrange.h -rw-r--r-- 4.3 KB
file_checksum_helper.cc -rw-r--r-- 4.5 KB
file_checksum_helper.h -rw-r--r-- 3.2 KB
file_reader_writer_test.cc -rw-r--r-- 15.4 KB
filelock_test.cc -rw-r--r-- 3.7 KB
filter_bench.cc -rw-r--r-- 27.4 KB
gflags_compat.h -rw-r--r-- 723 bytes
hash.cc -rw-r--r-- 3.0 KB
hash.h -rw-r--r-- 3.8 KB
hash_map.h -rw-r--r-- 1.9 KB
hash_test.cc -rw-r--r-- 23.3 KB
heap.h -rw-r--r-- 4.9 KB
heap_test.cc -rw-r--r-- 3.8 KB
kv_map.h -rw-r--r-- 922 bytes
log_write_bench.cc -rw-r--r-- 2.7 KB
math.h -rw-r--r-- 6.5 KB
math128.h -rw-r--r-- 8.1 KB
murmurhash.cc -rw-r--r-- 4.3 KB
murmurhash.h -rw-r--r-- 1.3 KB
mutexlock.h -rw-r--r-- 4.8 KB
ppc-opcode.h -rw-r--r-- 1.2 KB
random.cc -rw-r--r-- 1.4 KB
random.h -rw-r--r-- 6.1 KB
random_test.cc -rw-r--r-- 2.7 KB
rate_limiter.cc -rw-r--r-- 12.0 KB
rate_limiter.h -rw-r--r-- 3.3 KB
rate_limiter_test.cc -rw-r--r-- 9.6 KB
repeatable_thread.h -rw-r--r-- 3.7 KB
repeatable_thread_test.cc -rw-r--r-- 4.0 KB
ribbon_alg.h -rw-r--r-- 52.1 KB
ribbon_impl.h -rw-r--r-- 42.3 KB
ribbon_test.cc -rw-r--r-- 32.7 KB
set_comparator.h -rw-r--r-- 829 bytes
slice.cc -rw-r--r-- 6.4 KB
slice_test.cc -rw-r--r-- 4.0 KB
slice_transform_test.cc -rw-r--r-- 4.4 KB
status.cc -rw-r--r-- 4.5 KB
stderr_logger.h -rw-r--r-- 870 bytes
stop_watch.h -rw-r--r-- 3.5 KB
string_util.cc -rw-r--r-- 10.5 KB
string_util.h -rw-r--r-- 4.8 KB
thread_list_test.cc -rw-r--r-- 11.7 KB
thread_local.cc -rw-r--r-- 18.6 KB
thread_local.h -rw-r--r-- 3.7 KB
thread_local_test.cc -rw-r--r-- 14.6 KB
thread_operation.h -rw-r--r-- 3.9 KB
threadpool_imp.cc -rw-r--r-- 13.8 KB
threadpool_imp.h -rw-r--r-- 3.6 KB
timer.h -rw-r--r-- 9.3 KB
timer_queue.h -rw-r--r-- 7.2 KB
timer_queue_test.cc -rw-r--r-- 2.1 KB
timer_test.cc -rw-r--r-- 11.4 KB
user_comparator_wrapper.h -rw-r--r-- 2.9 KB
vector_iterator.h -rw-r--r-- 2.8 KB
work_queue.h -rw-r--r-- 4.0 KB
work_queue_test.cc -rw-r--r-- 5.9 KB
xxh3p.h -rw-r--r-- 57.5 KB
xxhash.cc -rw-r--r-- 39.2 KB
xxhash.h -rw-r--r-- 27.1 KB

back to top