-
Notifications
You must be signed in to change notification settings - Fork 1.6k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #14013 from alexet/only-taint-argv-indirections
CPP:Only taint argv indirections
- Loading branch information
Showing
12 changed files
with
13 additions
and
95 deletions.
There are no files selected for viewing
4 changes: 4 additions & 0 deletions
4
cpp/ql/lib/change-notes/2023-08-24-no-taint-argv-indirections.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
--- | ||
category: minorAnalysis | ||
--- | ||
* Only the 2 level indirection of `argv` (corresponding to `**argv`) is consided for `FlowSource`. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
4 changes: 4 additions & 0 deletions
4
cpp/ql/src/change-notes/2023-08-24-no-taint-argv-indirections.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
--- | ||
category: minorAnalysis | ||
--- | ||
* Some queries that had repeated results corresponding to different levels of indirection for `argv` now only have a single result. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
14 changes: 3 additions & 11 deletions
14
cpp/ql/test/experimental/query-tests/Security/CWE/CWE-078/WordexpTainted.expected
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,16 +1,8 @@ | ||
edges | ||
| test.cpp:22:27:22:30 | argv | test.cpp:29:13:29:20 | filePath | | ||
| test.cpp:22:27:22:30 | argv | test.cpp:29:13:29:20 | filePath | | ||
| test.cpp:22:27:22:30 | argv indirection | test.cpp:29:13:29:20 | filePath | | ||
| test.cpp:22:27:22:30 | argv indirection | test.cpp:29:13:29:20 | filePath | | ||
| test.cpp:22:27:22:30 | argv indirection | test.cpp:29:13:29:20 | filePath indirection | | ||
nodes | ||
| test.cpp:22:27:22:30 | argv | semmle.label | argv | | ||
| test.cpp:22:27:22:30 | argv indirection | semmle.label | argv indirection | | ||
| test.cpp:29:13:29:20 | filePath | semmle.label | filePath | | ||
| test.cpp:29:13:29:20 | filePath | semmle.label | filePath | | ||
| test.cpp:29:13:29:20 | filePath indirection | semmle.label | filePath indirection | | ||
subpaths | ||
#select | ||
| test.cpp:29:13:29:20 | filePath | test.cpp:22:27:22:30 | argv | test.cpp:29:13:29:20 | filePath | Using user-supplied data in a `wordexp` command, without disabling command substitution, can make code vulnerable to command injection. | | ||
| test.cpp:29:13:29:20 | filePath | test.cpp:22:27:22:30 | argv | test.cpp:29:13:29:20 | filePath | Using user-supplied data in a `wordexp` command, without disabling command substitution, can make code vulnerable to command injection. | | ||
| test.cpp:29:13:29:20 | filePath | test.cpp:22:27:22:30 | argv indirection | test.cpp:29:13:29:20 | filePath | Using user-supplied data in a `wordexp` command, without disabling command substitution, can make code vulnerable to command injection. | | ||
| test.cpp:29:13:29:20 | filePath | test.cpp:22:27:22:30 | argv indirection | test.cpp:29:13:29:20 | filePath | Using user-supplied data in a `wordexp` command, without disabling command substitution, can make code vulnerable to command injection. | | ||
| test.cpp:29:13:29:20 | filePath indirection | test.cpp:22:27:22:30 | argv indirection | test.cpp:29:13:29:20 | filePath indirection | Using user-supplied data in a `wordexp` command, without disabling command substitution, can make code vulnerable to command injection. | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
15 changes: 0 additions & 15 deletions
15
cpp/ql/test/query-tests/Security/CWE/CWE-089/SqlTainted/SqlTainted.expected
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,27 +1,12 @@ | ||
edges | ||
| test.c:14:27:14:30 | argv | test.c:21:18:21:23 | query1 indirection | | ||
| test.c:14:27:14:30 | argv indirection | test.c:21:18:21:23 | query1 indirection | | ||
| test.c:14:27:14:30 | argv indirection | test.c:21:18:21:23 | query1 indirection | | ||
| test.cpp:39:27:39:30 | argv | test.cpp:43:27:43:33 | access to array | | ||
| test.cpp:39:27:39:30 | argv indirection | test.cpp:43:27:43:33 | access to array | | ||
| test.cpp:39:27:39:30 | argv indirection | test.cpp:43:27:43:33 | access to array indirection | | ||
| test.cpp:39:27:39:30 | argv indirection | test.cpp:43:27:43:33 | access to array indirection | | ||
nodes | ||
| test.c:14:27:14:30 | argv | semmle.label | argv | | ||
| test.c:14:27:14:30 | argv indirection | semmle.label | argv indirection | | ||
| test.c:14:27:14:30 | argv indirection | semmle.label | argv indirection | | ||
| test.c:21:18:21:23 | query1 indirection | semmle.label | query1 indirection | | ||
| test.cpp:39:27:39:30 | argv | semmle.label | argv | | ||
| test.cpp:39:27:39:30 | argv indirection | semmle.label | argv indirection | | ||
| test.cpp:39:27:39:30 | argv indirection | semmle.label | argv indirection | | ||
| test.cpp:43:27:43:33 | access to array | semmle.label | access to array | | ||
| test.cpp:43:27:43:33 | access to array indirection | semmle.label | access to array indirection | | ||
subpaths | ||
#select | ||
| test.c:21:18:21:23 | query1 | test.c:14:27:14:30 | argv | test.c:21:18:21:23 | query1 indirection | This argument to a SQL query function is derived from $@ and then passed to mysql_query(sqlArg). | test.c:14:27:14:30 | argv | user input (a command-line argument) | | ||
| test.c:21:18:21:23 | query1 | test.c:14:27:14:30 | argv indirection | test.c:21:18:21:23 | query1 indirection | This argument to a SQL query function is derived from $@ and then passed to mysql_query(sqlArg). | test.c:14:27:14:30 | argv indirection | user input (a command-line argument) | | ||
| test.c:21:18:21:23 | query1 | test.c:14:27:14:30 | argv indirection | test.c:21:18:21:23 | query1 indirection | This argument to a SQL query function is derived from $@ and then passed to mysql_query(sqlArg). | test.c:14:27:14:30 | argv indirection | user input (a command-line argument) | | ||
| test.cpp:43:27:43:33 | access to array | test.cpp:39:27:39:30 | argv | test.cpp:43:27:43:33 | access to array | This argument to a SQL query function is derived from $@ and then passed to pqxx::work::exec1((unnamed parameter 0)). | test.cpp:39:27:39:30 | argv | user input (a command-line argument) | | ||
| test.cpp:43:27:43:33 | access to array | test.cpp:39:27:39:30 | argv indirection | test.cpp:43:27:43:33 | access to array | This argument to a SQL query function is derived from $@ and then passed to pqxx::work::exec1((unnamed parameter 0)). | test.cpp:39:27:39:30 | argv indirection | user input (a command-line argument) | | ||
| test.cpp:43:27:43:33 | access to array | test.cpp:39:27:39:30 | argv indirection | test.cpp:43:27:43:33 | access to array indirection | This argument to a SQL query function is derived from $@ and then passed to pqxx::work::exec1((unnamed parameter 0)). | test.cpp:39:27:39:30 | argv indirection | user input (a command-line argument) | | ||
| test.cpp:43:27:43:33 | access to array | test.cpp:39:27:39:30 | argv indirection | test.cpp:43:27:43:33 | access to array indirection | This argument to a SQL query function is derived from $@ and then passed to pqxx::work::exec1((unnamed parameter 0)). | test.cpp:39:27:39:30 | argv indirection | user input (a command-line argument) | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.