CVE Vulnerabilities

CVE-2018-12886

Generation of Error Message Containing Sensitive Information

Published: May 22, 2019 | Modified: Nov 21, 2024
CVSS 3.x
8.1
HIGH
Source:
NVD
CVSS:3.0/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:H
CVSS 2.x
6.8 MEDIUM
AV:N/AC:M/Au:N/C:P/I:P/A:P
RedHat/V2
RedHat/V3
6.8 MODERATE
CVSS:3.0/AV:L/AC:L/PR:N/UI:N/S:U/C:L/I:N/A:H
Ubuntu
LOW

stack_protect_prologue in cfgexpand.c and stack_protect_epilogue in function.c in GNU Compiler Collection (GCC) 4.1 through 8 (under certain circumstances) generate instruction sequences when targeting ARM targets that spill the address of the stack protector guard, which allows an attacker to bypass the protection of -fstack-protector, -fstack-protector-all, -fstack-protector-strong, and -fstack-protector-explicit against stack overflow by controlling what the stack canary is compared against.

Weakness

The product generates an error message that includes sensitive information about its environment, users, or associated data.

Affected Software

Name Vendor Start Version End Version
Gcc Gnu 4.1 (including) 8.0 (including)
Gcc-4.8 Ubuntu bionic *
Gcc-4.8 Ubuntu cosmic *
Gcc-4.8 Ubuntu esm-apps/xenial *
Gcc-4.8 Ubuntu esm-infra-legacy/trusty *
Gcc-4.8 Ubuntu trusty *
Gcc-4.8 Ubuntu trusty/esm *
Gcc-4.8 Ubuntu xenial *
Gcc-4.9 Ubuntu esm-apps/xenial *
Gcc-4.9 Ubuntu trusty *
Gcc-4.9 Ubuntu xenial *
Gcc-6 Ubuntu bionic *
Gcc-6 Ubuntu cosmic *
Gcc-6 Ubuntu disco *
Gcc-6 Ubuntu esm-apps/bionic *
Gcc-6 Ubuntu trusty *
Gcc-7 Ubuntu bionic *
Gcc-7 Ubuntu cosmic *
Gcc-7 Ubuntu disco *
Gcc-7 Ubuntu eoan *
Gcc-7 Ubuntu esm-infra/bionic *
Gcc-7 Ubuntu focal *
Gcc-7 Ubuntu groovy *
Gcc-7 Ubuntu hirsute *
Gcc-8 Ubuntu bionic *
Gcc-8 Ubuntu cosmic *
Gcc-8 Ubuntu disco *
Gcc-8 Ubuntu eoan *
Gcc-8 Ubuntu groovy *
Gcc-8 Ubuntu hirsute *
Gcc-8 Ubuntu impish *
Gcc-9 Ubuntu upstream *
Gcc-arm-none-eabi Ubuntu bionic *
Gcc-arm-none-eabi Ubuntu cosmic *
Gcc-arm-none-eabi Ubuntu disco *
Gcc-arm-none-eabi Ubuntu eoan *
Gcc-arm-none-eabi Ubuntu groovy *
Gcc-arm-none-eabi Ubuntu hirsute *
Gcc-arm-none-eabi Ubuntu impish *
Gcc-arm-none-eabi Ubuntu kinetic *
Gcc-arm-none-eabi Ubuntu lunar *
Gcc-arm-none-eabi Ubuntu mantic *
Gcc-arm-none-eabi Ubuntu trusty *
Gcc-arm-none-eabi Ubuntu xenial *
Gcc-snapshot Ubuntu bionic *
Gcc-snapshot Ubuntu cosmic *
Gcc-snapshot Ubuntu disco *
Gcc-snapshot Ubuntu eoan *
Gcc-snapshot Ubuntu esm-apps/bionic *
Gcc-snapshot Ubuntu groovy *
Gcc-snapshot Ubuntu hirsute *
Gcc-snapshot Ubuntu impish *
Gcc-snapshot Ubuntu kinetic *
Gcc-snapshot Ubuntu lunar *
Gcc-snapshot Ubuntu mantic *
Gcc-snapshot Ubuntu trusty *
Gcc-snapshot Ubuntu xenial *

Extended Description

The sensitive information may be valuable information on its own (such as a password), or it may be useful for launching other, more serious attacks. The error message may be created in different ways:

An attacker may use the contents of error messages to help launch another, more focused attack. For example, an attempt to exploit a path traversal weakness (CWE-22) might yield the full pathname of the installed application. In turn, this could be used to select the proper number of “..” sequences to navigate to the targeted file. An attack using SQL injection (CWE-89) might not initially succeed, but an error message could reveal the malformed query, which would expose query logic and possibly even passwords or other sensitive information used within the query.

Potential Mitigations

  • Ensure that error messages only contain minimal details that are useful to the intended audience and no one else. The messages need to strike the balance between being too cryptic (which can confuse users) or being too detailed (which may reveal more than intended). The messages should not reveal the methods that were used to determine the error. Attackers can use detailed information to refine or optimize their original attack, thereby increasing their chances of success.
  • If errors must be captured in some detail, record them in log messages, but consider what could occur if the log messages can be viewed by attackers. Highly sensitive information such as passwords should never be saved to log files.
  • Avoid inconsistent messaging that might accidentally tip off an attacker about internal state, such as whether a user account exists or not.

References