Usage of deprecated function (ulimit)
Description
The ulimit function is obsolete and no longer recommended. Use `getrlimit(2)`, `setrlimit`, or `sysconf` instead.
Examples
Insecure Code
c
ulimit(...)Secure Code
c
getrlimit(...)Remediation
Replace ulimit with getrlimit, setrlimit, or sysconf.
Rule Details
| Field | Value |
|---|---|
| ID | CODE-0604 |
| Category | InsecureConfig |
| Severity | LOW |
| CWE | CWE-676 |
| Confidence | HIGH |
| Impact | LOW |
| Likelihood | LOW |
| Exploitability | COMPLEX |
| Tags | deprecated function, ulimit |
| OWASP | A9:2017-Using Components with Known Vulnerabilities, A06:2021-Vulnerable and Outdated Components |