Commit Graph

53 Commits

Author SHA1 Message Date
Jeroen Ketema
6ae1656ec4 Merge pull request #17581 from jketema/loc-table-merge
C++: Merge the location tables
2025-06-30 10:33:46 +02:00
Jeroen Ketema
b4caba7c0e C++: Merge the location tables 2025-06-27 14:42:08 +02:00
REDMOND\brodes
505d8806c7 Crypto: Add key input support for the graph for key generation operations. 2025-06-26 11:51:49 -04:00
REDMOND\brodes
93bad3c799 Crypto: Misc bug fixes and updated expected files. 2025-06-25 11:02:30 -04:00
REDMOND\brodes
fb495bf665 Crypto: Update expected files. There are failures, but accepting them for now and noting the issue for a future PR. 2025-06-13 12:02:57 -04:00
REDMOND\brodes
cf2f0f16b8 Crypto: Initial model of signatures. Still incomplete for verification and correct handling of MACs. 2025-06-13 11:52:37 -04:00
REDMOND\brodes
eb20955a54 Crypto: Further simplify test caes to only use edges/nodes/properties. Update model to account for MAC algorithms. 2025-06-12 15:36:59 -04:00
REDMOND\brodes
20e2c7cefd Crypto: Overhaul/refactor of EVPInitialzers. Update cipher operation to disallow null key and IV on initializers (typically do not represent an actual key or IV). 2025-06-12 00:41:15 -04:00
REDMOND\brodes
8f25380655 Crypto: Consolidate tests to use node, edges, and properties. 2025-06-11 15:15:22 -04:00
REDMOND\brodes
d3cff2dff1 Crypto: Add support to trace keys, add support to find prior key gen properties that configure downstream operations. Add key size tests 2025-06-11 13:58:56 -04:00
REDMOND\brodes
7d479940e5 Crypto: Nop out signature operations for now until complete. Minor model update. Remove setting RSA bits as an RSA algorithm. Fix bug in hash algorithm. Add missing PKey encryption to cipher ops. Consolidate ctx initializers. Add unit tests, and alter unit test directory structure to allow for application to other APIs. Update expected files for unit tests (not all updated yet, a work in progress). 2025-06-10 13:37:17 -04:00
REDMOND\brodes
4f2045bbdd Crypto: CtxFlow now uses an interface for additional steps. Add CTX step to handle paramgen. Remove redundant test. Overhaul of EVP update/initializer/final mechanics. Misc. updates for new API and refactoring EVPKeyGenOperation. Clean up of keygen_operaitons.ql. 2025-06-09 15:07:00 -04:00
REDMOND\brodes
98aae6a7bf Crypto: Add EVP key gen and signature operation (work in progress). Add initial signature tests (no expected files yet). Add new openssl .h stubs. Clean up of OperationBase and associated uses. Update test case stubs to be closer to the actual stubs. Fix unncessary instanceof check in signatures. 2025-06-05 16:43:58 -04:00
GrosQuildu
af8702d6a8 fix openssl outputs 2025-06-03 16:27:50 +02:00
GrosQuildu
6d1b1d1a6e refactor EVP common classes
add initial work for openssl signatures

add basic C test files for ciphers and signatures

more signature classes, comments for evp base classes

more signature tests

fix super calls for input consumers

fix getOutputArtifact for tests

formatting

delete redundant test files

move algorithm methods to OpenSSLOperation

refactor ECKeyGenOperation for new EVP classes

formatting

fix getOutputArtifact

fix cipher and digest operation test results

mv openssl signature to another PR
2025-06-03 16:27:50 +02:00
REDMOND\brodes
a473c96a9c Crypto: Move crypto test stubs under experimental/stubs and remove special CODEOWNERS assignments for crypto stubs. 2025-06-02 16:10:35 +02:00
REDMOND\brodes
6b267479be Crypto: Update crypto stubs location under 'crypto' and associate codeowners on any test/stubs/crypto. Minor fix to HashAlgorithmValueConsumer (remove library detector logic). 2025-06-02 16:10:35 +02:00
REDMOND\brodes
a9bdcc72eb Crypto: Move openssl stubs to a shared stubs location. Include openssl apache license and a readme for future stub creation. Modify existing test case to reference stubs location. 2025-06-02 16:10:35 +02:00
REDMOND\brodes
0de6647927 Crypto: Adding initial openssl tests, fixing a bug in hash modeling found through tests, and updating CODEOWNERS for quantum tests 2025-06-02 16:10:35 +02:00
Mathias Vorreiter Pedersen
b5897e5727 C++: Accept sign analysis changes. 2025-01-16 00:39:36 +00:00
Mathias Vorreiter Pedersen
20dfbdc5cc Revert "Merge pull request #18057 from jketema/codeql-cli-2.19.4"
This reverts commit ed922f6519, reversing
changes made to aa4cc72f30.
2024-12-16 14:02:38 +00:00
Jeroen Ketema
fa8aba88af Revert "Merge pull request #17938 from MathiasVP/fix-fp-in-missing-check-scanf-fixing-take-2"
This reverts commit 6785b93ed8, reversing
changes made to d9b86f55c8.
2024-11-21 15:39:00 +01:00
Mathias Vorreiter Pedersen
bb85aa2fc9 C++: Accept test changes. 2024-11-14 16:29:51 +00:00
Mathias Vorreiter Pedersen
21bc8c4324 C++: Accept test changes. 2024-04-10 18:32:15 +01:00
Jeroen Ketema
7e71d9e619 C++: Update expected test results after outputting less loads from the extractor 2023-10-19 10:45:14 +02:00
Jeroen Ketema
554087161b C++: Accept sign analysis test changes
The IR now contains extra loads that need to be accounted for.
2023-10-19 10:45:13 +02:00
Gulshan Singh
b87f12d5b2 C++: Add StrlenLiteralRangeExpr 2023-03-24 08:51:35 -07:00
Gulshan Singh
fb31570af3 Fix bitshift test 2023-01-30 19:55:53 -08:00
Gulshan Singh
051d36ee6a Add ConstantLShiftExprRange and ConstantRShiftExprRange classes 2023-01-30 19:55:53 -08:00
Gulshan Singh
5710289460 Add bitshift test 2023-01-30 19:55:53 -08:00
Mathias Vorreiter Pedersen
b8a5aa5d85 C++: Fix a couple of range analysis issues:
1. The new query is expecting pointer arithmetic operations to generate
range-analysis bounds, but this wasn't true on main.
2. The bounds generated by `boundFlowCond` was incorrectly inferred as
non-strict when comparing a pointers (unlike when comparing values of
integral types). This gave FPs in the new query.

This also fixes a couple of missing results in existing queries that
use the new range-analysis library.
2022-09-15 17:46:52 +01:00
Mathias Vorreiter Pedersen
7062263885 C++: Accept test changes. 2022-09-07 21:11:52 +01:00
Erik Krogh Kristensen
6ff8d4de5c add all remaining explicit this 2021-11-26 13:50:10 +01:00
Gulshan Singh
f026d3a1e6 C++: Improve bitwise and range analysis 2020-10-01 23:30:51 -07:00
Gulshan Singh
78625b764d C++: Add test for bitwise and ranges 2020-10-01 23:30:48 -07:00
Geoffrey White
282d3e8f7e Merge pull request #4322 from jbj/range-analysis-custom-defs
C++: Support custom defs in SimpleRangeAnalysis
2020-09-30 15:43:32 +01:00
Jonas Jensen
b7d0939f4a C++: ExtendedRangeAnalysis stub implementation
Just to demonstrate how things fit together, I've created
`SubtractSelf.qll` that adds a (hopefully sound) version of the test
extension that was already used in `extensibility.ql`.
2020-09-23 15:50:07 +02:00
Jonas Jensen
4faeede5cd C++: Remove unnecessary comment on import 2020-09-22 16:55:25 +02:00
Jonas Jensen
9fd8b0431a C++: Add a SimpleRangeAnalysisDefinition test def 2020-09-22 15:54:54 +02:00
Jonas Jensen
826632d6a9 C++: Add a test of def overrides
The def used in this test is not overridden yet.
2020-09-22 15:54:54 +02:00
lcartey@github.com
eaea860d3e C++: Test for overriding existing simple range analysis ranges. 2020-09-15 15:34:48 +01:00
Jonas Jensen
f7273b8665 C++: Add custom modeling to extensibility.ql 2020-08-14 12:27:30 +02:00
Jonas Jensen
ee3312503e C++: Add test for extensible range analysis
This commit demonstrates that the range is too wide before custom
modeling has been added to the test.
2020-08-14 12:27:30 +02:00
Robert Marsh
fb6e578618 C++: move IR range analysis to experimental 2020-06-24 12:50:14 -07:00
Cornelius Riemenschneider
3596ff7c51 Address review. 2020-05-10 19:34:16 +02:00
Cornelius Riemenschneider
e397e5d325 Add new testcase to arraylengthanalysis library. 2020-05-06 16:36:48 +02:00
Cornelius Riemenschneider
1c9fa4eb1d This library proves that a subset of pointer dereferences in a program are safe, i.e. in-bounds.
It does so by first defining what a pointer dereference is (on the IR
`Instruction` level), and then using the array length analysis and the range
analysis together to prove that some of these pointer dereferences are safe.
2020-05-06 16:36:48 +02:00
Cornelius Riemenschneider
bab893d2d1 Address review. 2020-05-02 15:27:56 +02:00
Cornelius Riemenschneider
b838426421 Move ArrayLengthAnalysis library to the correct location. 2020-04-29 21:07:44 +02:00
Cornelius Riemenschneider
f83c3452a1 Switch allocation size expression analysis to unconverted result expression. 2020-04-29 15:13:00 +02:00