Commit Graph

571 Commits

Author SHA1 Message Date
f62cc3b365 add setup_dir to the PATH for libfuzzer (#680) 2021-03-16 22:35:55 -04:00
7d087f3a75 release 2.9.0 (#678) 2.9.0 2021-03-16 15:01:37 -04:00
fd0820f1a1 Updated AFL++ to 3.11c. (#675) 2021-03-16 16:51:56 +00:00
f0e5823c0a add retry to download_input (#676) 2021-03-16 12:17:28 -04:00
7ebdeac537 Added UserInfo Filter Logging Function (#661)
## Summary of the Pull Request

_What is this about?_
Due to our GDPR privacy requirements, we decided that it would be best to completely purge personal identifiable information from our AppInsights telemetry and logging. Instead of just removing all of the logging statements with personal info, I created a filter function that logs telemetry after it's been run through a recursive scrubbing function. This PR includes this new scrubbing function. 

## PR Checklist
* [x] Applies to work item: #660
* [ ] CLA signed. If not, go over [here](https://cla.opensource.microsoft.com/microsoft/onefuzz) and sign the CLI.
* [ ] 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

_What does this include?_
Includes changes to events.py in onefuzzlib. I've implemented functionality - log_event() - to recursively check Event structures for UserInfo before logging to AppInsights. 

## Validation Steps Performed
I run local tests using a script I created with test events. 

_How does someone test & validate?_
I can provide local testing script. If that is insufficient, I can write a unit test that will run against this code.
2021-03-15 23:56:00 +00:00
09e4afcbce retry any failed request regardless of status (#674) 2021-03-15 19:10:24 -04:00
a3fdc74c53 handle exception related to manually deleted scalesets (#672)
If a user manually deletes a scaleset managed by OneFuzz, then `get_vmss_size` returns None.

When this happens, `Scaleset.shutdown` generates an exception from the `logging.info` call on line 573.

This PR handles this edge condition.
2021-03-15 14:18:59 +00:00
9ee114ff71 Make fields of JobStats public (#673) 2021-03-12 22:44:03 -08:00
ff3e80fca5 Add salvo telemetry (#619)
Adds telemetry fields for Salvo.

This PR should not be merged until approved by CELA.

Note: This PR includes #586
2021-03-12 23:39:42 +00:00
32cc2e7387 address issues from by latest regex update (#671) 2021-03-12 15:16:17 -05:00
19a3805130 include version and software role to Microsoft collected telemetry (#586)
NOTE: This should not be merged until the privacy review has completed.

Ref: reltrack-4150
2021-03-12 14:50:15 +00:00
6888fc8fb8 send EventTaskFailed and EventTaskStopped once the task is stopped (#651)
As is, these events are sent once the task enters the state `stopping`.
However, the tasks can still be running on the VMs which can be
confusing.
2021-03-12 01:48:28 +00:00
07f7f6fa48 Add input file sha256 placeholder (#641) 2021-03-11 20:27:58 -05:00
44c830f600 save login details on successful login (#665)
If we login successfully, save the login data immediately.  That way if users run a second command  before the first one finishes, they only have to login once.
2021-03-12 00:36:12 +00:00
14c7d5e4d9 mark dependant tasks failed upon failure (#650)
Fix #644
2021-03-11 22:24:43 +00:00
09c6f9263f sample webhook service (#666) 2021-03-11 17:08:13 -05:00
0378455a66 fix racy tests for expected failures in web requests (#667) 2021-03-11 16:10:04 -05:00
8a1a4db556 Try to demangle symbol names before filtering (#662)
Filter coverage recording against human-readable, demangled symbols.

- Add custom demanglers for Itanium C++ mangling, rustc mangling, and MSVC decorated names
- Add a catch-all demangler that tries each known demangler against a raw symbol, in a fixed order
- Default to using the catch-all demangler in coverage recording

We try to implement a lowest common denominator across schemes: omit types and extra annotations, but preserve generic specializations, namespacing, and paths. Note that the omission of parameter types causes collisions in the face of ad hoc polymorphism. Consult the unit tests for examples.
2021-03-11 17:46:35 +00:00
aa83f20ad8 Simplify types used in stack walking (#657)
* Fix test build
* Unify stack frame types
* Always include code offset within a function
* Run cargo test --workspace in CI
2021-03-10 23:36:03 -08:00
277725776d automatic retry on wget failure (#659) 2021-03-11 01:38:42 -05:00
54e007045e Fix incorrect offset in stack reports (#658) 2021-03-10 14:52:17 -08:00
f6a426cc07 enable long-running integration tests (#654) 2021-03-10 17:03:15 -05:00
f055e73b13 ignore RUSTSEC-2019-0036 (#656) 2021-03-10 13:55:31 -05:00
caba957d9c remove azure-mgmt-servicebus from deployment dependencies (#653)
Remove ServiceBus dependency, as this isn't used in OneFuzz
2021-03-10 13:00:50 +00:00
67435e7883 Simplify module/symbol filter definition format, impl (#628)
Update the filter rule format and implementation to be simpler and user-predictable. In particular, we remove an accidental dependence of rule application on hash map iteration order.
2021-03-09 12:45:01 -08:00
b4ceb263e0 stop jobs once all tasks are stopped (#649)
Fixed #643
2021-03-09 20:09:18 +00:00
f26838452b remove stray ? (#652) 2021-03-09 11:57:58 -05:00
d2e4baa48d Updating Task Heartbeat Struct to actually include job_id (#646) 2021-03-09 10:24:04 -05:00
0a3812d8bc Add job stopped task info (#648) 2021-03-09 10:06:06 -05:00
18bf361d62 release 2.8.0 (#639) 2.8.0 2021-03-08 12:39:51 -05:00
54e2cb2bf1 update signalrcore (#640) 2021-03-08 12:22:55 -05:00
23dc8ad301 explain the source of task failures related notifications (#635) 2021-03-06 13:35:09 +00:00
157a14d003 fix markdown link error (#637) 2021-03-05 19:20:00 -05:00
fb8e7490c6 pre-define clusterfuzz as a dependency (#636) 2021-03-05 15:37:30 -05:00
1c09caedc5 add howto guide to understand the libfuzzer_coverage task (#631) 2021-03-05 19:21:11 +00:00
12df25ca17 Defer log formatting (#634)
Log formatting allocates memory and should only happen
if the log message is needed.
2021-03-05 10:39:15 -08:00
fdac6b02a8 re-pin pyjwt version due to conflicts with azure-cli-core (#630) 2021-03-03 22:18:45 -05:00
7fc725d012 add non-x86_64 architecture libfuzzer target support using qemu-user (#600) 2021-03-03 19:06:50 -05:00
92c1d0a7a1 only set VM passwords on Windows (#620) 2021-03-03 21:27:56 +00:00
d2e6c29e6b add info to help clarify success after warnings (#629) 2021-03-03 15:20:31 -05:00
ec33531870 Add Threat Model documentation (#482)
This PR includes a [Threat Model](https://aka.ms/tmt) for OneFuzz.
2021-03-03 19:30:56 +00:00
4ccc84a7de remove pyjwt from dependency list (#627) 2021-03-03 12:47:04 -05:00
2bec9db828 update azure-cli and azure-cli-core (#626) 2021-03-03 10:50:30 +00:00
78d6adf555 upgrade azure-storage-blob to 12.8.0 (#625)
Note, this makes use of the new feature, `ContainerClient.exists()` which models our existing mechanism for doing container existence checking.
2021-03-03 10:33:23 +00:00
b30ade7d0c update AFL++ to 3.10c (#609) 2021-03-02 22:11:46 -05:00
04fc41597e require target_exe to be a canonicalized relative path (#613) 2021-03-02 19:06:02 -05:00
4489036d9f add node & task heartbeat events (#621)
This adds node & task heartbeats and makes the event data available as a structured data in the logs.
2021-03-02 22:04:39 +00:00
7f66eeee0d handle OperationNotAllowed errors when creating VMSS (#614) 2021-03-02 16:14:10 -05:00
a0c04ec3d1 Add symbol cache and filtering (#570)
- Add caching to symbol table-driven module disassembly on Linux.
- Add configurable regex-based filtering for coverage collection, by module and module-scoped symbol name.

Block coverage recording can be manually tested using the `block_coverage` example in the `coverage` crate. See `./block_coverage -h` for expected args.

The filter file is optional. The file format is JSON like this:
```json
{
    "modules": {
        "allow": [
            "<module-path-regex-1>",
            "<module-path-regex-2>",
        ]
    },
    "symbols": {
        "<module-path-regex-1>": {
            "allow": [
                "<symbol-name-regex-1>",
                "<symbol-name-regex-2>",
            ]
        },
        "<module-path-regex-2>": {
            "deny": [
                "<symbol-name-regex-3>",
                "<symbol-name-regex-4>",
            ]
        }
    }
}
```

Closes #285.
2021-03-02 19:42:05 +00:00
b97093735a fix agent retry on connection level failures (#623)
In debugging the connection retry issues, I dug into this more.  

Apparently, some of hyper's connection errors are not mapped to std::io::Error, rendering the existing downcast impl ineffective.

As such, this PR makes the following updates:
1. Any request that fails for what `reqwest` calls a `connection` error is considered transient.
2. Updates the retry notify code to use our `warn` macro such that the events show up in application insights.
3. Updates the unit test to demonstrate that failures by trying to connect to `http://localhost:81/`, which shouldn't be listening on any system.
4. Adds a simple unit test to verify with send_retry_default, connections to https://www.microsoft.com work

Fixes #263
2021-03-02 19:02:10 +00:00