Mathias Vorreiter Pedersen
8c615ece8a
Merge pull request #4292 from MathiasVP/mathiasvp/cache-simpleLocalFlowStep
...
C++: Cache simpleLocalFlowStep instead of simpleInstructionLocalFlowStep
2020-09-18 10:18:21 +02:00
Mathias Vorreiter Pedersen
3ef6e8a580
Merge pull request #4283 from geoffw0/stringstream4
...
C++: Model getline
2020-09-18 10:17:47 +02:00
Robert Marsh
3a83cc71fe
C++: use qualifier flow in more models
2020-09-17 18:03:02 -07:00
Robert Marsh
556ace004f
C++: use qualifiers in string constructor model
2020-09-17 17:39:50 -07:00
Robert Marsh
6b7b64d7be
C++: IR data and taint flow through qualifiers
2020-09-17 17:10:11 -07:00
Mathias Vorreiter Pedersen
c6ff805a07
C++: Cache simpleLocalFlowStep instead of simpleInstructionLocalFlowStep
2020-09-17 21:13:02 +02:00
Mathias Vorreiter Pedersen
8e1d9e0996
C++: Fix bad join order introduced by #4270
2020-09-17 19:23:01 +02:00
Ian Lynagh
c7b6374e55
C++: Improve compileTimeConstantInt
...
It is possible for the frontend to make
(bool)e
where e has a constant value 0, but the (implicit) cast has no constant
value. This was causing us to not understand assume(0) correctly.
Now compileTimeConstantInt will handle casts itself if necessary.
2020-09-17 14:51:50 +01:00
Geoffrey White
5cc11f1c44
C++: Additional model for 'this' flow through chains.
2020-09-17 14:12:30 +01:00
Geoffrey White
73399cb5f7
C++: Model GetLine.
2020-09-17 14:05:43 +01:00
Mathias Vorreiter Pedersen
63afe1da78
Merge pull request #4276 from geoffw0/stringstream3
...
C++: More stringstream models.
2020-09-17 14:19:52 +02:00
Geoffrey White
c17ae3ad6c
C++: Correct dataflow for return (*this).
2020-09-17 11:34:10 +01:00
Robert Marsh
691d0f3fb2
Merge branch 'main' into rdmarsh2/cpp/output-iterators-1
...
Fix merge conflict in test expectations
2020-09-16 13:52:59 -07:00
Robert Marsh
086d074a26
C++: make PartialDefinition abstract
2020-09-16 12:48:38 -07:00
Robert Marsh
fa0e27b2de
C++: move interprocedural iterator flow to taint
2020-09-16 12:34:52 -07:00
Geoffrey White
86404af501
Merge pull request #4270 from MathiasVP/mathiasvp/single-field-flow-fix-cwe190test
...
C++: Use underlying type when checking whether a type is a single-field struct.
2020-09-16 17:21:07 +01:00
Geoffrey White
f1a9547b38
C++: Split off putback.
2020-09-16 16:44:39 +01:00
Geoffrey White
c4de071a4c
C++: Flow through swap.
2020-09-16 13:39:07 +01:00
Geoffrey White
eb7bd6e176
C++: Flow through putback.
2020-09-16 13:39:07 +01:00
Geoffrey White
7cc60a30a6
C++: Flow through get, peek, read, readsome.
2020-09-16 13:36:41 +01:00
Geoffrey White
56390c1aef
C++: Flow through operator>>.
2020-09-16 13:32:13 +01:00
Mathias Vorreiter Pedersen
3026eb4b85
Revert "C++: Remove the same rule in TaintTrackingUtil.qll as 78b24b76a0 removed from DefaultTaintTracking.qll"
...
This reverts commit 0b97a4a182 .
2020-09-16 14:26:01 +02:00
Mathias Vorreiter Pedersen
92d81edae6
Revert "C++: Remove the problematic taint tracking rule. It seems like we get the flows from dataflow already now."
...
This reverts commit 78b24b76a0 .
2020-09-16 14:25:42 +02:00
Mathias Vorreiter Pedersen
0b97a4a182
C++: Remove the same rule in TaintTrackingUtil.qll as 78b24b76a0 removed from DefaultTaintTracking.qll
2020-09-16 10:54:23 +02:00
Mathias Vorreiter Pedersen
7b456d6162
Merge branch 'main' into mathiasvp/array-field-flow
2020-09-16 10:45:31 +02:00
Mathias Vorreiter Pedersen
c8a3baf356
Merge pull request #4272 from jbj/dataflow-partial-access
...
C++: Add AST flow through arrays
2020-09-16 09:29:39 +02:00
Ian Lynagh
56388b57bd
C++: Update stats for new coroutines* tables
2020-09-15 15:36:19 +01:00
Ian Lynagh
99c4bc5175
C++: Add coroutine metadata tables
2020-09-15 15:36:19 +01:00
Mathias Vorreiter Pedersen
50ad4cfec4
C++: Add comments to {Array,Pointer}StoreNode and arrayStoreStepChi.
2020-09-15 16:03:21 +02:00
Jonas Jensen
b3c50aed5e
Merge pull request #4262 from github/igfoo/location
...
C++: Deprecate Location subclasses
2020-09-15 15:49:36 +02:00
lcartey@github.com
084992d40b
C++: Support overriding existing range bounds
...
The current support only allows the user to supply bounds for previously
unsupported expressions or for variable accesses. This commit allows
SimpleRangeAnalysisExprs to override built-in range definitions.
2020-09-15 14:43:34 +01:00
Jonas Jensen
bdce24735c
C++: Add flow through arrays
...
This works by adding data-flow edges to skip over array expressions when
reading from arrays. On the post-update side, there was already code to
skip over array expressions when storing to arrays. That happens in
`valueToUpdate` in `AddressFlow.qll`, which needed just a small tweak to
support assignments with non-field expressions at the top-level LHS,
like `*a = ...` or `a[0] = ...`.
The new code in `AddressFlow.qll` is copy-pasted from `EscapesTree.qll`,
and there is already a note in these files saying that they share a lot
of code and must be maintained in sync.
2020-09-15 14:46:11 +02:00
Mathias Vorreiter Pedersen
265a641d06
C++: Use the underlying type to check whether a type is a single-field struct.
2020-09-15 12:49:16 +02:00
Jonas Jensen
25412da845
Merge pull request #4253 from geoffw0/stringstream2
...
C++: Model more stringstream features
2020-09-15 12:19:26 +02:00
Robert Marsh
5f2cafc4f5
C++: Interprocedural iterator flow
2020-09-14 14:36:19 -07:00
Mathias Vorreiter Pedersen
3e56db7f83
C++: Make fieldReadStep private
2020-09-14 20:52:55 +02:00
Mathias Vorreiter Pedersen
7cd6137b34
Merge branch 'main' into mathiasvp/array-field-flow
2020-09-14 20:45:06 +02:00
Ian Lynagh
826c40fcac
C++: Deprecate Location subclasses
...
The main Location class should always be used.
2020-09-14 13:14:18 +01:00
Geoffrey White
6b035df660
C++: Repair taint flow from previous.
2020-09-14 10:21:43 +01:00
Jonas Jensen
021aa647c1
Merge pull request #4142 from MathiasVP/mathiasvp/read-step-without-memory-operands
...
C++: Use IR alias analysis for field flow
2020-09-14 09:37:27 +02:00
Mathias Vorreiter Pedersen
78b24b76a0
C++: Remove the problematic taint tracking rule. It seems like we get the flows from dataflow already now.
2020-09-14 09:26:41 +02:00
Mathias Vorreiter Pedersen
34a57e2bd4
Merge pull request #4252 from jbj/normalize-bounds
...
C++: SimpleRangeAnalysis: Always normalize bounds after a computation
2020-09-14 09:16:32 +02:00
lcartey@github.com
eb5782d908
C++: Support customizable ranges for RangeSsaDefinitions.
2020-09-11 17:12:10 +01:00
Geoffrey White
b404a339a4
C++: Correct isQualifierObject -> isQualifierAddress.
2020-09-11 16:15:47 +01:00
Jonas Jensen
fee7ce6c7f
Merge pull request #4221 from rajivshah3/fix/cpp-av-32-include
...
C++: Allow .inc files to be included
2020-09-11 16:53:43 +02:00
Geoffrey White
d3ca140eeb
C++: Account for pointer / reference parameters to operator<<.
2020-09-11 15:20:54 +01:00
Jonas Jensen
172becd67f
Merge pull request #4250 from lcartey/cpp/expose-getdefbounds
...
C++: Expose getDef(Upper|Lower)Bound as an internal predicate.
2020-09-11 13:26:08 +02:00
Mathias Vorreiter Pedersen
2d57abdcbe
Merge branch 'main' into mathiasvp/read-step-without-memory-operands
2020-09-11 12:47:29 +02:00
Geoffrey White
d648150322
C++: Autoformat.
2020-09-11 11:14:58 +01:00
Geoffrey White
dd53e3fe65
C++: Fix data flow to return value.
2020-09-11 11:14:58 +01:00