programa-stic/barf-project

Error in translation of stack canary check to REIL instruction and SMT expression

chubbymaggie opened this issue · 3 comments

Hi,

I am getteting error when stack canary is tranalated to SMT expression. This is the error:
File "XXX/barf-project/barf/barf/analysis/codeanalyzer/codeanalyzer.py", line 313, in check_path_satisfiability
smt_mem_addr = smtlibv2.BitVec(32, "#x%08x" % instr.operands[0].name)
AttributeError: 'ReilImmediateOperand' object has no attribute 'name'

I think the error is caused by this instruction and the correspoding REIL tralanation:
mov eax, dword ptr gs:[0x14]
ldm [DWORD 0x14, EMPTY, DWORD t22]

Thank you.

Regards,
Maggie

Hi,

I've just pushed a fixed for this. The error should be gone but keep in mind
that translation is not complete for segments (as you see in the translation
it assumes that all segments have base address equal to 0x00000000).

Regards,
Christian

Thanks for the fix

You're welcome.