2187 Commits

Author SHA1 Message Date
Dmitry Vyukov
10a8987f80 tools: fix create-image.sh again 2018-04-07 12:42:50 +02:00
Dmitry Vyukov
54907ddb1e tools: improve demo_setup.sh
1. Account for the fact that go can be already in path.
2. Unset GOROOT in case it is set already.
3. export variables (not sure how it worked for me).
2018-04-07 12:33:23 +02:00
Dmitry Vyukov
d613535f94 pkg/ipc: disable coverage collection by default
syz-manager always passes explicit value for the flag.
syz-stress does not need coverage.
The only real user is syz-execprog. syz-execprog already
forces coverage with -coverfile is given. Coverage is harmful
for external users trying to reproduce reported bugs.
For the remaining cases of syzkaller developers running
syz-execprog on KCOV-enabled kernel, the flag can be given
manually if really needed.

Fixes #554
2018-04-06 21:24:22 +02:00
Dmitry Vyukov
53196ce262 syz-manager: warn about disabled syscalls in enable_syscalls
syz-manager used to silently transitively disable syscalls
for which input resources can't be created.
This caused lots of confusion, or worse, users did not notice
that syzkaller does not actually test what they want.
Fail loudly with a readable explanation when a syscall
explicitly enabled in enable_syscalls is actually disabled.

Note: this requires to slightly change enable/disable_syscalls
matching logic. Previously "foo" would match "foo" and all "foo$BAR",
now it matches only "foo". But "foo*" can be used to match all
disciminations.
2018-04-06 21:08:54 +02:00
Dmitry Vyukov
2a9c3edcda pkg/prog: explain why syscalls are transitively disabled 2018-04-06 19:43:06 +02:00
Dmitry Vyukov
4daf8570eb pkg/host: explain why syscalls are disabled 2018-04-06 18:47:56 +02:00
Dmitry Vyukov
48a846e42b syz-manager/mgrconfig: check that ssh key is properly protected 2018-04-06 17:49:50 +02:00
Dmitry Vyukov
2d0ec24625 sys/linux: improve team descriptions
1. Create ifindex_team, because TEAM_ATTR_TEAM_IFINDEX must
   always point to a team device.

2. Remove output only attributes like team_attr_item_port, TEAM_ATTR_LIST_PORT,
   TEAM_ATTR_OPTION_CHANGED.

3. Restructure team_nl_option_policy: we always want TEAM_ATTR_OPTION_NAME/TYPE/DATA
   + optionally TEAM_ATTR_OPTION_ARRAY_INDEX and TEAM_ATTR_OPTION_PORT_IFINDEX.

4. Provide specialized team_nl_option_policy_per_port and team_nl_option_policy_array.

5. Make team_attr_option varlen.

6. Remove unnecessary indirection via team_attr_list_option/team_attr_list_port.

7. Fix data type for bpf_hash_func and lb_tx_hash_to_port_mapping.
2018-04-06 17:29:15 +02:00
Dmitry Vyukov
8e4c2e24cb executor: create team device 2018-04-06 17:28:33 +02:00
Dmitry Vyukov
7606c2ac04 pkg/report: don't blame kcov
kcov frame can be present in rcu stalls, ignore it.
2018-04-06 17:24:28 +02:00
Hangbin Liu
4f1152d4db sys/linux: add netlink generic team descriptions
Signed-off-by: Hangbin Liu <liuhangbin@gmail.com>
2018-04-06 11:30:36 +02:00
Dmitry Vyukov
a932eae671 tools: add a script that setups everything 2018-04-05 19:52:54 +02:00
Dmitry Vyukov
ad7d294798 tools/syz-execprog: dump coverage in text format
There is no point in using sancov,
it does not do anything other than transforming
binary format to a useful text format.
Write out text format directly.
2018-04-05 12:02:16 +02:00
Dmitry Vyukov
c58e46ddd1 dashboard/app: allow deplaying intial bug reporting
This is useful to collect reproducers and more info
about trees where the bug happens before it is first reported.
2018-04-05 11:57:18 +02:00
Dmitry Vyukov
5883462aab docs: add KMSAN description to syzbot page 2018-04-05 11:56:07 +02:00
Mitchell Horne
5e1ccffca2 Update AUTHORS and CONTRIBUTORS files 2018-04-05 11:18:53 +02:00
Mitchell Horne
395221551d executor: update to support FreeBSD kcov
Make the required changes to the BSD executor file to interface with
FreeBSD's kernel coverage implementation. This will allow coverage to be
used when running syzkaller on this platform.
2018-04-05 11:18:53 +02:00
Dmitry Vyukov
676bd07e7e sys/linux: test various binfmt's in execve 2018-04-02 20:10:48 +02:00
Dmitry Vyukov
3e679c51c0 pkg/compiler: support non-zero terminated filenames
Now file names become:

string[filename]

with a possibility of using other string features:

stringnoz[filename]
string[filename, CONST_SIZE]

and filename is left as type alias as it is commonly used:

type filename string[filename]
2018-04-02 20:10:07 +02:00
Dmitry Vyukov
374050e904 sys/syz-extract: fix linux/arm
At some point extract for linux/arm started to fail with:

extracting from key.txt
	failed to run compiler: exit status 1
/tmp/ccT6o7iZ.s: Assembler messages:
/tmp/ccT6o7iZ.s:4: Error: unknown pseudo-op: `.syntax'

This is caused by arch/arm/include/asm/unified.h:

__asm__(".syntax unified");

Ignore all __asm__ directives as we are cross compiling.
2018-04-02 20:09:30 +02:00
Dmitry Vyukov
729f261057 Makefile: fix install_prerequisites
apt-get complains if all these packages are installed at once.
2018-04-02 20:09:30 +02:00
Dmitry Vyukov
0d845719c3 syz-manager: move syscall info to a separate page
It's rarely needed. So move from main page.
2018-04-02 20:09:30 +02:00
Dmitry Vyukov
188daeb272 syz-manager: show what crashes are currently being reproduced 2018-04-02 20:09:26 +02:00
Dmitry Vyukov
dc88925771 executor: fix unchecked result warning 2018-04-01 18:49:53 +02:00
Dmitry Vyukov
99e3b0a7e8 sys/linux: add support for reading partition tables 2018-04-01 18:29:56 +02:00
Dmitry Vyukov
185ac3525e prog: support big-endian during hints matching
Use big-endian match/replace for both blobs and ints.
Sometimes we have unmarked blobs (no little/big-endian info);
for ANYBLOBs we intentionally lose all marking;
but even for marked ints we may need this too.
Consider that kernel code does not convert the data
(i.e. not ntohs(pkt->proto) == ETH_P_BATMAN),
but instead converts the constant (i.e. pkt->proto == htons(ETH_P_BATMAN)).
In such case we will see dynamic operand that does not
match what we have in the program.
2018-04-01 15:28:01 +02:00
Dmitry Vyukov
0a78e248b7 dashboard/app: support undup command
Fixes #520
2018-04-01 13:43:18 +02:00
Dmitry Vyukov
372799e446 pkg/report: skip list functions during function extraction
List functions are very generic and we see lots of different
bug merged into "bug-type in list_function".
2018-04-01 12:23:00 +02:00
Dmitry Vyukov
1b0214295f pkg/report: detect corrupted task hung reports 2018-04-01 12:07:10 +02:00
Dmitry Vyukov
0174c6c8f7 prog: reduce nesting level in shrinkExpand 2018-03-31 18:55:59 +02:00
Dmitry Vyukov
6a1a7543db syz-fuzzer: revert "syz-fuzzer: relax triage signal conditions"
"syz-fuzzer: relax triage signal conditions" commit caused doubling of corpuses.
So that was probably a mistake. Revert it.
2018-03-31 18:46:34 +02:00
Dmitry Vyukov
63f4cf6fff syz-manager: log when a crash report is corrupted 2018-03-31 17:27:58 +02:00
Dmitry Vyukov
aa258367d3 sys/linux: fix misspelled const name
Fixes #552
2018-03-31 16:33:37 +02:00
Dmitry Vyukov
d5473a248e Makefile: remove obsolete package
This package is not present on latest debian versions.
2018-03-31 16:31:48 +02:00
Dmitry Vyukov
fef07bd04c syz-manager: add special type=none
Type "none" is a special case for debugging/development when manager
does not start any VMs, but instead you start them manually
and start syz-fuzzer there.
2018-03-31 16:25:15 +02:00
Dmitry Vyukov
8fbce0e442 executor: fix compilation warnings
SYS_memfd_create define produces warning in scource
if system headers already contain the definition (we strip all ifdefs!).
The same is true for CLONE_NEWCGROUP but we just never hit it yet.
Also fix format string for 32 bits.
Also fix potential uninit var in csource, and a missing new line.
2018-03-30 20:08:05 +02:00
Dmitry Vyukov
7c923cf8d4 sys/linux: add support for mounting filesystem images 2018-03-30 19:51:27 +02:00
Dmitry Vyukov
d47f0ed685 tools: remove stray comments in create-image.sh
The comments were unintentionally committed in a previous commit.
2018-03-29 11:59:14 +02:00
Dmitry Vyukov
a5dbafc91d sys/linux: regenerate files
A previous commit included some non-regenerateed files.
Regenerate them now.
2018-03-29 11:58:32 +02:00
Dmitry Vyukov
99fa39ccb1 syz-fuzzer: relax triage signal conditions
Don't discard programs if signal is flaky.
We already do this for inputs from corpus,
do this for all inputs.
2018-03-28 18:17:44 +02:00
Dmitry Vyukov
db72a5aaac executor: don't let syscalls fail with errno=0
Our syz syscalls may mishandle errno in some cases
and fail with errno=0. Fix it up.
2018-03-28 18:17:44 +02:00
Dmitry Vyukov
bf5e585c5e executor: rework cgroups support
Turns out creating a cgroup per test is too expensive.
Moreover, it leads to hanged tasks as cgroup destruction
is asynchronous and overloads kernel work queues.

Create only a single cgroup per proc, but restrict
descriptions to mess with that single group,
instead test processes create own nested cgroups for messing.
2018-03-27 11:39:58 +02:00
Dmitry Vyukov
c7e0d50a76 tools/syz-db: allow to specify db version in pack 2018-03-27 09:39:02 +02:00
Dmitry Vyukov
0ca7878bc3 sys/linux: add IPVS descriptions
Update #533
2018-03-26 18:27:11 +02:00
Dmitry Vyukov
327060ba9b pkg/report: add few KMSAN report examples 2018-03-26 15:08:10 +02:00
Dmitry Vyukov
e033c1f167 dashboard/app: use links instead of attachments in emails
As per discussion at:
https://groups.google.com/d/msg/syzkaller/zYlQ-b-QPHQ/AJzpeObcBAAJ
2018-03-25 12:46:05 +02:00
Dmitry Vyukov
87a9162718 dashboard/app: set filename in text handler 2018-03-25 12:46:05 +02:00
Dmitry Vyukov
60d6f956a2 executor: fix reset of bridge netfilter
We left entries non-zero, so memcmp always failed.
2018-03-25 12:46:05 +02:00
Dmitry Vyukov
2675f92065 sys/linux: add cgroup descriptions 2018-03-25 12:46:05 +02:00
Dmitry Vyukov
2e9d905410 dashboard/app: use monospace font for crash text
Fixes #545
2018-03-22 13:30:36 +01:00