Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Mismatched usage of new and delete could lead to a denial-of-service attack.

Rule

Severity

Likelihood

Remediation Cost

Priority

Level

DCL54-CPP

Low

Probable

Low

P6

L2

Automated Detection

Tool

Version

Checker

Description

Astrée

Include Page
Astrée_V
Astrée_V

new-delete-pairwise
Partially checked
Axivion Bauhaus Suite

Include Page
Axivion Bauhaus Suite_V
Axivion Bauhaus Suite_V

CertC++-DCL54
Clang
Include Page
Clang_38_V
Clang_38_V
misc-new-delete-overloadsChecked with clang-tidy.
Helix QAC

Include Page
Helix QAC_V
Helix QAC_V

C++2160
Klocwork
Include Page
Klocwork_V
Klocwork_V
CERT.DCL.SAME_SCOPE_ALLOC_DEALLOC 
Parasoft C/C++test
Include Page
cplusplus:
Parasoft_V
cplusplus:
Parasoft_V
MRM-26, MRM-27 PRQA QA-C++ Include PagePRQA QA-C++_VPRQA QA-C++_V2160
CERT_CPP-DCL54-a

Always provide new and delete together

Polyspace Bug Finder

Include Page
Polyspace Bug Finder_V
Polyspace Bug Finder_V

CERT C++: DCL54-CPPChecks for mismatch between overloaded operator new and operator delete (rule fully covered)
RuleChecker
Include Page
RuleChecker_V
RuleChecker_V
new-delete-pairwise
Partially checked
 
SonarQube C/C++ Plugin
Include Page
SonarQube C/C++ Plugin_V
SonarQube C/C++ Plugin_V
S1265
 

Related Vulnerabilities

Search for vulnerabilities resulting from the violation of this rule on the CERT website.

Related Guidelines

Bibliography

[ISO/IEC 14882-2014]

Subclause 3.7.4, "Dynamic Storage Duration"
Subclause 5.3.4, "New"
Subclause 5.3.5, "Delete"

 

 


...