CVE Vulnerabilities

CVE-2016-1251

Use After Free

Published: Nov 29, 2016 | Modified: Jul 01, 2017
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
5.1 MODERATE
AV:N/AC:H/Au:N/C:P/I:P/A:P
RedHat/V3
7.5 MODERATE
CVSS:3.0/AV:N/AC:H/PR:N/UI:R/S:U/C:H/I:H/A:H
Ubuntu
LOW

There is a vulnerability of type use-after-free affecting DBD::mysql (aka DBD-mysql or the Database Interface (DBI) MySQL driver for Perl) 3.x and 4.x before 4.041 when used with mysql_server_prepare=1.

Weakness

Referencing memory after it has been freed can cause a program to crash, use unexpected values, or execute code.

Affected Software

Name Vendor Start Version End Version
Dbd-mysql Dbd-mysql_project 3.0000_0 (including) 3.0000_0 (including)
Dbd-mysql Dbd-mysql_project 3.0001_1 (including) 3.0001_1 (including)
Dbd-mysql Dbd-mysql_project 3.0001_2 (including) 3.0001_2 (including)
Dbd-mysql Dbd-mysql_project 3.0001_3 (including) 3.0001_3 (including)
Dbd-mysql Dbd-mysql_project 3.0002_1 (including) 3.0002_1 (including)
Dbd-mysql Dbd-mysql_project 3.0002_2 (including) 3.0002_2 (including)
Dbd-mysql Dbd-mysql_project 3.0002_3 (including) 3.0002_3 (including)
Dbd-mysql Dbd-mysql_project 3.0002_4 (including) 3.0002_4 (including)
Dbd-mysql Dbd-mysql_project 3.0002_5 (including) 3.0002_5 (including)
Dbd-mysql Dbd-mysql_project 3.0003_1 (including) 3.0003_1 (including)
Dbd-mysql Dbd-mysql_project 3.0004_1 (including) 3.0004_1 (including)
Dbd-mysql Dbd-mysql_project 3.0005 (including) 3.0005 (including)
Dbd-mysql Dbd-mysql_project 3.0005_1 (including) 3.0005_1 (including)
Dbd-mysql Dbd-mysql_project 3.0007_2 (including) 3.0007_2 (including)
Dbd-mysql Dbd-mysql_project 3.0008_1 (including) 3.0008_1 (including)
Dbd-mysql Dbd-mysql_project 3.0009_1 (including) 3.0009_1 (including)
Dbd-mysql Dbd-mysql_project 4.00 (including) 4.00 (including)
Dbd-mysql Dbd-mysql_project 4.001 (including) 4.001 (including)
Dbd-mysql Dbd-mysql_project 4.002 (including) 4.002 (including)
Dbd-mysql Dbd-mysql_project 4.003 (including) 4.003 (including)
Dbd-mysql Dbd-mysql_project 4.004 (including) 4.004 (including)
Dbd-mysql Dbd-mysql_project 4.005 (including) 4.005 (including)
Dbd-mysql Dbd-mysql_project 4.006 (including) 4.006 (including)
Dbd-mysql Dbd-mysql_project 4.007 (including) 4.007 (including)
Dbd-mysql Dbd-mysql_project 4.008 (including) 4.008 (including)
Dbd-mysql Dbd-mysql_project 4.009 (including) 4.009 (including)
Dbd-mysql Dbd-mysql_project 4.010 (including) 4.010 (including)
Dbd-mysql Dbd-mysql_project 4.011 (including) 4.011 (including)
Dbd-mysql Dbd-mysql_project 4.012 (including) 4.012 (including)
Dbd-mysql Dbd-mysql_project 4.013 (including) 4.013 (including)
Dbd-mysql Dbd-mysql_project 4.014 (including) 4.014 (including)
Dbd-mysql Dbd-mysql_project 4.015 (including) 4.015 (including)
Dbd-mysql Dbd-mysql_project 4.016 (including) 4.016 (including)
Dbd-mysql Dbd-mysql_project 4.017 (including) 4.017 (including)
Dbd-mysql Dbd-mysql_project 4.018 (including) 4.018 (including)
Dbd-mysql Dbd-mysql_project 4.019 (including) 4.019 (including)
Dbd-mysql Dbd-mysql_project 4.020 (including) 4.020 (including)
Dbd-mysql Dbd-mysql_project 4.021 (including) 4.021 (including)
Dbd-mysql Dbd-mysql_project 4.022 (including) 4.022 (including)
Dbd-mysql Dbd-mysql_project 4.023 (including) 4.023 (including)
Dbd-mysql Dbd-mysql_project 4.024 (including) 4.024 (including)
Dbd-mysql Dbd-mysql_project 4.025 (including) 4.025 (including)
Dbd-mysql Dbd-mysql_project 4.026 (including) 4.026 (including)
Dbd-mysql Dbd-mysql_project 4.027 (including) 4.027 (including)
Dbd-mysql Dbd-mysql_project 4.028 (including) 4.028 (including)
Dbd-mysql Dbd-mysql_project 4.029 (including) 4.029 (including)
Dbd-mysql Dbd-mysql_project 4.030_01 (including) 4.030_01 (including)
Dbd-mysql Dbd-mysql_project 4.030_02 (including) 4.030_02 (including)
Dbd-mysql Dbd-mysql_project 4.031 (including) 4.031 (including)
Dbd-mysql Dbd-mysql_project 4.032 (including) 4.032 (including)
Dbd-mysql Dbd-mysql_project 4.032_01 (including) 4.032_01 (including)
Dbd-mysql Dbd-mysql_project 4.032_02 (including) 4.032_02 (including)
Dbd-mysql Dbd-mysql_project 4.032_03 (including) 4.032_03 (including)
Dbd-mysql Dbd-mysql_project 4.033 (including) 4.033 (including)
Dbd-mysql Dbd-mysql_project 4.033_01 (including) 4.033_01 (including)
Dbd-mysql Dbd-mysql_project 4.033_02 (including) 4.033_02 (including)
Dbd-mysql Dbd-mysql_project 4.033_03 (including) 4.033_03 (including)
Dbd-mysql Dbd-mysql_project 4.034 (including) 4.034 (including)
Dbd-mysql Dbd-mysql_project 4.035 (including) 4.035 (including)
Dbd-mysql Dbd-mysql_project 4.035_01 (including) 4.035_01 (including)
Dbd-mysql Dbd-mysql_project 4.035_02 (including) 4.035_02 (including)
Dbd-mysql Dbd-mysql_project 4.035_03 (including) 4.035_03 (including)
Dbd-mysql Dbd-mysql_project 4.036 (including) 4.036 (including)
Dbd-mysql Dbd-mysql_project 4.037 (including) 4.037 (including)
Dbd-mysql Dbd-mysql_project 4.037_01 (including) 4.037_01 (including)
Dbd-mysql Dbd-mysql_project 4.038 (including) 4.038 (including)
Dbd-mysql Dbd-mysql_project 4.038_01 (including) 4.038_01 (including)
Dbd-mysql Dbd-mysql_project 4.039 (including) 4.039 (including)
Dbd-mysql Dbd-mysql_project 4.040 (including) 4.040 (including)
Libdbd-mysql-perl Ubuntu esm-apps/xenial *
Libdbd-mysql-perl Ubuntu esm-infra-legacy/trusty *
Libdbd-mysql-perl Ubuntu precise *
Libdbd-mysql-perl Ubuntu precise/esm *
Libdbd-mysql-perl Ubuntu trusty *
Libdbd-mysql-perl Ubuntu trusty/esm *
Libdbd-mysql-perl Ubuntu upstream *
Libdbd-mysql-perl Ubuntu xenial *
Libdbd-mysql-perl Ubuntu yakkety *

Extended Description

The use of previously-freed memory can have any number of adverse consequences, ranging from the corruption of valid data to the execution of arbitrary code, depending on the instantiation and timing of the flaw. The simplest way data corruption may occur involves the system’s reuse of the freed memory. Use-after-free errors have two common and sometimes overlapping causes:

In this scenario, the memory in question is allocated to another pointer validly at some point after it has been freed. The original pointer to the freed memory is used again and points to somewhere within the new allocation. As the data is changed, it corrupts the validly used memory; this induces undefined behavior in the process. If the newly allocated data happens to hold a class, in C++ for example, various function pointers may be scattered within the heap data. If one of these function pointers is overwritten with an address to valid shellcode, execution of arbitrary code can be achieved.

Potential Mitigations

References