Name | CVE-2024-24577 |
Description | libgit2 is a portable C implementation of the Git core methods provided as a linkable library with a solid API, allowing to build Git functionality into your application. Using well-crafted inputs to `git_index_add` can cause heap corruption that could be leveraged for arbitrary code execution. There is an issue in the `has_dir_name` function in `src/libgit2/index.c`, which frees an entry that should not be freed. The freed entry is later used and overwritten with potentially bad actor-controlled data leading to controlled heap corruption. Depending on the application that uses libgit2, this could lead to arbitrary code execution. This issue has been patched in version 1.6.5 and 1.7.2. |
Source | CVE (at NVD; CERT, LWN, oss-sec, fulldisc, Red Hat, Ubuntu, Gentoo, SUSE bugzilla/CVE, GitHub advisories/code/issues, web search, more) |
References | DLA-3742-1, DSA-5619-1, ELA-1053-1 |
Debian Bugs | 1063416 |
The table below lists information on source packages.
Source Package | Release | Version | Status |
---|---|---|---|
libgit2 (PTS) | jessie, jessie (lts) | 0.21.1-3+deb8u1 | vulnerable |
stretch (security) | 0.25.1+really0.24.6-1+deb9u1 | vulnerable | |
stretch (lts), stretch | 0.25.1+really0.24.6-1+deb9u3 | fixed | |
buster (security), buster, buster (lts) | 0.27.7+dfsg.1-0.2+deb10u2 | fixed | |
bullseye (security), bullseye | 1.1.0+dfsg.1-4+deb11u2 | fixed | |
bookworm (security), bookworm | 1.5.1+ds-1+deb12u1 | fixed | |
sid, trixie | 1.8.4+ds-3 | fixed |
The information below is based on the following data on fixed versions.
Package | Type | Release | Fixed Version | Urgency | Origin | Debian Bugs |
---|---|---|---|---|---|---|
libgit2 | source | jessie | (unfixed) | end-of-life | ||
libgit2 | source | stretch | 0.25.1+really0.24.6-1+deb9u3 | ELA-1053-1 | ||
libgit2 | source | buster | 0.27.7+dfsg.1-0.2+deb10u2 | DLA-3742-1 | ||
libgit2 | source | bullseye | 1.1.0+dfsg.1-4+deb11u2 | DSA-5619-1 | ||
libgit2 | source | bookworm | 1.5.1+ds-1+deb12u1 | DSA-5619-1 | ||
libgit2 | source | (unstable) | 1.7.2+ds-1 | 1063416 |
https://github.com/libgit2/libgit2/security/advisories/GHSA-j2v7-4f6v-gpg8
Fixed by: https://github.com/libgit2/libgit2/commit/eb4c1716cd92bf56f2770653a915d5fc01eab8f3 (v1.6.5)
Fixed by: https://github.com/libgit2/libgit2/commit/487af0cf6687dc48b0a960fa2f39894e2d84d77b (v1.7.2)