llvm-project
llvm-project copied to clipboard
[Compiler-RT] CodeQL Violations
Description
CodeQL analysis has flagged violations in the codebase of compiler-rt. These issues may impact code quality, security, or maintainability and should be reviewed and addressed.
Some violations are addressed in PR 154937 & PR 159097.
Pending severe violations
- cpp/pointer-overflow-check In compiler-rt/lib/safestack/safestack.cpp at line 126 ,127
- cpp/command-line-injection In fuzzer/FuzzerUtilLinux.cpp at line 27
- cpp/incorrect-string-type-conversion In sanitizer_common/sanitizer_common_interceptors_format.inc at line 355
- cpp/uncontrolled-allocation-size In profile/InstrProfilingFile.c at line 383
Violation Summary Report Detailed Violation Summary Report
Steps to Reproduce
- Download CodeQL and Configuration
- Create/Build the CodeQL database for compiler-rt
Note. Please Clean the build directory of compile-rt usingcodeql database create /path/to/dir/CODEQL_DB --language=cpp --source-root="llvm-project" --command="ninja -C /path/to/build/dir/compiler-rt"ninja cleanbefore running above command. - Analyze the CodeQL database
codeql database analyze /path/to/dir/CODEQL_DB --format=sarif-latest --output="results.sarif" cpp-security-extended.qls - Generate report in html using sarif tool
sarif html -o results.html results.sarif
Environment
LLVM version: 22.0.0 OS: Ubuntu 22.04 Architecture: x86_64 LLVM Branch: main Commit HEAD: 2155f17d39f3969ef841c85ef1102a214ab22b30