Main Content
Load of library from a relative path can be controlled by an external actor
Library loaded with relative path is vulnerable to malicious attacks
Description
This defect occurs when library loading routines that load an external library use a relative path or do not use a path at all.
Risk
By using a relative path or no path to load an external library, your program uses an unsafe search process to find the library. An attacker can control the search process and replace the intended library with a library of their own.
Fix
When you load an external library, specify the full path.
Examples
Result Information
Group: Security |
Language: C | C++ |
Default: Off |
Command-Line Syntax: RELATIVE_PATH_LIB |
Impact: Medium |
Version History
Introduced in R2015b
See Also
Execution of a binary from a relative path can be controlled by an external actor
| Vulnerable path manipulation
| Library loaded from externally controlled path
| 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)