mirror of
https://github.com/github/codeql.git
synced 2026-04-30 11:15:13 +02:00
Merge branch 'main' into rdmarsh/cpp/use-taint-configuration-dtt
This commit is contained in:
@@ -47,6 +47,18 @@ edges
|
||||
| test.cpp:76:12:76:17 | fgets output argument | test.cpp:79:10:79:13 | (const char *)... |
|
||||
| test.cpp:76:12:76:17 | fgets output argument | test.cpp:79:10:79:13 | data |
|
||||
| test.cpp:76:12:76:17 | fgets output argument | test.cpp:79:10:79:13 | data indirection |
|
||||
| test.cpp:98:17:98:22 | buffer | test.cpp:99:15:99:20 | (const char *)... |
|
||||
| test.cpp:98:17:98:22 | buffer | test.cpp:99:15:99:20 | buffer |
|
||||
| test.cpp:98:17:98:22 | buffer | test.cpp:99:15:99:20 | buffer indirection |
|
||||
| test.cpp:98:17:98:22 | recv output argument | test.cpp:99:15:99:20 | (const char *)... |
|
||||
| test.cpp:98:17:98:22 | recv output argument | test.cpp:99:15:99:20 | buffer |
|
||||
| test.cpp:98:17:98:22 | recv output argument | test.cpp:99:15:99:20 | buffer indirection |
|
||||
| test.cpp:106:17:106:22 | buffer | test.cpp:107:15:107:20 | (const char *)... |
|
||||
| test.cpp:106:17:106:22 | buffer | test.cpp:107:15:107:20 | buffer |
|
||||
| test.cpp:106:17:106:22 | buffer | test.cpp:107:15:107:20 | buffer indirection |
|
||||
| test.cpp:106:17:106:22 | recv output argument | test.cpp:107:15:107:20 | (const char *)... |
|
||||
| test.cpp:106:17:106:22 | recv output argument | test.cpp:107:15:107:20 | buffer |
|
||||
| test.cpp:106:17:106:22 | recv output argument | test.cpp:107:15:107:20 | buffer indirection |
|
||||
nodes
|
||||
| test.cpp:24:30:24:36 | *command | semmle.label | *command |
|
||||
| test.cpp:24:30:24:36 | command | semmle.label | command |
|
||||
@@ -94,6 +106,20 @@ nodes
|
||||
| test.cpp:79:10:79:13 | data | semmle.label | data |
|
||||
| test.cpp:79:10:79:13 | data indirection | semmle.label | data indirection |
|
||||
| test.cpp:79:10:79:13 | data indirection | semmle.label | data indirection |
|
||||
| test.cpp:98:17:98:22 | buffer | semmle.label | buffer |
|
||||
| test.cpp:98:17:98:22 | recv output argument | semmle.label | recv output argument |
|
||||
| test.cpp:99:15:99:20 | (const char *)... | semmle.label | (const char *)... |
|
||||
| test.cpp:99:15:99:20 | (const char *)... | semmle.label | (const char *)... |
|
||||
| test.cpp:99:15:99:20 | buffer | semmle.label | buffer |
|
||||
| test.cpp:99:15:99:20 | buffer indirection | semmle.label | buffer indirection |
|
||||
| test.cpp:99:15:99:20 | buffer indirection | semmle.label | buffer indirection |
|
||||
| test.cpp:106:17:106:22 | buffer | semmle.label | buffer |
|
||||
| test.cpp:106:17:106:22 | recv output argument | semmle.label | recv output argument |
|
||||
| test.cpp:107:15:107:20 | (const char *)... | semmle.label | (const char *)... |
|
||||
| test.cpp:107:15:107:20 | (const char *)... | semmle.label | (const char *)... |
|
||||
| test.cpp:107:15:107:20 | buffer | semmle.label | buffer |
|
||||
| test.cpp:107:15:107:20 | buffer indirection | semmle.label | buffer indirection |
|
||||
| test.cpp:107:15:107:20 | buffer indirection | semmle.label | buffer indirection |
|
||||
#select
|
||||
| test.cpp:26:10:26:16 | command | test.cpp:42:18:42:23 | call to getenv | test.cpp:26:10:26:16 | command | The value of this argument may come from $@ and is being passed to system | test.cpp:42:18:42:23 | call to getenv | call to getenv |
|
||||
| test.cpp:31:10:31:16 | command | test.cpp:43:18:43:23 | call to getenv | test.cpp:31:10:31:16 | command | The value of this argument may come from $@ and is being passed to system | test.cpp:43:18:43:23 | call to getenv | call to getenv |
|
||||
@@ -101,3 +127,5 @@ nodes
|
||||
| test.cpp:63:10:63:13 | data | test.cpp:56:12:56:17 | buffer | test.cpp:63:10:63:13 | data | The value of this argument may come from $@ and is being passed to system | test.cpp:56:12:56:17 | buffer | buffer |
|
||||
| test.cpp:78:10:78:15 | buffer | test.cpp:76:12:76:17 | buffer | test.cpp:78:10:78:15 | buffer | The value of this argument may come from $@ and is being passed to system | test.cpp:76:12:76:17 | buffer | buffer |
|
||||
| test.cpp:79:10:79:13 | data | test.cpp:76:12:76:17 | buffer | test.cpp:79:10:79:13 | data | The value of this argument may come from $@ and is being passed to system | test.cpp:76:12:76:17 | buffer | buffer |
|
||||
| test.cpp:99:15:99:20 | buffer | test.cpp:98:17:98:22 | buffer | test.cpp:99:15:99:20 | buffer | The value of this argument may come from $@ and is being passed to LoadLibrary | test.cpp:98:17:98:22 | buffer | buffer |
|
||||
| test.cpp:107:15:107:20 | buffer | test.cpp:106:17:106:22 | buffer | test.cpp:107:15:107:20 | buffer | The value of this argument may come from $@ and is being passed to LoadLibrary | test.cpp:106:17:106:22 | buffer | buffer |
|
||||
|
||||
@@ -81,3 +81,29 @@ void testReferencePointer2()
|
||||
system(data2); // BAD [NOT DETECTED]
|
||||
}
|
||||
}
|
||||
|
||||
// ---
|
||||
|
||||
typedef unsigned long size_t;
|
||||
|
||||
void accept(int arg, char *buf, size_t *bufSize);
|
||||
void recv(int arg, char *buf, size_t bufSize);
|
||||
void LoadLibrary(const char *arg);
|
||||
|
||||
void testAcceptRecv(int socket1, int socket2)
|
||||
{
|
||||
{
|
||||
char buffer[1024];
|
||||
|
||||
recv(socket1, buffer, 1024);
|
||||
LoadLibrary(buffer); // BAD: using data from recv
|
||||
}
|
||||
|
||||
{
|
||||
char buffer[1024];
|
||||
|
||||
accept(socket2, 0, 0);
|
||||
recv(socket2, buffer, 1024);
|
||||
LoadLibrary(buffer); // BAD: using data from recv
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user