question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Add a special case for passing original calldata with symbolic length

See original GitHub issue

Description

As described in #674, Mythril currently doesn’t support the delegatecall proxy pattern where the original calldata is passed through. This is because we don’t support calldata with a symbolic offset or length.

I suppose that we could add a special case for offset = 0 and length = calldatasize where we provide the original calldata to the callee.

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:10 (2 by maintainers)

github_iconTop GitHub Comments

1reaction
nbanmpcommented, Nov 8, 2018

We don’t need a special case for this, we could choose to handle it correctly with some modifications to Calldata.

If a Calldata can take another Calldata object as the starting_calldata, as well as the offest and length as keyword arguments, to grab a value from an index, the new calldata can return previousCalldata[index + offset] and the constraint ULT(index, length),

0reactions
gitcoinbotcommented, Dec 1, 2018

Issue Status: 1. Open 2. Started 3. Submitted 4. Done


The funding of 2.5 ETH (285.9 USD @ $114.36/ETH) attached to this issue has been approved & issued to @nbanmp.

Read more comments on GitHub >

github_iconTop Results From Across the Web

dapptools/README.md at master - hevm - GitHub
The hevm command line program can symbolically execute smart contracts, ... Calldata specialized to the bytestring 0xa9059cbb followed by 64 symbolic bytes:.
Read more >
Symbolic execution for hevm - Formal Verification Blog
In this tutorial we will show how to use the new capabilities of hevm , and discuss some of its unique features as...
Read more >
Contracts — Solidity 0.8.17 documentation
Internally, constructor arguments are passed ABI encoded after the code of the ... The function body is inserted where the special symbol //...
Read more >
Understanding Solidity Assembly: Hashing a String from ...
The first line locates the length of the string in the calldata and copies it to memory. Based on our understanding of the...
Read more >
When should I use calldata and when should I use memory?
Breaking this down, let's first look at memory . memory 's lifetime is limited to a function call and is meant to be...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found