[clang] [analyzer] Adding taint analysis capability to unix.Malloc checker (PR #92420)

DonĂ¡t Nagy via cfe-commits cfe-commits at lists.llvm.org
Mon May 27 08:55:55 PDT 2024


================
@@ -1730,6 +1721,21 @@ def UnixAPIPortabilityChecker : Checker<"UnixAPI">,
 
 } // end optin.portability
 
+
+//===----------------------------------------------------------------------===//
+// Taint checkers.
+//===----------------------------------------------------------------------===//
+
+let ParentPackage = TaintOptIn in {
+
+def TaintMallocChecker: Checker<"TaintMalloc">,
+  HelpText<"Check for memory allocations, where the size parameter "
+           "might be a tainted (attacker controlled) value.">,
+  Dependencies<[DynamicMemoryModeling]>,
----------------
NagyDonat wrote:

Once the `TaintPropagation` checker will be brought out of alpha, it should be added as a dependency of this checker.

https://github.com/llvm/llvm-project/pull/92420


More information about the cfe-commits mailing list