Skip to content
This repository has been archived by the owner on May 26, 2023. It is now read-only.

Reentrancy bug not recognized upon analyzing raw bytecode #172

Closed
noobdoesre opened this issue Aug 24, 2017 · 2 comments
Closed

Reentrancy bug not recognized upon analyzing raw bytecode #172

noobdoesre opened this issue Aug 24, 2017 · 2 comments

Comments

@noobdoesre
Copy link

Not sure whether it is a bug or tool limitation: when analyzing raw bytecode of simple contract with reentrancy bug oyente reports that it's not vulnerable, although when running it with --debug flag I see:

INFO:oyente.analysis:Reentrancy bug? True.

I looked into source code and seen this snippet in symExec.py:

    if not isTesting():
        s = ""
        if reentrancy_bug_found and source_map != None:
            pcs = global_problematic_pcs["reentrancy_bug"]
            pcs = [pc for pc in pcs if source_map.find_source_code(pc)]
            pcs = source_map.reduce_same_position_pcs(pcs)
            s = source_map.to_str(pcs, "Reentrancy bug")
        results["reentrancy"] = s
        s = "\t  Reentrancy bug: \t True" + s if s else "\t  Reentrancy bug: \t False"
        log.info(s)

Seems like reentrancy bug can only 'recognized' when there is source code present. Is this a bug or is it an intended behaviour?

@luongnt95
Copy link
Contributor

Thanks @noobdoesres. This is a bug and it will be fixed soon.

@luongnt95
Copy link
Contributor

@noobdoesre The bug is fixed now. You can pull the latest code to run.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Development

No branches or pull requests

2 participants