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
Geoffrey White
597757d76f
C++: Model std::stringstream put and write.
2020-09-11 11:14:57 +01:00
Geoffrey White
66a5c38eef
C++: Model std::stringstream constructor.
2020-09-11 11:14:57 +01:00
Jonas Jensen
ad11f76ec6
C++: Always normalize bounds after a computation
...
This stops some cases of `-0.0` from propagating through the range
analysis, fixing a false positive on arvidn/libtorrent.
There seems to be no need for a corresponding change in the caller of
`getDefLowerBoundsImpl` since that predicate only contains computations
that cannot introduce negative zero.
2020-09-11 11:59:00 +02:00
lcartey@github.com
65d48a32b8
C++: Expose getDef(Upper|Lower)Bound as an internal predicate.
2020-09-11 09:49:18 +01:00
Mathias Vorreiter Pedersen
ff09104089
Merge branch 'main' into mathiasvp/array-field-flow
2020-09-11 09:25:50 +02:00
Mathias Vorreiter Pedersen
399da6837a
Merge pull request #4227 from jbj/SimpleRangeAnalysis-NotExpr
...
C++: Support `(bool)x` and `!x` in SimpleRangeAnalysis
2020-09-11 08:59:03 +02:00
Geoffrey White
fed973f9c4
Merge pull request #4229 from MathiasVP/mathiasvp/make_shared_make_unique-models
...
C++: Add taint models for std::make_unique and std::make_shared
2020-09-10 10:46:30 +01:00
Geoffrey White
34a03ec523
Merge pull request #4213 from rdmarsh2/rdmarsh2/cpp/explicit-conversion-perf
...
C++: Improve performance of getExplicitlyConverted
2020-09-10 10:33:16 +01:00
Robert Marsh
10633019a6
C++: autoformat
2020-09-09 12:45:17 -07:00
Mathias Vorreiter Pedersen
bb9cf72a31
Merge branch 'main' into mathiasvp/make_shared_make_unique-models
2020-09-09 20:51:56 +02:00
Geoffrey White
46a07fa9b2
C++: Model std::stringstream::str.
2020-09-09 18:22:06 +01:00
Taus
17ccc137ae
Merge pull request #4238 from RasmusWL/dataflow-small-fix-for-naming
...
Dataflow: small fixes for naming in taint tracking
2020-09-09 16:26:36 +02:00
Mathias Vorreiter Pedersen
ad602b892b
Merge branch 'main' into mathiasvp/read-step-without-memory-operands
2020-09-09 16:17:23 +02:00
Mathias Vorreiter Pedersen
e91d321d28
Merge pull request #4234 from geoffw0/stringstream
...
C++: Tests and initial models for taint through std::stringstream / std::ostream.
2020-09-09 15:31:46 +02:00
Jonas Jensen
ceb198f65d
Merge remote-tracking branch 'upstream/main' into SimpleRangeAnalysis-NotExpr
2020-09-09 14:50:00 +02:00
Rasmus Wriedt Larsen
2172fb6e65
Dataflow: s/data flow/taint propagation/ in QLDoc for sanitizers
2020-09-09 14:30:33 +02:00
Rasmus Wriedt Larsen
d90f0be2c4
Dataflow: defaultTaintBarrier => defaultTaintSanitizer
...
Just keeping things a bit more consistent :)
2020-09-09 14:11:56 +02:00
Mathias Vorreiter Pedersen
8226515138
C++: Add a taint model for std::{shared, unique}_ptr<T>::get
2020-09-09 12:22:29 +02:00
Mathias Vorreiter Pedersen
417424ab75
C++: Add QLDoc and fix comment in isArray (review comments)
2020-09-09 12:21:09 +02:00
Geoffrey White
db3f81a98f
C++: Correct QLDoc.
2020-09-09 11:16:14 +01:00
Robert Marsh
30b5975274
C++: autoformat
2020-09-08 14:51:08 -07:00
Robert Marsh
eab1557e27
C++: output iterator flow via FlowVar
2020-09-08 14:09:57 -07:00
Robert Marsh
13c45b6664
C++: remove unnecessary parameter in FlowVar.qll
2020-09-08 13:51:58 -07:00
Robert Marsh
c8cdf68bf9
C++: Remove StdStringBeginEnd
2020-09-08 13:49:57 -07:00
Robert Marsh
703db0b9a6
C++: noisy output iterators in AST taint tracking
2020-09-08 13:45:23 -07:00
Robert Marsh
44bdf98217
C++: simplify and explain getExplicitlyConverted
2020-09-08 13:02:51 -07:00
Robert Marsh
65cc9888d5
Merge branch 'main' into rdmarsh2/cpp/explicit-conversion-perf
2020-09-08 12:29:34 -07:00
Robert Marsh
083a4b2abc
C++: handle non-casts in hasExplicitConversion
2020-09-08 12:28:16 -07:00
Mathias Vorreiter Pedersen
978b74f235
C++: Implement taint model for make_shared and make_unique
2020-09-08 19:11:48 +02:00