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

Flaw in __get_related core logic #1679

Closed
smoelius opened this issue Apr 24, 2020 · 1 comment · Fixed by #1706
Closed

Flaw in __get_related core logic #1679

smoelius opened this issue Apr 24, 2020 · 1 comment · Fixed by #1706
Assignees
Labels
Projects

Comments

@smoelius
Copy link
Contributor

There is a flaw in how __get_related works: when called on certain unsatisfiable sets, it can return a satisfiable one. The flaw arises when:

  • self consists of a single constraint C
  • C is the value of the related_to parameter
  • C contains no variables
  • C is unsatisfiable

Since C contains no variables, it is not considered "related to" itself and is thrown out by __get_related. Since C was the sole element of self, __get_related returns the empty set. Thus, __get_related was called on an unsatisfiable set, {C}, but it returned a satisfiable one, {}.

I suspect this is the reason for #1678.

@ehennenfent
Copy link
Contributor

It looks like the changes introduced in #1674 introduce some problems of their own. In #1677, I discovered that we end up with constraint sets where constraints from the related set have the same name (but a different size) than constraints from the original set, which could probably lead to incorrect results from Z3. The old get_related logic seemed to handle some edge cases that the default case doesn't, so we should try to fix this soon.

Sam, do you have an existing example of the flaw above that you're able to share? If not, no worries - it should be easy enough to replicate from your description.

@MatthewARinehart MatthewARinehart added this to In progress in Manticore Jun 11, 2020
@ehennenfent ehennenfent linked a pull request Jun 11, 2020 that will close this issue
Manticore automation moved this from In progress to Done Jun 17, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
Manticore
  
Done
Development

Successfully merging a pull request may close this issue.

4 participants