1. CVE archive
  2. 2016
  3. CVE-2016-10087

CVE-2016-10087

7.5 High severity CVSS v3.0 · source NVD CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H 7.5 – High

Description

The png_set_text_2 function in libpng 0.71 before 1.0.67, 1.2.x before 1.2.57, 1.4.x before 1.4.20, 1.5.x before 1.5.28, and 1.6.x before 1.6.27 allows context-dependent attackers to cause a NULL pointer dereference vectors involving loading a text chunk into a png structure, removing the text, and then adding another text chunk to the structure.

Affected products

VendorProductVersionPlatform
libpng libpng 1.0.33 –
libpng libpng 1.0.34 –
libpng libpng 1.0.35 –
libpng libpng 1.0.37 –
libpng libpng 1.0.38 –
libpng libpng 1.0.39 –
libpng libpng 1.0.40 –
libpng libpng 1.0.41 –
libpng libpng 1.0.42 –
libpng libpng 1.0.43 –
libpng libpng 1.0.44 –
libpng libpng 1.0.45 –
libpng libpng 1.0.46 –
libpng libpng 1.0.47 –
libpng libpng 1.0.48 –
libpng libpng 1.0.50 –
libpng libpng 1.0.51 –
libpng libpng 1.0.52 –
libpng libpng 1.0.53 –
libpng libpng 1.0.54 –
libpng libpng 1.0.55 –
libpng libpng 1.0.56 –
libpng libpng 1.0.57 –
libpng libpng 1.0.58 –
libpng libpng 1.0.59 –
libpng libpng 1.0.60 –
libpng libpng 1.0.61 –
libpng libpng 1.0.62 –
libpng libpng 1.0.63 –
libpng libpng 1.0.64 –
libpng libpng 1.0.65 –
libpng libpng 1.0.66 –
libpng libpng 1.2.0 –
libpng libpng 1.2.1 –
libpng libpng 1.2.3 –
libpng libpng 1.2.4 –
libpng libpng 1.2.6 –
libpng libpng 1.2.8 –
libpng libpng 1.2.10 –
libpng libpng 1.2.12 –
libpng libpng 1.2.13 –
libpng libpng 1.2.14 –
libpng libpng 1.2.16 –
libpng libpng 1.2.18 –
libpng libpng 1.2.20 –
libpng libpng 1.2.21 –
libpng libpng 1.2.22 –
libpng libpng 1.2.24 –
libpng libpng 1.2.25 –
libpng libpng 1.2.26 –
libpng libpng 1.2.27 –
libpng libpng 1.2.29 –
libpng libpng 1.2.32 –
libpng libpng 1.2.33 –
libpng libpng 1.2.35 –
libpng libpng 1.2.37 –
libpng libpng 1.2.38 –
libpng libpng 1.2.39 –
libpng libpng 1.2.41 –
libpng libpng 1.2.42 –
libpng libpng 1.2.44 –
libpng libpng 1.2.45 –
libpng libpng 1.2.46 –
libpng libpng 1.2.47 –
libpng libpng 1.2.50 –
libpng libpng 1.2.51 –
libpng libpng 1.2.52 –
libpng libpng 1.2.53 –
libpng libpng 1.2.54 –
libpng libpng 1.2.55 –
libpng libpng 1.2.56 –
libpng libpng 1.4.0 –
libpng libpng 1.4.1 –
libpng libpng 1.4.2 –
libpng libpng 1.4.3 –
libpng libpng 1.4.4 –
libpng libpng 1.4.5 –
libpng libpng 1.4.6 –
libpng libpng 1.4.7 –
libpng libpng 1.4.8 –
libpng libpng 1.4.9 –
libpng libpng 1.4.10 –
libpng libpng 1.4.11 –
libpng libpng 1.4.12 –
libpng libpng 1.4.13 –
libpng libpng 1.4.14 –
libpng libpng 1.4.15 –
libpng libpng 1.4.16 –
libpng libpng 1.4.17 –
libpng libpng 1.4.18 –
libpng libpng 1.4.19 –
libpng libpng 1.5.0 –
libpng libpng 1.5.1 –
libpng libpng 1.5.2 –
libpng libpng 1.5.3 –
libpng libpng 1.5.4 –
libpng libpng 1.5.5 –
libpng libpng 1.5.6 –
libpng libpng 1.5.7 –
libpng libpng 1.5.8 –

Showing 100 of 250 configurations. The full list is on NVD.

All 58 Libpng vulnerabilities

Vulnerability type

CWE-476 NULL Pointer Dereference

The product dereferences a pointer that it expects to be valid but is NULL.

Impact on systems

ScopeImpact
Availability DoS: Crash, Exit, or Restart
NULL pointer dereferences usually result in the failure of the process unless exception handling (on some platforms) is available and implemented. Even when exception handling is being used, it can still be very difficult to return the software to a safe state of operation.
Integrity, Confidentiality Execute Unauthorized Code or Commands, Read Memory, Modify Memory
In rare circumstances, when NULL is equivalent to the 0x0 memory address and privileged code can access it, then writing or reading memory is possible, which may lead to code execution.

How to prevent it

Implementation For any pointers that could have been modified or provided from a function that can return NULL, check the pointer for NULL before use. When working with a multithreaded or otherwise asynchronous environment, ensure that proper locking APIs are used to lock before the check, and unlock when it has finished.
Requirements Select a programming language that is not susceptible to these issues.
Implementation Check the results of all functions that return a value and verify that the value is non-null before acting upon it.
Architecture and Design Identify all variables and data stores that receive information from external sources, and apply input validation to make sure that they are only initialized to expected values.
Implementation Explicitly initialize all variables and other data stores, either during declaration or just before the first usage.

All 5,819 CWE-476 CVEs, with trend and prevention

Source: MITRE CWE catalog · cwe.mitre.org