Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: axivion bauhaus

...

Passing an invalid type or member to offsetof() can result in undefined behavior that might be exploited to cause data integrity violations or result in incorrect values from the macro expansion.

Rule

Severity

Likelihood

Remediation Cost

Priority

Level

EXP59-CPP

Medium

Unlikely

Medium

P4

L3 

Automated Detection 

Tool

Version

Checker

Description

Axivion Bauhaus Suite

Include Page
c:Axivion Bauhaus Suite_V
c:Axivion Bauhaus Suite_V

CertC++-EXP59
Clang
Include Page
Clang_V
Clang_V

-Winvalid-offsetof

Emits an error diagnostic on invalid member designators, and emits a warning diagnostic on invalid types.
GCC
Include Page
Gcc_V
Gcc_V

-Winvalid-offsetof

Emits an error diagnostic on invalid member designators, and emits a warning diagnostic on invalid types.

Related Vulnerabilities

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

Bibliography

[ISO/IEC 9899:1999]Subclause 7.17, "Common Definitions <stddef.h>"
[ISO/IEC 14882-2014]

Subclause 9.4.2, "Static Data Members"

Subclause 18.2, "Types"

...


...