CVE-2016-10087 - NULL Pointer Dereference

Severity

50%

Complexity

99%

Confidentiality

48%

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.

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.

CVSS 3.0 Base Score 7.5. CVSS Attack Vector: network. CVSS Attack Complexity: low. CVSS Vector: (CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H).

CVSS 2.0 Base Score 5. CVSS Attack Vector: network. CVSS Attack Complexity: low. CVSS Vector: (AV:N/AC:L/Au:N/C:N/I:N/A:P).

Demo Examples

NULL Pointer Dereference

CWE-476

While there are no complete fixes aside from conscientious programming, the following steps will go a long way to ensure that NULL pointer dereferences do not occur.


               
}
/* make use of pointer1 *//* ... */

If you are working with a multithreaded or otherwise asynchronous environment, ensure that proper locking APIs are used to lock before the if statement; and unlock when it has finished.

NULL Pointer Dereference

CWE-476

This example takes an IP address from a user, verifies that it is well formed and then looks up the hostname and copies it into a buffer.


               
}
strcpy(hostname, hp->h_name);/*routine that ensures user_supplied_addr is in the right format for conversion */

If an attacker provides an address that appears to be well-formed, but the address does not resolve to a hostname, then the call to gethostbyaddr() will return NULL. Since the code does not check the return value from gethostbyaddr (CWE-252), a NULL pointer dereference would then occur in the call to strcpy().

Note that this example is also vulnerable to a buffer overflow (see CWE-119).

NULL Pointer Dereference

CWE-476

In the following code, the programmer assumes that the system always has a property named "cmd" defined. If an attacker can control the program's environment so that "cmd" is not defined, the program throws a NULL pointer exception when it attempts to call the trim() method.


               
cmd = cmd.trim();

NULL Pointer Dereference

CWE-476

This application has registered to handle a URL when sent an intent:


               
}......
}
}
int length = URL.length();
...

The application assumes the URL will always be included in the intent. When the URL is not present, the call to getStringExtra() will return null, thus causing a null pointer exception when length() is called.

Overview

First reported 8 years ago

2017-01-30 22:59:00

Last updated 6 years ago

2018-07-13 01:29:00

Affected Software

libpng 0.8

0.8

libpng 0.71

0.71

libpng 0.81

0.81

libpng 0.82

0.82

libpng 0.85

0.85

libpng 0.86

0.86

libpng 0.87

0.87

libpng 0.88

0.88

libpng 0.89

0.89

libpng 0.89c

0.89c

libpng 0.90

0.90

libpng 0.95

0.95

libpng 0.96

0.96

libpng 0.97

0.97

libpng 0.98

0.98

libpng 0.99

0.99

libpng 0.99a

0.99a

libpng 0.99b

0.99b

libpng 0.99c

0.99c

libpng 0.99d

0.99d

libpng 0.99e

0.99e

libpng 0.99f

0.99f

libpng 0.99g

0.99g

libpng 0.99h

0.99h

libpng 1.00

1.00

libpng 1.0.0

1.0.0

libpng 1.0.0a

1.0.0a

libpng 1.0.0b

1.0.0b

libpng 1.0.1

1.0.1

libpng 1.0.1a

1.0.1a

libpng 1.0.1b

1.0.1b

libpng 1.0.1c

1.0.1c

libpng 1.0.1d

1.0.1d

libpng 1.0.1e

1.0.1e

libpng 1.0.2

1.0.2

libpng 1.0.2a

1.0.2a

libpng 1.0.3

1.0.3

libpng 1.0.3a

1.0.3a

libpng 1.0.3b

1.0.3b

libpng 1.0.3d

1.0.3d

libpng 1.0.4

1.0.4

libpng 1.0.4a

1.0.4a

libpng 1.0.4b

1.0.4b

libpng 1.0.4c

1.0.4c

libpng 1.0.4d

1.0.4d

libpng 1.0.4e

1.0.4e

libpng 1.0.4f

1.0.4f

libpng 1.0.5

1.0.5

libpng 1.0.5a

1.0.5a

libpng 1.0.5b

1.0.5b

libpng 1.0.5c

1.0.5c

libpng 1.0.5d

1.0.5d

libpng 1.0.5e

1.0.5e

libpng 1.0.5f

1.0.5f

libpng 1.0.5g

1.0.5g

libpng 1.0.5h

1.0.5h

libpng 1.0.5i

1.0.5i

libpng 1.0.5j

1.0.5j

libpng 1.0.5k

1.0.5k

libpng 1.0.5l

1.0.5l

libpng 1.0.5m

1.0.5m

libpng 1.0.5n

1.0.5n

libpng 1.0.5o

1.0.5o

libpng 1.0.5p

1.0.5p

libpng 1.0.5q

1.0.5q

libpng 1.0.5r

1.0.5r

libpng 1.0.5s

1.0.5s

libpng 1.0.5t

1.0.5t

libpng 1.0.5u

1.0.5u

libpng 1.0.5v

1.0.5v

libpng 1.0.6

1.0.6

libpng 1.0.6d

1.0.6d

libpng 1.0.6e

1.0.6e

libpng 1.0.6f

1.0.6f

libpng 1.0.6g

1.0.6g

libpng 1.0.6h

1.0.6h

libpng 1.0.6i

1.0.6i

libpng 1.0.6j

1.0.6j

libpng 1.0.7

1.0.7

libpng 1.0.8

1.0.8

libpng 1.0.9

1.0.9

libpng 1.0.10

1.0.10

libpng 1.0.11

1.0.11

libpng 1.0.12

1.0.12

libpng 1.0.13

1.0.13

libpng 1.0.14

1.0.14

libpng 1.0.15

1.0.15

libpng 1.0.16

1.0.16

libpng 1.0.17

1.0.17

libpng 1.0.18

1.0.18

libpng 1.0.19

1.0.19

libpng 1.0.20

1.0.20

libpng 1.0.21

1.0.21

libpng 1.0.22

1.0.22

libpng 1.0.23

1.0.23

libpng 1.0.24

1.0.24

libpng 1.0.25

1.0.25

libpng 1.0.26

1.0.26

libpng 1.0.27

1.0.27

libpng 1.0.28

1.0.28

libpng 1.0.29

1.0.29

libpng 1.0.30

1.0.30

libpng 1.0.31

1.0.31

libpng 1.0.32

1.0.32

libpng 1.0.33

1.0.33

libpng 1.0.34

1.0.34

libpng 1.0.35

1.0.35

libpng 1.0.37

1.0.37

libpng 1.0.38

1.0.38

libpng 1.0.39

1.0.39

libpng 1.0.40

1.0.40

libpng 1.0.41

1.0.41

libpng 1.0.42

1.0.42

libpng 1.0.43

1.0.43

libpng 1.0.44

1.0.44

libpng 1.0.45

1.0.45

libpng 1.0.46

1.0.46

libpng 1.0.47

1.0.47

libpng 1.0.48

1.0.48

libpng 1.0.50

1.0.50

libpng 1.0.51

1.0.51

libpng 1.0.52

1.0.52

libpng 1.0.53

1.0.53

libpng 1.0.54

1.0.54

libpng 1.0.55

1.0.55

libpng 1.0.56

1.0.56

libpng 1.0.57

1.0.57

libpng 1.0.58

1.0.58

libpng 1.0.59

1.0.59

libpng 1.0.60

1.0.60

libpng 1.0.61

1.0.61

libpng 1.0.62

1.0.62

libpng 1.0.63

1.0.63

Libpng Libpng 1.0.64

1.0.64

libpng 1.0.65

1.0.65

libpng 1.0.66

1.0.66

libpng 1.2.0

1.2.0

libpng 1.2.1

1.2.1

libpng 1.2.3

1.2.3

libpng 1.2.4

1.2.4

libpng 1.2.6

1.2.6

libpng 1.2.8

1.2.8

libpng 1.2.10

1.2.10

libpng 1.2.12

1.2.12

libpng 1.2.13

1.2.13

libpng 1.2.14

1.2.14

libpng 1.2.16

1.2.16

libpng 1.2.18

1.2.18

libpng 1.2.20

1.2.20

libpng 1.2.21

1.2.21

libpng 1.2.22

1.2.22

libpng 1.2.24

1.2.24

libpng 1.2.25

1.2.25

libpng 1.2.26

1.2.26

libpng 1.2.27

1.2.27

libpng 1.2.29

1.2.29

libpng 1.2.32

1.2.32

libpng 1.2.33

1.2.33

libpng 1.2.35

1.2.35

libpng 1.2.37

1.2.37

libpng 1.2.38

1.2.38

libpng 1.2.39

1.2.39

libpng 1.2.41

1.2.41

libpng 1.2.42

1.2.42

libpng 1.2.44

1.2.44

libpng 1.2.45

1.2.45

libpng 1.2.46

1.2.46

libpng 1.2.47

1.2.47

Libpng Libpng 1.2.50

1.2.50

Libpng Libpng 1.2.51

1.2.51

Libpng Libpng 1.2.52

1.2.52

Libpng Libpng 1.2.53

1.2.53

Libpng Libpng 1.2.54

1.2.54

libpng 1.2.55

1.2.55

libpng 1.2.56

1.2.56

libpng 1.4.0

1.4.0

libpng 1.4.1

1.4.1

libpng 1.4.2

1.4.2

libpng 1.4.3

1.4.3

libpng 1.4.4

1.4.4

libpng 1.4.5

1.4.5

libpng 1.4.6

1.4.6

libpng 1.4.7

1.4.7

libpng 1.4.8

1.4.8

libpng 1.4.9

1.4.9

libpng 1.4.10

1.4.10

Libpng Libpng 1.4.11

1.4.11

Libpng Libpng 1.4.12

1.4.12

Libpng Libpng 1.4.13

1.4.13

Libpng Libpng 1.4.14

1.4.14

Libpng Libpng 1.4.15

1.4.15

Libpng Libpng 1.4.16

1.4.16

Libpng Libpng 1.4.17

1.4.17

libpng 1.4.18

1.4.18

libpng 1.4.19

1.4.19

libpng 1.5.1

1.5.1

libpng 1.5.2

1.5.2

libpng 1.5.4

1.5.4

libpng 1.5.5

1.5.5

libpng 1.5.6

1.5.6

libpng 1.5.7

1.5.7

libpng 1.5.8

1.5.8

libpng 1.5.9

1.5.9

libpng 1.5.11

1.5.11

libpng 1.5.12

1.5.12

libpng 1.5.13

1.5.13

Libpng Libpng 1.5.14

1.5.14

Libpng Libpng 1.5.15

1.5.15

Libpng Libpng 1.5.16

1.5.16

Libpng Libpng 1.5.17

1.5.17

Libpng Libpng 1.5.18

1.5.18

Libpng Libpng 1.5.19

1.5.19

Libpng Libpng 1.5.21

1.5.21

Libpng Libpng 1.5.22

1.5.22

Libpng Libpng 1.5.23

1.5.23

Libpng Libpng 1.5.24

1.5.24

libpng 1.5.25

1.5.25

libpng 1.5.26

1.5.26

libpng 1.5.27

1.5.27

libpng 1.6.0

1.6.0

libpng 1.6.1

1.6.1

libpng 1.6.2

1.6.2

libpng 1.6.3

1.6.3

libpng 1.6.4

1.6.4

libpng 1.6.5

1.6.5

libpng 1.6.6

1.6.6

libpng 1.6.7

1.6.7

libpng 1.6.8

1.6.8

libpng 1.6.9

1.6.9

libpng libpng 1.6.10

1.6.10

libpng libpng 1.6.11

1.6.11

libpng libpng 1.6.13

1.6.13

libpng libpng 1.6.14

1.6.14

libpng libpng 1.6.15

1.6.15

Libpng Libpng 1.6.16

1.6.16

Libpng Libpng 1.6.17

1.6.17

libpng libpng 1.6.18

1.6.18

Libpng Libpng 1.6.19

1.6.19

libpng 1.6.20

1.6.20

libpng 1.6.21

1.6.21

libpng 1.6.22

1.6.22

libpng 1.6.23

1.6.23

libpng 1.6.24

1.6.24

libpng 1.6.25

1.6.25

libpng 1.6.26

1.6.26

Stay updated

ExploitPedia is constantly evolving. Sign up to receive a notification when we release additional functionality.

Get in touch

If you'd like to report a bug or have any suggestions for improvements then please do get in touch with us using this form. We will get back to you as soon as we can.