C++: Emulate old security library's use of predictable more accurately.#2760
Merged
jbj merged 8 commits intogithub:masterfrom Feb 6, 2020
Merged
C++: Emulate old security library's use of predictable more accurately.#2760jbj merged 8 commits intogithub:masterfrom
jbj merged 8 commits intogithub:masterfrom
Conversation
geoffw0
commented
Feb 4, 2020
geoffw0
commented
Feb 4, 2020
cpp/ql/src/semmle/code/cpp/ir/dataflow/DefaultTaintTracking.qll
Outdated
Show resolved
Hide resolved
8662271 to
5555077
Compare
Contributor
Author
|
Rebased, fixed merge conflict. |
jbj
reviewed
Feb 5, 2020
Contributor
jbj
left a comment
There was a problem hiding this comment.
Otherwise LGTM. I think you've struck the right balance here between legacy compatibility and future maintainability.
cpp/ql/src/semmle/code/cpp/ir/dataflow/DefaultTaintTracking.qll
Outdated
Show resolved
Hide resolved
Contributor
|
Two tests are failing. |
Contributor
Author
|
Fixed the failing tests (they were new tests, and I believe the changes are correct). |
7776986 to
2dfeafa
Compare
jbj
approved these changes
Feb 6, 2020
Contributor
|
In the PR description, should |
Contributor
Author
I don't think so, I only saw changes for IntegerOverflowTainted. Something else could've changed since the 30th of January though - when I got the version of master I tested this on. |
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.
Changes to the defaulttainttracking library, to make it emulate use of the old security taint tracking's
predictablepredicate more accurately. This resolves at least one of the issues listed in https://jira.semmle.com/browse/CPP-491:BAD, but it requires pointer analysis to catch), and this PR removes the FP but not the TP.Test changes examined:
^^^ these things weren't tainted with the old security taint tracking lib, and I don't think we want them, so these changes are desired.
^^^ these things weren't tainted with the old security taint tracking lib, and are labelled 'GOOD' in the source code, so these changes are desired.
^^^ this wasn't reported with the old security taint tracking lib, and is labelled 'OK' in the source code, so this change is desired.
^^^ the result on line 41 wasn't reported with the old security taint tracking lib either, but appears to be a TP result so I'm happy we leave it in.