...
Padding bits might inadvertently contain sensitive data such as pointers to kernel data structures or passwords. A pointer to such a structure could be passed to other functions, causing information leakage.
Rule | Severity | Likelihood | Detectable | RepairableRemediation Cost | Priority | Level |
|---|---|---|---|---|---|---|
DCL55-CPP | Low | Unlikely | No | HighYes | P1P2 | L3 |
Automated Detection
Tool | Version | Checker | Description | ||||||
|---|---|---|---|---|---|---|---|---|---|
| Axivion Bauhaus Suite |
| CertC++-DCL55 | |||||||
| CodeSonar |
| MISC.PADDING.POTB | Padding Passed Across a Trust Boundary | ||||||
| Helix QAC |
| DF4941, DF4942, DF4943 | |||||||
| Parasoft C/C++test |
| CERT_CPP-DCL55-a | A pointer to a structure should not be passed to a function that can copy data to the user space | ||||||
| Helix QACPolyspace Bug Finder |
| CERT C++: DCL55-CPP | Checks for information leakage due to structure padding (rule partially covered) |
Related Vulnerabilities
Numerous vulnerabilities in the Linux Kernel have resulted from violations of this rule.
...
| SEI CERT C Coding Standard | DCL39-C. Avoid information leakage when passing a structure across a trust boundary |
Bibliography
| [ISO/IEC 14882-2014] | Subclause 8.5, "Initializers" |
...