Insecure MemSet#2207
Draft
dave-bartolomeo wants to merge 1 commit into
Draft
Conversation
Contributor
|
Please could you link to the page for the original version, so I can see what was discussed there? |
Contributor
|
If you mean the original version of the memset query, it's #1933. |
geoffw0
reviewed
Oct 29, 2019
| @@ -0,0 +1,54 @@ | |||
| /** | |||
| * @name Call to `memset` may be deleted | |||
Contributor
There was a problem hiding this comment.
Why is this query in the test directory, rather than a .qlref? Where is the .expected for it?
Contributor
There was a problem hiding this comment.
Another question: is "my" version of the memset query (#1933) still necessary?
Contributor
There was a problem hiding this comment.
We'll at least want the qhelp from #1933, as well as any tests that didn't make it across.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This is @zlaski's insecure memset query, based on top of my PR to add the
AliasedUseinstruction. I've switched the dead code detection portion to be more general, which theAliasedUseinstruction makes possible. I also extended thepointsIntoStackpredicate to handle pointer arithmetic. Finally, I added an aliasing model forstrcpy. With these three changes, the query detects 13 apparent true positives on the test cases, as opposed to 3 before the changes.