- html - 出于某种原因,IE8 对我的 Sass 文件中继承的 html5 CSS 不友好?
- JMeter 在响应断言中使用 span 标签的问题
- html - 在 :hover and :active? 上具有不同效果的 CSS 动画
- html - 相对于居中的 html 内容固定的 CSS 重复背景?
Libfuzzer 提供了两个 API 来开发自定义修改器。
size_t LLVMFuzzerCustomMutator(uint8_t *Data, size_t Size, size_t MaxSize, unsigned int Seed)
size_t LLVMFuzzerCustomCrossOver(const uint8_t *Data1, size_t Size1, const uint8_t *Data2, size_t Size2, uint8_t *Out, size_t MaxOutSize, unsigned int Seed)
这些 API 应该如何使用?
最佳答案
您只需要在您的 LLVMFuzzerTestOneInput
旁边实现这些功能。 .
google/fuzzing repository has a tutorial on how to implement structure-aware fuzzing .
此外,您可以从 CustomMutatorTest.cpp 中获得灵感。 , 和 CustomCrossOverTest.cpp , 来自 LLVM 存储库。
The fuzzer is required to be deterministic.
LLVMFuzzerTestOneInput
之前发生叫做。
LLVMFuzzerCustomMutator
, 和
LLVMFuzzerCustomCrossOver
分别:
Optional user-provided custom mutator.Mutates raw data in [Data, Data+Size) inplace.Returns the new size, which is not greater than MaxSize.Given the same Seed produces the same mutation.
Optional user-provided custom cross-over function.Combines pieces of Data1 & Data2 together into Out.Returns the new size, which is not greater than MaxOutSize.Should produce the same mutation given the same Seed.
Data
和
seed
应该产生相同的结果。
LLVMFuzzerCustomMutator
大多数情况下应该足够了。
关于clang - 如何使用 libfuzzers 自定义修改器 API?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/62706527/
我正在尝试使用 libfuzzer 模糊为大端 MIPS 架构编写的部分代码。 我在 Debian 小端机器下运行 libfuzzer 并出现段错误。我认为结果并不是100%值得信赖。如何将 libf
使用 libfuzzer 的模糊测试过程会无限期地继续,直到发现错误。 即使在发现错误后,libfuzzer 中是否有标志或选项可以改变并继续模糊测试? 最佳答案 ASAN_OPTIONS=halt_
Libfuzzer 提供了两个 API 来开发自定义修改器。 size_t LLVMFuzzerCustomMutator(uint8_t *Data, size_t Size, size_t Max
我正在试验 LLVM 项目的 libFuzzer,试图为音频信号处理库生成输入。 为了简单起见,我从一个常量零的 64kb PCM 作为初始语料库开始,使用 -max_len=65536。每次库调用的
我有一个 libFuzzer 用法的简单示例。 // Test_fuzzer.cc #include #include extern "C" int LLVMFuzzerTestOneInput(
我可以在 makefile 中使用以下变量成功编译 Nginx CC = clang-6.0 CFLAGS = -pipe -O -Wall -Wextra -Wpointer-arith -Wcon
我正在尝试链接在一起: libFuzzer.a,使用 clang++-5.0 和 -std=c++11 编译 我的模糊驱动程序,使用 clang++-5.0 和 -std=c++11 -stdlib=
http://llvm.org/docs/LibFuzzer.html我现在正在使用 libfuzzer 做一些工作,但是当我使用官方玩具示例时。当我运行这个命令时: clang++ -fsaniti
我是一名优秀的程序员,十分优秀!