Unsafe call to a system function
Unsanitized command argument has exploitable vulnerabilities
Description
This defect occurs when you use a function that invokes an implementation-defined command processor. These functions include:
The C standard
system()function.The POSIX
popen()function.The Windows®
_popen()and_wpopen()functions.
Risk
If the argument of a function that invokes a command processor is not sanitized, it can cause exploitable vulnerabilities. An attacker can execute arbitrary commands or read and modify data anywhere on the system.
Fix
Do not use a system-family function to invoke a command processor.
Instead, use safer functions such as POSIX execve() and WinAPI
CreateProcess().
Examples
Result Information
| Group: Security |
| Language: C | C++ |
| Default: Off |
Command-Line Syntax:
UNSAFE_SYSTEM_CALL
|
| Impact: High |
Version History
Introduced in R2017b
See Also
Command executed from externally controlled path | Execution of externally controlled command | Find defects (-checkers)
Topics
- Interpret Bug Finder Results in Polyspace Desktop User Interface
- Interpret Bug Finder Results in Polyspace Access Web Interface (Polyspace Access)
- Address Results in Polyspace User Interface Through Bug Fixes or Justifications
- Address Results in Polyspace Access Through Bug Fixes or Justifications (Polyspace Access)