Skip to content

Conversation

@jbj
Copy link
Contributor

@jbj jbj commented May 19, 2020

No description provided.

james and others added 12 commits May 12, 2020 11:33
Co-authored-by: Shati Patel <42641846+shati-patel@users.noreply.github.com>
CodeQL docs: remove information about metric queries
CodeQL docs migration: Delete `ql-spec` Sphinx project
This cleans up the test results, which were confusing because functions
like `sink` had multiple locations.

There are some additional results now involving casts to `const char *`
because previously it varied whether `sink` used `const`, and now it
always does.
CodeQL docs: remove stray GH variable
This test demonstrates that IR data flow conflates unrelated fields of a
global struct-typed variable and that this bug is not present in the old
AST-based implementation of `semmle.code.cpp.security.TaintTracking`.
The virtual-dispatch code for globals was missing any relationship
between the union field access and the global variable, which meant it
propagated function-pointer flow between any two fields of a global
struct. This resulted in false positives from
`cpp/tainted-format-string` on projects using SDL, such as
WohlSoft/PGE-Project.

In addition to fixing that bug, this commit also brings the code up to
date with the new style of modeling flow through global variables:
`DataFlow::Node.asVariable()`.
C++: Fix struct field conflation in IR data flow
@jbj jbj added the Mergeback label May 19, 2020
@jbj jbj requested review from a team, jf205 and shati-patel as code owners May 19, 2020 12:49
shati-patel
shati-patel previously approved these changes May 19, 2020
Copy link
Contributor

@shati-patel shati-patel left a comment

Choose a reason for hiding this comment

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

Documentation changes look good ✔️

Conflicts:
	cpp/ql/test/library-tests/dataflow/DefaultTaintTracking/tainted.expected
	cpp/ql/test/library-tests/dataflow/DefaultTaintTracking/test_diff.expected
@jbj
Copy link
Contributor Author

jbj commented May 19, 2020

A conflict appeared because #3511 was merged, so I merged from master into this PR to resolve it.

@hvitved hvitved merged commit f0f833b into github:master May 19, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants