aboutsummaryrefslogtreecommitdiffstats
path: root/syz-hub
Commit message (Collapse)AuthorAgeFilesLines
* pkg/tool: add ServeHTTP functionDmitry Vyukov2025-12-292-16/+4
| | | | Dedup code in syz-ci and syz-hub.
* all: apply linter auto fixesTaras Madan2025-07-171-1/+1
| | | | ./tools/syz-env bin/golangci-lint run ./... --fix
* all: show manager url in syz-hubJoey Jiao2025-03-174-5/+11
|
* all: use min/max functionsDmitry Vyukov2025-01-171-9/+3
| | | | They are shorter, more readable, and don't require temp vars.
* syz-hub: purse inactive managersDmitry Vyukov2024-09-122-0/+56
| | | | | | Discard manager data after 30 days of inactivity. This should automatically get rid of decomissioned managers, and old manual instances.
* pkg/rpctype: prepare for not using for target communicationDmitry Vyukov2024-05-031-1/+1
| | | | | | Remove things that are only needed for target VM communication: conditional compression, timeout scaling, traffic stats. To minimize diffs when we switch target VM communication to flatrpc.
* tools/syz-linter: check t.Logf/Errorf/Fatalf messagesDmitry Vyukov2024-04-171-1/+1
| | | | | Fix checking of Logf, it has string in 0-th arg. Add checking of t.Errorf/Fatalf.
* pkg/rpctype: make RPC compression optionalDmitry Vyukov2024-04-031-1/+1
| | | | | | | | RPC compression take up to 10% of CPU time in profiles, but it's unlikely to be beneficial for local VM runs (we are mostly copying memory in this case). Enable RPC compression based on the VM type (local VM don't use it, remove machines use it).
* all: use special placeholder for errorsTaras Madan2023-07-241-6/+6
|
* all: ioutil is deprecated in go1.19 (#3718)Taras Madan2023-02-231-4/+3
|
* all: use `t.TempDir` to create temporary test directoryEng Zer Jun2022-03-281-14/+1
| | | | | | | | | This commit replaces all `ioutil.TempDir` with `t.TempDir` in tests. The directory created by `t.TempDir` is automatically removed when the test and all its subtests complete. Reference: https://pkg.go.dev/testing#T.TempDir Signed-off-by: Eng Zer Jun <engzerjun@gmail.com>
* pkg/db: make repair of the db file optionalDmitry Vyukov2022-02-011-2/+2
| | | | | | | | | | | 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
* syz-manager: support oauth when calling syz-hubGreg Steuck2021-07-301-0/+2
| | | | Permit empty hub_key to indicate oauth.
* syz-hub: support oauth authenticationGreg Steuck2021-07-302-5/+32
|
* syz-manager: send domain to hubDmitry Vyukov2020-12-031-2/+2
| | | | | | Actually send domain to the hub... Update #2095
* syz-hub: show domain on web pageDmitry Vyukov2020-12-032-30/+16
| | | | Update #2095
* syz-hub: support input domainsDmitry Vyukov2020-12-033-110/+263
| | | | | | | | | | | | | | | | | | | | | | | | | Hub input domain identifier (optional). The domain is used to avoid duplicate work (input minimization, smashing) across multiple managers testing similar kernels and connected to the same hub. If two managers are in the same domain, they will not do input minimization after each other. If additionally they are in the same smashing sub-domain, they will also not do smashing after each other. By default (empty domain) all managers testing the same OS are placed into the same domain, this is a reasonable setting if managers test roughly the same kernel. In this case they will not do minimization nor smashing after each other. The setting can be either a single identifier (e.g. "foo") which will affect both minimization and smashing; or two identifiers separated with '/' (e.g. "foo/bar"), in this case the first identifier affects minimization and both affect smashing. For example, if managers test different Linux kernel versions with different tools, a reasonable use of domains on these managers can be: - "upstream/kasan" - "upstream/kmsan" - "upstream/kcsan" - "5.4/kasan" - "5.4/kcsan" - "4.19/kasan" Fixes #2095
* prog: control program lengthDmitry Vyukov2020-03-131-13/+31
| | | | | | | | | | | | | | | | | | | We have _some_ limits on program length, but they are really soft. When we ask to generate a program with 10 calls, sometimes we get 100-150 calls. There are also no checks when we accept external programs from corpus/hub. Issue #1630 contains an example where this crashes VM (executor limit on number of 1000 resources is violated). Larger programs also harm the process overall (slower, consume more memory, lead to monster reproducers, etc). Add a set of measure for hard control over program length. Ensure that generated/mutated programs are not too long; drop too long programs coming from corpus/hub in manager; drop too long programs in hub. As a bonus ensure that mutation don't produce programs with 0 calls (which is currently possible and happens). Fixes #1630
* syz-hub: cap total number of programs sent to a managerDmitry Vyukov2019-11-291-17/+14
| | | | | | If we have way too many programs to send (more than 100000), cap total number to 100000 and give up sending all. Otherwise new managers will never chew all this on a busy hub.
* syz-manager: factor out rpc serving partDmitry Vyukov2018-12-261-1/+1
| | | | Update #605
* syz-manager: make rpc communication finer grainedDmitry Vyukov2018-06-261-1/+1
| | | | | | | | | | RPC package does excessive caching per connection, so if a larger object is ever sent in any direction, rpc connection consumes large amount of memory persistently. This makes manager consume gigs of memory with large number of VMs and larger corpus/coverage. Make all communication done in very limited batches.
* gometalinter: check dot importsDmitry Vyukov2018-05-033-43/+43
| | | | Update #538
* all: fix gometalinter warningsDmitry Vyukov2018-03-082-5/+5
| | | | Fix typos, non-canonical code, remove dead code, etc.
* syz-hub: fix auth logicDmitry Vyukov2018-03-052-1/+104
| | | | Fix a bug and add a test.
* syz-hub: don't send all repros to new managersDmitry Vyukov2018-01-221-1/+4
| | | | | We how have thousands of repros, running all of them on new managers will take ethernity.
* syz-manager: don't save/send to dashboard repros from hubDmitry Vyukov2017-08-071-2/+2
|
* syz-manager, syz-hub: share repros between managers via hubDmitry Vyukov2017-08-074-97/+324
| | | | | | | | | | | | | | | | | Currently hub allows managers to exchange programs from corpus. But reproducers are not exchanged and we don't know if a crash happens on other managers as well or not. Allow hub to exchange reproducers. Reproducers are stored in a separate db file with own sequence numbers. This allows to throttle distribution of reproducers to managers, so that they are not overloaded with reproducers and don't lose them on restarts. Based on patch by Andrey Konovalov: https://github.com/google/syzkaller/pull/325 Fixes #282
* all: use consistent file permissionsDmitry Vyukov2017-07-031-4/+5
| | | | | | | | | | | | | | | | 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.
* syz-hub: split client name and manager nameDmitry Vyukov2017-06-291-31/+33
| | | | | This allows to reduce number of hub clients by grouping managers and creating one client per such group.
* pkg/rpctype: from from rpctypeDmitry Vyukov2017-06-171-1/+1
|
* syz-hub: fix copy-paste error in httpSummary()Alexander Popov2017-06-141-1/+1
| | | | Also mention Alexander Popov in AUTHORS and CONTRIBUTORS.
* pkg/db: move from dbDmitry Vyukov2017-06-031-1/+1
|
* pkg/log: move from logDmitry Vyukov2017-06-033-3/+3
|
* pkg/hash: move from hashDmitry Vyukov2017-06-031-1/+1
|
* syz-hub: send new inputs in smaller partsDmitry Vyukov2017-05-233-15/+50
| | | | | | | | Currently hub sends all inputs on first manager connect. This can be 100K+ inputs and can take long time and consume tons of memory. Send inputs in 1K parts. Also increase rpc timeouts as hub still has global mutex.
* manager, fuzzer, hub: move common rpc code into rpctypeDmitry Vyukov2017-01-301-18/+4
| | | | | | | If hub hangs, it causes all managers to hang as well as they call hub under the global mutex. So move common rpc code into rpctype and make it more careful about timeouts (tcp keepalives, call timeouts). Also don't call hub under the mutex, the call can be slow.
* syz-hub: don't flush global corpus after every additionDmitry Vyukov2017-01-301-3/+7
| | | | | We already flush in addInputs, no need to flush in addInput. Also add some logging on start as it can be slow.
* syz-hub: use db packageDmitry Vyukov2017-01-162-94/+77
| | | | | | Hub accumulates tremendous of programs. Storing all them in separate files can be very slow. Use the new db package to store corpus in a single file.
* syz-hub: fix log format stringDmitry Vyukov2016-11-221-1/+1
|
* manager: unbreak buildDmitry Vyukov2016-11-181-2/+3
|
* manager: enable keepalives on rcp connectionsDmitry Vyukov2016-11-181-1/+10
| | | | VMs die frequently and it causes orphan tcp rpc connections on manager.
* syz-hub: add programDmitry Vyukov2016-11-174-0/+556
syz-hub is used to exchange programs between syz-managers.