Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ERROR:Karl:Exception: 'NoneType' object is not subscriptable #204

Open
keewenaw opened this issue Jun 21, 2022 · 0 comments
Open

ERROR:Karl:Exception: 'NoneType' object is not subscriptable #204

keewenaw opened this issue Jun 21, 2022 · 0 comments

Comments

@keewenaw
Copy link

keewenaw commented Jun 21, 2022

Upon testing in Ganache, certain findings trigger the error **ERROR:Karl:Exception: 'NoneType' object is not subscriptable. An example smart contract on the mainenet that causes this is 0x1260ef3c37Cc4Bedf21D9f0AF4107F67F8E8297D.

Command ran:

./karl --rpc [Infura node] --sandbox=true --output folder --folder-output folder &

Console output:

INFO:Karl:Analyzing 0x1260ef3c37Cc4Bedf21D9f0AF4107F67F8E8297D 
[snip of code blocks]
INFO:Karl:Found 2 issue(s) 
INFO:Karl:Firing up sandbox tester 
**ERROR:Karl:Exception: 'NoneType' object is not subscriptable
<traceback object at 0x7f6226748880>** 

Findings file:

==== Integer Underflow ====
SWC ID: 101
Severity: High
Contract: 0x1260ef3c37Cc4Bedf21D9f0AF4107F67F8E8297D
Function name: setApprovalForAll(address,bool)
PC address: 5845
Estimated Gas Usage: 8138 - 29150
The binary subtraction can underflow.
The operands of the subtraction operation are not sufficiently constrained. The subtraction could therefore result in an integer underflow. Prevent the underflow by checking inputs or ensure sure that the underflow is caught by an assertion.

Initial State:

Account: [ATTACKER], balance: 0x0, nonce:0, storage:{}
Account: [SOMEGUY], balance: 0x0, nonce:0, storage:{}

Transaction Sequence:

Caller: [CREATOR], function: setApprovalForAll(address,bool), txdata: 0xa22cb465000000000000000000000000b00100000000000700000000000000ff500204010000000000000000000000000000000000000000000000000000000000000000, value: 0x0

==== Integer Underflow ====
SWC ID: 101
Severity: High
Contract: 0x1260ef3c37Cc4Bedf21D9f0AF4107F67F8E8297D
Function name: link_classic_internal(uint64,int64)
PC address: 8646
Estimated Gas Usage: 3453 - 4678
The binary subtraction can underflow.
The operands of the subtraction operation are not sufficiently constrained. The subtraction could therefore result in an integer underflow. Prevent the underflow by checking inputs or ensure sure that the underflow is caught by an assertion.

Initial State:

Account: [ATTACKER], balance: 0x0, nonce:0, storage:{}
Account: [SOMEGUY], balance: 0x0, nonce:0, storage:{}

Transaction Sequence:

Caller: [CREATOR], function: link_classic_internal(uint64,int64), txdata: 0x95d89b41, value: 0x0
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant