aboutsummaryrefslogtreecommitdiffstats
path: root/pkg/db
Commit message (Collapse)AuthorAgeFilesLines
* syz-manager: information about probability-only inputs in dbGrigory Bazilevich19 hours1-0/+1
|
* syz-cluster: rewrite fuzz config generationAleksandr Nogikh2025-10-071-0/+39
| | | | | | | | Instead of a predefined set of manually written syz-manager configs, construct it dynamically from different bits. During triage, select not just one, but all matching fuzzer configurations and then merge them together.
* syz-manager: don't keep corpus in memoryDmitry Vyukov2024-07-102-20/+111
| | | | | | | | Add DB mode when it does not keep records in memory, instead it re-reads them from disk on compaction. On my instance this saves 466MB (14.3%) of heap, which reduces RSS by 900MB (2x due to GC).
* db: make ReadCorpus() deterministicAleksandr Nogikh2024-01-251-2/+8
| | | | It gives reproducibility to syz_execprog and syz_mutate behavior.
* all: use special placeholder for errorsTaras Madan2023-07-241-7/+7
|
* all: ioutil is deprecated in go1.19 (#3718)Taras Madan2023-02-232-6/+4
|
* pkg/db: make repair of the db file optionalDmitry Vyukov2022-02-012-15/+18
| | | | | | | | | | | It was too radical to repair and overwrite db file unconditionally. syz-execprog probes if a given file is a database. Usually it's a crash log or a single program, but db.Open started to overwrite it. And an explicit repair flag in db.Open and enable it only in syz-manager and syz-hub. Fixes #2997
* pkg/db: fix test under rootDmitry Vyukov2022-01-241-0/+3
| | | | | Opening inaccessible file won't fail under root. Skip the test.
* pkg/db: treat deserialization errors as softDmitry Vyukov2022-01-242-10/+64
| | | | | | | | corpus.db may get corrupted on an unexpected reset, etc. Commit a254b0f5 ("pkg/db: properly handle errors when loading a DB") made these errors fatal and manager never recovers on its own. Restore the previous behavior when we still recovered some records from the db. But (1) ensure that the file is at least writable and (2) add tests.
* pkg/db: properly handle errors when loading a DBDmitry Vyukov2021-12-092-6/+26
| | | | Properly return errors to caller instead of logging them.
* syz-manager: load test programs as candidatesDmitry Vyukov2020-09-141-36/+0
| | | | | | | | | | | 1. Load test programs directly from sys/OS/test. Since we have sykaller dir, we don't need separate workdir/seeds. 2. Load test programs into candidates avoiding pulling them into corpus. This unbreaks mgr.fresh detection and does not pollute corpus with programs that don't give coverage/contain unsupported syscalls, etc. Follow up to #2053
* syz-manager: add test file as corpusJiaheng Hu2020-09-141-0/+36
| | | | | | | This commit enables the syz-manager to add unit test files as corpus to accelerate fuzzing. The syz-ci would copy unit tests into the worker/seeds folder for each manager process, and the manager would add those tests as seed into the corpus.
* pkg/db: moved ReadCorpus function to avoid duplicate codeVeronica Radu2019-09-231-0/+19
|
* pkg/osutil: provide better RenameDmitry Vyukov2018-12-171-1/+1
| | | | | os.Rename fails for cross-device renaming (e.g. to/from tmpfs). This is quite unpleasant. Provide own version that falls back to copying.
* pkg/db: provide helper function for database creationDmitry Vyukov2018-12-061-0/+20
| | | | | | | | This is needed for both tools/syz-db and tools/syz-trace2syz. Also, remove code to resolve SHA1 collisions. Also, don't set db version as we actually want to minimize and smash these programs like anything else (not minimizing nor smashing them is only useful during tool testing).
* gometalinter: clean up some errcheck warningsDmitry Vyukov2018-08-021-4/+4
| | | | | | | Check some errors where relevant. Unfortunately enabling errcheck does not look feasible, too many warnings. Update #538
* pkg/osutil: introduce TempFile helperDmitry Vyukov2018-05-141-5/+5
| | | | Introduce TempFile helper and use it in several packages.
* pkg/db: remove code duplication in testDmitry Vyukov2018-05-061-55/+31
| | | | Update #538
* gometalinter: check dot importsDmitry Vyukov2018-05-031-3/+3
| | | | Update #538
* gometalinter: check unkeyed composite literalsDmitry Vyukov2018-05-031-1/+1
| | | | Update #538
* syz-manager, syz-fuzzer: allow re-minimizing/re-smashing inputsDmitry Vyukov2017-12-181-9/+25
| | | | | | | | | | By default we don't re-minimize/re-smash programs from corpus, it takes lots of time on start and is unnecessary. However, when we improve/fix minimization/smashing, we may want to. Introduce corpus database versions and allow to re-minimize/re-smash on version bumps.
* all: use consistent file permissionsDmitry Vyukov2017-07-031-2/+3
| | | | | | | | | | | | | | | | Currently we have unix permissions for new files/dirs hardcoded throughout the code base. Some places use 0644, some - 0640, some - 0600 and a variety of other constants. Introduce osutil.MkdirAll/WriteFile that use the default permissions and use them throughout the code base. This makes permissions consistent and also allows to easily change the permissions later if we change our minds. Also merge pkg/fileutil into pkg/osutil as they become dependent on each other. The line between them was poorly defined anyway as both operate on files.
* pkg/db: move from dbDmitry Vyukov2017-06-032-0/+399