Versions Compared

Key

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

...

Using arrays polymorphically can result in memory corruption, which could lead to an attacker being able to execute arbitrary code.

Rule

Severity

Likelihood

Remediation Cost

Priority

Level

CTR56-CPP

High

Likely

High

P9

L2

Automated Detection

Tool

Version

Checker

Description

Parasoft C/C++test
Include Page
cplusplus:
Parasoft_V
cplusplus:
Parasoft_V
PB-10, STL-02
 

LDRA tool suite
Include Page
LDRA_V
LDRA_V

567 S

Enhanced Enforcement

PRQA QA-C++
Include Page
PRQA QA-C++_V
PRQA QA-C++_V
3073

PVS-Studio6.22V777General analysis rule
 

Related Vulnerabilities

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

Related Guidelines

Bibliography

[ISO/IEC 14882-2014]

Subclause 5.7, "Additive Operators"
Subclause 5.2.1, "Subscripting" 

[Lockheed Martin 2005]AV Rule 96, "Arrays shall not be treated polymorphically"
[Meyers 1996]Item 3, "Never Treat Arrays Polymorphically"
[Stroustrup 2006]"What's Wrong with Arrays?"
[Sutter 2004]Item 100, "Don't Treat Arrays Polymorphically"

...


...