Commit Graph

1930 Commits

Author SHA1 Message Date
Dmitry Vyukov
3a80fe350d prog: support bytesizeN for vma
I guess this is currently unused,
but ignoring bytesizeN for vma looks wrong.
If user asks for bytesizeN for vma, divide vma size by N.
2017-11-29 11:12:47 +01:00
Ed Maste
1a6a7478c2 docs: use 'c++' to build on FreeBSD
Building the executor via `gcc executor/executor_freebsd.cc ...`
requires that a GCC package first be installed on the FreeBSD VM image.
The FreeBSD base system comes with Clang already installed, so we can
build via `c++ executor/executor_freebsd.cc ...` and avoid having to
install additional packages.
2017-11-29 08:55:05 +01:00
Dmitry Vyukov
1808de66ce prog: repair arrays/buffers with incorrect size in Deserialize
For string[N] we successfully deserialize a string of any length.
Similarly for a fixed-size array[T, N] we successfully deserialize
an array of any size.
Such programs later crash in foreachSubargOffset because static size
Type.Size() does not match what we've calculated iterating over fields.
The crash happens only in SerializeForExec in syz-fuzzer,
which is especially bad.
Fix this from both sides:
1. Validate sizes of arrays/buffers in Validate.
2. Repair incorrect sizes in Deserialize.
2017-11-28 19:15:28 +01:00
Dmitry Vyukov
e338ada43c dashboard/app: fix purging of old crashes
We sorted by Report (which is a random int ID) instead of ReportLen.
Sort by ReportLen (order is opposite of what of queryCrashesForBug uses).
2017-11-28 17:52:24 +01:00
Andrey Konovalov
7bd85f2aea pkg/report: fix corrupted stack trace detection
Look for stack frames in the next 10 lines after 'Call Trace' instead of 3.
2017-11-28 15:54:13 +01:00
Dmitry Vyukov
ac93d7e1d8 pkg/compiler: add check that len does not refer to array with varlen elements
This [almost] always means a bug in descriptions.
Fix all bugs identified by the check.
2017-11-28 14:55:21 +01:00
Dmitry Vyukov
afba0b55e6 sys/linux: add binder descriptions 2017-11-27 15:09:30 +01:00
Dmitry Vyukov
deb5f6aea2 sys/linux: assorted improvements to descriptions 2017-11-27 09:09:06 +01:00
Dmitry Vyukov
103a5b3fa4 sys/linux: add files from net dir to list of /proc files 2017-11-27 09:09:05 +01:00
Dmitry Vyukov
502d78153c sys/linux: fix control len in msghdr's
Contol len is in bytes, not array elements.
2017-11-27 09:09:03 +01:00
Dmitry Vyukov
473d90487b sys/linux: improve hash generation for KEYCTL_DH_COMPUTE
KEYCTL_DH_COMPUTE used the old fixed list of algorithm names.
Use the new code for algorithm generation.
+ it needs only SHASH algs, but we passed in all alg names.
Pass only SHASH algs.
2017-11-27 09:09:01 +01:00
Dmitry Vyukov
d695195a6b sys/linux: resolve TODO re argument truncation 2017-11-27 09:09:00 +01:00
Dmitry Vyukov
8257de047b sys/linux: open files from /proc 2017-11-27 09:08:59 +01:00
Dmitry Vyukov
bbe60f6cb6 sys/linux: improve fuse descriptions 2017-11-27 09:08:57 +01:00
Dmitry Vyukov
01b82d46ee executor: use /proc/thread-self/fail-nth instead of /proc/self/task/%d/fail-nth
Makes code slightly simpler.
2017-11-27 09:08:56 +01:00
Dmitry Vyukov
4bd70f886b sys/linux: remove crypto algs starting with __
These can't be created from user-space.
2017-11-24 17:50:31 +01:00
Dmitry Vyukov
3bbb8c0b30 sys/linux: prefix non-autogenerated files with init_ 2017-11-24 14:57:38 +01:00
Dmitry Vyukov
ddf7b3e065 sys/linux: improve AF_ALG alg name generation
There is effectively infinite number of possible crypto
algorithm names due to templates. Plus there is tricky
relation between algorithms and algorithm type names.

This change adds custom mutator for sockaddr_alg struct
to improve variance in generated algorithms.
2017-11-24 13:56:20 +01:00
Dmitry Vyukov
d19770f1b9 syz-manager: fix up osutil.RunCmd call
Fixes #435
2017-11-24 13:41:28 +01:00
Dmitry Vyukov
eea051f798 vm/qemu: fix up osutil.RunCmd call 2017-11-24 13:41:08 +01:00
Andrey Konovalov
cb27b030b5
Update found_bugs_usb.md 2017-11-23 17:15:51 +01:00
Andrey Konovalov
5378ce720e
Update found_bugs_usb.md 2017-11-23 17:07:17 +01:00
Andrey Konovalov
6834199b8c pkg/report: various corrupted report detection improvements 2017-11-23 16:17:40 +01:00
Dmitry Vyukov
7061d1973b sys/syz-extract: fix mmap on arm
__NR_mmap is missing on arm entirely,
so we disable mmap during generate.
Patch mmap to mmap2 right in syz-extract,
so that mmap is never missing.
2017-11-23 08:51:04 +01:00
Dmitry Vyukov
31af2ce022 vm/gce: fix boot output capture
Turns out GetSerialPortOutput API does not work if instance has
serial port connections enabled (which we always have).
Get output from serial port relay service instead.
2017-11-22 17:56:48 +01:00
Dmitry Vyukov
a7bbe24b6f dashboard/app: strip quotes from commit titles
There is probably no way to stop people doing this.
Though, we never mention that this is allowed syntax...
2017-11-22 17:56:37 +01:00
Dmitry Vyukov
fc5dca0a4a dashboard/app: reduce database contention
We frequently get "too much contention" errors when saving crashes.
Reduce contention by:
 - finding/creating bug before the transaction
 - saving crash outside of transaction
 - not saving crashes when we have too many of them already
2017-11-22 17:55:07 +01:00
Andrey Konovalov
7bd6e42d35 pkg/report: fix corrupted reports detection
Add another regexp to oopses that should match the whole report.
Report is considered corrupted when it doesn't.
2017-11-22 16:12:55 +01:00
Andrey Konovalov
c8b87c9cf7 pkg/report: fix corrupted KASAN reports detection
KASAN report might not have Allocated or Freed stack traces at all.
2017-11-22 13:41:47 +01:00
Andrey Konovalov
53a23f2a37 pkg/report: corrupted report detection fixes 2017-11-22 13:17:21 +01:00
Dmitry Vyukov
8c7cd9275d dashboard/app: support corrupted reports 2017-11-22 12:49:11 +01:00
Dmitry Vyukov
ee01a72bf4 syz-manager: don't reproduce corrupted reports
Corrupted reports are usually associated with frequently happenning races.
Since they are frequently happenning, we should get a repro for them
without corrupted reports. Reproducing is expensive, so doing it
when we will the repro anyway is harmful.
2017-11-22 12:47:00 +01:00
Dmitry Vyukov
9a6b4d18ba dashboard/app: show bugs by reporting ID
External reporting does not know real bug ID,
but it knows reporting ID. Allow it to genereate links to bugs.
2017-11-22 12:04:03 +01:00
Dmitry Vyukov
657a01b951 pkg/email: ignore missing To: header
We've got such email.
2017-11-22 12:03:31 +01:00
Dmitry Vyukov
7e076b78b4 prog: export MakeData/UnionArg as we do for other arg types
Target code can use these to generate special structs.
2017-11-22 11:46:26 +01:00
Andrey Konovalov
e06afd3259 pkg/repro: don't bisect single entry 2017-11-22 11:45:38 +01:00
Dmitry Vyukov
b3a8d05cdd executor: fixup previous commit 2017-11-22 10:38:32 +01:00
Dmitry Vyukov
ae8da4a43e executor: move arm syscall fixup to syz-extract 2017-11-22 10:34:47 +01:00
Atul Prakash
1ad2f8f9d2 Makefile: compilation for arm should now work. Added arm target to presubmit tests 2017-11-22 10:18:01 +01:00
Atul Prakash
9113005830 docs/linux: added and updated docs for ARM32 architecture
docs/linux: Also fixed link and spacing in arm32 docs
2017-11-22 10:17:35 +01:00
Atul Prakash
93f228d8d8 executor: Modified executor_linux.cc to support ARM32 architecture
executor: changed kOutputDataAddr so that it works on 32-bit kernels
executor: simplified ifdefs for arm in executor_linux.cc
executor: removed empty lines that were accidentally added.
2017-11-22 10:16:55 +01:00
Dmitry Vyukov
6440d6940f syz-manager: send corrupted flag to dashboard 2017-11-21 19:11:54 +01:00
Dmitry Vyukov
ad0af9fff5 vm: return Report from MonitorExecution
This allows callers to get access to Report.Corrupted.
Better than adding 6-th return value and will allow
to pipe other report properties if necessary.
2017-11-21 19:02:35 +01:00
Andrey Konovalov
d4d14b030e
Update found_bugs_usb.md 2017-11-21 15:05:03 +01:00
Andrey Konovalov
7401db5302
Update found_bugs_usb.md 2017-11-21 14:55:21 +01:00
Andrey Konovalov
eff27f330a makefile: move diff check to makefile from travis script 2017-11-20 18:22:40 +01:00
Dmitry Vyukov
f07ea3fc22 sys/linux: remove get_kernel_syms, add quotactl syscall
get_kernel_syms does not seem to be present upstream.
Describe an old quotactl syscall.
Also fix umount/umount2 names in kallsyms.
2017-11-20 17:23:24 +01:00
Dmitry Vyukov
e4f20040fb sys/syz-extract: fix compiler invocation 2017-11-20 15:41:35 +01:00
Dmitry Vyukov
84dd36bae9 dashboard/app: fix error trimming 2017-11-20 11:59:16 +01:00
Dmitry Vyukov
2d24bbb225 vm/gce: fix nil deref
New console output code crashes with nil deref,
because we shadow outer err variable and then
dereference nil err.

Also express ssh connect timeout in real time.
Currently the timeout is on par of ~25 mins
(5s sleep + 10s connect timeout) * 100.
Reduce timeout to 5m of real time.
2017-11-20 11:57:42 +01:00