Skip to content

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

@keewenaw

Description

@keewenaw

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions