crytic / crytic/slither

When handling internal function pointers, information loss can occur.

Open
#2,527 0 comments 0 reactions 0 assignees View on GitHub
bug-candidate
Dominant language
Python
Stars
6.4k
Forks
1.1k
PR merge metrics
No merged PRs in 30d

Description

### Describe the issue:

When handling internal function pointers, information about function visibility (internal, external) can be lost.

### Code example to reproduce the issue:

```solidity
contract C {
function() internal returns (uint) a;
}
```

### Version:

0.10.3

### Relevant log output:

```shell
The type of a is as follows:
variable.type: function() returns(uint256)

However, I think it should be function() internal returns(uint256)
```

Contributor guide

Open the contributing guide

Research direction

Start by reproducing the issue with the Solidity contract shown in the report on version 0.10.3, then trace how Slither represents and reports internal function pointers. The work is done when the reported type preserves the function's internal visibility, including the returns(uint256) signature.

Written by the indexing model from the issue text.

Assessment

Tech stack
python, solidity
Domain
devtools, security
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.