mirror of https://github.com/crytic/slither
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
4586 lines
226 KiB
4586 lines
226 KiB
[
|
|
[
|
|
{
|
|
"elements": [
|
|
{
|
|
"type": "function",
|
|
"name": "bad0",
|
|
"source_mapping": {
|
|
"start": 116,
|
|
"length": 120,
|
|
"filename_used": "/GENERIC_PATH",
|
|
"filename_relative": "tests/detectors/reentrancy-benign/0.4.25/reentrancy-benign.sol",
|
|
"filename_absolute": "/GENERIC_PATH",
|
|
"filename_short": "tests/detectors/reentrancy-benign/0.4.25/reentrancy-benign.sol",
|
|
"is_dependency": false,
|
|
"lines": [
|
|
7,
|
|
8,
|
|
9,
|
|
10,
|
|
11,
|
|
12
|
|
],
|
|
"starting_column": 5,
|
|
"ending_column": 6
|
|
},
|
|
"type_specific_fields": {
|
|
"parent": {
|
|
"type": "contract",
|
|
"name": "ReentrancyBenign",
|
|
"source_mapping": {
|
|
"start": 25,
|
|
"length": 1304,
|
|
"filename_used": "/GENERIC_PATH",
|
|
"filename_relative": "tests/detectors/reentrancy-benign/0.4.25/reentrancy-benign.sol",
|
|
"filename_absolute": "/GENERIC_PATH",
|
|
"filename_short": "tests/detectors/reentrancy-benign/0.4.25/reentrancy-benign.sol",
|
|
"is_dependency": false,
|
|
"lines": [
|
|
3,
|
|
4,
|
|
5,
|
|
6,
|
|
7,
|
|
8,
|
|
9,
|
|
10,
|
|
11,
|
|
12,
|
|
13,
|
|
14,
|
|
15,
|
|
16,
|
|
17,
|
|
18,
|
|
19,
|
|
20,
|
|
21,
|
|
22,
|
|
23,
|
|
24,
|
|
25,
|
|
26,
|
|
27,
|
|
28,
|
|
29,
|
|
30,
|
|
31,
|
|
32,
|
|
33,
|
|
34,
|
|
35,
|
|
36,
|
|
37,
|
|
38,
|
|
39,
|
|
40,
|
|
41,
|
|
42,
|
|
43,
|
|
44,
|
|
45,
|
|
46,
|
|
47,
|
|
48,
|
|
49,
|
|
50,
|
|
51,
|
|
52,
|
|
53,
|
|
54,
|
|
55,
|
|
56,
|
|
57,
|
|
58,
|
|
59,
|
|
60,
|
|
61,
|
|
62
|
|
],
|
|
"starting_column": 1,
|
|
"ending_column": 0
|
|
}
|
|
},
|
|
"signature": "bad0()"
|
|
}
|
|
},
|
|
{
|
|
"type": "node",
|
|
"name": "! (msg.sender.call())",
|
|
"source_mapping": {
|
|
"start": 153,
|
|
"length": 20,
|
|
"filename_used": "/GENERIC_PATH",
|
|
"filename_relative": "tests/detectors/reentrancy-benign/0.4.25/reentrancy-benign.sol",
|
|
"filename_absolute": "/GENERIC_PATH",
|
|
"filename_short": "tests/detectors/reentrancy-benign/0.4.25/reentrancy-benign.sol",
|
|
"is_dependency": false,
|
|
"lines": [
|
|
8
|
|
],
|
|
"starting_column": 13,
|
|
"ending_column": 33
|
|
},
|
|
"type_specific_fields": {
|
|
"parent": {
|
|
"type": "function",
|
|
"name": "bad0",
|
|
"source_mapping": {
|
|
"start": 116,
|
|
"length": 120,
|
|
"filename_used": "/GENERIC_PATH",
|
|
"filename_relative": "tests/detectors/reentrancy-benign/0.4.25/reentrancy-benign.sol",
|
|
"filename_absolute": "/GENERIC_PATH",
|
|
"filename_short": "tests/detectors/reentrancy-benign/0.4.25/reentrancy-benign.sol",
|
|
"is_dependency": false,
|
|
"lines": [
|
|
7,
|
|
8,
|
|
9,
|
|
10,
|
|
11,
|
|
12
|
|
],
|
|
"starting_column": 5,
|
|
"ending_column": 6
|
|
},
|
|
"type_specific_fields": {
|
|
"parent": {
|
|
"type": "contract",
|
|
"name": "ReentrancyBenign",
|
|
"source_mapping": {
|
|
"start": 25,
|
|
"length": 1304,
|
|
"filename_used": "/GENERIC_PATH",
|
|
"filename_relative": "tests/detectors/reentrancy-benign/0.4.25/reentrancy-benign.sol",
|
|
"filename_absolute": "/GENERIC_PATH",
|
|
"filename_short": "tests/detectors/reentrancy-benign/0.4.25/reentrancy-benign.sol",
|
|
"is_dependency": false,
|
|
"lines": [
|
|
3,
|
|
4,
|
|
5,
|
|
6,
|
|
7,
|
|
8,
|
|
9,
|
|
10,
|
|
11,
|
|
12,
|
|
13,
|
|
14,
|
|
15,
|
|
16,
|
|
17,
|
|
18,
|
|
19,
|
|
20,
|
|
21,
|
|
22,
|
|
23,
|
|
24,
|
|
25,
|
|
26,
|
|
27,
|
|
28,
|
|
29,
|
|
30,
|
|
31,
|
|
32,
|
|
33,
|
|
34,
|
|
35,
|
|
36,
|
|
37,
|
|
38,
|
|
39,
|
|
40,
|
|
41,
|
|
42,
|
|
43,
|
|
44,
|
|
45,
|
|
46,
|
|
47,
|
|
48,
|
|
49,
|
|
50,
|
|
51,
|
|
52,
|
|
53,
|
|
54,
|
|
55,
|
|
56,
|
|
57,
|
|
58,
|
|
59,
|
|
60,
|
|
61,
|
|
62
|
|
],
|
|
"starting_column": 1,
|
|
"ending_column": 0
|
|
}
|
|
},
|
|
"signature": "bad0()"
|
|
}
|
|
}
|
|
},
|
|
"additional_fields": {
|
|
"underlying_type": "external_calls"
|
|
}
|
|
},
|
|
{
|
|
"type": "node",
|
|
"name": "! (msg.sender.call())",
|
|
"source_mapping": {
|
|
"start": 153,
|
|
"length": 20,
|
|
"filename_used": "/GENERIC_PATH",
|
|
"filename_relative": "tests/detectors/reentrancy-benign/0.4.25/reentrancy-benign.sol",
|
|
"filename_absolute": "/GENERIC_PATH",
|
|
"filename_short": "tests/detectors/reentrancy-benign/0.4.25/reentrancy-benign.sol",
|
|
"is_dependency": false,
|
|
"lines": [
|
|
8
|
|
],
|
|
"starting_column": 13,
|
|
"ending_column": 33
|
|
},
|
|
"type_specific_fields": {
|
|
"parent": {
|
|
"type": "function",
|
|
"name": "bad0",
|
|
"source_mapping": {
|
|
"start": 116,
|
|
"length": 120,
|
|
"filename_used": "/GENERIC_PATH",
|
|
"filename_relative": "tests/detectors/reentrancy-benign/0.4.25/reentrancy-benign.sol",
|
|
"filename_absolute": "/GENERIC_PATH",
|
|
"filename_short": "tests/detectors/reentrancy-benign/0.4.25/reentrancy-benign.sol",
|
|
"is_dependency": false,
|
|
"lines": [
|
|
7,
|
|
8,
|
|
9,
|
|
10,
|
|
11,
|
|
12
|
|
],
|
|
"starting_column": 5,
|
|
"ending_column": 6
|
|
},
|
|
"type_specific_fields": {
|
|
"parent": {
|
|
"type": "contract",
|
|
"name": "ReentrancyBenign",
|
|
"source_mapping": {
|
|
"start": 25,
|
|
"length": 1304,
|
|
"filename_used": "/GENERIC_PATH",
|
|
"filename_relative": "tests/detectors/reentrancy-benign/0.4.25/reentrancy-benign.sol",
|
|
"filename_absolute": "/GENERIC_PATH",
|
|
"filename_short": "tests/detectors/reentrancy-benign/0.4.25/reentrancy-benign.sol",
|
|
"is_dependency": false,
|
|
"lines": [
|
|
3,
|
|
4,
|
|
5,
|
|
6,
|
|
7,
|
|
8,
|
|
9,
|
|
10,
|
|
11,
|
|
12,
|
|
13,
|
|
14,
|
|
15,
|
|
16,
|
|
17,
|
|
18,
|
|
19,
|
|
20,
|
|
21,
|
|
22,
|
|
23,
|
|
24,
|
|
25,
|
|
26,
|
|
27,
|
|
28,
|
|
29,
|
|
30,
|
|
31,
|
|
32,
|
|
33,
|
|
34,
|
|
35,
|
|
36,
|
|
37,
|
|
38,
|
|
39,
|
|
40,
|
|
41,
|
|
42,
|
|
43,
|
|
44,
|
|
45,
|
|
46,
|
|
47,
|
|
48,
|
|
49,
|
|
50,
|
|
51,
|
|
52,
|
|
53,
|
|
54,
|
|
55,
|
|
56,
|
|
57,
|
|
58,
|
|
59,
|
|
60,
|
|
61,
|
|
62
|
|
],
|
|
"starting_column": 1,
|
|
"ending_column": 0
|
|
}
|
|
},
|
|
"signature": "bad0()"
|
|
}
|
|
}
|
|
},
|
|
"additional_fields": {
|
|
"underlying_type": "external_calls_sending_eth"
|
|
}
|
|
},
|
|
{
|
|
"type": "node",
|
|
"name": "counter += 1",
|
|
"source_mapping": {
|
|
"start": 217,
|
|
"length": 12,
|
|
"filename_used": "/GENERIC_PATH",
|
|
"filename_relative": "tests/detectors/reentrancy-benign/0.4.25/reentrancy-benign.sol",
|
|
"filename_absolute": "/GENERIC_PATH",
|
|
"filename_short": "tests/detectors/reentrancy-benign/0.4.25/reentrancy-benign.sol",
|
|
"is_dependency": false,
|
|
"lines": [
|
|
11
|
|
],
|
|
"starting_column": 9,
|
|
"ending_column": 21
|
|
},
|
|
"type_specific_fields": {
|
|
"parent": {
|
|
"type": "function",
|
|
"name": "bad0",
|
|
"source_mapping": {
|
|
"start": 116,
|
|
"length": 120,
|
|
"filename_used": "/GENERIC_PATH",
|
|
"filename_relative": "tests/detectors/reentrancy-benign/0.4.25/reentrancy-benign.sol",
|
|
"filename_absolute": "/GENERIC_PATH",
|
|
"filename_short": "tests/detectors/reentrancy-benign/0.4.25/reentrancy-benign.sol",
|
|
"is_dependency": false,
|
|
"lines": [
|
|
7,
|
|
8,
|
|
9,
|
|
10,
|
|
11,
|
|
12
|
|
],
|
|
"starting_column": 5,
|
|
"ending_column": 6
|
|
},
|
|
"type_specific_fields": {
|
|
"parent": {
|
|
"type": "contract",
|
|
"name": "ReentrancyBenign",
|
|
"source_mapping": {
|
|
"start": 25,
|
|
"length": 1304,
|
|
"filename_used": "/GENERIC_PATH",
|
|
"filename_relative": "tests/detectors/reentrancy-benign/0.4.25/reentrancy-benign.sol",
|
|
"filename_absolute": "/GENERIC_PATH",
|
|
"filename_short": "tests/detectors/reentrancy-benign/0.4.25/reentrancy-benign.sol",
|
|
"is_dependency": false,
|
|
"lines": [
|
|
3,
|
|
4,
|
|
5,
|
|
6,
|
|
7,
|
|
8,
|
|
9,
|
|
10,
|
|
11,
|
|
12,
|
|
13,
|
|
14,
|
|
15,
|
|
16,
|
|
17,
|
|
18,
|
|
19,
|
|
20,
|
|
21,
|
|
22,
|
|
23,
|
|
24,
|
|
25,
|
|
26,
|
|
27,
|
|
28,
|
|
29,
|
|
30,
|
|
31,
|
|
32,
|
|
33,
|
|
34,
|
|
35,
|
|
36,
|
|
37,
|
|
38,
|
|
39,
|
|
40,
|
|
41,
|
|
42,
|
|
43,
|
|
44,
|
|
45,
|
|
46,
|
|
47,
|
|
48,
|
|
49,
|
|
50,
|
|
51,
|
|
52,
|
|
53,
|
|
54,
|
|
55,
|
|
56,
|
|
57,
|
|
58,
|
|
59,
|
|
60,
|
|
61,
|
|
62
|
|
],
|
|
"starting_column": 1,
|
|
"ending_column": 0
|
|
}
|
|
},
|
|
"signature": "bad0()"
|
|
}
|
|
}
|
|
},
|
|
"additional_fields": {
|
|
"underlying_type": "variables_written",
|
|
"variable_name": "counter"
|
|
}
|
|
}
|
|
],
|
|
"description": "Reentrancy in ReentrancyBenign.bad0() (tests/detectors/reentrancy-benign/0.4.25/reentrancy-benign.sol#7-12):\n\tExternal calls:\n\t- ! (msg.sender.call()) (tests/detectors/reentrancy-benign/0.4.25/reentrancy-benign.sol#8)\n\tState variables written after the call(s):\n\t- counter += 1 (tests/detectors/reentrancy-benign/0.4.25/reentrancy-benign.sol#11)\n",
|
|
"markdown": "Reentrancy in [ReentrancyBenign.bad0()](tests/detectors/reentrancy-benign/0.4.25/reentrancy-benign.sol#L7-L12):\n\tExternal calls:\n\t- [! (msg.sender.call())](tests/detectors/reentrancy-benign/0.4.25/reentrancy-benign.sol#L8)\n\tState variables written after the call(s):\n\t- [counter += 1](tests/detectors/reentrancy-benign/0.4.25/reentrancy-benign.sol#L11)\n",
|
|
"first_markdown_element": "tests/detectors/reentrancy-benign/0.4.25/reentrancy-benign.sol#L7-L12",
|
|
"id": "63a6117be188fedd63d46e13119e967dc70adbd140f7ad2f9d3343e5139ccffb",
|
|
"check": "reentrancy-benign",
|
|
"impact": "Low",
|
|
"confidence": "Medium"
|
|
},
|
|
{
|
|
"elements": [
|
|
{
|
|
"type": "function",
|
|
"name": "bad1",
|
|
"source_mapping": {
|
|
"start": 242,
|
|
"length": 132,
|
|
"filename_used": "/GENERIC_PATH",
|
|
"filename_relative": "tests/detectors/reentrancy-benign/0.4.25/reentrancy-benign.sol",
|
|
"filename_absolute": "/GENERIC_PATH",
|
|
"filename_short": "tests/detectors/reentrancy-benign/0.4.25/reentrancy-benign.sol",
|
|
"is_dependency": false,
|
|
"lines": [
|
|
14,
|
|
15,
|
|
16,
|
|
17,
|
|
18
|
|
],
|
|
"starting_column": 5,
|
|
"ending_column": 6
|
|
},
|
|
"type_specific_fields": {
|
|
"parent": {
|
|
"type": "contract",
|
|
"name": "ReentrancyBenign",
|
|
"source_mapping": {
|
|
"start": 25,
|
|
"length": 1304,
|
|
"filename_used": "/GENERIC_PATH",
|
|
"filename_relative": "tests/detectors/reentrancy-benign/0.4.25/reentrancy-benign.sol",
|
|
"filename_absolute": "/GENERIC_PATH",
|
|
"filename_short": "tests/detectors/reentrancy-benign/0.4.25/reentrancy-benign.sol",
|
|
"is_dependency": false,
|
|
"lines": [
|
|
3,
|
|
4,
|
|
5,
|
|
6,
|
|
7,
|
|
8,
|
|
9,
|
|
10,
|
|
11,
|
|
12,
|
|
13,
|
|
14,
|
|
15,
|
|
16,
|
|
17,
|
|
18,
|
|
19,
|
|
20,
|
|
21,
|
|
22,
|
|
23,
|
|
24,
|
|
25,
|
|
26,
|
|
27,
|
|
28,
|
|
29,
|
|
30,
|
|
31,
|
|
32,
|
|
33,
|
|
34,
|
|
35,
|
|
36,
|
|
37,
|
|
38,
|
|
39,
|
|
40,
|
|
41,
|
|
42,
|
|
43,
|
|
44,
|
|
45,
|
|
46,
|
|
47,
|
|
48,
|
|
49,
|
|
50,
|
|
51,
|
|
52,
|
|
53,
|
|
54,
|
|
55,
|
|
56,
|
|
57,
|
|
58,
|
|
59,
|
|
60,
|
|
61,
|
|
62
|
|
],
|
|
"starting_column": 1,
|
|
"ending_column": 0
|
|
}
|
|
},
|
|
"signature": "bad1(address)"
|
|
}
|
|
},
|
|
{
|
|
"type": "node",
|
|
"name": "success = target.call()",
|
|
"source_mapping": {
|
|
"start": 289,
|
|
"length": 30,
|
|
"filename_used": "/GENERIC_PATH",
|
|
"filename_relative": "tests/detectors/reentrancy-benign/0.4.25/reentrancy-benign.sol",
|
|
"filename_absolute": "/GENERIC_PATH",
|
|
"filename_short": "tests/detectors/reentrancy-benign/0.4.25/reentrancy-benign.sol",
|
|
"is_dependency": false,
|
|
"lines": [
|
|
15
|
|
],
|
|
"starting_column": 9,
|
|
"ending_column": 39
|
|
},
|
|
"type_specific_fields": {
|
|
"parent": {
|
|
"type": "function",
|
|
"name": "bad1",
|
|
"source_mapping": {
|
|
"start": 242,
|
|
"length": 132,
|
|
"filename_used": "/GENERIC_PATH",
|
|
"filename_relative": "tests/detectors/reentrancy-benign/0.4.25/reentrancy-benign.sol",
|
|
"filename_absolute": "/GENERIC_PATH",
|
|
"filename_short": "tests/detectors/reentrancy-benign/0.4.25/reentrancy-benign.sol",
|
|
"is_dependency": false,
|
|
"lines": [
|
|
14,
|
|
15,
|
|
16,
|
|
17,
|
|
18
|
|
],
|
|
"starting_column": 5,
|
|
"ending_column": 6
|
|
},
|
|
"type_specific_fields": {
|
|
"parent": {
|
|
"type": "contract",
|
|
"name": "ReentrancyBenign",
|
|
"source_mapping": {
|
|
"start": 25,
|
|
"length": 1304,
|
|
"filename_used": "/GENERIC_PATH",
|
|
"filename_relative": "tests/detectors/reentrancy-benign/0.4.25/reentrancy-benign.sol",
|
|
"filename_absolute": "/GENERIC_PATH",
|
|
"filename_short": "tests/detectors/reentrancy-benign/0.4.25/reentrancy-benign.sol",
|
|
"is_dependency": false,
|
|
"lines": [
|
|
3,
|
|
4,
|
|
5,
|
|
6,
|
|
7,
|
|
8,
|
|
9,
|
|
10,
|
|
11,
|
|
12,
|
|
13,
|
|
14,
|
|
15,
|
|
16,
|
|
17,
|
|
18,
|
|
19,
|
|
20,
|
|
21,
|
|
22,
|
|
23,
|
|
24,
|
|
25,
|
|
26,
|
|
27,
|
|
28,
|
|
29,
|
|
30,
|
|
31,
|
|
32,
|
|
33,
|
|
34,
|
|
35,
|
|
36,
|
|
37,
|
|
38,
|
|
39,
|
|
40,
|
|
41,
|
|
42,
|
|
43,
|
|
44,
|
|
45,
|
|
46,
|
|
47,
|
|
48,
|
|
49,
|
|
50,
|
|
51,
|
|
52,
|
|
53,
|
|
54,
|
|
55,
|
|
56,
|
|
57,
|
|
58,
|
|
59,
|
|
60,
|
|
61,
|
|
62
|
|
],
|
|
"starting_column": 1,
|
|
"ending_column": 0
|
|
}
|
|
},
|
|
"signature": "bad1(address)"
|
|
}
|
|
}
|
|
},
|
|
"additional_fields": {
|
|
"underlying_type": "external_calls"
|
|
}
|
|
},
|
|
{
|
|
"type": "node",
|
|
"name": "success = target.call()",
|
|
"source_mapping": {
|
|
"start": 289,
|
|
"length": 30,
|
|
"filename_used": "/GENERIC_PATH",
|
|
"filename_relative": "tests/detectors/reentrancy-benign/0.4.25/reentrancy-benign.sol",
|
|
"filename_absolute": "/GENERIC_PATH",
|
|
"filename_short": "tests/detectors/reentrancy-benign/0.4.25/reentrancy-benign.sol",
|
|
"is_dependency": false,
|
|
"lines": [
|
|
15
|
|
],
|
|
"starting_column": 9,
|
|
"ending_column": 39
|
|
},
|
|
"type_specific_fields": {
|
|
"parent": {
|
|
"type": "function",
|
|
"name": "bad1",
|
|
"source_mapping": {
|
|
"start": 242,
|
|
"length": 132,
|
|
"filename_used": "/GENERIC_PATH",
|
|
"filename_relative": "tests/detectors/reentrancy-benign/0.4.25/reentrancy-benign.sol",
|
|
"filename_absolute": "/GENERIC_PATH",
|
|
"filename_short": "tests/detectors/reentrancy-benign/0.4.25/reentrancy-benign.sol",
|
|
"is_dependency": false,
|
|
"lines": [
|
|
14,
|
|
15,
|
|
16,
|
|
17,
|
|
18
|
|
],
|
|
"starting_column": 5,
|
|
"ending_column": 6
|
|
},
|
|
"type_specific_fields": {
|
|
"parent": {
|
|
"type": "contract",
|
|
"name": "ReentrancyBenign",
|
|
"source_mapping": {
|
|
"start": 25,
|
|
"length": 1304,
|
|
"filename_used": "/GENERIC_PATH",
|
|
"filename_relative": "tests/detectors/reentrancy-benign/0.4.25/reentrancy-benign.sol",
|
|
"filename_absolute": "/GENERIC_PATH",
|
|
"filename_short": "tests/detectors/reentrancy-benign/0.4.25/reentrancy-benign.sol",
|
|
"is_dependency": false,
|
|
"lines": [
|
|
3,
|
|
4,
|
|
5,
|
|
6,
|
|
7,
|
|
8,
|
|
9,
|
|
10,
|
|
11,
|
|
12,
|
|
13,
|
|
14,
|
|
15,
|
|
16,
|
|
17,
|
|
18,
|
|
19,
|
|
20,
|
|
21,
|
|
22,
|
|
23,
|
|
24,
|
|
25,
|
|
26,
|
|
27,
|
|
28,
|
|
29,
|
|
30,
|
|
31,
|
|
32,
|
|
33,
|
|
34,
|
|
35,
|
|
36,
|
|
37,
|
|
38,
|
|
39,
|
|
40,
|
|
41,
|
|
42,
|
|
43,
|
|
44,
|
|
45,
|
|
46,
|
|
47,
|
|
48,
|
|
49,
|
|
50,
|
|
51,
|
|
52,
|
|
53,
|
|
54,
|
|
55,
|
|
56,
|
|
57,
|
|
58,
|
|
59,
|
|
60,
|
|
61,
|
|
62
|
|
],
|
|
"starting_column": 1,
|
|
"ending_column": 0
|
|
}
|
|
},
|
|
"signature": "bad1(address)"
|
|
}
|
|
}
|
|
},
|
|
"additional_fields": {
|
|
"underlying_type": "external_calls_sending_eth"
|
|
}
|
|
},
|
|
{
|
|
"type": "node",
|
|
"name": "counter += 1",
|
|
"source_mapping": {
|
|
"start": 355,
|
|
"length": 12,
|
|
"filename_used": "/GENERIC_PATH",
|
|
"filename_relative": "tests/detectors/reentrancy-benign/0.4.25/reentrancy-benign.sol",
|
|
"filename_absolute": "/GENERIC_PATH",
|
|
"filename_short": "tests/detectors/reentrancy-benign/0.4.25/reentrancy-benign.sol",
|
|
"is_dependency": false,
|
|
"lines": [
|
|
17
|
|
],
|
|
"starting_column": 9,
|
|
"ending_column": 21
|
|
},
|
|
"type_specific_fields": {
|
|
"parent": {
|
|
"type": "function",
|
|
"name": "bad1",
|
|
"source_mapping": {
|
|
"start": 242,
|
|
"length": 132,
|
|
"filename_used": "/GENERIC_PATH",
|
|
"filename_relative": "tests/detectors/reentrancy-benign/0.4.25/reentrancy-benign.sol",
|
|
"filename_absolute": "/GENERIC_PATH",
|
|
"filename_short": "tests/detectors/reentrancy-benign/0.4.25/reentrancy-benign.sol",
|
|
"is_dependency": false,
|
|
"lines": [
|
|
14,
|
|
15,
|
|
16,
|
|
17,
|
|
18
|
|
],
|
|
"starting_column": 5,
|
|
"ending_column": 6
|
|
},
|
|
"type_specific_fields": {
|
|
"parent": {
|
|
"type": "contract",
|
|
"name": "ReentrancyBenign",
|
|
"source_mapping": {
|
|
"start": 25,
|
|
"length": 1304,
|
|
"filename_used": "/GENERIC_PATH",
|
|
"filename_relative": "tests/detectors/reentrancy-benign/0.4.25/reentrancy-benign.sol",
|
|
"filename_absolute": "/GENERIC_PATH",
|
|
"filename_short": "tests/detectors/reentrancy-benign/0.4.25/reentrancy-benign.sol",
|
|
"is_dependency": false,
|
|
"lines": [
|
|
3,
|
|
4,
|
|
5,
|
|
6,
|
|
7,
|
|
8,
|
|
9,
|
|
10,
|
|
11,
|
|
12,
|
|
13,
|
|
14,
|
|
15,
|
|
16,
|
|
17,
|
|
18,
|
|
19,
|
|
20,
|
|
21,
|
|
22,
|
|
23,
|
|
24,
|
|
25,
|
|
26,
|
|
27,
|
|
28,
|
|
29,
|
|
30,
|
|
31,
|
|
32,
|
|
33,
|
|
34,
|
|
35,
|
|
36,
|
|
37,
|
|
38,
|
|
39,
|
|
40,
|
|
41,
|
|
42,
|
|
43,
|
|
44,
|
|
45,
|
|
46,
|
|
47,
|
|
48,
|
|
49,
|
|
50,
|
|
51,
|
|
52,
|
|
53,
|
|
54,
|
|
55,
|
|
56,
|
|
57,
|
|
58,
|
|
59,
|
|
60,
|
|
61,
|
|
62
|
|
],
|
|
"starting_column": 1,
|
|
"ending_column": 0
|
|
}
|
|
},
|
|
"signature": "bad1(address)"
|
|
}
|
|
}
|
|
},
|
|
"additional_fields": {
|
|
"underlying_type": "variables_written",
|
|
"variable_name": "counter"
|
|
}
|
|
}
|
|
],
|
|
"description": "Reentrancy in ReentrancyBenign.bad1(address) (tests/detectors/reentrancy-benign/0.4.25/reentrancy-benign.sol#14-18):\n\tExternal calls:\n\t- success = target.call() (tests/detectors/reentrancy-benign/0.4.25/reentrancy-benign.sol#15)\n\tState variables written after the call(s):\n\t- counter += 1 (tests/detectors/reentrancy-benign/0.4.25/reentrancy-benign.sol#17)\n",
|
|
"markdown": "Reentrancy in [ReentrancyBenign.bad1(address)](tests/detectors/reentrancy-benign/0.4.25/reentrancy-benign.sol#L14-L18):\n\tExternal calls:\n\t- [success = target.call()](tests/detectors/reentrancy-benign/0.4.25/reentrancy-benign.sol#L15)\n\tState variables written after the call(s):\n\t- [counter += 1](tests/detectors/reentrancy-benign/0.4.25/reentrancy-benign.sol#L17)\n",
|
|
"first_markdown_element": "tests/detectors/reentrancy-benign/0.4.25/reentrancy-benign.sol#L14-L18",
|
|
"id": "8dc236b9193d1240d219303bae9f115b1c69ee45b7d5528a1915891463b62d15",
|
|
"check": "reentrancy-benign",
|
|
"impact": "Low",
|
|
"confidence": "Medium"
|
|
},
|
|
{
|
|
"elements": [
|
|
{
|
|
"type": "function",
|
|
"name": "bad2",
|
|
"source_mapping": {
|
|
"start": 380,
|
|
"length": 238,
|
|
"filename_used": "/GENERIC_PATH",
|
|
"filename_relative": "tests/detectors/reentrancy-benign/0.4.25/reentrancy-benign.sol",
|
|
"filename_absolute": "/GENERIC_PATH",
|
|
"filename_short": "tests/detectors/reentrancy-benign/0.4.25/reentrancy-benign.sol",
|
|
"is_dependency": false,
|
|
"lines": [
|
|
20,
|
|
21,
|
|
22,
|
|
23,
|
|
24,
|
|
25,
|
|
26,
|
|
27,
|
|
28,
|
|
29
|
|
],
|
|
"starting_column": 5,
|
|
"ending_column": 6
|
|
},
|
|
"type_specific_fields": {
|
|
"parent": {
|
|
"type": "contract",
|
|
"name": "ReentrancyBenign",
|
|
"source_mapping": {
|
|
"start": 25,
|
|
"length": 1304,
|
|
"filename_used": "/GENERIC_PATH",
|
|
"filename_relative": "tests/detectors/reentrancy-benign/0.4.25/reentrancy-benign.sol",
|
|
"filename_absolute": "/GENERIC_PATH",
|
|
"filename_short": "tests/detectors/reentrancy-benign/0.4.25/reentrancy-benign.sol",
|
|
"is_dependency": false,
|
|
"lines": [
|
|
3,
|
|
4,
|
|
5,
|
|
6,
|
|
7,
|
|
8,
|
|
9,
|
|
10,
|
|
11,
|
|
12,
|
|
13,
|
|
14,
|
|
15,
|
|
16,
|
|
17,
|
|
18,
|
|
19,
|
|
20,
|
|
21,
|
|
22,
|
|
23,
|
|
24,
|
|
25,
|
|
26,
|
|
27,
|
|
28,
|
|
29,
|
|
30,
|
|
31,
|
|
32,
|
|
33,
|
|
34,
|
|
35,
|
|
36,
|
|
37,
|
|
38,
|
|
39,
|
|
40,
|
|
41,
|
|
42,
|
|
43,
|
|
44,
|
|
45,
|
|
46,
|
|
47,
|
|
48,
|
|
49,
|
|
50,
|
|
51,
|
|
52,
|
|
53,
|
|
54,
|
|
55,
|
|
56,
|
|
57,
|
|
58,
|
|
59,
|
|
60,
|
|
61,
|
|
62
|
|
],
|
|
"starting_column": 1,
|
|
"ending_column": 0
|
|
}
|
|
},
|
|
"signature": "bad2(address)"
|
|
}
|
|
},
|
|
{
|
|
"type": "node",
|
|
"name": "success = target.call()",
|
|
"source_mapping": {
|
|
"start": 427,
|
|
"length": 30,
|
|
"filename_used": "/GENERIC_PATH",
|
|
"filename_relative": "tests/detectors/reentrancy-benign/0.4.25/reentrancy-benign.sol",
|
|
"filename_absolute": "/GENERIC_PATH",
|
|
"filename_short": "tests/detectors/reentrancy-benign/0.4.25/reentrancy-benign.sol",
|
|
"is_dependency": false,
|
|
"lines": [
|
|
21
|
|
],
|
|
"starting_column": 9,
|
|
"ending_column": 39
|
|
},
|
|
"type_specific_fields": {
|
|
"parent": {
|
|
"type": "function",
|
|
"name": "bad2",
|
|
"source_mapping": {
|
|
"start": 380,
|
|
"length": 238,
|
|
"filename_used": "/GENERIC_PATH",
|
|
"filename_relative": "tests/detectors/reentrancy-benign/0.4.25/reentrancy-benign.sol",
|
|
"filename_absolute": "/GENERIC_PATH",
|
|
"filename_short": "tests/detectors/reentrancy-benign/0.4.25/reentrancy-benign.sol",
|
|
"is_dependency": false,
|
|
"lines": [
|
|
20,
|
|
21,
|
|
22,
|
|
23,
|
|
24,
|
|
25,
|
|
26,
|
|
27,
|
|
28,
|
|
29
|
|
],
|
|
"starting_column": 5,
|
|
"ending_column": 6
|
|
},
|
|
"type_specific_fields": {
|
|
"parent": {
|
|
"type": "contract",
|
|
"name": "ReentrancyBenign",
|
|
"source_mapping": {
|
|
"start": 25,
|
|
"length": 1304,
|
|
"filename_used": "/GENERIC_PATH",
|
|
"filename_relative": "tests/detectors/reentrancy-benign/0.4.25/reentrancy-benign.sol",
|
|
"filename_absolute": "/GENERIC_PATH",
|
|
"filename_short": "tests/detectors/reentrancy-benign/0.4.25/reentrancy-benign.sol",
|
|
"is_dependency": false,
|
|
"lines": [
|
|
3,
|
|
4,
|
|
5,
|
|
6,
|
|
7,
|
|
8,
|
|
9,
|
|
10,
|
|
11,
|
|
12,
|
|
13,
|
|
14,
|
|
15,
|
|
16,
|
|
17,
|
|
18,
|
|
19,
|
|
20,
|
|
21,
|
|
22,
|
|
23,
|
|
24,
|
|
25,
|
|
26,
|
|
27,
|
|
28,
|
|
29,
|
|
30,
|
|
31,
|
|
32,
|
|
33,
|
|
34,
|
|
35,
|
|
36,
|
|
37,
|
|
38,
|
|
39,
|
|
40,
|
|
41,
|
|
42,
|
|
43,
|
|
44,
|
|
45,
|
|
46,
|
|
47,
|
|
48,
|
|
49,
|
|
50,
|
|
51,
|
|
52,
|
|
53,
|
|
54,
|
|
55,
|
|
56,
|
|
57,
|
|
58,
|
|
59,
|
|
60,
|
|
61,
|
|
62
|
|
],
|
|
"starting_column": 1,
|
|
"ending_column": 0
|
|
}
|
|
},
|
|
"signature": "bad2(address)"
|
|
}
|
|
}
|
|
},
|
|
"additional_fields": {
|
|
"underlying_type": "external_calls"
|
|
}
|
|
},
|
|
{
|
|
"type": "node",
|
|
"name": "address(target).call.value(1000)()",
|
|
"source_mapping": {
|
|
"start": 494,
|
|
"length": 34,
|
|
"filename_used": "/GENERIC_PATH",
|
|
"filename_relative": "tests/detectors/reentrancy-benign/0.4.25/reentrancy-benign.sol",
|
|
"filename_absolute": "/GENERIC_PATH",
|
|
"filename_short": "tests/detectors/reentrancy-benign/0.4.25/reentrancy-benign.sol",
|
|
"is_dependency": false,
|
|
"lines": [
|
|
23
|
|
],
|
|
"starting_column": 13,
|
|
"ending_column": 47
|
|
},
|
|
"type_specific_fields": {
|
|
"parent": {
|
|
"type": "function",
|
|
"name": "bad2",
|
|
"source_mapping": {
|
|
"start": 380,
|
|
"length": 238,
|
|
"filename_used": "/GENERIC_PATH",
|
|
"filename_relative": "tests/detectors/reentrancy-benign/0.4.25/reentrancy-benign.sol",
|
|
"filename_absolute": "/GENERIC_PATH",
|
|
"filename_short": "tests/detectors/reentrancy-benign/0.4.25/reentrancy-benign.sol",
|
|
"is_dependency": false,
|
|
"lines": [
|
|
20,
|
|
21,
|
|
22,
|
|
23,
|
|
24,
|
|
25,
|
|
26,
|
|
27,
|
|
28,
|
|
29
|
|
],
|
|
"starting_column": 5,
|
|
"ending_column": 6
|
|
},
|
|
"type_specific_fields": {
|
|
"parent": {
|
|
"type": "contract",
|
|
"name": "ReentrancyBenign",
|
|
"source_mapping": {
|
|
"start": 25,
|
|
"length": 1304,
|
|
"filename_used": "/GENERIC_PATH",
|
|
"filename_relative": "tests/detectors/reentrancy-benign/0.4.25/reentrancy-benign.sol",
|
|
"filename_absolute": "/GENERIC_PATH",
|
|
"filename_short": "tests/detectors/reentrancy-benign/0.4.25/reentrancy-benign.sol",
|
|
"is_dependency": false,
|
|
"lines": [
|
|
3,
|
|
4,
|
|
5,
|
|
6,
|
|
7,
|
|
8,
|
|
9,
|
|
10,
|
|
11,
|
|
12,
|
|
13,
|
|
14,
|
|
15,
|
|
16,
|
|
17,
|
|
18,
|
|
19,
|
|
20,
|
|
21,
|
|
22,
|
|
23,
|
|
24,
|
|
25,
|
|
26,
|
|
27,
|
|
28,
|
|
29,
|
|
30,
|
|
31,
|
|
32,
|
|
33,
|
|
34,
|
|
35,
|
|
36,
|
|
37,
|
|
38,
|
|
39,
|
|
40,
|
|
41,
|
|
42,
|
|
43,
|
|
44,
|
|
45,
|
|
46,
|
|
47,
|
|
48,
|
|
49,
|
|
50,
|
|
51,
|
|
52,
|
|
53,
|
|
54,
|
|
55,
|
|
56,
|
|
57,
|
|
58,
|
|
59,
|
|
60,
|
|
61,
|
|
62
|
|
],
|
|
"starting_column": 1,
|
|
"ending_column": 0
|
|
}
|
|
},
|
|
"signature": "bad2(address)"
|
|
}
|
|
}
|
|
},
|
|
"additional_fields": {
|
|
"underlying_type": "external_calls"
|
|
}
|
|
},
|
|
{
|
|
"type": "node",
|
|
"name": "success = target.call()",
|
|
"source_mapping": {
|
|
"start": 427,
|
|
"length": 30,
|
|
"filename_used": "/GENERIC_PATH",
|
|
"filename_relative": "tests/detectors/reentrancy-benign/0.4.25/reentrancy-benign.sol",
|
|
"filename_absolute": "/GENERIC_PATH",
|
|
"filename_short": "tests/detectors/reentrancy-benign/0.4.25/reentrancy-benign.sol",
|
|
"is_dependency": false,
|
|
"lines": [
|
|
21
|
|
],
|
|
"starting_column": 9,
|
|
"ending_column": 39
|
|
},
|
|
"type_specific_fields": {
|
|
"parent": {
|
|
"type": "function",
|
|
"name": "bad2",
|
|
"source_mapping": {
|
|
"start": 380,
|
|
"length": 238,
|
|
"filename_used": "/GENERIC_PATH",
|
|
"filename_relative": "tests/detectors/reentrancy-benign/0.4.25/reentrancy-benign.sol",
|
|
"filename_absolute": "/GENERIC_PATH",
|
|
"filename_short": "tests/detectors/reentrancy-benign/0.4.25/reentrancy-benign.sol",
|
|
"is_dependency": false,
|
|
"lines": [
|
|
20,
|
|
21,
|
|
22,
|
|
23,
|
|
24,
|
|
25,
|
|
26,
|
|
27,
|
|
28,
|
|
29
|
|
],
|
|
"starting_column": 5,
|
|
"ending_column": 6
|
|
},
|
|
"type_specific_fields": {
|
|
"parent": {
|
|
"type": "contract",
|
|
"name": "ReentrancyBenign",
|
|
"source_mapping": {
|
|
"start": 25,
|
|
"length": 1304,
|
|
"filename_used": "/GENERIC_PATH",
|
|
"filename_relative": "tests/detectors/reentrancy-benign/0.4.25/reentrancy-benign.sol",
|
|
"filename_absolute": "/GENERIC_PATH",
|
|
"filename_short": "tests/detectors/reentrancy-benign/0.4.25/reentrancy-benign.sol",
|
|
"is_dependency": false,
|
|
"lines": [
|
|
3,
|
|
4,
|
|
5,
|
|
6,
|
|
7,
|
|
8,
|
|
9,
|
|
10,
|
|
11,
|
|
12,
|
|
13,
|
|
14,
|
|
15,
|
|
16,
|
|
17,
|
|
18,
|
|
19,
|
|
20,
|
|
21,
|
|
22,
|
|
23,
|
|
24,
|
|
25,
|
|
26,
|
|
27,
|
|
28,
|
|
29,
|
|
30,
|
|
31,
|
|
32,
|
|
33,
|
|
34,
|
|
35,
|
|
36,
|
|
37,
|
|
38,
|
|
39,
|
|
40,
|
|
41,
|
|
42,
|
|
43,
|
|
44,
|
|
45,
|
|
46,
|
|
47,
|
|
48,
|
|
49,
|
|
50,
|
|
51,
|
|
52,
|
|
53,
|
|
54,
|
|
55,
|
|
56,
|
|
57,
|
|
58,
|
|
59,
|
|
60,
|
|
61,
|
|
62
|
|
],
|
|
"starting_column": 1,
|
|
"ending_column": 0
|
|
}
|
|
},
|
|
"signature": "bad2(address)"
|
|
}
|
|
}
|
|
},
|
|
"additional_fields": {
|
|
"underlying_type": "external_calls_sending_eth"
|
|
}
|
|
},
|
|
{
|
|
"type": "node",
|
|
"name": "address(target).call.value(1000)()",
|
|
"source_mapping": {
|
|
"start": 494,
|
|
"length": 34,
|
|
"filename_used": "/GENERIC_PATH",
|
|
"filename_relative": "tests/detectors/reentrancy-benign/0.4.25/reentrancy-benign.sol",
|
|
"filename_absolute": "/GENERIC_PATH",
|
|
"filename_short": "tests/detectors/reentrancy-benign/0.4.25/reentrancy-benign.sol",
|
|
"is_dependency": false,
|
|
"lines": [
|
|
23
|
|
],
|
|
"starting_column": 13,
|
|
"ending_column": 47
|
|
},
|
|
"type_specific_fields": {
|
|
"parent": {
|
|
"type": "function",
|
|
"name": "bad2",
|
|
"source_mapping": {
|
|
"start": 380,
|
|
"length": 238,
|
|
"filename_used": "/GENERIC_PATH",
|
|
"filename_relative": "tests/detectors/reentrancy-benign/0.4.25/reentrancy-benign.sol",
|
|
"filename_absolute": "/GENERIC_PATH",
|
|
"filename_short": "tests/detectors/reentrancy-benign/0.4.25/reentrancy-benign.sol",
|
|
"is_dependency": false,
|
|
"lines": [
|
|
20,
|
|
21,
|
|
22,
|
|
23,
|
|
24,
|
|
25,
|
|
26,
|
|
27,
|
|
28,
|
|
29
|
|
],
|
|
"starting_column": 5,
|
|
"ending_column": 6
|
|
},
|
|
"type_specific_fields": {
|
|
"parent": {
|
|
"type": "contract",
|
|
"name": "ReentrancyBenign",
|
|
"source_mapping": {
|
|
"start": 25,
|
|
"length": 1304,
|
|
"filename_used": "/GENERIC_PATH",
|
|
"filename_relative": "tests/detectors/reentrancy-benign/0.4.25/reentrancy-benign.sol",
|
|
"filename_absolute": "/GENERIC_PATH",
|
|
"filename_short": "tests/detectors/reentrancy-benign/0.4.25/reentrancy-benign.sol",
|
|
"is_dependency": false,
|
|
"lines": [
|
|
3,
|
|
4,
|
|
5,
|
|
6,
|
|
7,
|
|
8,
|
|
9,
|
|
10,
|
|
11,
|
|
12,
|
|
13,
|
|
14,
|
|
15,
|
|
16,
|
|
17,
|
|
18,
|
|
19,
|
|
20,
|
|
21,
|
|
22,
|
|
23,
|
|
24,
|
|
25,
|
|
26,
|
|
27,
|
|
28,
|
|
29,
|
|
30,
|
|
31,
|
|
32,
|
|
33,
|
|
34,
|
|
35,
|
|
36,
|
|
37,
|
|
38,
|
|
39,
|
|
40,
|
|
41,
|
|
42,
|
|
43,
|
|
44,
|
|
45,
|
|
46,
|
|
47,
|
|
48,
|
|
49,
|
|
50,
|
|
51,
|
|
52,
|
|
53,
|
|
54,
|
|
55,
|
|
56,
|
|
57,
|
|
58,
|
|
59,
|
|
60,
|
|
61,
|
|
62
|
|
],
|
|
"starting_column": 1,
|
|
"ending_column": 0
|
|
}
|
|
},
|
|
"signature": "bad2(address)"
|
|
}
|
|
}
|
|
},
|
|
"additional_fields": {
|
|
"underlying_type": "external_calls_sending_eth"
|
|
}
|
|
},
|
|
{
|
|
"type": "node",
|
|
"name": "counter += 1",
|
|
"source_mapping": {
|
|
"start": 542,
|
|
"length": 12,
|
|
"filename_used": "/GENERIC_PATH",
|
|
"filename_relative": "tests/detectors/reentrancy-benign/0.4.25/reentrancy-benign.sol",
|
|
"filename_absolute": "/GENERIC_PATH",
|
|
"filename_short": "tests/detectors/reentrancy-benign/0.4.25/reentrancy-benign.sol",
|
|
"is_dependency": false,
|
|
"lines": [
|
|
24
|
|
],
|
|
"starting_column": 13,
|
|
"ending_column": 25
|
|
},
|
|
"type_specific_fields": {
|
|
"parent": {
|
|
"type": "function",
|
|
"name": "bad2",
|
|
"source_mapping": {
|
|
"start": 380,
|
|
"length": 238,
|
|
"filename_used": "/GENERIC_PATH",
|
|
"filename_relative": "tests/detectors/reentrancy-benign/0.4.25/reentrancy-benign.sol",
|
|
"filename_absolute": "/GENERIC_PATH",
|
|
"filename_short": "tests/detectors/reentrancy-benign/0.4.25/reentrancy-benign.sol",
|
|
"is_dependency": false,
|
|
"lines": [
|
|
20,
|
|
21,
|
|
22,
|
|
23,
|
|
24,
|
|
25,
|
|
26,
|
|
27,
|
|
28,
|
|
29
|
|
],
|
|
"starting_column": 5,
|
|
"ending_column": 6
|
|
},
|
|
"type_specific_fields": {
|
|
"parent": {
|
|
"type": "contract",
|
|
"name": "ReentrancyBenign",
|
|
"source_mapping": {
|
|
"start": 25,
|
|
"length": 1304,
|
|
"filename_used": "/GENERIC_PATH",
|
|
"filename_relative": "tests/detectors/reentrancy-benign/0.4.25/reentrancy-benign.sol",
|
|
"filename_absolute": "/GENERIC_PATH",
|
|
"filename_short": "tests/detectors/reentrancy-benign/0.4.25/reentrancy-benign.sol",
|
|
"is_dependency": false,
|
|
"lines": [
|
|
3,
|
|
4,
|
|
5,
|
|
6,
|
|
7,
|
|
8,
|
|
9,
|
|
10,
|
|
11,
|
|
12,
|
|
13,
|
|
14,
|
|
15,
|
|
16,
|
|
17,
|
|
18,
|
|
19,
|
|
20,
|
|
21,
|
|
22,
|
|
23,
|
|
24,
|
|
25,
|
|
26,
|
|
27,
|
|
28,
|
|
29,
|
|
30,
|
|
31,
|
|
32,
|
|
33,
|
|
34,
|
|
35,
|
|
36,
|
|
37,
|
|
38,
|
|
39,
|
|
40,
|
|
41,
|
|
42,
|
|
43,
|
|
44,
|
|
45,
|
|
46,
|
|
47,
|
|
48,
|
|
49,
|
|
50,
|
|
51,
|
|
52,
|
|
53,
|
|
54,
|
|
55,
|
|
56,
|
|
57,
|
|
58,
|
|
59,
|
|
60,
|
|
61,
|
|
62
|
|
],
|
|
"starting_column": 1,
|
|
"ending_column": 0
|
|
}
|
|
},
|
|
"signature": "bad2(address)"
|
|
}
|
|
}
|
|
},
|
|
"additional_fields": {
|
|
"underlying_type": "variables_written",
|
|
"variable_name": "counter"
|
|
}
|
|
}
|
|
],
|
|
"description": "Reentrancy in ReentrancyBenign.bad2(address) (tests/detectors/reentrancy-benign/0.4.25/reentrancy-benign.sol#20-29):\n\tExternal calls:\n\t- success = target.call() (tests/detectors/reentrancy-benign/0.4.25/reentrancy-benign.sol#21)\n\t- address(target).call.value(1000)() (tests/detectors/reentrancy-benign/0.4.25/reentrancy-benign.sol#23)\n\tExternal calls sending eth:\n\t- address(target).call.value(1000)() (tests/detectors/reentrancy-benign/0.4.25/reentrancy-benign.sol#23)\n\tState variables written after the call(s):\n\t- counter += 1 (tests/detectors/reentrancy-benign/0.4.25/reentrancy-benign.sol#24)\n",
|
|
"markdown": "Reentrancy in [ReentrancyBenign.bad2(address)](tests/detectors/reentrancy-benign/0.4.25/reentrancy-benign.sol#L20-L29):\n\tExternal calls:\n\t- [success = target.call()](tests/detectors/reentrancy-benign/0.4.25/reentrancy-benign.sol#L21)\n\t- [address(target).call.value(1000)()](tests/detectors/reentrancy-benign/0.4.25/reentrancy-benign.sol#L23)\n\tExternal calls sending eth:\n\t- [address(target).call.value(1000)()](tests/detectors/reentrancy-benign/0.4.25/reentrancy-benign.sol#L23)\n\tState variables written after the call(s):\n\t- [counter += 1](tests/detectors/reentrancy-benign/0.4.25/reentrancy-benign.sol#L24)\n",
|
|
"first_markdown_element": "tests/detectors/reentrancy-benign/0.4.25/reentrancy-benign.sol#L20-L29",
|
|
"id": "d0cd48646930b460d018a96dca75d8781c9707be1d4a451d83f1fec56f560c43",
|
|
"check": "reentrancy-benign",
|
|
"impact": "Low",
|
|
"confidence": "Medium"
|
|
},
|
|
{
|
|
"elements": [
|
|
{
|
|
"type": "function",
|
|
"name": "bad3",
|
|
"source_mapping": {
|
|
"start": 624,
|
|
"length": 125,
|
|
"filename_used": "/GENERIC_PATH",
|
|
"filename_relative": "tests/detectors/reentrancy-benign/0.4.25/reentrancy-benign.sol",
|
|
"filename_absolute": "/GENERIC_PATH",
|
|
"filename_short": "tests/detectors/reentrancy-benign/0.4.25/reentrancy-benign.sol",
|
|
"is_dependency": false,
|
|
"lines": [
|
|
31,
|
|
32,
|
|
33,
|
|
34,
|
|
35
|
|
],
|
|
"starting_column": 5,
|
|
"ending_column": 6
|
|
},
|
|
"type_specific_fields": {
|
|
"parent": {
|
|
"type": "contract",
|
|
"name": "ReentrancyBenign",
|
|
"source_mapping": {
|
|
"start": 25,
|
|
"length": 1304,
|
|
"filename_used": "/GENERIC_PATH",
|
|
"filename_relative": "tests/detectors/reentrancy-benign/0.4.25/reentrancy-benign.sol",
|
|
"filename_absolute": "/GENERIC_PATH",
|
|
"filename_short": "tests/detectors/reentrancy-benign/0.4.25/reentrancy-benign.sol",
|
|
"is_dependency": false,
|
|
"lines": [
|
|
3,
|
|
4,
|
|
5,
|
|
6,
|
|
7,
|
|
8,
|
|
9,
|
|
10,
|
|
11,
|
|
12,
|
|
13,
|
|
14,
|
|
15,
|
|
16,
|
|
17,
|
|
18,
|
|
19,
|
|
20,
|
|
21,
|
|
22,
|
|
23,
|
|
24,
|
|
25,
|
|
26,
|
|
27,
|
|
28,
|
|
29,
|
|
30,
|
|
31,
|
|
32,
|
|
33,
|
|
34,
|
|
35,
|
|
36,
|
|
37,
|
|
38,
|
|
39,
|
|
40,
|
|
41,
|
|
42,
|
|
43,
|
|
44,
|
|
45,
|
|
46,
|
|
47,
|
|
48,
|
|
49,
|
|
50,
|
|
51,
|
|
52,
|
|
53,
|
|
54,
|
|
55,
|
|
56,
|
|
57,
|
|
58,
|
|
59,
|
|
60,
|
|
61,
|
|
62
|
|
],
|
|
"starting_column": 1,
|
|
"ending_column": 0
|
|
}
|
|
},
|
|
"signature": "bad3(address)"
|
|
}
|
|
},
|
|
{
|
|
"type": "node",
|
|
"name": "externalCaller(target)",
|
|
"source_mapping": {
|
|
"start": 671,
|
|
"length": 22,
|
|
"filename_used": "/GENERIC_PATH",
|
|
"filename_relative": "tests/detectors/reentrancy-benign/0.4.25/reentrancy-benign.sol",
|
|
"filename_absolute": "/GENERIC_PATH",
|
|
"filename_short": "tests/detectors/reentrancy-benign/0.4.25/reentrancy-benign.sol",
|
|
"is_dependency": false,
|
|
"lines": [
|
|
32
|
|
],
|
|
"starting_column": 9,
|
|
"ending_column": 31
|
|
},
|
|
"type_specific_fields": {
|
|
"parent": {
|
|
"type": "function",
|
|
"name": "bad3",
|
|
"source_mapping": {
|
|
"start": 624,
|
|
"length": 125,
|
|
"filename_used": "/GENERIC_PATH",
|
|
"filename_relative": "tests/detectors/reentrancy-benign/0.4.25/reentrancy-benign.sol",
|
|
"filename_absolute": "/GENERIC_PATH",
|
|
"filename_short": "tests/detectors/reentrancy-benign/0.4.25/reentrancy-benign.sol",
|
|
"is_dependency": false,
|
|
"lines": [
|
|
31,
|
|
32,
|
|
33,
|
|
34,
|
|
35
|
|
],
|
|
"starting_column": 5,
|
|
"ending_column": 6
|
|
},
|
|
"type_specific_fields": {
|
|
"parent": {
|
|
"type": "contract",
|
|
"name": "ReentrancyBenign",
|
|
"source_mapping": {
|
|
"start": 25,
|
|
"length": 1304,
|
|
"filename_used": "/GENERIC_PATH",
|
|
"filename_relative": "tests/detectors/reentrancy-benign/0.4.25/reentrancy-benign.sol",
|
|
"filename_absolute": "/GENERIC_PATH",
|
|
"filename_short": "tests/detectors/reentrancy-benign/0.4.25/reentrancy-benign.sol",
|
|
"is_dependency": false,
|
|
"lines": [
|
|
3,
|
|
4,
|
|
5,
|
|
6,
|
|
7,
|
|
8,
|
|
9,
|
|
10,
|
|
11,
|
|
12,
|
|
13,
|
|
14,
|
|
15,
|
|
16,
|
|
17,
|
|
18,
|
|
19,
|
|
20,
|
|
21,
|
|
22,
|
|
23,
|
|
24,
|
|
25,
|
|
26,
|
|
27,
|
|
28,
|
|
29,
|
|
30,
|
|
31,
|
|
32,
|
|
33,
|
|
34,
|
|
35,
|
|
36,
|
|
37,
|
|
38,
|
|
39,
|
|
40,
|
|
41,
|
|
42,
|
|
43,
|
|
44,
|
|
45,
|
|
46,
|
|
47,
|
|
48,
|
|
49,
|
|
50,
|
|
51,
|
|
52,
|
|
53,
|
|
54,
|
|
55,
|
|
56,
|
|
57,
|
|
58,
|
|
59,
|
|
60,
|
|
61,
|
|
62
|
|
],
|
|
"starting_column": 1,
|
|
"ending_column": 0
|
|
}
|
|
},
|
|
"signature": "bad3(address)"
|
|
}
|
|
}
|
|
},
|
|
"additional_fields": {
|
|
"underlying_type": "external_calls"
|
|
}
|
|
},
|
|
{
|
|
"type": "node",
|
|
"name": "address(target).call()",
|
|
"source_mapping": {
|
|
"start": 1123,
|
|
"length": 22,
|
|
"filename_used": "/GENERIC_PATH",
|
|
"filename_relative": "tests/detectors/reentrancy-benign/0.4.25/reentrancy-benign.sol",
|
|
"filename_absolute": "/GENERIC_PATH",
|
|
"filename_short": "tests/detectors/reentrancy-benign/0.4.25/reentrancy-benign.sol",
|
|
"is_dependency": false,
|
|
"lines": [
|
|
51
|
|
],
|
|
"starting_column": 9,
|
|
"ending_column": 31
|
|
},
|
|
"type_specific_fields": {
|
|
"parent": {
|
|
"type": "function",
|
|
"name": "externalCaller",
|
|
"source_mapping": {
|
|
"start": 1065,
|
|
"length": 87,
|
|
"filename_used": "/GENERIC_PATH",
|
|
"filename_relative": "tests/detectors/reentrancy-benign/0.4.25/reentrancy-benign.sol",
|
|
"filename_absolute": "/GENERIC_PATH",
|
|
"filename_short": "tests/detectors/reentrancy-benign/0.4.25/reentrancy-benign.sol",
|
|
"is_dependency": false,
|
|
"lines": [
|
|
50,
|
|
51,
|
|
52
|
|
],
|
|
"starting_column": 5,
|
|
"ending_column": 6
|
|
},
|
|
"type_specific_fields": {
|
|
"parent": {
|
|
"type": "contract",
|
|
"name": "ReentrancyBenign",
|
|
"source_mapping": {
|
|
"start": 25,
|
|
"length": 1304,
|
|
"filename_used": "/GENERIC_PATH",
|
|
"filename_relative": "tests/detectors/reentrancy-benign/0.4.25/reentrancy-benign.sol",
|
|
"filename_absolute": "/GENERIC_PATH",
|
|
"filename_short": "tests/detectors/reentrancy-benign/0.4.25/reentrancy-benign.sol",
|
|
"is_dependency": false,
|
|
"lines": [
|
|
3,
|
|
4,
|
|
5,
|
|
6,
|
|
7,
|
|
8,
|
|
9,
|
|
10,
|
|
11,
|
|
12,
|
|
13,
|
|
14,
|
|
15,
|
|
16,
|
|
17,
|
|
18,
|
|
19,
|
|
20,
|
|
21,
|
|
22,
|
|
23,
|
|
24,
|
|
25,
|
|
26,
|
|
27,
|
|
28,
|
|
29,
|
|
30,
|
|
31,
|
|
32,
|
|
33,
|
|
34,
|
|
35,
|
|
36,
|
|
37,
|
|
38,
|
|
39,
|
|
40,
|
|
41,
|
|
42,
|
|
43,
|
|
44,
|
|
45,
|
|
46,
|
|
47,
|
|
48,
|
|
49,
|
|
50,
|
|
51,
|
|
52,
|
|
53,
|
|
54,
|
|
55,
|
|
56,
|
|
57,
|
|
58,
|
|
59,
|
|
60,
|
|
61,
|
|
62
|
|
],
|
|
"starting_column": 1,
|
|
"ending_column": 0
|
|
}
|
|
},
|
|
"signature": "externalCaller(address)"
|
|
}
|
|
}
|
|
},
|
|
"additional_fields": {
|
|
"underlying_type": "external_calls_sending_eth"
|
|
}
|
|
},
|
|
{
|
|
"type": "node",
|
|
"name": "externalCaller(target)",
|
|
"source_mapping": {
|
|
"start": 671,
|
|
"length": 22,
|
|
"filename_used": "/GENERIC_PATH",
|
|
"filename_relative": "tests/detectors/reentrancy-benign/0.4.25/reentrancy-benign.sol",
|
|
"filename_absolute": "/GENERIC_PATH",
|
|
"filename_short": "tests/detectors/reentrancy-benign/0.4.25/reentrancy-benign.sol",
|
|
"is_dependency": false,
|
|
"lines": [
|
|
32
|
|
],
|
|
"starting_column": 9,
|
|
"ending_column": 31
|
|
},
|
|
"type_specific_fields": {
|
|
"parent": {
|
|
"type": "function",
|
|
"name": "bad3",
|
|
"source_mapping": {
|
|
"start": 624,
|
|
"length": 125,
|
|
"filename_used": "/GENERIC_PATH",
|
|
"filename_relative": "tests/detectors/reentrancy-benign/0.4.25/reentrancy-benign.sol",
|
|
"filename_absolute": "/GENERIC_PATH",
|
|
"filename_short": "tests/detectors/reentrancy-benign/0.4.25/reentrancy-benign.sol",
|
|
"is_dependency": false,
|
|
"lines": [
|
|
31,
|
|
32,
|
|
33,
|
|
34,
|
|
35
|
|
],
|
|
"starting_column": 5,
|
|
"ending_column": 6
|
|
},
|
|
"type_specific_fields": {
|
|
"parent": {
|
|
"type": "contract",
|
|
"name": "ReentrancyBenign",
|
|
"source_mapping": {
|
|
"start": 25,
|
|
"length": 1304,
|
|
"filename_used": "/GENERIC_PATH",
|
|
"filename_relative": "tests/detectors/reentrancy-benign/0.4.25/reentrancy-benign.sol",
|
|
"filename_absolute": "/GENERIC_PATH",
|
|
"filename_short": "tests/detectors/reentrancy-benign/0.4.25/reentrancy-benign.sol",
|
|
"is_dependency": false,
|
|
"lines": [
|
|
3,
|
|
4,
|
|
5,
|
|
6,
|
|
7,
|
|
8,
|
|
9,
|
|
10,
|
|
11,
|
|
12,
|
|
13,
|
|
14,
|
|
15,
|
|
16,
|
|
17,
|
|
18,
|
|
19,
|
|
20,
|
|
21,
|
|
22,
|
|
23,
|
|
24,
|
|
25,
|
|
26,
|
|
27,
|
|
28,
|
|
29,
|
|
30,
|
|
31,
|
|
32,
|
|
33,
|
|
34,
|
|
35,
|
|
36,
|
|
37,
|
|
38,
|
|
39,
|
|
40,
|
|
41,
|
|
42,
|
|
43,
|
|
44,
|
|
45,
|
|
46,
|
|
47,
|
|
48,
|
|
49,
|
|
50,
|
|
51,
|
|
52,
|
|
53,
|
|
54,
|
|
55,
|
|
56,
|
|
57,
|
|
58,
|
|
59,
|
|
60,
|
|
61,
|
|
62
|
|
],
|
|
"starting_column": 1,
|
|
"ending_column": 0
|
|
}
|
|
},
|
|
"signature": "bad3(address)"
|
|
}
|
|
}
|
|
},
|
|
"additional_fields": {
|
|
"underlying_type": "external_calls_sending_eth"
|
|
}
|
|
},
|
|
{
|
|
"type": "node",
|
|
"name": "address(target).call()",
|
|
"source_mapping": {
|
|
"start": 1123,
|
|
"length": 22,
|
|
"filename_used": "/GENERIC_PATH",
|
|
"filename_relative": "tests/detectors/reentrancy-benign/0.4.25/reentrancy-benign.sol",
|
|
"filename_absolute": "/GENERIC_PATH",
|
|
"filename_short": "tests/detectors/reentrancy-benign/0.4.25/reentrancy-benign.sol",
|
|
"is_dependency": false,
|
|
"lines": [
|
|
51
|
|
],
|
|
"starting_column": 9,
|
|
"ending_column": 31
|
|
},
|
|
"type_specific_fields": {
|
|
"parent": {
|
|
"type": "function",
|
|
"name": "externalCaller",
|
|
"source_mapping": {
|
|
"start": 1065,
|
|
"length": 87,
|
|
"filename_used": "/GENERIC_PATH",
|
|
"filename_relative": "tests/detectors/reentrancy-benign/0.4.25/reentrancy-benign.sol",
|
|
"filename_absolute": "/GENERIC_PATH",
|
|
"filename_short": "tests/detectors/reentrancy-benign/0.4.25/reentrancy-benign.sol",
|
|
"is_dependency": false,
|
|
"lines": [
|
|
50,
|
|
51,
|
|
52
|
|
],
|
|
"starting_column": 5,
|
|
"ending_column": 6
|
|
},
|
|
"type_specific_fields": {
|
|
"parent": {
|
|
"type": "contract",
|
|
"name": "ReentrancyBenign",
|
|
"source_mapping": {
|
|
"start": 25,
|
|
"length": 1304,
|
|
"filename_used": "/GENERIC_PATH",
|
|
"filename_relative": "tests/detectors/reentrancy-benign/0.4.25/reentrancy-benign.sol",
|
|
"filename_absolute": "/GENERIC_PATH",
|
|
"filename_short": "tests/detectors/reentrancy-benign/0.4.25/reentrancy-benign.sol",
|
|
"is_dependency": false,
|
|
"lines": [
|
|
3,
|
|
4,
|
|
5,
|
|
6,
|
|
7,
|
|
8,
|
|
9,
|
|
10,
|
|
11,
|
|
12,
|
|
13,
|
|
14,
|
|
15,
|
|
16,
|
|
17,
|
|
18,
|
|
19,
|
|
20,
|
|
21,
|
|
22,
|
|
23,
|
|
24,
|
|
25,
|
|
26,
|
|
27,
|
|
28,
|
|
29,
|
|
30,
|
|
31,
|
|
32,
|
|
33,
|
|
34,
|
|
35,
|
|
36,
|
|
37,
|
|
38,
|
|
39,
|
|
40,
|
|
41,
|
|
42,
|
|
43,
|
|
44,
|
|
45,
|
|
46,
|
|
47,
|
|
48,
|
|
49,
|
|
50,
|
|
51,
|
|
52,
|
|
53,
|
|
54,
|
|
55,
|
|
56,
|
|
57,
|
|
58,
|
|
59,
|
|
60,
|
|
61,
|
|
62
|
|
],
|
|
"starting_column": 1,
|
|
"ending_column": 0
|
|
}
|
|
},
|
|
"signature": "externalCaller(address)"
|
|
}
|
|
}
|
|
},
|
|
"additional_fields": {
|
|
"underlying_type": "external_calls_sending_eth"
|
|
}
|
|
},
|
|
{
|
|
"type": "node",
|
|
"name": "varChanger()",
|
|
"source_mapping": {
|
|
"start": 703,
|
|
"length": 12,
|
|
"filename_used": "/GENERIC_PATH",
|
|
"filename_relative": "tests/detectors/reentrancy-benign/0.4.25/reentrancy-benign.sol",
|
|
"filename_absolute": "/GENERIC_PATH",
|
|
"filename_short": "tests/detectors/reentrancy-benign/0.4.25/reentrancy-benign.sol",
|
|
"is_dependency": false,
|
|
"lines": [
|
|
33
|
|
],
|
|
"starting_column": 9,
|
|
"ending_column": 21
|
|
},
|
|
"type_specific_fields": {
|
|
"parent": {
|
|
"type": "function",
|
|
"name": "bad3",
|
|
"source_mapping": {
|
|
"start": 624,
|
|
"length": 125,
|
|
"filename_used": "/GENERIC_PATH",
|
|
"filename_relative": "tests/detectors/reentrancy-benign/0.4.25/reentrancy-benign.sol",
|
|
"filename_absolute": "/GENERIC_PATH",
|
|
"filename_short": "tests/detectors/reentrancy-benign/0.4.25/reentrancy-benign.sol",
|
|
"is_dependency": false,
|
|
"lines": [
|
|
31,
|
|
32,
|
|
33,
|
|
34,
|
|
35
|
|
],
|
|
"starting_column": 5,
|
|
"ending_column": 6
|
|
},
|
|
"type_specific_fields": {
|
|
"parent": {
|
|
"type": "contract",
|
|
"name": "ReentrancyBenign",
|
|
"source_mapping": {
|
|
"start": 25,
|
|
"length": 1304,
|
|
"filename_used": "/GENERIC_PATH",
|
|
"filename_relative": "tests/detectors/reentrancy-benign/0.4.25/reentrancy-benign.sol",
|
|
"filename_absolute": "/GENERIC_PATH",
|
|
"filename_short": "tests/detectors/reentrancy-benign/0.4.25/reentrancy-benign.sol",
|
|
"is_dependency": false,
|
|
"lines": [
|
|
3,
|
|
4,
|
|
5,
|
|
6,
|
|
7,
|
|
8,
|
|
9,
|
|
10,
|
|
11,
|
|
12,
|
|
13,
|
|
14,
|
|
15,
|
|
16,
|
|
17,
|
|
18,
|
|
19,
|
|
20,
|
|
21,
|
|
22,
|
|
23,
|
|
24,
|
|
25,
|
|
26,
|
|
27,
|
|
28,
|
|
29,
|
|
30,
|
|
31,
|
|
32,
|
|
33,
|
|
34,
|
|
35,
|
|
36,
|
|
37,
|
|
38,
|
|
39,
|
|
40,
|
|
41,
|
|
42,
|
|
43,
|
|
44,
|
|
45,
|
|
46,
|
|
47,
|
|
48,
|
|
49,
|
|
50,
|
|
51,
|
|
52,
|
|
53,
|
|
54,
|
|
55,
|
|
56,
|
|
57,
|
|
58,
|
|
59,
|
|
60,
|
|
61,
|
|
62
|
|
],
|
|
"starting_column": 1,
|
|
"ending_column": 0
|
|
}
|
|
},
|
|
"signature": "bad3(address)"
|
|
}
|
|
}
|
|
},
|
|
"additional_fields": {
|
|
"underlying_type": "variables_written",
|
|
"variable_name": "anotherVariableToChange"
|
|
}
|
|
},
|
|
{
|
|
"type": "node",
|
|
"name": "anotherVariableToChange ++",
|
|
"source_mapping": {
|
|
"start": 1295,
|
|
"length": 25,
|
|
"filename_used": "/GENERIC_PATH",
|
|
"filename_relative": "tests/detectors/reentrancy-benign/0.4.25/reentrancy-benign.sol",
|
|
"filename_absolute": "/GENERIC_PATH",
|
|
"filename_short": "tests/detectors/reentrancy-benign/0.4.25/reentrancy-benign.sol",
|
|
"is_dependency": false,
|
|
"lines": [
|
|
59
|
|
],
|
|
"starting_column": 9,
|
|
"ending_column": 34
|
|
},
|
|
"type_specific_fields": {
|
|
"parent": {
|
|
"type": "function",
|
|
"name": "varChanger",
|
|
"source_mapping": {
|
|
"start": 1255,
|
|
"length": 72,
|
|
"filename_used": "/GENERIC_PATH",
|
|
"filename_relative": "tests/detectors/reentrancy-benign/0.4.25/reentrancy-benign.sol",
|
|
"filename_absolute": "/GENERIC_PATH",
|
|
"filename_short": "tests/detectors/reentrancy-benign/0.4.25/reentrancy-benign.sol",
|
|
"is_dependency": false,
|
|
"lines": [
|
|
58,
|
|
59,
|
|
60
|
|
],
|
|
"starting_column": 5,
|
|
"ending_column": 6
|
|
},
|
|
"type_specific_fields": {
|
|
"parent": {
|
|
"type": "contract",
|
|
"name": "ReentrancyBenign",
|
|
"source_mapping": {
|
|
"start": 25,
|
|
"length": 1304,
|
|
"filename_used": "/GENERIC_PATH",
|
|
"filename_relative": "tests/detectors/reentrancy-benign/0.4.25/reentrancy-benign.sol",
|
|
"filename_absolute": "/GENERIC_PATH",
|
|
"filename_short": "tests/detectors/reentrancy-benign/0.4.25/reentrancy-benign.sol",
|
|
"is_dependency": false,
|
|
"lines": [
|
|
3,
|
|
4,
|
|
5,
|
|
6,
|
|
7,
|
|
8,
|
|
9,
|
|
10,
|
|
11,
|
|
12,
|
|
13,
|
|
14,
|
|
15,
|
|
16,
|
|
17,
|
|
18,
|
|
19,
|
|
20,
|
|
21,
|
|
22,
|
|
23,
|
|
24,
|
|
25,
|
|
26,
|
|
27,
|
|
28,
|
|
29,
|
|
30,
|
|
31,
|
|
32,
|
|
33,
|
|
34,
|
|
35,
|
|
36,
|
|
37,
|
|
38,
|
|
39,
|
|
40,
|
|
41,
|
|
42,
|
|
43,
|
|
44,
|
|
45,
|
|
46,
|
|
47,
|
|
48,
|
|
49,
|
|
50,
|
|
51,
|
|
52,
|
|
53,
|
|
54,
|
|
55,
|
|
56,
|
|
57,
|
|
58,
|
|
59,
|
|
60,
|
|
61,
|
|
62
|
|
],
|
|
"starting_column": 1,
|
|
"ending_column": 0
|
|
}
|
|
},
|
|
"signature": "varChanger()"
|
|
}
|
|
}
|
|
},
|
|
"additional_fields": {
|
|
"underlying_type": "variables_written",
|
|
"variable_name": "anotherVariableToChange"
|
|
}
|
|
}
|
|
],
|
|
"description": "Reentrancy in ReentrancyBenign.bad3(address) (tests/detectors/reentrancy-benign/0.4.25/reentrancy-benign.sol#31-35):\n\tExternal calls:\n\t- externalCaller(target) (tests/detectors/reentrancy-benign/0.4.25/reentrancy-benign.sol#32)\n\t\t- address(target).call() (tests/detectors/reentrancy-benign/0.4.25/reentrancy-benign.sol#51)\n\tState variables written after the call(s):\n\t- varChanger() (tests/detectors/reentrancy-benign/0.4.25/reentrancy-benign.sol#33)\n\t\t- anotherVariableToChange ++ (tests/detectors/reentrancy-benign/0.4.25/reentrancy-benign.sol#59)\n",
|
|
"markdown": "Reentrancy in [ReentrancyBenign.bad3(address)](tests/detectors/reentrancy-benign/0.4.25/reentrancy-benign.sol#L31-L35):\n\tExternal calls:\n\t- [externalCaller(target)](tests/detectors/reentrancy-benign/0.4.25/reentrancy-benign.sol#L32)\n\t\t- [address(target).call()](tests/detectors/reentrancy-benign/0.4.25/reentrancy-benign.sol#L51)\n\tState variables written after the call(s):\n\t- [varChanger()](tests/detectors/reentrancy-benign/0.4.25/reentrancy-benign.sol#L33)\n\t\t- [anotherVariableToChange ++](tests/detectors/reentrancy-benign/0.4.25/reentrancy-benign.sol#L59)\n",
|
|
"first_markdown_element": "tests/detectors/reentrancy-benign/0.4.25/reentrancy-benign.sol#L31-L35",
|
|
"id": "b5e5f8e97fa06883b3ba5da0b071d115f3181ded338efbbd6dbadaef4033ca17",
|
|
"check": "reentrancy-benign",
|
|
"impact": "Low",
|
|
"confidence": "Medium"
|
|
},
|
|
{
|
|
"elements": [
|
|
{
|
|
"type": "function",
|
|
"name": "bad4",
|
|
"source_mapping": {
|
|
"start": 755,
|
|
"length": 170,
|
|
"filename_used": "/GENERIC_PATH",
|
|
"filename_relative": "tests/detectors/reentrancy-benign/0.4.25/reentrancy-benign.sol",
|
|
"filename_absolute": "/GENERIC_PATH",
|
|
"filename_short": "tests/detectors/reentrancy-benign/0.4.25/reentrancy-benign.sol",
|
|
"is_dependency": false,
|
|
"lines": [
|
|
37,
|
|
38,
|
|
39,
|
|
40,
|
|
41,
|
|
42
|
|
],
|
|
"starting_column": 5,
|
|
"ending_column": 6
|
|
},
|
|
"type_specific_fields": {
|
|
"parent": {
|
|
"type": "contract",
|
|
"name": "ReentrancyBenign",
|
|
"source_mapping": {
|
|
"start": 25,
|
|
"length": 1304,
|
|
"filename_used": "/GENERIC_PATH",
|
|
"filename_relative": "tests/detectors/reentrancy-benign/0.4.25/reentrancy-benign.sol",
|
|
"filename_absolute": "/GENERIC_PATH",
|
|
"filename_short": "tests/detectors/reentrancy-benign/0.4.25/reentrancy-benign.sol",
|
|
"is_dependency": false,
|
|
"lines": [
|
|
3,
|
|
4,
|
|
5,
|
|
6,
|
|
7,
|
|
8,
|
|
9,
|
|
10,
|
|
11,
|
|
12,
|
|
13,
|
|
14,
|
|
15,
|
|
16,
|
|
17,
|
|
18,
|
|
19,
|
|
20,
|
|
21,
|
|
22,
|
|
23,
|
|
24,
|
|
25,
|
|
26,
|
|
27,
|
|
28,
|
|
29,
|
|
30,
|
|
31,
|
|
32,
|
|
33,
|
|
34,
|
|
35,
|
|
36,
|
|
37,
|
|
38,
|
|
39,
|
|
40,
|
|
41,
|
|
42,
|
|
43,
|
|
44,
|
|
45,
|
|
46,
|
|
47,
|
|
48,
|
|
49,
|
|
50,
|
|
51,
|
|
52,
|
|
53,
|
|
54,
|
|
55,
|
|
56,
|
|
57,
|
|
58,
|
|
59,
|
|
60,
|
|
61,
|
|
62
|
|
],
|
|
"starting_column": 1,
|
|
"ending_column": 0
|
|
}
|
|
},
|
|
"signature": "bad4(address)"
|
|
}
|
|
},
|
|
{
|
|
"type": "node",
|
|
"name": "externalCaller(target)",
|
|
"source_mapping": {
|
|
"start": 802,
|
|
"length": 22,
|
|
"filename_used": "/GENERIC_PATH",
|
|
"filename_relative": "tests/detectors/reentrancy-benign/0.4.25/reentrancy-benign.sol",
|
|
"filename_absolute": "/GENERIC_PATH",
|
|
"filename_short": "tests/detectors/reentrancy-benign/0.4.25/reentrancy-benign.sol",
|
|
"is_dependency": false,
|
|
"lines": [
|
|
38
|
|
],
|
|
"starting_column": 9,
|
|
"ending_column": 31
|
|
},
|
|
"type_specific_fields": {
|
|
"parent": {
|
|
"type": "function",
|
|
"name": "bad4",
|
|
"source_mapping": {
|
|
"start": 755,
|
|
"length": 170,
|
|
"filename_used": "/GENERIC_PATH",
|
|
"filename_relative": "tests/detectors/reentrancy-benign/0.4.25/reentrancy-benign.sol",
|
|
"filename_absolute": "/GENERIC_PATH",
|
|
"filename_short": "tests/detectors/reentrancy-benign/0.4.25/reentrancy-benign.sol",
|
|
"is_dependency": false,
|
|
"lines": [
|
|
37,
|
|
38,
|
|
39,
|
|
40,
|
|
41,
|
|
42
|
|
],
|
|
"starting_column": 5,
|
|
"ending_column": 6
|
|
},
|
|
"type_specific_fields": {
|
|
"parent": {
|
|
"type": "contract",
|
|
"name": "ReentrancyBenign",
|
|
"source_mapping": {
|
|
"start": 25,
|
|
"length": 1304,
|
|
"filename_used": "/GENERIC_PATH",
|
|
"filename_relative": "tests/detectors/reentrancy-benign/0.4.25/reentrancy-benign.sol",
|
|
"filename_absolute": "/GENERIC_PATH",
|
|
"filename_short": "tests/detectors/reentrancy-benign/0.4.25/reentrancy-benign.sol",
|
|
"is_dependency": false,
|
|
"lines": [
|
|
3,
|
|
4,
|
|
5,
|
|
6,
|
|
7,
|
|
8,
|
|
9,
|
|
10,
|
|
11,
|
|
12,
|
|
13,
|
|
14,
|
|
15,
|
|
16,
|
|
17,
|
|
18,
|
|
19,
|
|
20,
|
|
21,
|
|
22,
|
|
23,
|
|
24,
|
|
25,
|
|
26,
|
|
27,
|
|
28,
|
|
29,
|
|
30,
|
|
31,
|
|
32,
|
|
33,
|
|
34,
|
|
35,
|
|
36,
|
|
37,
|
|
38,
|
|
39,
|
|
40,
|
|
41,
|
|
42,
|
|
43,
|
|
44,
|
|
45,
|
|
46,
|
|
47,
|
|
48,
|
|
49,
|
|
50,
|
|
51,
|
|
52,
|
|
53,
|
|
54,
|
|
55,
|
|
56,
|
|
57,
|
|
58,
|
|
59,
|
|
60,
|
|
61,
|
|
62
|
|
],
|
|
"starting_column": 1,
|
|
"ending_column": 0
|
|
}
|
|
},
|
|
"signature": "bad4(address)"
|
|
}
|
|
}
|
|
},
|
|
"additional_fields": {
|
|
"underlying_type": "external_calls"
|
|
}
|
|
},
|
|
{
|
|
"type": "node",
|
|
"name": "address(target).call()",
|
|
"source_mapping": {
|
|
"start": 1123,
|
|
"length": 22,
|
|
"filename_used": "/GENERIC_PATH",
|
|
"filename_relative": "tests/detectors/reentrancy-benign/0.4.25/reentrancy-benign.sol",
|
|
"filename_absolute": "/GENERIC_PATH",
|
|
"filename_short": "tests/detectors/reentrancy-benign/0.4.25/reentrancy-benign.sol",
|
|
"is_dependency": false,
|
|
"lines": [
|
|
51
|
|
],
|
|
"starting_column": 9,
|
|
"ending_column": 31
|
|
},
|
|
"type_specific_fields": {
|
|
"parent": {
|
|
"type": "function",
|
|
"name": "externalCaller",
|
|
"source_mapping": {
|
|
"start": 1065,
|
|
"length": 87,
|
|
"filename_used": "/GENERIC_PATH",
|
|
"filename_relative": "tests/detectors/reentrancy-benign/0.4.25/reentrancy-benign.sol",
|
|
"filename_absolute": "/GENERIC_PATH",
|
|
"filename_short": "tests/detectors/reentrancy-benign/0.4.25/reentrancy-benign.sol",
|
|
"is_dependency": false,
|
|
"lines": [
|
|
50,
|
|
51,
|
|
52
|
|
],
|
|
"starting_column": 5,
|
|
"ending_column": 6
|
|
},
|
|
"type_specific_fields": {
|
|
"parent": {
|
|
"type": "contract",
|
|
"name": "ReentrancyBenign",
|
|
"source_mapping": {
|
|
"start": 25,
|
|
"length": 1304,
|
|
"filename_used": "/GENERIC_PATH",
|
|
"filename_relative": "tests/detectors/reentrancy-benign/0.4.25/reentrancy-benign.sol",
|
|
"filename_absolute": "/GENERIC_PATH",
|
|
"filename_short": "tests/detectors/reentrancy-benign/0.4.25/reentrancy-benign.sol",
|
|
"is_dependency": false,
|
|
"lines": [
|
|
3,
|
|
4,
|
|
5,
|
|
6,
|
|
7,
|
|
8,
|
|
9,
|
|
10,
|
|
11,
|
|
12,
|
|
13,
|
|
14,
|
|
15,
|
|
16,
|
|
17,
|
|
18,
|
|
19,
|
|
20,
|
|
21,
|
|
22,
|
|
23,
|
|
24,
|
|
25,
|
|
26,
|
|
27,
|
|
28,
|
|
29,
|
|
30,
|
|
31,
|
|
32,
|
|
33,
|
|
34,
|
|
35,
|
|
36,
|
|
37,
|
|
38,
|
|
39,
|
|
40,
|
|
41,
|
|
42,
|
|
43,
|
|
44,
|
|
45,
|
|
46,
|
|
47,
|
|
48,
|
|
49,
|
|
50,
|
|
51,
|
|
52,
|
|
53,
|
|
54,
|
|
55,
|
|
56,
|
|
57,
|
|
58,
|
|
59,
|
|
60,
|
|
61,
|
|
62
|
|
],
|
|
"starting_column": 1,
|
|
"ending_column": 0
|
|
}
|
|
},
|
|
"signature": "externalCaller(address)"
|
|
}
|
|
}
|
|
},
|
|
"additional_fields": {
|
|
"underlying_type": "external_calls_sending_eth"
|
|
}
|
|
},
|
|
{
|
|
"type": "node",
|
|
"name": "ethSender(address(0))",
|
|
"source_mapping": {
|
|
"start": 834,
|
|
"length": 21,
|
|
"filename_used": "/GENERIC_PATH",
|
|
"filename_relative": "tests/detectors/reentrancy-benign/0.4.25/reentrancy-benign.sol",
|
|
"filename_absolute": "/GENERIC_PATH",
|
|
"filename_short": "tests/detectors/reentrancy-benign/0.4.25/reentrancy-benign.sol",
|
|
"is_dependency": false,
|
|
"lines": [
|
|
39
|
|
],
|
|
"starting_column": 9,
|
|
"ending_column": 30
|
|
},
|
|
"type_specific_fields": {
|
|
"parent": {
|
|
"type": "function",
|
|
"name": "bad4",
|
|
"source_mapping": {
|
|
"start": 755,
|
|
"length": 170,
|
|
"filename_used": "/GENERIC_PATH",
|
|
"filename_relative": "tests/detectors/reentrancy-benign/0.4.25/reentrancy-benign.sol",
|
|
"filename_absolute": "/GENERIC_PATH",
|
|
"filename_short": "tests/detectors/reentrancy-benign/0.4.25/reentrancy-benign.sol",
|
|
"is_dependency": false,
|
|
"lines": [
|
|
37,
|
|
38,
|
|
39,
|
|
40,
|
|
41,
|
|
42
|
|
],
|
|
"starting_column": 5,
|
|
"ending_column": 6
|
|
},
|
|
"type_specific_fields": {
|
|
"parent": {
|
|
"type": "contract",
|
|
"name": "ReentrancyBenign",
|
|
"source_mapping": {
|
|
"start": 25,
|
|
"length": 1304,
|
|
"filename_used": "/GENERIC_PATH",
|
|
"filename_relative": "tests/detectors/reentrancy-benign/0.4.25/reentrancy-benign.sol",
|
|
"filename_absolute": "/GENERIC_PATH",
|
|
"filename_short": "tests/detectors/reentrancy-benign/0.4.25/reentrancy-benign.sol",
|
|
"is_dependency": false,
|
|
"lines": [
|
|
3,
|
|
4,
|
|
5,
|
|
6,
|
|
7,
|
|
8,
|
|
9,
|
|
10,
|
|
11,
|
|
12,
|
|
13,
|
|
14,
|
|
15,
|
|
16,
|
|
17,
|
|
18,
|
|
19,
|
|
20,
|
|
21,
|
|
22,
|
|
23,
|
|
24,
|
|
25,
|
|
26,
|
|
27,
|
|
28,
|
|
29,
|
|
30,
|
|
31,
|
|
32,
|
|
33,
|
|
34,
|
|
35,
|
|
36,
|
|
37,
|
|
38,
|
|
39,
|
|
40,
|
|
41,
|
|
42,
|
|
43,
|
|
44,
|
|
45,
|
|
46,
|
|
47,
|
|
48,
|
|
49,
|
|
50,
|
|
51,
|
|
52,
|
|
53,
|
|
54,
|
|
55,
|
|
56,
|
|
57,
|
|
58,
|
|
59,
|
|
60,
|
|
61,
|
|
62
|
|
],
|
|
"starting_column": 1,
|
|
"ending_column": 0
|
|
}
|
|
},
|
|
"signature": "bad4(address)"
|
|
}
|
|
}
|
|
},
|
|
"additional_fields": {
|
|
"underlying_type": "external_calls"
|
|
}
|
|
},
|
|
{
|
|
"type": "node",
|
|
"name": "address(target).call.value(1)()",
|
|
"source_mapping": {
|
|
"start": 1211,
|
|
"length": 31,
|
|
"filename_used": "/GENERIC_PATH",
|
|
"filename_relative": "tests/detectors/reentrancy-benign/0.4.25/reentrancy-benign.sol",
|
|
"filename_absolute": "/GENERIC_PATH",
|
|
"filename_short": "tests/detectors/reentrancy-benign/0.4.25/reentrancy-benign.sol",
|
|
"is_dependency": false,
|
|
"lines": [
|
|
55
|
|
],
|
|
"starting_column": 9,
|
|
"ending_column": 40
|
|
},
|
|
"type_specific_fields": {
|
|
"parent": {
|
|
"type": "function",
|
|
"name": "ethSender",
|
|
"source_mapping": {
|
|
"start": 1158,
|
|
"length": 91,
|
|
"filename_used": "/GENERIC_PATH",
|
|
"filename_relative": "tests/detectors/reentrancy-benign/0.4.25/reentrancy-benign.sol",
|
|
"filename_absolute": "/GENERIC_PATH",
|
|
"filename_short": "tests/detectors/reentrancy-benign/0.4.25/reentrancy-benign.sol",
|
|
"is_dependency": false,
|
|
"lines": [
|
|
54,
|
|
55,
|
|
56
|
|
],
|
|
"starting_column": 5,
|
|
"ending_column": 6
|
|
},
|
|
"type_specific_fields": {
|
|
"parent": {
|
|
"type": "contract",
|
|
"name": "ReentrancyBenign",
|
|
"source_mapping": {
|
|
"start": 25,
|
|
"length": 1304,
|
|
"filename_used": "/GENERIC_PATH",
|
|
"filename_relative": "tests/detectors/reentrancy-benign/0.4.25/reentrancy-benign.sol",
|
|
"filename_absolute": "/GENERIC_PATH",
|
|
"filename_short": "tests/detectors/reentrancy-benign/0.4.25/reentrancy-benign.sol",
|
|
"is_dependency": false,
|
|
"lines": [
|
|
3,
|
|
4,
|
|
5,
|
|
6,
|
|
7,
|
|
8,
|
|
9,
|
|
10,
|
|
11,
|
|
12,
|
|
13,
|
|
14,
|
|
15,
|
|
16,
|
|
17,
|
|
18,
|
|
19,
|
|
20,
|
|
21,
|
|
22,
|
|
23,
|
|
24,
|
|
25,
|
|
26,
|
|
27,
|
|
28,
|
|
29,
|
|
30,
|
|
31,
|
|
32,
|
|
33,
|
|
34,
|
|
35,
|
|
36,
|
|
37,
|
|
38,
|
|
39,
|
|
40,
|
|
41,
|
|
42,
|
|
43,
|
|
44,
|
|
45,
|
|
46,
|
|
47,
|
|
48,
|
|
49,
|
|
50,
|
|
51,
|
|
52,
|
|
53,
|
|
54,
|
|
55,
|
|
56,
|
|
57,
|
|
58,
|
|
59,
|
|
60,
|
|
61,
|
|
62
|
|
],
|
|
"starting_column": 1,
|
|
"ending_column": 0
|
|
}
|
|
},
|
|
"signature": "ethSender(address)"
|
|
}
|
|
}
|
|
},
|
|
"additional_fields": {
|
|
"underlying_type": "external_calls_sending_eth"
|
|
}
|
|
},
|
|
{
|
|
"type": "node",
|
|
"name": "externalCaller(target)",
|
|
"source_mapping": {
|
|
"start": 802,
|
|
"length": 22,
|
|
"filename_used": "/GENERIC_PATH",
|
|
"filename_relative": "tests/detectors/reentrancy-benign/0.4.25/reentrancy-benign.sol",
|
|
"filename_absolute": "/GENERIC_PATH",
|
|
"filename_short": "tests/detectors/reentrancy-benign/0.4.25/reentrancy-benign.sol",
|
|
"is_dependency": false,
|
|
"lines": [
|
|
38
|
|
],
|
|
"starting_column": 9,
|
|
"ending_column": 31
|
|
},
|
|
"type_specific_fields": {
|
|
"parent": {
|
|
"type": "function",
|
|
"name": "bad4",
|
|
"source_mapping": {
|
|
"start": 755,
|
|
"length": 170,
|
|
"filename_used": "/GENERIC_PATH",
|
|
"filename_relative": "tests/detectors/reentrancy-benign/0.4.25/reentrancy-benign.sol",
|
|
"filename_absolute": "/GENERIC_PATH",
|
|
"filename_short": "tests/detectors/reentrancy-benign/0.4.25/reentrancy-benign.sol",
|
|
"is_dependency": false,
|
|
"lines": [
|
|
37,
|
|
38,
|
|
39,
|
|
40,
|
|
41,
|
|
42
|
|
],
|
|
"starting_column": 5,
|
|
"ending_column": 6
|
|
},
|
|
"type_specific_fields": {
|
|
"parent": {
|
|
"type": "contract",
|
|
"name": "ReentrancyBenign",
|
|
"source_mapping": {
|
|
"start": 25,
|
|
"length": 1304,
|
|
"filename_used": "/GENERIC_PATH",
|
|
"filename_relative": "tests/detectors/reentrancy-benign/0.4.25/reentrancy-benign.sol",
|
|
"filename_absolute": "/GENERIC_PATH",
|
|
"filename_short": "tests/detectors/reentrancy-benign/0.4.25/reentrancy-benign.sol",
|
|
"is_dependency": false,
|
|
"lines": [
|
|
3,
|
|
4,
|
|
5,
|
|
6,
|
|
7,
|
|
8,
|
|
9,
|
|
10,
|
|
11,
|
|
12,
|
|
13,
|
|
14,
|
|
15,
|
|
16,
|
|
17,
|
|
18,
|
|
19,
|
|
20,
|
|
21,
|
|
22,
|
|
23,
|
|
24,
|
|
25,
|
|
26,
|
|
27,
|
|
28,
|
|
29,
|
|
30,
|
|
31,
|
|
32,
|
|
33,
|
|
34,
|
|
35,
|
|
36,
|
|
37,
|
|
38,
|
|
39,
|
|
40,
|
|
41,
|
|
42,
|
|
43,
|
|
44,
|
|
45,
|
|
46,
|
|
47,
|
|
48,
|
|
49,
|
|
50,
|
|
51,
|
|
52,
|
|
53,
|
|
54,
|
|
55,
|
|
56,
|
|
57,
|
|
58,
|
|
59,
|
|
60,
|
|
61,
|
|
62
|
|
],
|
|
"starting_column": 1,
|
|
"ending_column": 0
|
|
}
|
|
},
|
|
"signature": "bad4(address)"
|
|
}
|
|
}
|
|
},
|
|
"additional_fields": {
|
|
"underlying_type": "external_calls_sending_eth"
|
|
}
|
|
},
|
|
{
|
|
"type": "node",
|
|
"name": "address(target).call()",
|
|
"source_mapping": {
|
|
"start": 1123,
|
|
"length": 22,
|
|
"filename_used": "/GENERIC_PATH",
|
|
"filename_relative": "tests/detectors/reentrancy-benign/0.4.25/reentrancy-benign.sol",
|
|
"filename_absolute": "/GENERIC_PATH",
|
|
"filename_short": "tests/detectors/reentrancy-benign/0.4.25/reentrancy-benign.sol",
|
|
"is_dependency": false,
|
|
"lines": [
|
|
51
|
|
],
|
|
"starting_column": 9,
|
|
"ending_column": 31
|
|
},
|
|
"type_specific_fields": {
|
|
"parent": {
|
|
"type": "function",
|
|
"name": "externalCaller",
|
|
"source_mapping": {
|
|
"start": 1065,
|
|
"length": 87,
|
|
"filename_used": "/GENERIC_PATH",
|
|
"filename_relative": "tests/detectors/reentrancy-benign/0.4.25/reentrancy-benign.sol",
|
|
"filename_absolute": "/GENERIC_PATH",
|
|
"filename_short": "tests/detectors/reentrancy-benign/0.4.25/reentrancy-benign.sol",
|
|
"is_dependency": false,
|
|
"lines": [
|
|
50,
|
|
51,
|
|
52
|
|
],
|
|
"starting_column": 5,
|
|
"ending_column": 6
|
|
},
|
|
"type_specific_fields": {
|
|
"parent": {
|
|
"type": "contract",
|
|
"name": "ReentrancyBenign",
|
|
"source_mapping": {
|
|
"start": 25,
|
|
"length": 1304,
|
|
"filename_used": "/GENERIC_PATH",
|
|
"filename_relative": "tests/detectors/reentrancy-benign/0.4.25/reentrancy-benign.sol",
|
|
"filename_absolute": "/GENERIC_PATH",
|
|
"filename_short": "tests/detectors/reentrancy-benign/0.4.25/reentrancy-benign.sol",
|
|
"is_dependency": false,
|
|
"lines": [
|
|
3,
|
|
4,
|
|
5,
|
|
6,
|
|
7,
|
|
8,
|
|
9,
|
|
10,
|
|
11,
|
|
12,
|
|
13,
|
|
14,
|
|
15,
|
|
16,
|
|
17,
|
|
18,
|
|
19,
|
|
20,
|
|
21,
|
|
22,
|
|
23,
|
|
24,
|
|
25,
|
|
26,
|
|
27,
|
|
28,
|
|
29,
|
|
30,
|
|
31,
|
|
32,
|
|
33,
|
|
34,
|
|
35,
|
|
36,
|
|
37,
|
|
38,
|
|
39,
|
|
40,
|
|
41,
|
|
42,
|
|
43,
|
|
44,
|
|
45,
|
|
46,
|
|
47,
|
|
48,
|
|
49,
|
|
50,
|
|
51,
|
|
52,
|
|
53,
|
|
54,
|
|
55,
|
|
56,
|
|
57,
|
|
58,
|
|
59,
|
|
60,
|
|
61,
|
|
62
|
|
],
|
|
"starting_column": 1,
|
|
"ending_column": 0
|
|
}
|
|
},
|
|
"signature": "externalCaller(address)"
|
|
}
|
|
}
|
|
},
|
|
"additional_fields": {
|
|
"underlying_type": "external_calls_sending_eth"
|
|
}
|
|
},
|
|
{
|
|
"type": "node",
|
|
"name": "ethSender(address(0))",
|
|
"source_mapping": {
|
|
"start": 834,
|
|
"length": 21,
|
|
"filename_used": "/GENERIC_PATH",
|
|
"filename_relative": "tests/detectors/reentrancy-benign/0.4.25/reentrancy-benign.sol",
|
|
"filename_absolute": "/GENERIC_PATH",
|
|
"filename_short": "tests/detectors/reentrancy-benign/0.4.25/reentrancy-benign.sol",
|
|
"is_dependency": false,
|
|
"lines": [
|
|
39
|
|
],
|
|
"starting_column": 9,
|
|
"ending_column": 30
|
|
},
|
|
"type_specific_fields": {
|
|
"parent": {
|
|
"type": "function",
|
|
"name": "bad4",
|
|
"source_mapping": {
|
|
"start": 755,
|
|
"length": 170,
|
|
"filename_used": "/GENERIC_PATH",
|
|
"filename_relative": "tests/detectors/reentrancy-benign/0.4.25/reentrancy-benign.sol",
|
|
"filename_absolute": "/GENERIC_PATH",
|
|
"filename_short": "tests/detectors/reentrancy-benign/0.4.25/reentrancy-benign.sol",
|
|
"is_dependency": false,
|
|
"lines": [
|
|
37,
|
|
38,
|
|
39,
|
|
40,
|
|
41,
|
|
42
|
|
],
|
|
"starting_column": 5,
|
|
"ending_column": 6
|
|
},
|
|
"type_specific_fields": {
|
|
"parent": {
|
|
"type": "contract",
|
|
"name": "ReentrancyBenign",
|
|
"source_mapping": {
|
|
"start": 25,
|
|
"length": 1304,
|
|
"filename_used": "/GENERIC_PATH",
|
|
"filename_relative": "tests/detectors/reentrancy-benign/0.4.25/reentrancy-benign.sol",
|
|
"filename_absolute": "/GENERIC_PATH",
|
|
"filename_short": "tests/detectors/reentrancy-benign/0.4.25/reentrancy-benign.sol",
|
|
"is_dependency": false,
|
|
"lines": [
|
|
3,
|
|
4,
|
|
5,
|
|
6,
|
|
7,
|
|
8,
|
|
9,
|
|
10,
|
|
11,
|
|
12,
|
|
13,
|
|
14,
|
|
15,
|
|
16,
|
|
17,
|
|
18,
|
|
19,
|
|
20,
|
|
21,
|
|
22,
|
|
23,
|
|
24,
|
|
25,
|
|
26,
|
|
27,
|
|
28,
|
|
29,
|
|
30,
|
|
31,
|
|
32,
|
|
33,
|
|
34,
|
|
35,
|
|
36,
|
|
37,
|
|
38,
|
|
39,
|
|
40,
|
|
41,
|
|
42,
|
|
43,
|
|
44,
|
|
45,
|
|
46,
|
|
47,
|
|
48,
|
|
49,
|
|
50,
|
|
51,
|
|
52,
|
|
53,
|
|
54,
|
|
55,
|
|
56,
|
|
57,
|
|
58,
|
|
59,
|
|
60,
|
|
61,
|
|
62
|
|
],
|
|
"starting_column": 1,
|
|
"ending_column": 0
|
|
}
|
|
},
|
|
"signature": "bad4(address)"
|
|
}
|
|
}
|
|
},
|
|
"additional_fields": {
|
|
"underlying_type": "external_calls_sending_eth"
|
|
}
|
|
},
|
|
{
|
|
"type": "node",
|
|
"name": "address(target).call.value(1)()",
|
|
"source_mapping": {
|
|
"start": 1211,
|
|
"length": 31,
|
|
"filename_used": "/GENERIC_PATH",
|
|
"filename_relative": "tests/detectors/reentrancy-benign/0.4.25/reentrancy-benign.sol",
|
|
"filename_absolute": "/GENERIC_PATH",
|
|
"filename_short": "tests/detectors/reentrancy-benign/0.4.25/reentrancy-benign.sol",
|
|
"is_dependency": false,
|
|
"lines": [
|
|
55
|
|
],
|
|
"starting_column": 9,
|
|
"ending_column": 40
|
|
},
|
|
"type_specific_fields": {
|
|
"parent": {
|
|
"type": "function",
|
|
"name": "ethSender",
|
|
"source_mapping": {
|
|
"start": 1158,
|
|
"length": 91,
|
|
"filename_used": "/GENERIC_PATH",
|
|
"filename_relative": "tests/detectors/reentrancy-benign/0.4.25/reentrancy-benign.sol",
|
|
"filename_absolute": "/GENERIC_PATH",
|
|
"filename_short": "tests/detectors/reentrancy-benign/0.4.25/reentrancy-benign.sol",
|
|
"is_dependency": false,
|
|
"lines": [
|
|
54,
|
|
55,
|
|
56
|
|
],
|
|
"starting_column": 5,
|
|
"ending_column": 6
|
|
},
|
|
"type_specific_fields": {
|
|
"parent": {
|
|
"type": "contract",
|
|
"name": "ReentrancyBenign",
|
|
"source_mapping": {
|
|
"start": 25,
|
|
"length": 1304,
|
|
"filename_used": "/GENERIC_PATH",
|
|
"filename_relative": "tests/detectors/reentrancy-benign/0.4.25/reentrancy-benign.sol",
|
|
"filename_absolute": "/GENERIC_PATH",
|
|
"filename_short": "tests/detectors/reentrancy-benign/0.4.25/reentrancy-benign.sol",
|
|
"is_dependency": false,
|
|
"lines": [
|
|
3,
|
|
4,
|
|
5,
|
|
6,
|
|
7,
|
|
8,
|
|
9,
|
|
10,
|
|
11,
|
|
12,
|
|
13,
|
|
14,
|
|
15,
|
|
16,
|
|
17,
|
|
18,
|
|
19,
|
|
20,
|
|
21,
|
|
22,
|
|
23,
|
|
24,
|
|
25,
|
|
26,
|
|
27,
|
|
28,
|
|
29,
|
|
30,
|
|
31,
|
|
32,
|
|
33,
|
|
34,
|
|
35,
|
|
36,
|
|
37,
|
|
38,
|
|
39,
|
|
40,
|
|
41,
|
|
42,
|
|
43,
|
|
44,
|
|
45,
|
|
46,
|
|
47,
|
|
48,
|
|
49,
|
|
50,
|
|
51,
|
|
52,
|
|
53,
|
|
54,
|
|
55,
|
|
56,
|
|
57,
|
|
58,
|
|
59,
|
|
60,
|
|
61,
|
|
62
|
|
],
|
|
"starting_column": 1,
|
|
"ending_column": 0
|
|
}
|
|
},
|
|
"signature": "ethSender(address)"
|
|
}
|
|
}
|
|
},
|
|
"additional_fields": {
|
|
"underlying_type": "external_calls_sending_eth"
|
|
}
|
|
},
|
|
{
|
|
"type": "node",
|
|
"name": "varChanger()",
|
|
"source_mapping": {
|
|
"start": 865,
|
|
"length": 12,
|
|
"filename_used": "/GENERIC_PATH",
|
|
"filename_relative": "tests/detectors/reentrancy-benign/0.4.25/reentrancy-benign.sol",
|
|
"filename_absolute": "/GENERIC_PATH",
|
|
"filename_short": "tests/detectors/reentrancy-benign/0.4.25/reentrancy-benign.sol",
|
|
"is_dependency": false,
|
|
"lines": [
|
|
40
|
|
],
|
|
"starting_column": 9,
|
|
"ending_column": 21
|
|
},
|
|
"type_specific_fields": {
|
|
"parent": {
|
|
"type": "function",
|
|
"name": "bad4",
|
|
"source_mapping": {
|
|
"start": 755,
|
|
"length": 170,
|
|
"filename_used": "/GENERIC_PATH",
|
|
"filename_relative": "tests/detectors/reentrancy-benign/0.4.25/reentrancy-benign.sol",
|
|
"filename_absolute": "/GENERIC_PATH",
|
|
"filename_short": "tests/detectors/reentrancy-benign/0.4.25/reentrancy-benign.sol",
|
|
"is_dependency": false,
|
|
"lines": [
|
|
37,
|
|
38,
|
|
39,
|
|
40,
|
|
41,
|
|
42
|
|
],
|
|
"starting_column": 5,
|
|
"ending_column": 6
|
|
},
|
|
"type_specific_fields": {
|
|
"parent": {
|
|
"type": "contract",
|
|
"name": "ReentrancyBenign",
|
|
"source_mapping": {
|
|
"start": 25,
|
|
"length": 1304,
|
|
"filename_used": "/GENERIC_PATH",
|
|
"filename_relative": "tests/detectors/reentrancy-benign/0.4.25/reentrancy-benign.sol",
|
|
"filename_absolute": "/GENERIC_PATH",
|
|
"filename_short": "tests/detectors/reentrancy-benign/0.4.25/reentrancy-benign.sol",
|
|
"is_dependency": false,
|
|
"lines": [
|
|
3,
|
|
4,
|
|
5,
|
|
6,
|
|
7,
|
|
8,
|
|
9,
|
|
10,
|
|
11,
|
|
12,
|
|
13,
|
|
14,
|
|
15,
|
|
16,
|
|
17,
|
|
18,
|
|
19,
|
|
20,
|
|
21,
|
|
22,
|
|
23,
|
|
24,
|
|
25,
|
|
26,
|
|
27,
|
|
28,
|
|
29,
|
|
30,
|
|
31,
|
|
32,
|
|
33,
|
|
34,
|
|
35,
|
|
36,
|
|
37,
|
|
38,
|
|
39,
|
|
40,
|
|
41,
|
|
42,
|
|
43,
|
|
44,
|
|
45,
|
|
46,
|
|
47,
|
|
48,
|
|
49,
|
|
50,
|
|
51,
|
|
52,
|
|
53,
|
|
54,
|
|
55,
|
|
56,
|
|
57,
|
|
58,
|
|
59,
|
|
60,
|
|
61,
|
|
62
|
|
],
|
|
"starting_column": 1,
|
|
"ending_column": 0
|
|
}
|
|
},
|
|
"signature": "bad4(address)"
|
|
}
|
|
}
|
|
},
|
|
"additional_fields": {
|
|
"underlying_type": "variables_written",
|
|
"variable_name": "anotherVariableToChange"
|
|
}
|
|
},
|
|
{
|
|
"type": "node",
|
|
"name": "anotherVariableToChange ++",
|
|
"source_mapping": {
|
|
"start": 1295,
|
|
"length": 25,
|
|
"filename_used": "/GENERIC_PATH",
|
|
"filename_relative": "tests/detectors/reentrancy-benign/0.4.25/reentrancy-benign.sol",
|
|
"filename_absolute": "/GENERIC_PATH",
|
|
"filename_short": "tests/detectors/reentrancy-benign/0.4.25/reentrancy-benign.sol",
|
|
"is_dependency": false,
|
|
"lines": [
|
|
59
|
|
],
|
|
"starting_column": 9,
|
|
"ending_column": 34
|
|
},
|
|
"type_specific_fields": {
|
|
"parent": {
|
|
"type": "function",
|
|
"name": "varChanger",
|
|
"source_mapping": {
|
|
"start": 1255,
|
|
"length": 72,
|
|
"filename_used": "/GENERIC_PATH",
|
|
"filename_relative": "tests/detectors/reentrancy-benign/0.4.25/reentrancy-benign.sol",
|
|
"filename_absolute": "/GENERIC_PATH",
|
|
"filename_short": "tests/detectors/reentrancy-benign/0.4.25/reentrancy-benign.sol",
|
|
"is_dependency": false,
|
|
"lines": [
|
|
58,
|
|
59,
|
|
60
|
|
],
|
|
"starting_column": 5,
|
|
"ending_column": 6
|
|
},
|
|
"type_specific_fields": {
|
|
"parent": {
|
|
"type": "contract",
|
|
"name": "ReentrancyBenign",
|
|
"source_mapping": {
|
|
"start": 25,
|
|
"length": 1304,
|
|
"filename_used": "/GENERIC_PATH",
|
|
"filename_relative": "tests/detectors/reentrancy-benign/0.4.25/reentrancy-benign.sol",
|
|
"filename_absolute": "/GENERIC_PATH",
|
|
"filename_short": "tests/detectors/reentrancy-benign/0.4.25/reentrancy-benign.sol",
|
|
"is_dependency": false,
|
|
"lines": [
|
|
3,
|
|
4,
|
|
5,
|
|
6,
|
|
7,
|
|
8,
|
|
9,
|
|
10,
|
|
11,
|
|
12,
|
|
13,
|
|
14,
|
|
15,
|
|
16,
|
|
17,
|
|
18,
|
|
19,
|
|
20,
|
|
21,
|
|
22,
|
|
23,
|
|
24,
|
|
25,
|
|
26,
|
|
27,
|
|
28,
|
|
29,
|
|
30,
|
|
31,
|
|
32,
|
|
33,
|
|
34,
|
|
35,
|
|
36,
|
|
37,
|
|
38,
|
|
39,
|
|
40,
|
|
41,
|
|
42,
|
|
43,
|
|
44,
|
|
45,
|
|
46,
|
|
47,
|
|
48,
|
|
49,
|
|
50,
|
|
51,
|
|
52,
|
|
53,
|
|
54,
|
|
55,
|
|
56,
|
|
57,
|
|
58,
|
|
59,
|
|
60,
|
|
61,
|
|
62
|
|
],
|
|
"starting_column": 1,
|
|
"ending_column": 0
|
|
}
|
|
},
|
|
"signature": "varChanger()"
|
|
}
|
|
}
|
|
},
|
|
"additional_fields": {
|
|
"underlying_type": "variables_written",
|
|
"variable_name": "anotherVariableToChange"
|
|
}
|
|
}
|
|
],
|
|
"description": "Reentrancy in ReentrancyBenign.bad4(address) (tests/detectors/reentrancy-benign/0.4.25/reentrancy-benign.sol#37-42):\n\tExternal calls:\n\t- externalCaller(target) (tests/detectors/reentrancy-benign/0.4.25/reentrancy-benign.sol#38)\n\t\t- address(target).call() (tests/detectors/reentrancy-benign/0.4.25/reentrancy-benign.sol#51)\n\t- ethSender(address(0)) (tests/detectors/reentrancy-benign/0.4.25/reentrancy-benign.sol#39)\n\t\t- address(target).call.value(1)() (tests/detectors/reentrancy-benign/0.4.25/reentrancy-benign.sol#55)\n\tExternal calls sending eth:\n\t- ethSender(address(0)) (tests/detectors/reentrancy-benign/0.4.25/reentrancy-benign.sol#39)\n\t\t- address(target).call.value(1)() (tests/detectors/reentrancy-benign/0.4.25/reentrancy-benign.sol#55)\n\tState variables written after the call(s):\n\t- varChanger() (tests/detectors/reentrancy-benign/0.4.25/reentrancy-benign.sol#40)\n\t\t- anotherVariableToChange ++ (tests/detectors/reentrancy-benign/0.4.25/reentrancy-benign.sol#59)\n",
|
|
"markdown": "Reentrancy in [ReentrancyBenign.bad4(address)](tests/detectors/reentrancy-benign/0.4.25/reentrancy-benign.sol#L37-L42):\n\tExternal calls:\n\t- [externalCaller(target)](tests/detectors/reentrancy-benign/0.4.25/reentrancy-benign.sol#L38)\n\t\t- [address(target).call()](tests/detectors/reentrancy-benign/0.4.25/reentrancy-benign.sol#L51)\n\t- [ethSender(address(0))](tests/detectors/reentrancy-benign/0.4.25/reentrancy-benign.sol#L39)\n\t\t- [address(target).call.value(1)()](tests/detectors/reentrancy-benign/0.4.25/reentrancy-benign.sol#L55)\n\tExternal calls sending eth:\n\t- [ethSender(address(0))](tests/detectors/reentrancy-benign/0.4.25/reentrancy-benign.sol#L39)\n\t\t- [address(target).call.value(1)()](tests/detectors/reentrancy-benign/0.4.25/reentrancy-benign.sol#L55)\n\tState variables written after the call(s):\n\t- [varChanger()](tests/detectors/reentrancy-benign/0.4.25/reentrancy-benign.sol#L40)\n\t\t- [anotherVariableToChange ++](tests/detectors/reentrancy-benign/0.4.25/reentrancy-benign.sol#L59)\n",
|
|
"first_markdown_element": "tests/detectors/reentrancy-benign/0.4.25/reentrancy-benign.sol#L37-L42",
|
|
"id": "f8ae59addfdbac8f20e5440f9a184916be6ddefc82424d7c3f29a226c4f2795f",
|
|
"check": "reentrancy-benign",
|
|
"impact": "Low",
|
|
"confidence": "Medium"
|
|
},
|
|
{
|
|
"elements": [
|
|
{
|
|
"type": "function",
|
|
"name": "bad5",
|
|
"source_mapping": {
|
|
"start": 931,
|
|
"length": 128,
|
|
"filename_used": "/GENERIC_PATH",
|
|
"filename_relative": "tests/detectors/reentrancy-benign/0.4.25/reentrancy-benign.sol",
|
|
"filename_absolute": "/GENERIC_PATH",
|
|
"filename_short": "tests/detectors/reentrancy-benign/0.4.25/reentrancy-benign.sol",
|
|
"is_dependency": false,
|
|
"lines": [
|
|
44,
|
|
45,
|
|
46,
|
|
47,
|
|
48
|
|
],
|
|
"starting_column": 5,
|
|
"ending_column": 6
|
|
},
|
|
"type_specific_fields": {
|
|
"parent": {
|
|
"type": "contract",
|
|
"name": "ReentrancyBenign",
|
|
"source_mapping": {
|
|
"start": 25,
|
|
"length": 1304,
|
|
"filename_used": "/GENERIC_PATH",
|
|
"filename_relative": "tests/detectors/reentrancy-benign/0.4.25/reentrancy-benign.sol",
|
|
"filename_absolute": "/GENERIC_PATH",
|
|
"filename_short": "tests/detectors/reentrancy-benign/0.4.25/reentrancy-benign.sol",
|
|
"is_dependency": false,
|
|
"lines": [
|
|
3,
|
|
4,
|
|
5,
|
|
6,
|
|
7,
|
|
8,
|
|
9,
|
|
10,
|
|
11,
|
|
12,
|
|
13,
|
|
14,
|
|
15,
|
|
16,
|
|
17,
|
|
18,
|
|
19,
|
|
20,
|
|
21,
|
|
22,
|
|
23,
|
|
24,
|
|
25,
|
|
26,
|
|
27,
|
|
28,
|
|
29,
|
|
30,
|
|
31,
|
|
32,
|
|
33,
|
|
34,
|
|
35,
|
|
36,
|
|
37,
|
|
38,
|
|
39,
|
|
40,
|
|
41,
|
|
42,
|
|
43,
|
|
44,
|
|
45,
|
|
46,
|
|
47,
|
|
48,
|
|
49,
|
|
50,
|
|
51,
|
|
52,
|
|
53,
|
|
54,
|
|
55,
|
|
56,
|
|
57,
|
|
58,
|
|
59,
|
|
60,
|
|
61,
|
|
62
|
|
],
|
|
"starting_column": 1,
|
|
"ending_column": 0
|
|
}
|
|
},
|
|
"signature": "bad5(address)"
|
|
}
|
|
},
|
|
{
|
|
"type": "node",
|
|
"name": "ethSender(address(0))",
|
|
"source_mapping": {
|
|
"start": 978,
|
|
"length": 21,
|
|
"filename_used": "/GENERIC_PATH",
|
|
"filename_relative": "tests/detectors/reentrancy-benign/0.4.25/reentrancy-benign.sol",
|
|
"filename_absolute": "/GENERIC_PATH",
|
|
"filename_short": "tests/detectors/reentrancy-benign/0.4.25/reentrancy-benign.sol",
|
|
"is_dependency": false,
|
|
"lines": [
|
|
45
|
|
],
|
|
"starting_column": 9,
|
|
"ending_column": 30
|
|
},
|
|
"type_specific_fields": {
|
|
"parent": {
|
|
"type": "function",
|
|
"name": "bad5",
|
|
"source_mapping": {
|
|
"start": 931,
|
|
"length": 128,
|
|
"filename_used": "/GENERIC_PATH",
|
|
"filename_relative": "tests/detectors/reentrancy-benign/0.4.25/reentrancy-benign.sol",
|
|
"filename_absolute": "/GENERIC_PATH",
|
|
"filename_short": "tests/detectors/reentrancy-benign/0.4.25/reentrancy-benign.sol",
|
|
"is_dependency": false,
|
|
"lines": [
|
|
44,
|
|
45,
|
|
46,
|
|
47,
|
|
48
|
|
],
|
|
"starting_column": 5,
|
|
"ending_column": 6
|
|
},
|
|
"type_specific_fields": {
|
|
"parent": {
|
|
"type": "contract",
|
|
"name": "ReentrancyBenign",
|
|
"source_mapping": {
|
|
"start": 25,
|
|
"length": 1304,
|
|
"filename_used": "/GENERIC_PATH",
|
|
"filename_relative": "tests/detectors/reentrancy-benign/0.4.25/reentrancy-benign.sol",
|
|
"filename_absolute": "/GENERIC_PATH",
|
|
"filename_short": "tests/detectors/reentrancy-benign/0.4.25/reentrancy-benign.sol",
|
|
"is_dependency": false,
|
|
"lines": [
|
|
3,
|
|
4,
|
|
5,
|
|
6,
|
|
7,
|
|
8,
|
|
9,
|
|
10,
|
|
11,
|
|
12,
|
|
13,
|
|
14,
|
|
15,
|
|
16,
|
|
17,
|
|
18,
|
|
19,
|
|
20,
|
|
21,
|
|
22,
|
|
23,
|
|
24,
|
|
25,
|
|
26,
|
|
27,
|
|
28,
|
|
29,
|
|
30,
|
|
31,
|
|
32,
|
|
33,
|
|
34,
|
|
35,
|
|
36,
|
|
37,
|
|
38,
|
|
39,
|
|
40,
|
|
41,
|
|
42,
|
|
43,
|
|
44,
|
|
45,
|
|
46,
|
|
47,
|
|
48,
|
|
49,
|
|
50,
|
|
51,
|
|
52,
|
|
53,
|
|
54,
|
|
55,
|
|
56,
|
|
57,
|
|
58,
|
|
59,
|
|
60,
|
|
61,
|
|
62
|
|
],
|
|
"starting_column": 1,
|
|
"ending_column": 0
|
|
}
|
|
},
|
|
"signature": "bad5(address)"
|
|
}
|
|
}
|
|
},
|
|
"additional_fields": {
|
|
"underlying_type": "external_calls"
|
|
}
|
|
},
|
|
{
|
|
"type": "node",
|
|
"name": "address(target).call.value(1)()",
|
|
"source_mapping": {
|
|
"start": 1211,
|
|
"length": 31,
|
|
"filename_used": "/GENERIC_PATH",
|
|
"filename_relative": "tests/detectors/reentrancy-benign/0.4.25/reentrancy-benign.sol",
|
|
"filename_absolute": "/GENERIC_PATH",
|
|
"filename_short": "tests/detectors/reentrancy-benign/0.4.25/reentrancy-benign.sol",
|
|
"is_dependency": false,
|
|
"lines": [
|
|
55
|
|
],
|
|
"starting_column": 9,
|
|
"ending_column": 40
|
|
},
|
|
"type_specific_fields": {
|
|
"parent": {
|
|
"type": "function",
|
|
"name": "ethSender",
|
|
"source_mapping": {
|
|
"start": 1158,
|
|
"length": 91,
|
|
"filename_used": "/GENERIC_PATH",
|
|
"filename_relative": "tests/detectors/reentrancy-benign/0.4.25/reentrancy-benign.sol",
|
|
"filename_absolute": "/GENERIC_PATH",
|
|
"filename_short": "tests/detectors/reentrancy-benign/0.4.25/reentrancy-benign.sol",
|
|
"is_dependency": false,
|
|
"lines": [
|
|
54,
|
|
55,
|
|
56
|
|
],
|
|
"starting_column": 5,
|
|
"ending_column": 6
|
|
},
|
|
"type_specific_fields": {
|
|
"parent": {
|
|
"type": "contract",
|
|
"name": "ReentrancyBenign",
|
|
"source_mapping": {
|
|
"start": 25,
|
|
"length": 1304,
|
|
"filename_used": "/GENERIC_PATH",
|
|
"filename_relative": "tests/detectors/reentrancy-benign/0.4.25/reentrancy-benign.sol",
|
|
"filename_absolute": "/GENERIC_PATH",
|
|
"filename_short": "tests/detectors/reentrancy-benign/0.4.25/reentrancy-benign.sol",
|
|
"is_dependency": false,
|
|
"lines": [
|
|
3,
|
|
4,
|
|
5,
|
|
6,
|
|
7,
|
|
8,
|
|
9,
|
|
10,
|
|
11,
|
|
12,
|
|
13,
|
|
14,
|
|
15,
|
|
16,
|
|
17,
|
|
18,
|
|
19,
|
|
20,
|
|
21,
|
|
22,
|
|
23,
|
|
24,
|
|
25,
|
|
26,
|
|
27,
|
|
28,
|
|
29,
|
|
30,
|
|
31,
|
|
32,
|
|
33,
|
|
34,
|
|
35,
|
|
36,
|
|
37,
|
|
38,
|
|
39,
|
|
40,
|
|
41,
|
|
42,
|
|
43,
|
|
44,
|
|
45,
|
|
46,
|
|
47,
|
|
48,
|
|
49,
|
|
50,
|
|
51,
|
|
52,
|
|
53,
|
|
54,
|
|
55,
|
|
56,
|
|
57,
|
|
58,
|
|
59,
|
|
60,
|
|
61,
|
|
62
|
|
],
|
|
"starting_column": 1,
|
|
"ending_column": 0
|
|
}
|
|
},
|
|
"signature": "ethSender(address)"
|
|
}
|
|
}
|
|
},
|
|
"additional_fields": {
|
|
"underlying_type": "external_calls_sending_eth"
|
|
}
|
|
},
|
|
{
|
|
"type": "node",
|
|
"name": "varChanger()",
|
|
"source_mapping": {
|
|
"start": 1009,
|
|
"length": 12,
|
|
"filename_used": "/GENERIC_PATH",
|
|
"filename_relative": "tests/detectors/reentrancy-benign/0.4.25/reentrancy-benign.sol",
|
|
"filename_absolute": "/GENERIC_PATH",
|
|
"filename_short": "tests/detectors/reentrancy-benign/0.4.25/reentrancy-benign.sol",
|
|
"is_dependency": false,
|
|
"lines": [
|
|
46
|
|
],
|
|
"starting_column": 9,
|
|
"ending_column": 21
|
|
},
|
|
"type_specific_fields": {
|
|
"parent": {
|
|
"type": "function",
|
|
"name": "bad5",
|
|
"source_mapping": {
|
|
"start": 931,
|
|
"length": 128,
|
|
"filename_used": "/GENERIC_PATH",
|
|
"filename_relative": "tests/detectors/reentrancy-benign/0.4.25/reentrancy-benign.sol",
|
|
"filename_absolute": "/GENERIC_PATH",
|
|
"filename_short": "tests/detectors/reentrancy-benign/0.4.25/reentrancy-benign.sol",
|
|
"is_dependency": false,
|
|
"lines": [
|
|
44,
|
|
45,
|
|
46,
|
|
47,
|
|
48
|
|
],
|
|
"starting_column": 5,
|
|
"ending_column": 6
|
|
},
|
|
"type_specific_fields": {
|
|
"parent": {
|
|
"type": "contract",
|
|
"name": "ReentrancyBenign",
|
|
"source_mapping": {
|
|
"start": 25,
|
|
"length": 1304,
|
|
"filename_used": "/GENERIC_PATH",
|
|
"filename_relative": "tests/detectors/reentrancy-benign/0.4.25/reentrancy-benign.sol",
|
|
"filename_absolute": "/GENERIC_PATH",
|
|
"filename_short": "tests/detectors/reentrancy-benign/0.4.25/reentrancy-benign.sol",
|
|
"is_dependency": false,
|
|
"lines": [
|
|
3,
|
|
4,
|
|
5,
|
|
6,
|
|
7,
|
|
8,
|
|
9,
|
|
10,
|
|
11,
|
|
12,
|
|
13,
|
|
14,
|
|
15,
|
|
16,
|
|
17,
|
|
18,
|
|
19,
|
|
20,
|
|
21,
|
|
22,
|
|
23,
|
|
24,
|
|
25,
|
|
26,
|
|
27,
|
|
28,
|
|
29,
|
|
30,
|
|
31,
|
|
32,
|
|
33,
|
|
34,
|
|
35,
|
|
36,
|
|
37,
|
|
38,
|
|
39,
|
|
40,
|
|
41,
|
|
42,
|
|
43,
|
|
44,
|
|
45,
|
|
46,
|
|
47,
|
|
48,
|
|
49,
|
|
50,
|
|
51,
|
|
52,
|
|
53,
|
|
54,
|
|
55,
|
|
56,
|
|
57,
|
|
58,
|
|
59,
|
|
60,
|
|
61,
|
|
62
|
|
],
|
|
"starting_column": 1,
|
|
"ending_column": 0
|
|
}
|
|
},
|
|
"signature": "bad5(address)"
|
|
}
|
|
}
|
|
},
|
|
"additional_fields": {
|
|
"underlying_type": "variables_written",
|
|
"variable_name": "anotherVariableToChange"
|
|
}
|
|
},
|
|
{
|
|
"type": "node",
|
|
"name": "anotherVariableToChange ++",
|
|
"source_mapping": {
|
|
"start": 1295,
|
|
"length": 25,
|
|
"filename_used": "/GENERIC_PATH",
|
|
"filename_relative": "tests/detectors/reentrancy-benign/0.4.25/reentrancy-benign.sol",
|
|
"filename_absolute": "/GENERIC_PATH",
|
|
"filename_short": "tests/detectors/reentrancy-benign/0.4.25/reentrancy-benign.sol",
|
|
"is_dependency": false,
|
|
"lines": [
|
|
59
|
|
],
|
|
"starting_column": 9,
|
|
"ending_column": 34
|
|
},
|
|
"type_specific_fields": {
|
|
"parent": {
|
|
"type": "function",
|
|
"name": "varChanger",
|
|
"source_mapping": {
|
|
"start": 1255,
|
|
"length": 72,
|
|
"filename_used": "/GENERIC_PATH",
|
|
"filename_relative": "tests/detectors/reentrancy-benign/0.4.25/reentrancy-benign.sol",
|
|
"filename_absolute": "/GENERIC_PATH",
|
|
"filename_short": "tests/detectors/reentrancy-benign/0.4.25/reentrancy-benign.sol",
|
|
"is_dependency": false,
|
|
"lines": [
|
|
58,
|
|
59,
|
|
60
|
|
],
|
|
"starting_column": 5,
|
|
"ending_column": 6
|
|
},
|
|
"type_specific_fields": {
|
|
"parent": {
|
|
"type": "contract",
|
|
"name": "ReentrancyBenign",
|
|
"source_mapping": {
|
|
"start": 25,
|
|
"length": 1304,
|
|
"filename_used": "/GENERIC_PATH",
|
|
"filename_relative": "tests/detectors/reentrancy-benign/0.4.25/reentrancy-benign.sol",
|
|
"filename_absolute": "/GENERIC_PATH",
|
|
"filename_short": "tests/detectors/reentrancy-benign/0.4.25/reentrancy-benign.sol",
|
|
"is_dependency": false,
|
|
"lines": [
|
|
3,
|
|
4,
|
|
5,
|
|
6,
|
|
7,
|
|
8,
|
|
9,
|
|
10,
|
|
11,
|
|
12,
|
|
13,
|
|
14,
|
|
15,
|
|
16,
|
|
17,
|
|
18,
|
|
19,
|
|
20,
|
|
21,
|
|
22,
|
|
23,
|
|
24,
|
|
25,
|
|
26,
|
|
27,
|
|
28,
|
|
29,
|
|
30,
|
|
31,
|
|
32,
|
|
33,
|
|
34,
|
|
35,
|
|
36,
|
|
37,
|
|
38,
|
|
39,
|
|
40,
|
|
41,
|
|
42,
|
|
43,
|
|
44,
|
|
45,
|
|
46,
|
|
47,
|
|
48,
|
|
49,
|
|
50,
|
|
51,
|
|
52,
|
|
53,
|
|
54,
|
|
55,
|
|
56,
|
|
57,
|
|
58,
|
|
59,
|
|
60,
|
|
61,
|
|
62
|
|
],
|
|
"starting_column": 1,
|
|
"ending_column": 0
|
|
}
|
|
},
|
|
"signature": "varChanger()"
|
|
}
|
|
}
|
|
},
|
|
"additional_fields": {
|
|
"underlying_type": "variables_written",
|
|
"variable_name": "anotherVariableToChange"
|
|
}
|
|
}
|
|
],
|
|
"description": "Reentrancy in ReentrancyBenign.bad5(address) (tests/detectors/reentrancy-benign/0.4.25/reentrancy-benign.sol#44-48):\n\tExternal calls:\n\t- ethSender(address(0)) (tests/detectors/reentrancy-benign/0.4.25/reentrancy-benign.sol#45)\n\t\t- address(target).call.value(1)() (tests/detectors/reentrancy-benign/0.4.25/reentrancy-benign.sol#55)\n\tState variables written after the call(s):\n\t- varChanger() (tests/detectors/reentrancy-benign/0.4.25/reentrancy-benign.sol#46)\n\t\t- anotherVariableToChange ++ (tests/detectors/reentrancy-benign/0.4.25/reentrancy-benign.sol#59)\n",
|
|
"markdown": "Reentrancy in [ReentrancyBenign.bad5(address)](tests/detectors/reentrancy-benign/0.4.25/reentrancy-benign.sol#L44-L48):\n\tExternal calls:\n\t- [ethSender(address(0))](tests/detectors/reentrancy-benign/0.4.25/reentrancy-benign.sol#L45)\n\t\t- [address(target).call.value(1)()](tests/detectors/reentrancy-benign/0.4.25/reentrancy-benign.sol#L55)\n\tState variables written after the call(s):\n\t- [varChanger()](tests/detectors/reentrancy-benign/0.4.25/reentrancy-benign.sol#L46)\n\t\t- [anotherVariableToChange ++](tests/detectors/reentrancy-benign/0.4.25/reentrancy-benign.sol#L59)\n",
|
|
"first_markdown_element": "tests/detectors/reentrancy-benign/0.4.25/reentrancy-benign.sol#L44-L48",
|
|
"id": "944f4ca691fcae3a55ccd543406d1eb8e969ab1b5d716cc975d4656f998f08f9",
|
|
"check": "reentrancy-benign",
|
|
"impact": "Low",
|
|
"confidence": "Medium"
|
|
}
|
|
]
|
|
] |