CVE Vulnerabilities

CVE-2021-40145

Double Free

Published: Aug 26, 2021 | Modified: May 17, 2024
CVSS 3.x
7.5
HIGH
Source:
NVD
CVSS:3.1/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
Ubuntu
MEDIUM

gdImageGd2Ptr in gd_gd2.c in the GD Graphics Library (aka LibGD) through 2.3.2 has a double free. NOTE: the vendors position is The GD2 image format is a proprietary image format of libgd. It has to be regarded as being obsolete, and should only be used for development and testing purposes.

Weakness

The product calls free() twice on the same memory address, potentially leading to modification of unexpected memory locations.

Affected Software

Name Vendor Start Version End Version
Libgd Libgd * 2.3.2 (including)
Libgd2 Ubuntu bionic *
Libgd2 Ubuntu devel *
Libgd2 Ubuntu esm-infra/xenial *
Libgd2 Ubuntu focal *
Libgd2 Ubuntu hirsute *
Libgd2 Ubuntu impish *
Libgd2 Ubuntu jammy *
Libgd2 Ubuntu trusty *
Libgd2 Ubuntu trusty/esm *
Libgd2 Ubuntu xenial *

Potential Mitigations

References