Commit Graph

3597 Commits

Author SHA1 Message Date
Geoffrey White
fcea3693f9 CPP: Remove now redundant special cases. 2020-01-17 18:56:21 +00:00
Geoffrey White
200545d88c CPP: Add detail to the model. 2020-01-17 18:56:21 +00:00
Geoffrey White
77a3778eef CPP: Add some strlen variants to the PureStrFunction model. 2020-01-17 18:56:21 +00:00
Jonas Jensen
3632d51abc Merge pull request #2635 from geoffw0/modelstrdup
CPP: Model strdup
2020-01-17 19:26:26 +01:00
Geoffrey White
803da339a1 CPP: Fix a mistake in Inet.qll. 2020-01-17 17:44:42 +00:00
Geoffrey White
e4139fe427 Apply suggestions from code review
Additional corrections.

Co-Authored-By: Dave Bartolomeo <dbartol@github.com>
2020-01-17 17:20:37 +00:00
Geoffrey White
839fd8f848 CPP: Fix typo. 2020-01-17 16:10:41 +00:00
Robert Marsh
bd98427c5a C++: sync files 2020-01-17 08:05:40 -08:00
Robert Marsh
bbf191e857 C++: fix join order in hasMemoryOperandDefinition 2020-01-17 08:05:40 -08:00
Robert Marsh
d91bc4ba72 C++: pull out hasMemoryOperandDefinition (slow) 2020-01-17 08:05:26 -08:00
Dave Bartolomeo
c7e62b4a35 Merge pull request #2613 from rdmarsh2/getPhiOperandDefinition-perf-2
C++: performance fixes for getPhiOperandDefinition
2020-01-17 09:01:33 -07:00
Mathias Vorreiter Pedersen
cd644ca5f2 Merge branch 'implicit-function-declaration' of github.com:MathiasVP/ql into implicit-function-declaration 2020-01-17 14:52:23 +01:00
Mathias Vorreiter Pedersen
303c6aa5b7 C++: Added query to suites and change-notes 2020-01-17 14:51:40 +01:00
Mathias Vorreiter Pedersen
4fc325f794 C++: Raise query to warning-high 2020-01-17 13:59:25 +01:00
Mathias Vorreiter Pedersen
aaf2679bf7 Remove incorrect html tag
Co-Authored-By: Jonas Jensen <jbj@github.com>
2020-01-17 13:52:38 +01:00
Mathias Vorreiter Pedersen
e79c0820ef Fix reference
Co-Authored-By: Jonas Jensen <jbj@github.com>
2020-01-17 13:51:14 +01:00
Jonas Jensen
53e10e4c7f Merge pull request #2634 from MathiasVP/overrideable-taint-sources
C++: Overrideable taint sources in DefaultTaintTracking
2020-01-17 13:01:03 +01:00
Mathias Vorreiter Pedersen
9e71e7f2ef C++: Added .qlhelp file 2020-01-17 12:58:10 +01:00
Jonas Jensen
d19c77d473 C++: Indirection for security.TaintTracking impl
This change should make it easier to switch to the IR-based
`DefaultTaintTracking` code without getting a large and conflict-prone
diff.
2020-01-17 12:04:53 +01:00
Marc Waldman
dbe51e070f Merge pull request #2 from marcrepo/patch-2
Documentation update for Issue #2623
2020-01-17 04:55:34 -05:00
Marc Waldman
0d409b2d69 Documentation update for Issue #2623
Changes based on Issue #2623 - DescriptorNeverClosed.ql identifies only sockets (not file handles)
2020-01-17 04:46:10 -05:00
Marc Waldman
140051cc9a Removed word "file" from description (see Issue 2623)
This pull request is in reference to Issue #2623 - "DescriptorNeverClosed.ql identifies only sockets (not file handles)"
2020-01-17 04:38:15 -05:00
Jonas Jensen
5d08a0e338 Merge pull request #2558 from MathiasVP/ast-classes-should-not-be-abstract
C++: Ast classes should not be abstract
2020-01-17 08:47:55 +01:00
Mathias Vorreiter Pedersen
e4def730fd C++: Fix alert message 2020-01-16 21:30:14 +01:00
Geoffrey White
3c41ed56a1 CPP: Support taint to return value derefs instead. 2020-01-16 18:15:21 +00:00
Robert Marsh
e0406190a1 Merge branch 'master' into getPhiOperandDefinition-perf-2 2020-01-16 07:23:59 -08:00
Robert Marsh
c942da524c C++/C#: Sync 2020-01-16 07:16:57 -08:00
Robert Marsh
1b5d33023e C++: actually fix Chi total operands 2020-01-16 07:15:08 -08:00
Mathias Vorreiter Pedersen
c1fcf78f16 C++: Fold predicate sameLocation 2020-01-16 16:14:55 +01:00
Mathias Vorreiter Pedersen
04ef4d102d C++: Remove unnecessary testcase 2020-01-16 15:10:37 +01:00
Jonas Jensen
f4d0c5e905 C++ IR: Support for global virtual dispatch
The IR data flow library now supports virtual dispatch with a library
that's similar to `security.TaintTracking`. In particular, it should
have the same performance characteristics. The main difference is that
non-recursive callers of `flowsFrom` now pass `_` instead of `true` for
`boolean allowFromArg`. This change allows flow through `return` to
actually work.
2020-01-16 14:51:28 +01:00
Geoffrey White
ef47563139 CPP: Support flow of pointed-to things through function calls. 2020-01-16 11:08:19 +00:00
Mathias Vorreiter Pedersen
87c59e0017 C++: Overrideable taint sources in DefaultTaintTracking 2020-01-16 11:10:43 +01:00
Mathias Vorreiter Pedersen
603b1c26a7 Merge branch 'master' into ast-classes-should-not-be-abstract 2020-01-16 10:16:03 +01:00
Dave Bartolomeo
48301e1187 Merge pull request #2594 from rdmarsh2/ir-overlappingVariableMemoryLocations
C++: compute overlap on irvars with vvar indexes
2020-01-15 13:06:33 -07:00
Geoffrey White
04af2ace94 CPP: Add DataFlow to strdup. 2020-01-15 19:18:37 +00:00
Geoffrey White
9b5be995d2 CPP: Split Strdup model into it's own class and file. 2020-01-15 18:38:33 +00:00
Geoffrey White
ce389ca791 CPP: Add tests for strdup. 2020-01-15 18:26:24 +00:00
Robert Marsh
a91f10fe40 Merge pull request #2629 from dbartol/dbartol/missing-vvars
C++/C#: Fix missing virtual variables
2020-01-15 08:32:43 -08:00
Tom Hvitved
f7278d36e1 Merge pull request #2498 from aschackmull/java/taint-getter
Java/C++/C#: Add support for taint-getter/setter summaries in data flow.
2020-01-15 09:55:19 +01:00
Dave Bartolomeo
e60f902c36 C++/C#: Fix missing virtual variables
The aliased SSA code was assuming that, for every automatic variable, there would be at least one memory access that reads or writes the entire variable. We've encountered a couple cases where that isn't true due to extractor issues. As a workaround, we now always create the `VariableMemoryLocation` for every local variable.

I've also added a sanity test to detect this condition in the future.

Along the way, I had to fix a perf issue in the PrintIR code. When determining the ID of a result based on line number, we were considering all `Instruction`s generated for a particular line, regardless of whether they were all in the same `IRFunction`. In addition, the predicate had what appeared to be a bad join order that made it take forever on large snapshots. I've scoped it down to just consider `Instruction`s in the same function, and outlined that predicate to fix the join order issue. This causes some numbering changes, but they're for the better. I don't think there was actually any nondeterminism there before, but now the numbering won't depend on the number of instantiations of a template, either.
2020-01-14 17:57:15 -07:00
Robert Marsh
42be28b211 C++: autoformat 2020-01-14 13:17:57 -08:00
Robert Marsh
5a5832b7de Merge pull request #2569 from jbj/ir-total-chi-flow
C++: IR data flow through total chi operands
2020-01-14 12:47:58 -08:00
Geoffrey White
e8139c0f31 CPP: Autoformat. 2020-01-14 14:35:58 +00:00
Geoffrey White
2fa846d1a6 CPP: Correct test. 2020-01-14 14:33:43 +00:00
Geoffrey White
d98d80b07d CPP: Improve locations for AV Rule 114.ql. 2020-01-14 14:33:43 +00:00
Anders Schack-Mulligen
241b8a05e4 Java/C++/C#: Address review comment. 2020-01-14 11:59:55 +01:00
Anders Schack-Mulligen
041bcc5812 Java/C++/C#: Small perf improvement and simplification. 2020-01-13 17:00:56 +01:00
Jonas Jensen
b8ee5a63db Merge pull request #2614 from geoffw0/arithun
CPP: Speed up ArithmeticUncontrolled.ql
2020-01-13 15:25:12 +01:00
Jonas Jensen
3183893a98 Merge pull request #2530 from geoffw0/hiddenqueries2
CPP: Speed up nullCheckAssert in InconsistentCheckReturnNull.ql.
2020-01-13 15:23:55 +01:00