Commit Graph

1550 Commits

Author SHA1 Message Date
Andrey Konovalov
94f1595a77 prog: allow recursion for optional pointers
When syzkaller generates arg that uses a few structs that reference each
other via pointers, it can go into infinite recursion and crash.

Fix this by forcing pointer args to be null when the depth of recursion
reaches 3 for some struct.
2017-07-19 15:46:50 +02:00
Dmitry Vyukov
0107e4124d pkg/repro: save final crash log
Logs are useful in situations where we mess the report.
Since we try to report crashes with reproducers,
we need logs for reproducers.
2017-07-18 18:00:03 +02:00
Dmitry Vyukov
012622d3c9 syz-ci: fix dashboard settings in manager config 2017-07-18 16:34:33 +02:00
Dmitry Vyukov
50cd6f06ef Update linux_kernel_configs.md 2017-07-18 14:00:26 +02:00
Dmitry Vyukov
9e1407a678 vm/isolated: reformat 2017-07-18 09:58:53 +02:00
Thomas Garnier
3fd92b9694 Add Isolated VM
Add a new isolated VM for machines that you cannot easily manage. It
assumes the machine is only available through SSH and create a reverse
proxy to ensure the machine can connect back to syz-manager.

Signed-off-by: Thomas Garnier <thgarnie@google.com>
2017-07-18 09:57:38 +02:00
Dmitry Vyukov
7c1ee0634b tools/create-gce-image.sh: ignore SIGINT
If the script is aborted at an unfortunate point, it leaves the whole system broken.
E.g. we've seen that fdisk cannot update partition table until the next reboot.
If you really need to kill it, use a different signal. But better wait.
2017-07-17 14:45:41 +02:00
Dmitry Vyukov
8382eb648f pkg/kernel: actually pass cmdline/sysctl files to the build script 2017-07-17 14:45:41 +02:00
Andrey Konovalov
7cdb3c70f7 Merge pull request #280 from xairy/up-split-arg
prog: split Arg into smaller structs
2017-07-17 14:42:11 +02:00
Andrey Konovalov
cfc46d9d0b prog: split Arg into smaller structs
Right now Arg is a huge struct (160 bytes), which has many different fields
used for different arg kinds. Since most of the args we see in a typical
corpus are ArgConst, this results in a significant memory overuse.

This change:
- makes Arg an interface instead of a struct
- adds a SomethingArg struct for each arg kind we have
- converts all *Arg pointers into just Arg, since interface variable by
  itself contains a pointer to the actual data
- removes ArgPageSize, now ConstArg is used instead
- consolidates correspondence between arg kinds and types, see comments
  before each SomethingArg struct definition
- now LenType args that denote the length of VmaType args are serialized as
  "0x1000" instead of "(0x1000)"; to preserve backwards compatibility
  syzkaller is able to parse the old format for now
- multiple small changes all over to make the above work

After this change syzkaller uses twice less memory after deserializing a
typical corpus.
2017-07-17 14:34:09 +02:00
Dmitry Vyukov
cc1c342923 syz-ci: allow to specify cmdline/sysctls
Allow to specify per-kernel command line and sysctl values
to more closely mimic the target kernel.
2017-07-17 12:39:11 +02:00
Dmitry Vyukov
e489b6cafd syz-ci: don't duplicate manager config default values 2017-07-17 12:39:11 +02:00
Dmitry Vyukov
0fd1458dba syz-ci: specify dashboard client per manager
Dashboard will need to distinguish managers
to understand what kernel they are testing.
2017-07-17 12:39:06 +02:00
Dmitry Vyukov
558280a686 tools/create-image.sh: create 2G images
1G does not seem to be enough.
Create 2G images as we do in create-gce-image.sh.
2017-07-17 09:56:08 +02:00
Dmitry Vyukov
8d1e709552 syz-manager: symbolize repro reports
We now take reports from repro and they are not symbolized.
Symbolize them.
2017-07-13 18:46:24 +02:00
Andrey Konovalov
bc44358170 Update found_bugs.md 2017-07-06 15:02:30 +02:00
Dmitry Vyukov
76f45d87f2 syz-manager: save proper report for reproducers
We can start reproducing one crash, but end up reproducing another.
Currently we still attribute the resulting repro to the original crash.
This is wrong.
Save the resulting desc/report for reproducers and use that in manager.
2017-07-06 12:17:39 +02:00
Dmitry Vyukov
f68d78b5a8 pkg/email: fix bug in context extraction
Compare email addresses without full name.
2017-07-05 21:29:41 +02:00
Dmitry Vyukov
6fe1bcf384 pkg/email: add AddAddrContext/RemoveAddrContext
Replace extractBugID function with more general AddAddrContext/RemoveAddrContext.
2017-07-05 19:45:56 +02:00
Dmitry Vyukov
6231964849 pkg/csource: reformat 2017-07-05 19:45:25 +02:00
Dmitry Vyukov
1841d5a558 syz-ci: don't rebuild syzkaller if commit has not changed 2017-07-05 19:44:57 +02:00
Andrey Konovalov
1b780baf30 Merge pull request #271 from xairy/up-syscall-defines
pkg/csourse: don't generate __NR_X defines for old syscalls
2017-07-05 15:51:25 +02:00
Andrey Konovalov
d50208f93e pkg/csourse: don't generate __NR_X defines for old syscalls 2017-07-05 15:46:38 +02:00
Andrey Konovalov
8adc4a749d Merge pull request #272 from xairy/up-repro-return
pkg/repro: return crash report
2017-07-05 15:41:20 +02:00
Andrey Konovalov
918a566afd pkg/repro: return crash report 2017-07-05 15:40:55 +02:00
Dmitry Vyukov
ebabe267cd pkg/email: don't add own email address to CC list
Otherwise we we send each reply to ourselves and receive it again.
2017-07-03 18:24:39 +02:00
Dmitry Vyukov
2181ef35e1 pkg/osutil: don't depend on syscall in appengine build
Dashboard app now depends on osutil through config package.
Reshuffle functions so that the package does not depend
on syscall in appengine build.
2017-07-03 14:43:37 +02:00
Dmitry Vyukov
e7b1c55592 syz-ci: fix manager config creation
Don't write hub/dashboard params if they are not enabled
in syz-ci config. Otherwise manager gets name but not addr/key,
and that does not pass config validation.
2017-07-03 14:23:35 +02:00
Dmitry Vyukov
a7b199253f all: use consistent file permissions
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.
2017-07-03 14:00:47 +02:00
Dmitry Vyukov
1438a6de81 pkg/report: strip panic message from reports
If panic_on_warn set, then we frequently have 2 stacks:
one for the actual report (or maybe even more than one),
and then one for panic caused by panic_on_warn. This makes
reports unnecessary long and the panic (current) stack
is always present in the actual report. So we strip the
panic message. However, we check that we have enough lines
before the panic, because sometimes we have, for example,
a single WARNING line without a stack and then the panic
with the stack.
2017-07-03 13:18:40 +02:00
Dmitry Vyukov
eb1cda04f3 pkg/email: add function that forms reply to an email 2017-07-02 16:08:04 +02:00
Dmitry Vyukov
233bc790fc pkg/email: add email parsing functionality
Parse extracts all potentially interesting info from an incoming email.
2017-07-02 15:40:24 +02:00
Dmitry Vyukov
1b20342f25 pkg/email: move patch parsing from pkg/kernel
ParsePatch is used by appengine app.
Appengine apps can't depend on syscall/unsafe,
but pkg/kernel currently does.
Move patch parsing to pkg/email which does not
depend on syscall/unsafe.
2017-06-30 16:20:19 +02:00
Dmitry Vyukov
7f03d6d553 syz-manager: switch to the new dashboard 2017-06-30 16:09:50 +02:00
Dmitry Vyukov
a8b32c55ab syz-ci: switch to the new dashboard
Switch to the new dashboard and start uploading build info.
2017-06-30 16:04:30 +02:00
Dmitry Vyukov
1b8e07333a dashboard/dashapi: add API for new dashboard 2017-06-30 16:00:09 +02:00
Dmitry Vyukov
cc9db10249 syz-ci: extend build info
We currently store 3 tags (compiler id, kernel commit and config hash).
But we also kernel git report/branch. To not store 2 more tag files,
combine everything into a single json file that holds all info about the build.
Will allow simpler extenstion in future as well.
2017-06-30 15:32:30 +02:00
Dmitry Vyukov
51a013e7b9 tools/syz-symbolize: add report mode
Currently syz-symbolize symbolizes whole input file.
Add a new mode (controlled with -report flag) when
it prints report as would be extracted by syz-manager.
2017-06-30 15:17:42 +02:00
Dmitry Vyukov
a7785e15ba syz-manager: output maintainers in html reports 2017-06-30 15:09:57 +02:00
Dmitry Vyukov
c2028e38d2 pkg/report: change arg of ExtractGuiltyFile to []byte
We usually store reports as []byte, not as string. They can be large.
So change arg type to []byte.
Also rename it from log to report. In our terminology log is
not symblized/processed crash output. What this function wants
is called report in manager.
2017-06-30 15:09:57 +02:00
Dmitry Vyukov
909ccbe28f pkg/config: support time.Time fields 2017-06-30 14:36:34 +02:00
Dmitry Vyukov
ed1e09a88a vm/gce: support debug mode
Print ssh/console output to stdout in debug mode.
2017-06-30 14:32:17 +02:00
Dmitry Vyukov
04e73701ec vendor: add google.golang.org/appengine/mail
For sending emails from appengine apps.
2017-06-30 14:25:26 +02:00
Dmitry Vyukov
c5b6fcddca syz-hub: split client name and manager name
This allows to reduce number of hub clients by grouping managers
and creating one client per such group.
2017-06-29 17:50:44 +02:00
Andrey Konovalov
ae33f0dff5 repro: fix tests (#266) 2017-06-29 16:14:39 +02:00
Andrey Konovalov
2cefef86ec Merge pull request #265 from xairy/up-security-bugs
docs: add instructions on reporting security bugs
2017-06-29 16:02:43 +02:00
Andrey Konovalov
e71d50711e docs: add instructions on reporting security bugs 2017-06-29 16:01:06 +02:00
Andrey Konovalov
a07670a5cb Merge pull request #244 from xairy/up-better-repro
Bisect the log to find multiple guilty programs
2017-06-29 13:58:45 +02:00
Zach Riggle
c30c1ddc7b Fix incorrect argument in syz-tty (#260) 2017-06-27 16:55:11 +02:00
Andrey Konovalov
e379542e8b repro, manager: show repro logs and stats on manager dashboard 2017-06-27 16:27:21 +02:00