Skip to content

Error Message Exposure of Memory Addresses

Description

The software generates an error message that includes sensitive information about its environment, users, or associated data. In particular, exposure of memory addresses might defeat ASLR.

Examples

Insecure Code

c
printf("Error: %p", pointer);

Secure Code

c
printf("Error: pointer address not logged for security reasons");

Remediation

Use a secure logging mechanism that does not include sensitive information, such as memory addresses, in error messages. Consider using a logging library that provides a secure way to log errors.

Rule Details

FieldValue
IDCODE-0242
CategoryErrorHandling
SeverityMEDIUM
CWECWE-209
ConfidenceLOW
ImpactMEDIUM
LikelihoodMEDIUM
ExploitabilityMODERATE
Tagserror handling, logging, memory address exposure
OWASPN/A

References