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

Insecure MemSet #2207

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

dave-bartolomeo
Copy link
Contributor

This is @zlaski's insecure memset query, based on top of my PR to add the AliasedUse instruction. I've switched the dead code detection portion to be more general, which the AliasedUse instruction makes possible. I also extended the pointsIntoStack predicate to handle pointer arithmetic. Finally, I added an aliasing model for strcpy. With these three changes, the query detects 13 apparent true positives on the test cases, as opposed to 3 before the changes.

@geoffw0
Copy link
Contributor

geoffw0 commented Oct 28, 2019

Please could you link to the page for the original version, so I can see what was discussed there?

@geoffw0 geoffw0 added the C++ label Oct 28, 2019
@jbj
Copy link
Contributor

jbj commented Oct 28, 2019

If you mean the original version of the memset query, it's #1933.

@@ -0,0 +1,54 @@
/**
* @name Call to `memset` may be deleted
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why is this query in the test directory, rather than a .qlref? Where is the .expected for it?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Another question: is "my" version of the memset query (#1933) still necessary?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We'll at least want the qhelp from #1933, as well as any tests that didn't make it across.

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

Successfully merging this pull request may close these issues.

5 participants