JavaScript is not currently enabled, but is required for full CodeSonar manual search and browse functionality.
If you are viewing this file in your hub's Web GUI, enable JavaScript in your browser: you will also need it for GUI functionality.
If you opened this file directly from disk, your browser may be directly suppressing JavaScript functionality: certain browsers perform this suppression on local files (but not files delivered by web servers) for security reasons.
| CodeSonar® 9.2p0 | CONFIDENTIAL | CodeSecure Inc |
A use of an _exec-family function that takes a path argument (see full list below). These functions are vulnerable to path spoofing if the path argument is not securely specified.
| Class Name | Use of _exec | ||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Significance | security | ||||||||||||||||||
| Mnemonic | BADFUNC.PATH._EXEC | ||||||||||||||||||
| Categories |
|
||||||||||||||||||
| Availability | Available for C and C++. |
||||||||||||||||||
| Enabling | Checks for this warning class are
disabled by default. To enable them, add the following WARNING_FILTER
rule to the project configuration file.
WARNING_FILTER += allow class="Use of _exec" |
| int | _execl(const char *cmdname, const char *arg0, ...) |
| int | _execle(const char *cmdname, const char *arg0, ...) |
| int | _execlp(const char *cmdname, const char *arg0, ...) |
| int | _execlpe(const char *cmdname, const char *arg0, ...) |
| int | _execv(const char *cmdname, const char *const *argv) |
| int | _execve(const char *cmdname, const char *const *argv, const char *const *envp) |
| int | _execvp(const char *cmdname, const char *const *argv) |
| int | _execvpe(const char *cmdname, const char *const *argv, const char *const *envp) |
| int | _wexecl(const wchar_t *cmdname, const wchar_t *arg0, ... const wchar_t *argn, NULL) |
| int | _wexecle(const wchar_t *cmdname, const wchar_t *arg0, ...) |
| int | _wexeclp(const wchar_t *cmdname, const wchar_t *arg0, ...) |
| int | _wexeclpe(const wchar_t *cmdname, const wchar_t *arg0, ...) |
| int | _wexecv(const wchar_t *cmdname, const wchar_t *const *argv) |
| int | _wexecve(const wchar_t *cmdname, const wchar_t *const *argv, const wchar_t *const *envp) |
| int | _wexecvp(const wchar_t *cmdname, const wchar_t *const *argv) |
| int | _wexecvpe(const wchar_t *cmdname, const wchar_t *const *argv, const wchar_t *const *envp) |
When you are warned about a use of one of these functions, make sure that the cmdname argument is a fully-specified path name (including file extension) from a trusted source.
Once you are satisfied that these conditions hold, you can change the warning state to Suppressed.
This class is implemented using a BAD_FUNCTION_* rule set in the general template configuration file.
The following configuration file parameters affect checks for this warning class.
To report problems with this documentation, please visit https://support.codesecure.com/.