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

Denial of service attack in `git_revparse_single`

Moderate
ethomson publishedGHSA-54mf-x2rh-hq9vFeb 6, 2024

Package

libgit2 (C)

Affected versions

>= 1.4.0, < 1.6.5
>= 1.4.0, < 1.7.2

Patched versions

1.6.5
1.7.2

Description

Impact

Using well-crafted inputs togit_revparse_single can cause the function to enter an infinite loop, potentially causing a Denial of Service attack in the calling application.

Detailed description

The revparse function insrc/libgit2/revparse.c uses a loop to parse the user-provided spec string. There is an edge-case during parsing that allows a bad actor to force the loop conditions to access arbitrary memory.

This can be abused to create an infinite loop in the revparse function. Potentially, this could also leak memory if the extracted rev spec is reflected back to the attacker. This issue was introduced in the commitadd2dabb3c16aa49b33904dcdc07cd915efc12fa. As such, libgit2 versions before 1.4.0 are not affected. Some of the language-specific wrappers (such as e.g. Rugged for ruby) bundle old versions of libgit2 (i.e., < 1.4) and are not affected. pygit2 since version 1.9 and git2go since v34 are affected.

Patches

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

Severity

Moderate

CVE ID

CVE-2024-24575

Weaknesses

No CWEs

[8]ページ先頭

©2009-2025 Movatter.jp