Skip to content

Conversation

@aschackmull
Copy link
Contributor

Flow through a method involving a taint (aka additional) step followed by an upcast was accidentally pruned due to the types not matching in the forward and backward pruning sweeps inside the summarized method. This meant that although the nodes in the final path were preserved, the nodes inside the method were not, which in turn meant that the summarization could not be reconstructed in the final flow calculation. The fix is to preserve the final tracked type from a summarized method and use that instead of resetting the tracked type at the call site. Note that this type should not usually depend on the tracked type at method entry since it will be reset at least once when the flow through the method takes the necessary taint step.

@aschackmull aschackmull requested review from a team as code owners July 22, 2019 13:42
Copy link
Contributor

@yh-semmle yh-semmle left a comment

Choose a reason for hiding this comment

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

LGTM. Would anyone from @Semmle/cpp-analysis or @Semmle/cs like to take a look as well before I merge?

@aschackmull
Copy link
Contributor Author

C++ and C# are not yet using the type-pruning capabilities of the dataflow library, so they should be unaffected by this change.

@yh-semmle yh-semmle merged commit a42d9b1 into github:master Jul 25, 2019
@aschackmull aschackmull deleted the java/dataflow-prunetype-bugfix branch July 25, 2019 07:56
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.

2 participants