1882 Commits

Author SHA1 Message Date
bmc-msft
bf5f3d0ebb
always use unix file endings when building libfuzzer-qemu wrappers (#782) 2021-04-09 09:56:56 -04:00
Cheick Keita
80b3533f83
Report the setup failure in the task when available (#781) 2021-04-09 08:57:56 -04:00
bmc-msft
75f0315eb9
add retry with backoff to azcopy calls (#701)
This adds a retry wrapper around azcopy.

something to note:  tokio's Command doesn't allow for clone, which makes this unfortunately difficult to generalize to any command.
2021-04-09 00:35:35 +00:00
bmc-msft
97a73a43b6
set default value for ephemeral disks at the server request parser (#780) 2021-04-08 11:18:52 -04:00
Gurpreet Singh
cb0701b2f2
Added missing parameter for multi tenant deployment (#773)
## Info on Pull Request

This is a quick fix for multi tenant authentication. After doing some more testing, I realized I was missing a parameter in `azuredeploy.json`. So added missing code from previous [PR ](https://github.com/microsoft/onefuzz/pull/563/files). 

## Validation Steps Performed

I have tested these changes and was successfully able to deploy in both single tenant and multi tenant environments.
2021-04-07 21:45:56 +00:00
Cheick Keita
3e7b3df34f
local run UI (#663)
## Summary of the Pull Request

This PR add a UI to the local run. 
- The UI currently monitors the logs and  some of the directory created (the rest will be wired in a coming PR)
- pressing 'q' will quit the PR
- By default, the job directory is deleted when the ui quits unless the parameter 'keep_job_dir' is specified
2021-04-06 21:44:37 +00:00
bmc-msft
794400adf1
ignore benign error messages when checking integration test logs (#775) 2021-04-06 15:35:54 -04:00
bmc-msft
88af5f4dd3
allow deployment to non-default subscriptions (#774) 2021-04-06 13:06:35 -04:00
bmc-msft
a33aba26f2
format deployment registration code (#768) 2021-04-06 09:26:13 +00:00
bmc-msft
d279fe3486
simplify context for storage queue enqueue (#767) 2021-04-05 21:58:01 +00:00
bmc-msft
e21eafd135
clarify telemetry key names at the service level (#769) 2021-04-05 15:23:03 -04:00
bmc-msft
c452a8aff3
allow upper case acronymns (#771) 2021-04-05 13:41:33 -04:00
bmc-msft
2aea006c50
fix checking status codes for failure (#766)
This fixes retrying on bad status codes.

Note, this adds support to specify specific error codes as "successful".  This is important for the If-None-Match conditional upload case (blob uploading).  The response we get back is 409 (Conflict).

Previously, we would "fail fast" the 409.  However, what we want is "409 is basically success here" and every other call 409 should be a failure.
2021-04-03 20:12:50 +00:00
bmc-msft
eb7571e531
verify libfuzzer targets at the start of the task (#752) 2021-04-02 23:11:46 -04:00
bmc-msft
ca12904684
add log checking to refactored integration check (#700)
In practice, Application Insights can take up to 3 minutes before something sent to it is available via KQL.

This PR logs a start and stop marker such that the integration tests only search for logs during the integration tests. This reduces the complexity when using the integration tests during the development process.

Note: this migrated the new functionality from #356 into the latest integration test tools.
2021-04-02 21:49:19 +00:00
Joe Ranweiler
9c1540aca8
Use custom serialization for block coverage (#765)
Update command block coverage serialization to support a more compact JSON format.
2021-04-02 11:57:27 -07:00
Gurpreet Singh
7e5cf780a6
Added support for multi tenant authentication (#746)
## Summary of the Pull Request

_What is this about?_

## PR Checklist
* [x] Applies to work item: #562 
* [x] CLA signed. If not, go over [here](https://cla.opensource.microsoft.com/microsoft/onefuzz) and sign the CLI.
* [x] Tests added/passed
* [ ] Requires documentation to be updated
* [x] I've discussed this with core contributors already. If not checked, I'm ready to accept this work might be rejected in favor of a different grand plan. Issue number where discussion took place: #xxx

## Info on Pull Request

The end-to-end changes needed to have onefuzz deployed with multi-tenant authentication.

## Validation Steps Performed

_How does someone test & validate?_
2021-04-02 14:39:20 +00:00
bmc-msft
624a7f77e8
set ephemeral disks off by default (#761) 2021-04-01 16:26:17 -04:00
bmc-msft
f6adad3ed9
updates related to cargo clippy 1.51.0 (#730) 2021-04-01 13:08:21 -04:00
Joe Ranweiler
7ef8223f38
Borrow Recorder in debug event handler (#762)
Enables accessing recorded coverage without using the top-level `record()` function.
2021-03-31 15:01:01 -07:00
bmc-msft
6aca32ed9c
use usize for worker_id (#755) 2021-03-30 22:27:10 -04:00
bmc-msft
522ae4c5d9
remove supervisor-is-done upon test completion (#754) 2021-03-30 19:58:43 -04:00
Joe Ranweiler
560fa63ac3
Add command block coverage merging (#756)
- Add coverage merging for module and command block coverage
- Initialize module and offset tracking on demand
- Add tests
2021-03-30 16:31:54 -07:00
bmc-msft
3096f99e86
enable using ephemeral disks by default (#461) 2021-03-30 18:48:44 -04:00
bmc-msft
3eb7c8643b
set expect_crash_on_failure default to False on libFuzzer tasks (#748) 2021-03-30 21:51:15 +00:00
Cheick Keita
b75916d62f
Yield on each enqueue and pop on the local queue (#750) 2021-03-30 21:19:20 +00:00
bmc-msft
5055bf6c38
add libfuzzer regression tasks to local fuzzing (#744) 2021-03-30 20:58:07 +00:00
Joe Ranweiler
cf1051bad1
Update Linux Recorder API for task (#753)
Clean up the interface of the Linux `Recorder` struct, and make it more consistent with the Windows version. Hold a mutable ref to a `ModuleCache` to enable in-memory cache re-use.
2021-03-30 11:42:52 -07:00
Cheick Keita
9bd2e90e53
fix message queue send (#749) 2021-03-29 23:01:47 -04:00
bmc-msft
e8ce384bd9
cleanup local job_id directory upon clean exit (#738) 2021-03-27 16:39:09 -04:00
bmc-msft
19d19a1e0e
add names for poller logging (#742) 2021-03-26 23:04:41 -04:00
bmc-msft
b43a45187b
optionally ignore dotfiles in syncdir monitors (#741) 2021-03-26 22:40:36 -04:00
bmc-msft
fffaab2d25
change the scale of timeouts to seconds instead of minutes (#739) 2021-03-26 22:20:10 -04:00
bmc-msft
324f812bb8
cleanup syncdir events (#740) 2021-03-26 21:53:55 -04:00
bmc-msft
dc9b6fa1b0
address telemetry log message locality (#736) 2021-03-26 18:45:36 -04:00
Joe Ranweiler
5c149413a5
Enable coverage module filtering (only) for both platforms (#733)
- Add coverage filtering to Windows generic coverage recording
- Temporarily disable deserialization of symbol filter rules
2021-03-26 15:16:28 -07:00
bmc-msft
cf0d047a23
bubble out invalid messages on input queues (#731) 2021-03-26 15:50:48 +00:00
Cheick Keita
2a0365b9a2
Adding timeout to local run (#735) 2021-03-25 19:07:38 -04:00
bmc-msft
5f10169783
simplify returns (#732) 2021-03-25 12:27:31 -04:00
Cheick Keita
c02ede76b3
fix local generic analysis (#729) 2021-03-24 22:03:34 -04:00
bmc-msft
fd6f9eb0c3
add symbol and module names to StackFrame (#723)
This exposes the module_info and symbol name from debugger in the StackFrame.  This enables the stack minimization function work on function names.
2021-03-24 19:07:28 +00:00
bmc-msft
5fcb777799
update AFL++ to 3.12c (#728) 2021-03-24 12:30:07 -04:00
bmc-msft
c06d439c92
update azure-cli, azure-cli-core, and msal (#721) 2021-03-23 20:22:54 -04:00
bmc-msft
50ce56f754
update to include regexes from google/clusterfuzz #2282 (#722) 2021-03-23 19:43:21 -04:00
bmc-msft
d6b2ff9bae
hardcode wget to use TLSv1.2 (#717) 2021-03-23 19:21:13 -04:00
nharper285
92b5139a0a
Removing UserInfo from notifications logging (#724) 2021-03-23 18:47:05 -04:00
nharper285
1706a91291
Removing UserInfo from 'created task' logging (#725) 2021-03-23 18:45:18 -04:00
bmc-msft
de5c843eb5
work around AAD service principal race condition (#716)
This works around an issue in AAD service principal creation.  The race condition in AAD shows up as:

```
INFO:deploy:checking if RBAC already exists
INFO:deploy:creating Application registration
INFO:deploy:creating service principal
Traceback (most recent call last):
  File "deploy.py", line 926, in <module>
    main()
  File "deploy.py", line 920, in main
    state[1](client)
  File "deploy.py", line 303, in setup_rbac
    client.service_principals.create(service_principal_params)
  File "/tmp/tmpp2x7ybfg/deploy-venv/lib/python3.8/site-packages/azure/graphrbac/operations/service_principals_operations.py", line 87, in create
    raise models.GraphErrorException(self._deserialize, response)
azure.graphrbac.models.graph_error_py3.GraphErrorException: When using this permission, the backing application of the service principal being created must in the local tenant
```

The azure-cli has the same issue, as seen in https://github.com/Azure/azure-cli/issues/14767
2021-03-23 21:02:36 +00:00
Joe Ranweiler
3ef7db64c3
Update Windows generic coverage recording (#699)
- Reimplement Windows generic coverage using new coverage format
- Remove old format
- Update and unify examples
2021-03-23 13:07:57 -07:00
bmc-msft
e80b658a1a
expose new minimized stack fields in the crash report model (#719) 2021-03-23 12:29:08 -04:00