Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Arbitrary code execution due to heap corruption in `git_index_add`

High
ethomson publishedGHSA-j2v7-4f6v-gpg8Feb 6, 2024

Package

libgit2 (C)

Affected versions

< 1.6.5
< 1.7.2

Patched versions

1.6.5
1.7.2

Description

Impact

Using well-crafted inputs togit_index_add can cause heap corruption that could be leveraged for arbitrary code execution.

Detailed description

There is an issue in thehas_dir_name function insrc/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.

To trigger the problem, the bad actor must be able to trigger two consecutive calls togit_index_add with a filename that starts with a/ character. To control the heap corruption, the bad actor must be able to control thectime field of the git_index_entry data structure.

Patches

Users should upgrade to v1.6.5 or v1.7.2.

Workarounds

Prevent paths beginning with/ from being provided togit_index_add.

Severity

High

CVE ID

CVE-2024-24577

Weaknesses

No CWEs

[8]ページ先頭

©2009-2025 Movatter.jp