aboutsummaryrefslogtreecommitdiffstats
path: root/pkg/corpus
Commit message (Collapse)AuthorAgeFilesLines
* pkg/corpus: increase the priority of programs that were rarely selectedcorpusfixGrigory Bazilevich14 hours2-1/+31
|
* pkg/corpus: upgrade corpus minimization algorithmGrigory Bazilevich14 hours2-1/+25
|
* pkg/fuzzer,pkg/corpus: detection and preservation of programs with ↵Grigory Bazilevich15 hours1-28/+38
| | | | probability coverage
* pkg/corpus: update Programs List priority storageGrigory Bazilevich2026-02-155-17/+171
| | | | | | | | | | | Static prefix sums have been replaced with a Fenwick tree. In the current syzkaller, program priority was set based on a Signal received by a single system call. This commit allows priority to be changed dynamically, making it possible to maintain priority based on Signals from all system calls. Signed-off-by: Grigory Bazilevich <g.bazilevich@ispras.ru>
* pkg/corpus: add Cover() method for returning the corpus' coverageEthan Graham2025-09-221-0/+4
| | | | Signed-off-by: Ethan Graham <ethangraham@google.com>
* pkg/manager: abort fuzzing if no patched code is reachedAleksandr Nogikh2025-07-181-0/+10
| | | | | Don't waste time doing focused fuzzing if no modified code has been reached in 30 minutes after corpus triage.
* all: fix recvcheck errorsTaras Madan2025-02-071-2/+2
|
* pkg/corpus: move focus area configuration to the constructorAleksandr Nogikh2024-10-252-25/+19
| | | | | Set Corpus in HTTPServer dynamically. Refactor syz-manager and syz-diff accordingly.
* pkg/corpus: support multiple focus areasAleksandr Nogikh2024-10-255-51/+219
| | | | | | | | Focus area assigns a fuzzing priority to a set of PCs. When running ChooseProgram(), corpus will first select a focus area proportionally to the specified weights, and only then continue with selecting a program belonging to it.
* pkg/corpus: prefer smaller programs during minimizationAleksandr Nogikh2024-08-071-3/+9
| | | | | | | | | | | | | Occasionally, deflake() and minimize() fail and we end up with huge programs in the syzkaller corpus. Huge programs in the corpus, in turn, lead to slower corpus triage and slower exec/sec overall, since many of the executed programs are based on the ones from the corpus. A slightly bigger corpus with on average shorter and more focused programs sounds like a more desirable outcome. Give preference to smaller programs during minimization. It should hopefully improve the situation over time.
* pkg/stat: rename package name to singular formDmitry Vyukov2024-07-241-10/+10
| | | | | | | | Go package names should generally be singular form: https://go.dev/blog/package-names https://rakyll.org/style-packages https://groups.google.com/g/golang-nuts/c/buBwLar1gNw
* pkg/stats: rename Create to NewDmitry Vyukov2024-07-241-3/+3
| | | | | | New is more idiomatic name and is shorter (lines where stats.Create is used are usually long, so making them a bit shorter is good).
* pkg/corpus: don't keep serialized programs in memoryDmitry Vyukov2024-07-101-24/+21
| | | | | | | | We only need serialized representation on some rare operations (some web UI pages, and first hub connect). Don't keep them in memory. In my instance this saves 503MB (15.5%) of heap, which reduces RSS by 1GB (2x due to GC).
* all: adapt all cover and sig to 64bitJoey Jiao2024-05-272-11/+11
| | | | | | | | | | | | | | | | | | Taken some arm64 devices for example: kaslr_offset is diff at bits 12-40, and kernel modules are loaded at 2GB space, so we have `ffffffd342e10000 T _stext` where uppper 32bit is ffffffd3. However, if we check modules range, the 1st module is loaded at 0xffffffd2eeb2a000, while the last module is loaded at 0xffffffd2f42c4000. We can see the upper 32bits are diff for core kernel and modules. If we use current 32bits for covered PC, we will get wrong module address recovered. So we need to move to 64bit cover and signal: - change cover/sig to 64bit to fit for syz-executor change - remove kernel upper base logic as kernel upper base is not a constant when kaslr enabled for core kernel and modules. - remove unused pcBase
* pkg/corpus: don't overwrite ProgsListAleksandr Nogikh2024-05-132-16/+23
| | | | | | | There's still a risk of a race between the pointer overwriting and accesses to the embedded object. Let's use an internal replace() method instead.
* all: refactor statsDmitry Vyukov2024-04-092-25/+16
| | | | | | | Add ability for each package to create and export own stats. Each stat is self-contained, describes how it should be presented, and there is not need to copy them from one package to another. Stats also keep historical data and allow building graphs over time.
* pkg/corpus: avoid a race in Corpus.Minimize()Aleksandr Nogikh2024-04-052-5/+8
| | | | | | | | The following two operations were in conflict: 1) Overwriting of corpus.ProgramsList in Minimize(). 2) ProgramsList.ChooseProgram() that used its own mutex. Instead of overwriting the object, let's create a new one.
* pkg/fuzzer: don't triage saturated callsDmitry Vyukov2024-04-031-12/+1
| | | | | | | Currently we throw away saturated calls only after triage/minimization. Triage/minimization is unnecessary for saturated calls, we already know we will throw them away later. Don't send saturated calls for triage/minimization.
* pkg/fuzzer: implement basic max signal rotationAleksandr Nogikh2024-03-251-7/+0
| | | | | | | Once in 15 minutes, drop 1000 elements of the pure max signal (that is, max signal minus corpus signal). It seems to have a positive effect on the total fuzzing performance.
* all: move fuzzer to the hostAleksandr Nogikh2024-03-251-20/+0
| | | | | | | | | | | | Instead of doing fuzzing in parallel in running VM, make all decisions in the host syz-manager process. Instantiate and keep a fuzzer.Fuzzer object in syz-manager and update the RPC between syz-manager and syz-fuzzer to exchange exact programs to execute and their resulting signal and coverage. To optimize the networking traffic, exchange mostly only the difference between the known max signal and the detected signal.
* all: rename corpus and fuzzer Stat objectsAleksandr Nogikh2024-03-192-7/+7
| | | | | Stats() seems to be a more sound choice since these structures include multiple data points.
* pkg/corpus: track the total coverageAleksandr Nogikh2024-03-192-2/+35
|
* pkg/corpus: a separate package for the corpus functionalityAleksandr Nogikh2024-03-185-0/+470
pkg/fuzzer and syz-manager have a common corpus functionality that can be well be unified. Create a separate pkg/corpus package that would be used by both of them. It will simplify further work of moving pkg/fuzzer to the host.