Skip to content

Commit

Permalink
Merge branch 'master' into native-arb-cf-redirect-detector
Browse files Browse the repository at this point in the history
* master:
  Fix FileNotFoundError when loading existing state (#1480)
  Add undoc-members to api docs (#1478)
  Improve deprecation warnings (#1476)
  Fix sycall getdents (#1472)
  Dev apidocs refactor (#1469)
  Enforce black formatting (#1466)
  Moving issymbolic to smtlib (#1456)
  Revert Unicorn Dependency Update (#1459)
  Manticore 0.3.0 (#1448)
  Install native deps on rtd (#1457)
  Fix check for symbolic syscall argument (#1452)
  Use deque instead of list for FIFO queue in Linux Socket buffer (#1453)
  • Loading branch information
ekilmer committed Jul 11, 2019
2 parents 19b2b40 + 4ca0d4c commit db3409c
Show file tree
Hide file tree
Showing 46 changed files with 581 additions and 335 deletions.
2 changes: 1 addition & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ jobs:
- stage: format
env: TEST_TYPE=format
script:
- git diff --name-only $TRAVIS_COMMIT_RANGE | python3 scripts/pyfile_exists.py | xargs black -t py36 -l 100 --check
- git diff --name-only $TRAVIS_COMMIT_RANGE | python3 scripts/pyfile_exists.py | xargs black --check
- stage: prepare
env: TEST_TYPE=env
script:
Expand Down
54 changes: 53 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,58 @@
# Change Log

## [Unreleased](https://github.com/trailofbits/manticore/compare/0.2.5...HEAD)
## [Unreleased](https://github.com/trailofbits/manticore/compare/0.3.0...HEAD)

## 0.3.0 - 2019-06-06

Thanks to our external contributors!

- [catenacyber](https://github.com/trailofbits/manticore/commits?author=catenacyber)
- [binaryflesh](https://github.com/trailofbits/manticore/commits?author=binaryflesh)

### Major Changes
##### Executor Refactor ([#1385](https://github.com/trailofbits/manticore/pull/1385))
We've completed a major refactor of the core executor that reorganizes Manticore's state machine to be more amenable toward use with the multiprocesssing module. This refactor introduces some small API changes:
* One must explicitly call the `finalize` method to dump test cases from a run
* The `will_start_run` event has been renamed to `will_run`
* The `solver` module requires explicitly accessing the Z3Solver singleton. `from manticore.core.smtlib import solver` becomes:
```python
from manticore.core.smtlib.solver import Z3Solver
solver = Z3Solver.instance()
```
* `manticore.running_states` has been renamed to `manticore._busy_states`
For more information about changes to the state machine, see [the diagram in core/manticore.py](https://github.com/trailofbits/manticore/blob/451965f03a5e0d6766e499bf3246e4796b35638f/manticore/core/manticore.py#L132-L239)

##### Blacken ([#1438](https://github.com/trailofbits/manticore/pull/1438))
We've run the [`black`](https://black.readthedocs.io/en/stable/index.html) autoformatter on the master branch of Manticore, and added a check for compliance to our CI. To ensure your code is properly formatted, run `black -t py36 -l 100 .` in your Manticore directory before committing.

##### Support for statically-linked AArch64 binaries ([#1424](https://github.com/trailofbits/manticore/pull/1424))
Contractor [nkaretnikov](https://github.com/trailofbits/manticore/commits?author=nkaretnikov) spent several months adding support for AArch64 on Linux. As this is a brand new architecture, we've left in most of the debugging assertions, which may slow it down slightly.
We look forward to getting feedback on this architecture so we can eventually remove the debugging assertions.


### Ethereum

* Added Symbolic EVM Tests for the Frontier fork. Note that we don't support any other forks (i.e. Constantinople) yet. ([#1431](https://github.com/trailofbits/manticore/pull/1431), [#1441](https://github.com/trailofbits/manticore/pull/1441))
* **[fixed API]** Fixed relative paths for .sol files ([#1393](https://github.com/trailofbits/manticore/pull/1393))
* **[fixed API]** Support dynamic parameters in constructors ([#1414](https://github.com/trailofbits/manticore/pull/1414))
* Fixed detector failure when PC is symbolic ([#1395](https://github.com/trailofbits/manticore/pull/1395))
* Transfers from etherless contracts no longer report STOP ([#1392](https://github.com/trailofbits/manticore/pull/1392))

### Native

* Added stubs for missing system calls & downgraded most missing calls from exceptions to warnings ([#1384](https://github.com/trailofbits/manticore/pull/1384))
* Fixed DECREE magic pages ([#1413](https://github.com/trailofbits/manticore/pull/1413))
* Store x86 registers in a set instead of a list ([#1415](https://github.com/trailofbits/manticore/pull/1415))
* Fix register boundary check for non-x86 architectures ([#1429](https://github.com/trailofbits/manticore/pull/1429))
* Support `movhps` on x86 ([#1444](https://github.com/trailofbits/manticore/pull/1444))

### Other

* Only publish events when there is at least one subscriber ([#1388](https://github.com/trailofbits/manticore/pull/1388))
* Added sandshrew example ([#1396](https://github.com/trailofbits/manticore/pull/1396))
* Updated Unicorn to track latest master ([#1440](https://github.com/trailofbits/manticore/pull/1440))
* **[fixed API]** Now respects coverage file argument ([#1442](https://github.com/trailofbits/manticore/pull/1442))


## 0.2.5 - 2019-03-18

Expand Down
2 changes: 1 addition & 1 deletion CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ Some pull request guidelines:

- We use the [`black`](https://black.readthedocs.io/en/stable/index.html) auto-formatter
to enforce style conventions in Manticore. To ensure your code is properly
formatted, run `black -t py36 -l 100 .` in the manticore directory before
formatted, run `black .` in the manticore directory before
committing.
- Minimize irrelevant changes (formatting, whitespace, etc) to code that would
otherwise not be touched by this patch. Save formatting or style corrections
Expand Down
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ LABEL dockerfile_maintenance=trailofbits

ENV LANG C.UTF-8

RUN apt-get -y update && DEBIAN_FRONTEND=noninteractive apt-get -y install python3 python3-pip git wget python
RUN apt-get -y update && DEBIAN_FRONTEND=noninteractive apt-get -y install python3 python3-pip git wget

# Install solc 0.4.25 and validate it
RUN wget https://github.com/ethereum/solidity/releases/download/v0.4.25/solc-static-linux \
Expand Down
73 changes: 0 additions & 73 deletions docs/api.rst

This file was deleted.

7 changes: 7 additions & 0 deletions docs/base.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
ManticoreBase
=============

.. autoclass:: manticore.core.manticore.ManticoreBase
:members:
:special-members: __init__
:exclude-members: all_states, ready_states, count_ready_states, count_busy_states, killed_states, count_killed_states, terminated_states, count_terminated_states
6 changes: 3 additions & 3 deletions docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@

# If your documentation needs a minimal Sphinx version, state it here.
#
# needs_sphinx = '1.0'
needs_sphinx = "1.0"

# Add any Sphinx extension module names here, as strings. They can be
# extensions coming with Sphinx (named 'sphinx.ext.*') or your custom
Expand Down Expand Up @@ -54,9 +54,9 @@
# built documents.
#
# The short X.Y version.
version = "0.2.5"
version = "0.3.0"
# The full version, including alpha/beta/rc tags.
release = "0.2.5"
release = "0.3.0"

# The language for content autogenerated by Sphinx. Refer to documentation
# for a list of supported languages.
Expand Down
24 changes: 24 additions & 0 deletions docs/evm.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
EVM
---

ABI
^^^

.. autoclass:: manticore.ethereum.ABI
:members:
:undoc-members:

Manager
^^^^^^^

.. autoclass:: manticore.ethereum.ManticoreEVM
:members:
:undoc-members:

EVM
^^^

.. automodule:: manticore.platforms.evm
:exclude-members: ADD, ADDMOD, ADDRESS, AND, BALANCE, BLOCKHASH, BYTE, CALL, CALLCODE, CALLDATACOPY, CALLDATALOAD, CALLDATASIZE, CALLER, CALLVALUE, CODECOPY, CODESIZE, COINBASE, CREATE, DELEGATECALL, DIFFICULTY, DIV, DUP, EQ, EXP, EXP_gas, EXTCODECOPY, EXTCODESIZE, GAS, GASLIMIT, GASPRICE, GETPC, GT, INVALID, ISZERO, JUMP, JUMPDEST, JUMPI, LT, MLOAD, MOD, MSIZE, MSTORE, MSTORE8, MUL, MULMOD, NOT, NUMBER, OR, ORIGIN, POP, PUSH, RETURN, SDIV, SELFDESTRUCT, SGT, SHA3, SIGNEXTEND, SLOAD, SLT, SMOD, SSTORE, STATICCALL, STOP, SUB, SWAP, TIMESTAMP, XOR, BALANCE_gas, CALLCODE_gas, CALLDATACOPY_gas, CALL_gas, CODECOPY_gas, CREATE_gas, DELEGATECALL_gas, EXTCODECOPY_gas, LOG, LOG_gas, MLOAD_gas, MSTORE8_gas, MSTORE_gas, PC, RETURNDATACOPY, RETURNDATACOPY_gas, RETURNDATASIZE, RETURN_gas, REVERT, REVERT_gas, SHA3_gas, SSTORE_gas, STATICCALL_gas, THROW
:members:
:undoc-members:
9 changes: 6 additions & 3 deletions docs/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,12 @@ Manticore is a symbolic execution tool for analysis of binaries and smart contra
:maxdepth: 2
:caption: Contents:

api
syminput
models
base
worker
states
evm
native
plugins
gotchas


Expand Down
29 changes: 0 additions & 29 deletions docs/models.rst

This file was deleted.

Loading

0 comments on commit db3409c

Please sign in to comment.