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

A bug in CheckpointHook causes false negatives #11

Open
yyyayo opened this issue Jun 19, 2022 · 1 comment
Open

A bug in CheckpointHook causes false negatives #11

yyyayo opened this issue Jun 19, 2022 · 1 comment

Comments

@yyyayo
Copy link

yyyayo commented Jun 19, 2022

I think the globals in self.state.globals.get('globals', None) should be sym_vars. This can make CheckpointHook discard some sym_vars and give false negatives. Could you have a check if there are similar problems?

class CheckpointHook(DefaultHook):
    def run(self, **kwargs):
        assert 'arg_num' in kwargs['kwargs']
        arg_num = kwargs['kwargs']['arg_num']
        if self.state.globals.get('globals', None) is None:
            self.state.globals['sym_vars'] = []
        if arg_num == 0:
            sym_var = claripy.BVS('ret', self.state.arch.bits)
            self.state.globals['sym_vars'].append(sym_var)
            return sym_var
@jkrshnmenon
Copy link
Owner

This looks certainly like a typo. Great catch!
Could you create a PR ?

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

2 participants