Skip to content

Insecure MemSet#2207

Draft
dave-bartolomeo wants to merge 1 commit into
github:mainfrom
dave-bartolomeo:dave/InsecureMemset
Draft

Insecure MemSet#2207
dave-bartolomeo wants to merge 1 commit into
github:mainfrom
dave-bartolomeo:dave/InsecureMemset

Conversation

@dave-bartolomeo

Copy link
Copy Markdown
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

geoffw0 commented Oct 28, 2019

Copy link
Copy Markdown
Contributor

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

jbj commented Oct 28, 2019

Copy link
Copy Markdown
Contributor

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
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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.

4 participants