Geoffrey White
22097a9e13
C++: Add some CWE-190 tests I had lying around.
2020-09-14 14:39:02 +01:00
Mathias Vorreiter Pedersen
9659afdf09
C++: Accept more test changes
2020-09-08 22:25:33 +02:00
Jonas Jensen
fd0937eb01
C++: Accept improved IntegerOverflowTainted test
2020-08-18 16:47:29 +02:00
Mathias Vorreiter Pedersen
bd97fe627c
Merge branch 'master' into remove-field-conflation-from-ir-fieldflow
2020-05-27 17:08:19 +02:00
Jonas Jensen
bc09720704
Merge pull request #3479 from geoffw0/fp2762
...
C++: Allow equality to block taint (security taint tracking)
2020-05-25 15:11:10 +02:00
Mathias Vorreiter Pedersen
617ef32464
C++: Remove [FALSE POSITIVE] annotations
2020-05-21 02:22:57 +02:00
Mathias Vorreiter Pedersen
3c167125e5
C++: Accept test output
2020-05-20 18:18:34 +02:00
Geoffrey White
9babd5dc10
C++: Another positive effect of the change.
2020-05-20 12:49:01 +01:00
Jonas Jensen
486f06ab18
C++: Simplify field conflation test
...
It turned out the `memcpy` step was not even necessary.
2020-05-19 14:12:11 +02:00
Geoffrey White
edd09f09cd
C++: Add test cases where several specific values are permitted.
2020-05-15 17:01:23 +01:00
Geoffrey White
48f3db3fbe
Merge branch 'master' into fp2762
2020-05-15 09:55:30 +01:00
Geoffrey White
4a6021fb61
C++: Allow equality checking to block taint flow.
2020-05-14 18:32:38 +01:00
Jonas Jensen
a380dc113f
C++: Test field conflation with array in struct
2020-05-14 16:29:39 +02:00
Geoffrey White
754d7f0be8
C++: More test cases for TaintedAllocationSize.
2020-05-14 15:23:31 +01:00
Dave Bartolomeo
163ecd97de
Merge pull request #3277 from geoffw0/rangeshift
...
C++: Support for & and >> in SimpleRangeAnalysis
2020-04-22 11:36:36 -04:00
Geoffrey White
de751b0b75
C++: Correct UnsignedBitwiseAndExpr.
2020-04-17 17:10:59 +01:00
Geoffrey White
01d3257d72
C++: Add test cases involving casts.
2020-04-17 17:01:58 +01:00
Geoffrey White
24d7446976
C++: Basic model of '&' and '>>' in SimpleRangeAnalysis.
2020-04-16 11:17:29 +01:00
Geoffrey White
2acbdecfdb
C++: Add test cases.
2020-04-16 11:11:58 +01:00
Geoffrey White
b8acd702d6
C++: Rename the test for consistency.
2020-04-15 12:49:07 +01:00
Geoffrey White
2aa64db40e
Merge remote-tracking branch 'upstream/rc/1.24' into alloc-size2
2020-04-15 10:09:54 +01:00
Geoffrey White
a7979fdc12
C++: Base results purely on allocations now, not multiplications by a sizeof.
2020-04-09 15:05:29 +01:00
Geoffrey White
febbbc4423
C++: Additional test cases.
2020-04-09 15:03:35 +01:00
Robert Marsh
c38ccaaab6
Merge branch 'master' into rdmarsh/cpp/ir-flow-through-outparams
2020-04-08 12:32:35 -07:00
Geoffrey White
66a0b7884e
Merge branch 'master' into alloc-size
2020-04-07 17:12:35 +01:00
Jonas Jensen
58366b19e9
C++: Path explanations in the last two queries
...
For some reason I thought that these two queries were special because
they manipulate `SecurityOptions` to change the taint-tracking sources.
It turns out it was just the opposite: the queries used to be special
because they invalidated the cache for the `tainted` predicate, but that
predicate is no longer used, so these queries are no longer special.
2020-04-04 16:47:06 +02:00
Jonas Jensen
36da2d1dae
C++: Manipulate the source end of paths too
...
Without this, we get duplicate alerts in some cases and
unnatural-looking source nodes in other cases. The source nodes were
often `Conversion`s.
2020-04-03 16:37:23 +02:00
Jonas Jensen
207c76b855
C++: Path explanations in DefaultTaintTracking
...
The first three queries are migrated to use path explanations.
2020-04-01 20:51:05 +02:00
Robert Marsh
59a81d8445
C++: merge from master and accept test changes
2020-03-18 13:47:01 -07:00
Geoffrey White
034f7cc948
Merge branch 'master' into model-gets
2020-03-16 15:12:36 +00:00
Geoffrey White
f4a1b41094
C++: Correct hasUpperBoundsCheck.
2020-03-12 15:45:01 +00:00
Geoffrey White
26ed560bd7
C++: Add new test cases.
2020-03-12 15:45:01 +00:00
Geoffrey White
263e51f72e
C++: Clean up the test.
2020-03-12 15:45:00 +00:00
Robert Marsh
bba6b23019
Merge branch 'master' into rdmarsh/cpp/ir-flow-through-outparams
2020-03-10 11:12:19 -07:00
Jonas Jensen
28a9baba36
Merge pull request #3026 from MathiasVP/simplerangeanalysis-const-var-access
...
C++: Handle constant variable accesses in SimpleRangeAnalysis.qll
2020-03-10 11:22:33 +01:00
Mathias Vorreiter Pedersen
1a5282ae21
C++: Add testcase that previously resulted in a false positive
2020-03-09 22:33:59 +01:00
Mathias Vorreiter Pedersen
3973a50c9b
C++: Add testcase for cpp/uncontrolled-allocation-size
2020-03-04 15:51:14 +01:00
Geoffrey White
a0e839d3f1
C++: Block duplicate taint results from 'gets' and other functions.
2020-02-24 11:53:22 +00:00
Robert Marsh
ff876aaedf
C++: Accept test output with IR enabled
2020-02-18 09:48:21 -08:00
Jonas Jensen
a59c0facee
C++: Accept test changes for IR libs
...
This is for the tests in the ql repo. There are also changed tests in
the internal repo.
2020-02-15 21:12:20 +01:00
Geoffrey White
a7fb2e1261
CPP: More test cases for ArithmeticWithExtremeValues.
2019-06-26 15:38:23 +01:00
Geoffrey White
3deff9c578
CPP: Fix in dataflow.
2019-06-10 12:01:14 +01:00
Geoffrey White
d51f870053
CPP: Add test cases.
2019-06-10 12:01:13 +01:00
Geoffrey White
574a1d8501
Merge pull request #1037 from kevinbackhouse/RangeAnalysisAssignAddOverflow
...
Better overflow detection for AssignAdd/AssignSub
2019-05-29 09:54:06 +01:00
Geoffrey White
6bac1e6e99
CPP: Accept CWE-190 test change.
2019-05-24 16:16:45 +01:00
Geoffrey White
faa23a53be
CPP: Update expected for changes elsewhere.
2019-03-28 15:49:36 +00:00
Geoffrey White
e7c02027f5
CPP: Fix 'BAD'.
2019-03-28 15:49:36 +00:00
Geoffrey White
8c75e730e4
CPP: Widen TaintedAllocationSize.ql.
2019-03-28 15:49:36 +00:00
Geoffrey White
dab1bba25c
CPP: Add a test of TaintedAllocationSize.
2019-03-28 15:49:36 +00:00
Jonas Jensen
2550788598
C++: Accept test changes to getRelativePath
...
After a `queries.xml` was added to the test directory,
`Container.getRelativePath` now considers source files to be relative to
the `cpp/test` directory rather than the directory of the `*.ql*` file.
This caused some benign test output changes, and it also caused an
unwanted alert for `test3.c:14` to appear in
`cpp/ql/test/query-tests/Security/CWE/CWE-190/semmle/tainted/IntegerOverflowTainted.expected`.
This alert came about because `inSystemMacroExpansion` holds for files
that don't have a relative path, but the pretend system header in
`../system_header` now does have a relative path because it's below the
`cpp/test` directory. The fix is to add another `queries.xml` just for
the directory with the affected test.
2019-02-18 14:41:28 +01:00