Commit Graph

1930 Commits

Author SHA1 Message Date
Dmitry Vyukov
d5beb42ace pkg/csource: make strings more readable
If string contains a file name or a crypto alg name,
don't escape it all to hex.
2017-12-17 11:39:14 +01:00
Dmitry Vyukov
1db7a350a9 vm/qemu: respect cpu config parameter
Fixes #42
2017-12-17 11:39:14 +01:00
Dmitry Vyukov
a33677f8bf prog: use dense indexes for copyout instructions
Fixes #174
2017-12-17 11:39:14 +01:00
Dmitry Vyukov
fea5478f46 prog: add DeserializeExec
Factor out program parsing from pkg/csource.
csource code that parses program and at the same time
formats output is very messy and complex.
New aproach also allows to understand e.g.
when a call has copyout instructions which is
useful for better C source output.
2017-12-17 11:39:14 +01:00
Dmitry Vyukov
431d3c90b1 pkg/csource: refactor
csource.go is too large and messy.
Move Build/Format into buid.go.
Move generation of common header into common.go.
Split generation of common header into smaller managable functions.
2017-12-17 11:39:14 +01:00
Dmitry Vyukov
9004acd9cc prog: remove unused writeArg argument 2017-12-17 11:39:14 +01:00
Dmitry Vyukov
dcfdc02b77 prog: minor refactoring around arguments
Introduce isUsed(arg) helper, use it in several places.
Move method definitions closer to their types.
Simplify presence check for ArgUsed.Used() in several places.
2017-12-17 11:39:14 +01:00
Dmitry Vyukov
9c21f3116f executor: remove unneeded NONFAILING
copyin is already NONFAILING.
2017-12-17 11:39:14 +01:00
Dmitry Vyukov
26eab5e866 syz-manager: speed up main page rendering
Remove unused calculation of total coverage.
Reduce critical section duration.
2017-12-17 11:39:14 +01:00
Dmitry Vyukov
535474e22e syz-manager: add favicon handler 2017-12-17 11:39:14 +01:00
Dmitry Vyukov
35ec89f46f syz-fuzzer: turn off collide during triage/minimization 2017-12-17 11:39:14 +01:00
Dmitry Vyukov
a80750a095 syz-fuzzer: remove unused execute flag 2017-12-17 11:39:14 +01:00
Dmitry Vyukov
c5826ff7aa pkg/ipc: make threaded/collide per-program options
Currently threaded/collide are global environment flags.
It can be useful to turn off collider during some executions
(minimization, triage, etc).
Make them per-program options.
2017-12-17 11:39:14 +01:00
Dmitry Vyukov
8ef0050706 prog: don't serialize output data args
Fixes #188

We now will write just ""/1000 to denote a 1000-byte output buffer.
Also we now don't store 1000-byte buffer in memory just to denote size.
Old format is still parsed.
2017-12-17 11:39:14 +01:00
Dmitry Vyukov
eaeccee1d7 pkg/report: add another test 2017-12-17 11:39:14 +01:00
Dmitry Vyukov
41799debdc prog: introduce more readable format for data args
Fixes #460

File names, crypto algorithm names, etc in programs are completely unreadable:

bind$alg(r0, &(0x7f0000408000)={0x26, "6861736800000000000000000000",
0x0, 0x0, "6d6435000000000000000000000000000000000000000000000000
000000000000000000000000000000000000000000000000000000000000000
00000000000"}, 0x58)

Introduce another format for printable strings.
New args are denoted by '' ("" for old args).
New format is enabled for printable chars, \x00
and \t, \r, \n.

Example:
`serialize(&(0x7f0000408000)={"6861736800000000000000000000", "4849000000"})`,
vs:
`serialize(&(0x7f0000408000)={'hash\x00', 'HI\x00'})`,
2017-12-17 11:39:14 +01:00
Dmitry Vyukov
286edfb78e prog: fix TestMutateTable
Now works fast enough even for short mode.

Fixes #208
2017-12-17 11:39:14 +01:00
Dmitry Vyukov
e3b5ea9797 prog: fix an unfortunate case of non-determinism
We used the math/rand global prng in biasedRand historically.
Fix that.
2017-12-17 11:39:14 +01:00
Dmitry Vyukov
b5b6142df4 prog: fix off-by-one in ChoiceTable
We need to choose last value inclusice,
otherwise we will never select the last call.

Will be tested by upcoming mutation tests.
2017-12-17 11:39:14 +01:00
Dmitry Vyukov
019cf5f235 sys: move test syscalls to a separate target
We have them in linux solely for historical reasons.

Fixes #462
2017-12-17 11:39:14 +01:00
Dmitry Vyukov
9150b3e544 prog: lazily initialize targets
We now have a bunch of targets compiled into each binary.
All targets are initialized eagerly on startup time.
As the result a do nothing binary starts for ~0.58s and
consumes ~21MB.

Initialize targets lazily. Usually only 1 target is used.
This reduces startup time to ~0.00s and memory consumption
to ~5.4MB.
2017-12-17 11:39:14 +01:00
Dmitry Vyukov
0da2fed84f prog: simplify MakeResultArg
Fixes #445
2017-12-17 11:39:14 +01:00
Dmitry Vyukov
2b4927e6ce prog: add benchmark for Mutate 2017-12-17 11:39:14 +01:00
Dmitry Vyukov
f2d5384a68 vm/isolated: allow to specify ssh port for target machines 2017-12-17 11:39:14 +01:00
Dmitry Vyukov
b6f0c91b3a
Update found_bugs.md 2017-12-16 08:25:34 +01:00
Tim Tianyang Chen
ac20b98c1b syz-manager: add simple email support
Users can specify an email address to reveive notifications when a
bug is discovered for the first time, without setting up a full fledged
dashboard. The supported mailer is mailx.

Signed-off-by: Tim Tianyang Chen <soapcn@gmail.com>
2017-12-14 08:57:27 +01:00
Andrey Konovalov
ea8dc17ee9 executor: fix macros in common.h 2017-12-14 08:54:55 +01:00
Andrey Konovalov
06ea774dca pkg/report: fix __this_cpu_* report header call trace capture 2017-12-13 19:48:13 +01:00
Andrey Konovalov
ce7f2399c4
Update found_bugs_usb.md 2017-12-12 16:57:20 +01:00
Andrey Konovalov
7e77969996
Update found_bugs_usb.md 2017-12-12 16:57:07 +01:00
Dmitry Vyukov
414a185f4d pkg/report: add another corruped report format 2017-12-12 15:35:21 +01:00
Dmitry Vyukov
9d46048cb9 dashboard/app: allow fragment links to namespaces
Now "#foo" link will point to namespace "foo".
2017-12-12 14:55:43 +01:00
Dmitry Vyukov
433029d5d4 pkg/report: add another guilty file test 2017-12-12 14:23:28 +01:00
Dmitry Vyukov
32f694fc72 pkg/report: properly infer kernel location if kcov is not enabled
We used to infer kernel source location based on __sanitizer_cov_trace_pc symbol.
But it's not present if KCOV is not enabled.
Look at more symbols.
2017-12-12 14:02:59 +01:00
Dmitry Vyukov
4224245438 pkg/report: add few more corrupted reports 2017-12-12 13:51:27 +01:00
Dmitry Vyukov
867fe6a840 pkg/report: improve using __this_cpu_add() in preemptible code report 2017-12-12 13:40:08 +01:00
Dmitry Vyukov
1b3ae9a6d0 pkg/report: handle syzkaller binaries
syzkallerNNN binaries are coming from pkg/repro.
2017-12-12 13:29:45 +01:00
Dmitry Vyukov
081721ff15 pkg/report: clean guilty files 2017-12-12 12:24:52 +01:00
Dmitry Vyukov
7130893383 pkg/report: merge TestLinuxParseLog into TestParse
That was the last test that used inline input data.
Merge it into TestParse.
Test Output for all crashes in TestParse.
Support multiple oopes in crash
Add more test cases for start/end line.
2017-12-12 12:20:41 +01:00
Dmitry Vyukov
9d0132a2fb pkg/report: move guilty file test data to testdir/
linux_test.go is total mess and very hard to work with.
Turns out we had 2 tests that do exactly the same
(verify Report), but nobody ever noticed.

Move all test data to testdir/. One file per crash.
2017-12-12 11:59:13 +01:00
Dmitry Vyukov
1556ebc4cc pkg/report: move test data to testdir/
linux_test.go is total mess and very hard to work with.
Turns out we had 2 tests that do exactly the same
(verify Report), but nobody ever noticed.

Move all test data to testdir/. One file per crash.
2017-12-12 11:28:37 +01:00
Dmitry Vyukov
8b77d41235 syz-manager: show the same file after cover page reload
Handy when you are looking at a single file
and periodically reload page to get new coverage.
2017-12-12 09:13:35 +01:00
Dmitry Vyukov
da131727fb sys/linux: describe PF_KEY 2017-12-11 20:12:35 +01:00
Andrey Konovalov
8d4ab42605 pkg/report: bad unlock balance can be a WARNING 2017-12-11 16:01:10 +01:00
Andrey Konovalov
c0020ec197 pkg/report: detect corrupted old-style KASAN reports 2017-12-11 16:01:10 +01:00
Andrey Konovalov
02b8de13ac pkg/report: better detect corrupted stack traces
We may find stack frames from the second stack trace in a report when
searching from frames of the first one.
2017-12-11 16:01:10 +01:00
Andrey Konovalov
27f5dfefff pkg/report: improve report header extraction
Allow stack traces to be intermixed with random kernel messages that don't
start with a ' ' char (all frames in a stack trace do).

Also improve report headers for BUGs from mm/usercopy.c, as we get quite a
lot of those.
2017-12-11 14:42:45 +01:00
Dmitry Vyukov
5ad0ce9589 dashboard/app: fix test
Fix test after the previous commit.
2017-12-08 19:06:08 +01:00
Dmitry Vyukov
2f6fb92368 dashboard/app: improve working in bug email
As per discussion in:
https://groups.google.com/d/msg/syzkaller-bugs/atbKWcFqE9s/w88o2OvsAwAJ
2017-12-08 18:46:20 +01:00
Dmitry Vyukov
8e1e4403ac
Update syzbot.md 2017-12-08 18:45:02 +01:00