CVE Vulnerabilities

CVE-2017-5335

Out-of-bounds Read

Published: Mar 24, 2017 | Modified: Oct 30, 2018
CVSS 3.x
7.5
HIGH
Source:
NVD
CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H
CVSS 2.x
5 MEDIUM
AV:N/AC:L/Au:N/C:N/I:N/A:P
RedHat/V2
RedHat/V3
5.3 MODERATE
CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:L
Ubuntu
MEDIUM

The stream reading functions in lib/opencdk/read-packet.c in GnuTLS before 3.3.26 and 3.5.x before 3.5.8 allow remote attackers to cause a denial of service (out-of-memory error and crash) via a crafted OpenPGP certificate.

Weakness

The product reads data past the end, or before the beginning, of the intended buffer.

Affected Software

Name Vendor Start Version End Version
Leap Opensuse 42.1 (including) 42.1 (including)
Leap Opensuse 42.2 (including) 42.2 (including)
Red Hat Enterprise Linux 6 RedHat gnutls-0:2.12.23-21.el6 *
Red Hat Enterprise Linux 7 RedHat gnutls-0:3.3.26-9.el7 *
Gnutls26 Ubuntu precise *
Gnutls26 Ubuntu trusty *
Gnutls28 Ubuntu artful *
Gnutls28 Ubuntu bionic *
Gnutls28 Ubuntu cosmic *
Gnutls28 Ubuntu devel *
Gnutls28 Ubuntu disco *
Gnutls28 Ubuntu precise *
Gnutls28 Ubuntu trusty *
Gnutls28 Ubuntu upstream *
Gnutls28 Ubuntu vivid/stable-phone-overlay *
Gnutls28 Ubuntu vivid/ubuntu-core *
Gnutls28 Ubuntu xenial *
Gnutls28 Ubuntu yakkety *
Gnutls28 Ubuntu zesty *

Potential Mitigations

  • Assume all input is malicious. Use an “accept known good” input validation strategy, i.e., use a list of acceptable inputs that strictly conform to specifications. Reject any input that does not strictly conform to specifications, or transform it into something that does.
  • When performing input validation, consider all potentially relevant properties, including length, type of input, the full range of acceptable values, missing or extra inputs, syntax, consistency across related fields, and conformance to business rules. As an example of business rule logic, “boat” may be syntactically valid because it only contains alphanumeric characters, but it is not valid if the input is only expected to contain colors such as “red” or “blue.”
  • Do not rely exclusively on looking for malicious or malformed inputs. This is likely to miss at least one undesirable input, especially if the code’s environment changes. This can give attackers enough room to bypass the intended validation. However, denylists can be useful for detecting potential attacks or determining which inputs are so malformed that they should be rejected outright.
  • To reduce the likelihood of introducing an out-of-bounds read, ensure that you validate and ensure correct calculations for any length argument, buffer size calculation, or offset. Be especially careful of relying on a sentinel (i.e. special character such as NUL) in untrusted inputs.

References