Geoffrey White
71a605b7d9
C++: Add tests for std::pair.
2020-09-23 18:43:28 +01:00
Robert Marsh
e28a45b8e6
Merge branch 'main' into rdmarsh2/cpp/output-iterators-1
...
Resolve test output conflicts from IR model improvements
2020-09-22 11:17:38 -07:00
Geoffrey White
e836bae20f
C++: Tidy up test stl.h a little.
2020-09-22 13:21:50 +01:00
Robert Marsh
772a51508f
C++: Update test comment
2020-09-21 16:19:41 -07:00
Robert Marsh
9e3bfe1968
C++: Fix iterator flow context sensitivity
2020-09-21 16:17:16 -07:00
Robert Marsh
913881b17b
C++: Add test for iterator false positive
2020-09-21 16:15:24 -07:00
Robert Marsh
bc3e74f7d6
Merge branch 'main' into rdmarsh2/cpp/ir-qualifier-flow
...
Fix test conflicts
2020-09-18 15:40:43 -07:00
Robert Marsh
12be90a6af
C++: remove unneeded cast
2020-09-18 15:00:01 -07:00
Jonas Jensen
c67605f15c
Merge pull request #4230 from MathiasVP/mathiasvp/array-field-flow
...
C++: Replace `field -> object` taint rule with `ArrayContent` dataflow
2020-09-18 10:56:51 +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
Robert Marsh
f73ff988e0
C++: improve cast and ptr handling in taint test
2020-09-17 16:55:36 -07: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
Geoffrey White
2c15e6f934
C++: Add test cases.
2020-09-17 13:43:07 +01:00
Geoffrey White
4d6125841d
C++: Clean up multiply defined functions.
2020-09-17 11:48:26 +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
44c5233459
C++: accept test output
2020-09-16 12:49:15 -07:00
Robert Marsh
fa0e27b2de
C++: move interprocedural iterator flow to taint
2020-09-16 12:34:52 -07: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
7b456d6162
Merge branch 'main' into mathiasvp/array-field-flow
2020-09-16 10:45:31 +02: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
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
0c14e2b69a
C++: Fix annotations in taint.cpp
2020-09-14 23:08:50 +02:00
Mathias Vorreiter Pedersen
7cd6137b34
Merge branch 'main' into mathiasvp/array-field-flow
2020-09-14 20:45:06 +02:00
Geoffrey White
6b035df660
C++: Repair taint flow from previous.
2020-09-14 10:21:43 +01:00
Geoffrey White
b404a339a4
C++: Correct isQualifierObject -> isQualifierAddress.
2020-09-11 16:15:47 +01: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
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
Mathias Vorreiter Pedersen
ff09104089
Merge branch 'main' into mathiasvp/array-field-flow
2020-09-11 09:25:50 +02:00
Robert Marsh
2e187a51ae
C++: test for interprocedurl iterator flow
2020-09-09 12:45:06 -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
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
17867f25a7
C++: Accept more test changes
2020-09-09 15:27: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
Robert Marsh
eab1557e27
C++: output iterator flow via FlowVar
2020-09-08 14:09:57 -07:00
Robert Marsh
703db0b9a6
C++: noisy output iterators in AST taint tracking
2020-09-08 13:45:23 -07:00
Robert Marsh
983f54f11a
C++: simple tests for vector output iterators
2020-09-08 13:27:41 -07:00
Mathias Vorreiter Pedersen
f025d09bf0
C++: Accept test changes
2020-09-08 19:12:00 +02:00
Mathias Vorreiter Pedersen
7ac5e84925
C++: Add make_shared and make_unique test cases
2020-09-08 19:03:54 +02:00
Geoffrey White
90c7a79272
C++: Fix the object/refs up.
2020-09-08 16:49:11 +01:00
Geoffrey White
5a3d41879a
C++: Change some of the taint flows to data flows.
2020-09-08 16:49:11 +01:00