Commit Graph

404 Commits

Author SHA1 Message Date
Dmitry Vyukov
560ebad5b0 dashboard/app: move FixBisectionDisabled from repo to manager
We have manager in more places (bug, job, etc),
but usually we don't have repo directly (this
always requires loading build). Move FixBisectionDisabled
to manager for easier access, e.g. we will be able to easily
check if a bug happened only on managers with fix bisection
disables, which is currently quite problematic.
2019-11-08 13:38:31 +01:00
Dmitry Vyukov
f39aff9e4a dashboard/app: auto-close bugs after successful fix bisection
Add an optional feature for subj.
Should be useful for unmaintained namespaces like Linux LTS.
2019-11-07 16:08:26 +01:00
Dmitry Vyukov
d5bc68123a dashboard/app: enable mailing results of fix bisection
All prerequisites are done now.
I've cleaned the datastore and did some manual testing as well.

Fixes #1371
2019-11-07 14:45:13 +01:00
Dmitry Vyukov
461291eaaf dashboard/app: show what fix bisections we will mail
Show [report pending] for fix bisections that we will send.
Help to analyze what will happen when we enable mailing of fix bisections.

Update #1271
2019-11-07 14:27:46 +01:00
Dmitry Vyukov
9cf4d4ed2e dashboard/app: few more cosmetic UI changes
Don't add <br> before bisection, if bisection does not exist.
Rename fix bisections table to make it clearer that they failed.
2019-11-07 12:37:52 +01:00
Dmitry Vyukov
efb49b4d0b dashboard/app: slightly tidy up bisection results
Add new lines around bisection block as it was before.
Remove kernel tree, does not seem to be critical.
Make it clear what is cause bisection and what is fix bisection
(currently we have 2 "Bisection" which is not very helpful).
2019-11-07 11:07:08 +01:00
Dmitry Vyukov
30cb7f98cd pkg/bisect: detect wrong bisections
Detect bisection to merge commits and to commits that don't affect
kernel binary (comments, other arches, whitespaces, etc).
Such bisections are not reported in emails (but shown on web).

Update #1271
2019-11-07 11:07:03 +01:00
Zubin Mithra
0f3ec414b9 dashboard/app: add support for disabling fix bisection
* Allow fix bisection to be disabled on kernel repos to which force-pushes
occur.
* Pending fix bisection jobs for KernelRepo with FixBisectionDisabled will have
to be deleted manually.
* Add TestFixBisectionsDisabled.

Closes #1365
2019-11-05 09:17:27 +01:00
Zubin Mithra
a77e6539d9 syz-ci: send build info for failed bisections
* When fix bisections fails due to a crash on HEAD, the dashboard needs to
keep track of which commit the crash occured at. In order to do this,
send correct commit information to the dashboard.
* Modify mail_bisect_result.txt to be clearer on what
BisectResult.KernelCommit represents. Modify test in bisect_test.go to
accommodate the changes in templates.
2019-11-05 09:15:56 +01:00
Andrey Konovalov
76630fc947 executor, pkg/host, dashboard/config: rename usb-fuzzer to usb raw-gadget
The interface is being upstreamed and the name has changed.
2019-11-04 15:43:43 +01:00
Dmitry Vyukov
841212d4cc sys/linux: extend CAN descriptions 2019-11-02 21:31:45 +01:00
Dmitry Vyukov
018e59bad0 dashboard/app: add link to bug to reproducers
As requested by users.
Fixes #1396
2019-10-25 18:02:24 +02:00
Dmitry Vyukov
c2e837da36 dashboard/app: flexible rules for bug obsoleting
Implement logic described in #1054:
 - close bugs that happened a lot and then stopped faster
 - close bugs in non-final reporting with different period
 - allow closing bugs that happened only on 1 manager with different period

Fixes #1054
2019-10-25 15:56:00 +02:00
Dmitry Vyukov
2d4fab5ed1 dashboard/app: reduce auto-closing timeout to 120 days
See #1054

First simple step.
2019-10-25 13:28:42 +02:00
Dmitry Vyukov
ffff482138 dashboard/app: don't log user errors in checkCrashTextAccess too
This pollutes error logs too.
2019-10-25 13:28:42 +02:00
Dmitry Vyukov
e1b158574e datastore/app: switch more bug queries to paged queries
Update #1448
2019-10-25 13:28:42 +02:00
Dmitry Vyukov
44e9a18ae7 dashboard/app: switch foreachBug to using cursors
Cursors seem to be more efficient than Offset-based queries:
https://cloud.google.com/datastore/docs/concepts/queries#datastore-datastore-cursor-paging-go

Update #1448
2019-10-25 13:28:42 +02:00
Dmitry Vyukov
93b35d600e dashboard/app: use paged query to load bugs on the main page
The bugs query periodically times out. Try to use a paged query.

Update #1448
2019-10-25 13:28:42 +02:00
Dmitry Vyukov
3a0514fbbf dashboard/app: remove duplicate error log
The returned error is logged by caller.
2019-10-25 13:28:42 +02:00
Dmitry Vyukov
639a1e6606 dashboard/app: don't log errors that can be caused by bad user requests 2019-10-25 13:28:42 +02:00
Dmitry Vyukov
b602d64b59 dashboard/config: disable /dev/{mem,kmem,ioport} in syzbot bits
If syzkaller gets to /dev/{mem,kmem,ioport}, it will destroy the machine.
It managed to do so with some mount's, chdir's and bogus file names.
These are not needed for fuzzing, so completely disabling them is
the simplest and the most reliable option.
2019-10-23 15:57:13 +02:00
Andrey Konovalov
a970258ea5 dashboard/config: better extract usb configs
When generating a USB config, disable USB symbols that are disabled in the
base config, as they might have been enabled when some of the dependecies
got enabled.
2019-10-23 10:13:19 +02:00
Dmitry Vyukov
ef4a2149fe dashboard/config: update linux/kasan config
- update to latest linux-next
- disable /dev/{mem,kmem,ioport}
- enable lockdown (but it's not actually turned on)
- enable /dev/device_notify
- enable exfat
- enable virtio_fs
- enable few other things that look reachable in VMs

Fixes #1436
2019-10-15 13:50:06 +02:00
Andrey Konovalov
05ad729222 dashboard/config: update USB config 2019-10-14 14:14:06 +02:00
Dmitry Vyukov
64612bfd3c tools/syz-reprolist: add utility to extract list of reproducers 2019-10-08 12:39:23 +02:00
Dmitry Vyukov
3e1e84d48e dashboard/app: refactor few things related to fix bisections 2019-10-04 18:02:27 +02:00
zsm-oss
671dd8203a Merge pull request #1383 from zsm-oss/show-bisections
dashboard/app: show fix bisections on bug web UI
2019-10-04 17:51:16 +02:00
Andrey Konovalov
b7a87a83f8 dashboard, sys/linux: update USB configs 2019-10-01 14:00:17 +02:00
Zubin Mithra
f8368f999a dashboard/app: no reporting fix bisection results for already fixed bugs
* Modify pollCompletedJobs(); for bugs that are already marked as fixed,
invalid or duplicate do not report bisection results.
* Add TestNotReportingAlreadyFixed() to test that reporting does not
occur for already fixed bugs.
2019-09-24 10:48:29 +02:00
Marco Elver
c68252d224 dashboard/config: Add KCSAN config generator and config 2019-09-23 18:02:39 +02:00
Dmitry Vyukov
b4680d8341 dashboard/app: fix error wrapping
The current code does not do what it's supposed to do.
Converting error to error is always true.
Properly wrap errors.
2019-09-19 16:47:24 +02:00
Siddharth Muralee
1037b42440 dashboard/config: Add netbsd kernel configs 2019-09-18 15:00:55 +02:00
Andrey Konovalov
669cade06a dashboard/config: add debian stretch options
See #760 for details.
2019-09-17 14:42:25 +02:00
Andrey Konovalov
d994512dff sys/linux, dashboard: update USB config 2019-09-04 13:09:49 +02:00
Andrey Konovalov
6c19c36919 dashboard/config: improve config generation scripts
1. Use MAKE_ARGS var to pass arguments to make.
2. Pass -m to merge_config.sh to avoid calling make without CC.
3. Make util_add_syzbot_extra_bits() operate on .config.
2019-09-04 13:09:49 +02:00
Zubin Mithra
05c2dc45fb dashboard/app: fix typo and change reporting description
* Fix a typo in mail_bisect_result.txt related to the "syz fix:" line.
* Improve the description to make it clearer why sending a "syz fix:" is
important.
2019-09-04 11:01:18 +02:00
Dmitry Vyukov
584f940baf dashboard/app: fix fix bisection tests
Currently TestBisectFixRetry  fails because it assumes emails
about crash on ToT are not sent. But we currently send them
in tests. Make the behavior consistent between tests and prod.

Update #1371
2019-09-01 20:42:31 -07:00
Dmitry Vyukov
9a1a17ad11 dashboard/app: temporary disable fix bisection reporting
Update #1371
2019-09-01 20:42:20 -07:00
Zubin Mithra
bad3cce26c dashboard/app: allow reporting of BisectFix results
* Modify mail_bisect_result.txt to allow for sending fix bisection
results.
* Modify BisectResult to have a Fix field; introduce selectBisect for
use within the template for choosing between BisectCause/BisectFix
fields.
* Modify bisectFromJob() to return BisectResult with Fix field set if
relevant.
* Modify the tests inside bisect_test.go to account for bisect fix
related reporting emails.
* Modify incomingMail() to ignore any emails from syzbot itself.
2019-08-30 19:50:12 -07:00
Zubin Mithra
cd626f3ba9 dashboard/app: retry BisectFix if crash still occurs on ToT
If a crash occurs on ToT when doing fix bisection, retry the job after
30 days. Add TestBisectFixRetry() to ensure that jobs are retried after
30 days if bisection results in crash on ToT.
2019-08-28 15:34:44 -07:00
Andrey Konovalov
d21c5d9de0 dashboard/app: include dashboard link in job reports 2019-08-24 13:42:14 -07:00
Andrey Konovalov
74d61399c2
dashboard: allow to view bugs happened on a particular manager (#1331)
As a result all bugs from the ci2-upstream-usb instance can be viewed here:

https://syzkaller.appspot.com/upstream?manager=ci2-upstream-usb
2019-08-13 14:11:21 +02:00
Zubin Mithra
ede31a9b51 dashboard/app: fix UI typo and formatting error
There is a typo and a formatting bug that can be viewed at bugs such as
    https://syzkaller.appspot.com/bug?id=f007ef1d7a31a469e3be7aeb0fde0769b18585db

Also cleanup the formatting in surrounding areas so that it is much
clearer.
2019-08-08 19:05:56 +02:00
Zubin Mithra
a02b5bcae2 dashboard/app: allow main UI to show bisect results
* Modify uiBug type. Rename BisectCause to BisectCauseDone. Introduce
BisectFixDone.
* Modify createUIBug() and MergeUIBug() to set the above fields
appropriately.
* Modify bug_list to display the bisection status; remove yesSort() as
it is not used anymore. Adjust ".list_table .stat" to appropriate width.
* Add TestBugBisectionStatus() to check bisection status on main page.
* Add file from running "make generate": pkg/html/generated.go
2019-08-08 15:58:57 +02:00
Zubin Mithra
1bd538f42c dashboard/app: remove duplicate code inside bug.html template
* Introduce "bisect_results" inside templates.html to take in a uiJob
and shows its contents.
* Modify bug.html to use "bisect_results" to show BisectCause and
BisectFix uiJob.
2019-08-08 15:22:19 +02:00
Anton Lindqvist
c6f01e54b0 dashboard/config: enable VFSLCKDEBUG on OpenBSD
In order to assert that vnodes are locked when needed.
2019-08-06 16:35:28 +02:00
Andrey Konovalov
3faab80738
dashboard, sys/linux: extract more HID USB configs (#1310)
Some USB drivers don't depend on core USB symbols, but rather depend on a
generic symbol for some input subsystem (e.g. HID). Account for that when
extracting USB configs.
2019-08-02 18:26:44 +02:00
Zubin Mithra
835dffe7e5 dashboard/app: allow fix bisection results to be visible on web UI
* Modify the dashboard/app/bug.html template to show fix bisection
results.
* Modify handleBug() to fetch and create a uiJob for fix bisection
results.
* Modify loadBisectJob() to fetch jobs based on a specified jobType.
Change all callers to pass in jobType info into loadBisectJob().
* Add TestBugBisectionResults() to ensure bisection results show up as
expected.
2019-08-01 13:43:22 +02:00
Zubin Mithra
c692b5bdab dashboard/app: clean up query inside findBugsForBisection 2019-07-31 13:51:17 +02:00
Dmitry Vyukov
6b499767f1 dashboard/app: add index for fix bisection 2019-07-30 16:54:57 +02:00
Zubin Mithra
5894f4562d dashboard/app: allow the dashboard to create BisectFix jobs
* Modify createBisectJob() to retrieve bugs that are potential candidates for both
BisectCause and BisectFix.
* Modify TestBisectCause() to account for BisectFix jobs that are
returned when polling.
* Add TestBisectFixJob() to check that BisectFix jobs are returned only
after 30 days of reporting.
* pollCompletedJobs() is currently called to fetch finished bisection
jobs for reporting purposes. Modify it to not return BisectFix jobs so
that they are not reported.
2019-07-30 16:35:15 +02:00
Dmitry Vyukov
732bc5a0a4 dashboard/app: ensure that tests consume all external reports
Ensure that tests consume all external reports as we already do for emails.
Reports is the most important thing because they involve people,
so tests need to be explicit and we want to notice changes in any reporting.
2019-07-25 16:31:25 +02:00
Dmitry Vyukov
8821159f77 dashboard/config: update upstream-kasan.config
Update config to 5.3.0-rc1.
Enable some new networking configs which should be able to reach.
Enable CONFIG_USB_DUMMY_HCD for /dev/usbmon testing.
2019-07-25 15:11:30 +02:00
Dmitry Vyukov
b858e6fb5f
dashboard/app: add test instructions 2019-07-23 08:56:16 +02:00
Andrey Konovalov
e2b11c0ada dashboard: fix usb config extraction script
Fix extracting more configs that are actually enabled.
Regenerate upsteam-usb.config and sys/linux/init_vusb_ids.go.
2019-07-16 15:02:36 +02:00
Dmitry Vyukov
db842eb61c dashboard/app: add ConstFilter helper
Handy to use in configs if lots of filter just need to return a const.
2019-07-16 14:18:35 +02:00
Dmitry Vyukov
7e921b852d dashboard/app: add an empty test file
blaze+tricoder fail when all test files are excluded by tags.
Work around the bug by adding an empty test file.
2019-07-16 12:44:02 +02:00
Dmitry Vyukov
f62e1e85cf dashboard/config: update linux configs
Update configs to the current linux-next (16c474c9ba39ede5fd1cd835ac52b3760d7820b7).
Enable CONFIG_GVE=y, we may be able to reach it on GCE.
2019-07-05 11:51:08 +02:00
Andrey Konovalov
c87d57e3e0 dashboard: update USB configs to the latest usb-linus
Also clean up config generation scripts a bit.
2019-05-29 15:56:43 +02:00
Dmitry Vyukov
d8aa8b73f5 dashboard/app: add invalid bugs page
Currently it's not possible to list all invalid bugs.
Add a page that does this.
It's not referenced from anywhere as it's unclear who/when
needs it on periodic basis. But if the list is needed
for something one-off, we have it.
2019-05-27 11:28:02 +02:00
Dmitry Vyukov
cddddce85a dashboard/config: update kmemleak config
Update to latest linux.
Enable configs enabled in the kasan config.
2019-05-20 19:40:20 +02:00
Dmitry Vyukov
40046286a4 dashboard/config: disable CONFIG_RETPOLINE
It slows down execution without any benefit for testing.
Who needs security anyways?
2019-05-17 13:21:31 +02:00
Dmitry Vyukov
c4a2377034 dashboard/config: disable binder debug
Binder is too noisy with debug output.
Still noisy, but this at least removes part of constant output.
2019-05-16 18:56:49 +02:00
Alexander Potapenko
f59a9cb554 Rebuild upstream-kmsan.config
Turns out I was using a stale KASAN config which didn't include TOMOYO
bits.
2019-05-16 11:10:34 +02:00
Alexander Potapenko
27b25dbc1d util.sh: factor out util_add_extra_syzbot_configs 2019-05-15 16:23:44 +02:00
Alexander Potapenko
692754f1a7 Enable USB fuzzing in KMSAN configs.
This moves the USB-related parts of generate-config-usb.sh to util.sh
and reuses them in generate-config-kmsan-from-kasan.sh.

It also updates upstream-kmsan.config
2019-05-15 16:23:44 +02:00
Dmitry Vyukov
3345130d0f dashboard/config: fix up TOMOYO configs
See https://groups.google.com/d/msg/syzkaller/mODXmnauUZM/nIuyd2M0AAAJ for context.
2019-05-15 11:57:17 +02:00
Andrey Konovalov
99688eaaba dashboard: remove COMPILE_TEST from USB config
It forces DEBUG_INFO to be disabled.
2019-05-14 14:36:57 +02:00
Andrey Konovalov
7c305b440c dashboard: add scripts for generating USB kernel configs
This is done via a custom Kconfiglib based script, that allows to merge
in all USB configs from a provided one into the current. The script finds
and enabled all USB configs and their dependencies.
2019-05-13 17:10:34 +02:00
Dmitry Vyukov
aa8482aa8a dashboard/config: enable CONFIG_SECURITY_TOMOYO_INSECURE_BUILTIN_SETTING
This allows to enable and test TOMOYO without an external policy (which we don't have).
2019-05-13 09:31:11 +02:00
Anton Lindqvist
1ab4c99920 dashboard/config: enable SPLASSERT_WATCH on OpenBSD
Makes interrupt priority level assertions fatal.
2019-05-08 19:51:17 +02:00
Dmitry Vyukov
1bb034d089 dashboard/app: fix too long line warning 2019-05-08 16:30:46 +02:00
Dmitry Vyukov
b12c1ab14c dashboard/app: restore printing of email commands
After commit 9ad9ef29ca
we started saying "your command '3' is accepted"
because we use numbers now. Keep string representation
of the command when parsing and use it in reply emails.
2019-05-08 16:29:04 +02:00
Dmitry Vyukov
3e1f67583e dashboard/config: update upstream KASAN config
Update config to latest linux-next kernel.
2019-05-07 18:01:24 +02:00
Dmitry Vyukov
8095117313 all: fix some static analysis warnings
Fix warnings produced by golangci-lint.

Update #977
2019-04-23 17:58:54 +03:00
Andrey Konovalov
2e55509e43 config: enable CONFIG_PRINTK_CALLER for usb 2019-04-22 12:20:42 +03:00
Greg Steuck
505ab413c7 Revert "dashboard/config: enable POOL_DEBUG on OpenBSD (#1113)"
This reverts commit 2fbd3aa904.
2019-04-14 10:44:34 +02:00
Dmitry Vyukov
57a8554e1a dashboard/app: fix cookie caching and redirects
Set expiration date for the cookie,
otherwise it should be dropped on browser restart.

Use http.StatusFound(302) instead of http.StatusMovedPermanently(301)
for redirects. Browsers can cache 301 redirects, which we don't want.
2019-04-12 14:42:17 +02:00
Dmitry Vyukov
13030ef80c dashboard/config: update usb config 2019-04-11 16:29:46 +02:00
Dmitry Vyukov
31e097a19f dashboard/app: stricter check on namespace names
Check that namespaces don't contain bad chars.
2019-04-10 15:07:22 +02:00
Dmitry Vyukov
e39dbde1da dashboard/app: fix login redirects
Login redirects broke because we failed to generate common header.
This wasn't noticed because we use client redirects
and there is no easy way to test them.
Fix redirects and use server redirect and test this behavior.
2019-04-10 15:06:59 +02:00
Andrey Konovalov
65b612b7c3 dashboard: disable CONFIG_DEBUG_WX in USB config
Otherwise we get "Found insecure W+X mapping" due to rodata=n in cmdline.
2019-04-09 19:15:49 +02:00
Andrey Konovalov
4e3011def6 dashboard: add USB cmdline and config 2019-04-09 18:37:45 +02:00
Dmitry Vyukov
91d50a67cc dashboard/app: add new favicon
Add syzbot favicon and log.
Authored by Tetsuo Handa.
2019-04-09 11:15:16 +02:00
Dmitry Vyukov
3ef496b7ba dashboard/app: split dashboard per-namespace
We now have too many namespaces and bugs.
Main page takes infinity to load.
Also almost nobody is interested in more than 1 namespace.
So split main page per-namespaces.
2019-04-08 14:32:32 +02:00
Anton Lindqvist
2fbd3aa904 dashboard/config: enable POOL_DEBUG on OpenBSD (#1113)
POOL_DEBUG is disabled during release, but we want it unconditionally
enabled.
2019-04-05 16:44:34 -07:00
Dmitry Vyukov
fa763482c3 dashboard/app: add admin page
Add /admin page and move logs, jobs, manager onto it.
The main page is too overloaded and takes too long to load.
We need to start splitting it. This is a first step.
2019-04-05 17:56:42 +02:00
Dmitry Vyukov
698a192c6d dashboard/app: don't error on invalid emails
Malformed emails constantly appear from spammers.
But we have not seen errors parsing legit emails.
These errors are annoying. Warn and ignore them.
2019-03-29 08:56:02 +01:00
Dmitry Vyukov
52a20ba400 dashboard/app: properly handle build failures
Separate kernel and syzkaller build failures.
Fix logic to understand when a build is fixed:
look if kernel/syzkaller commit changes to understand
if it's a new good build or re-upload of an old build.

Fixes #1014
2019-03-25 17:00:25 +01:00
Dmitry Vyukov
8e1b6f6446 dashboard/app: fix infinite emails
We override crash with the crash used for bisection
to make the information more consistent.
However if bisection crash only have syz repro
and there is now another crash with C repro,
then we always think that we have not reported C repro
and continue sending the same report again and again.
Don't override the crash with bisection crash in such case.
2019-03-24 12:52:30 +01:00
Dmitry Vyukov
3361bde577 dashboard/app: import datastore as db
datastore is too long name for such widely used packages.
Import it as db throughout. Nicely reduces line lengths.
2019-03-22 15:11:26 +01:00
Dmitry Vyukov
6155cc0988 dashboard/app: mark managers as bad after 6 hours of inactivity
It should not take more than 6 hours to rebuild all kernels.
So it's better to highlight bad managers earlier.
2019-03-22 15:05:45 +01:00
Dmitry Vyukov
9ad9ef29ca dashboard/app: slightly relax command parsing
Users have misspelled test: multiple times.
Accept commands without the colon.
2019-03-22 12:00:50 +01:00
Dmitry Vyukov
4d9d915eae syz-ci: fix filling of kernel commit in bisection jobs
There is a bit of a mess: dashboard expects the start commit
in build info, but syz-ci sends the resulting cause commit.
Moreover for inconclusive bisection the commit is not filled at all.
Fill start commit in build info on start.

Update #501
2019-03-22 12:00:50 +01:00
Dmitry Vyukov
ca3ffbc9f3 dashboard/app: add uncc command
Add "#syz uncc" command as a safety handle.
The command allows sender to unsubscribe from all future communication on the bug.

Linus mentioned possibility of saying "I'm not the right person for this report"
in the context of bug reminders:
https://groups.google.com/d/msg/syzkaller/zYlQ-b-QPHQ/AJzpeObcBAAJ
2019-03-22 12:00:50 +01:00
Dmitry Vyukov
40fdabdc24 dashboard/app: add bisection link to emails
Add link to more information about bisection process
to emails that contain bisection results.
This seems to be a hot topic for questions.

Update #501
2019-03-22 12:00:50 +01:00
Dmitry Vyukov
f6094a8c64 dashboard/app: use 12-char hash in Fixes tags
@ebiggers pointed out that Fixes tags should use 12-char hash:
https://groups.google.com/d/msg/syzkaller-bugs/yUhRrLD6T6A/3TMwOWvWAgAJ
I can't find any documentation on this, but it looks like most
existing tags follow this convention so use 12-char hashes.
2019-03-21 09:32:46 +01:00
Dmitry Vyukov
142c38ee4d dashboard/app: request test/bisect jobs separately
Allow separate sets of managers for patch testing and for bisection.
This makes things more flexible on syz-ci deployment side.
Remove previous hacks for bisection deployment.

Update #501
2019-03-20 12:00:34 +01:00
Dmitry Vyukov
3f1c29d938 dashboard/app: report bisection results to external reporting
Update #501
2019-03-19 16:37:21 +01:00
Dmitry Vyukov
46264c3259 dashboard/app: fix a typo in comment 2019-03-18 13:39:52 +01:00