Bug 1219664 (CVE-2024-24575) - VUL-0: CVE-2024-24575: git,libgit2: potential infinite loop condition in git_revparse_single()
Summary: VUL-0: CVE-2024-24575: git,libgit2: potential infinite loop condition in git_...
Status: NEW
Alias: CVE-2024-24575
Product: SUSE Security Incidents
Classification: Novell Products
Component: Incidents (show other bugs)
Version: unspecified
Hardware: Other Other
: P3 - Medium : Normal
Target Milestone: ---
Assignee: Scott Bradnick
QA Contact: Security Team bot
URL: https://smash.suse.de/issue/393298/
Whiteboard: CVSSv3.1:SUSE:CVE-2024-24575:7.5:(AV:...
Keywords:
Depends on:
Blocks:
 
Reported: 2024-02-07 08:52 UTC by SMASH SMASH
Modified: 2024-07-17 14:01 UTC (History)
4 users (show)

See Also:
Found By: Security Response Team
Services Priority:
Business Priority:
Blocker: ---
Marketing QA Status: ---
IT Deployment: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description SMASH SMASH 2024-02-07 08:52:12 UTC
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_revparse_single` can cause the function to enter an infinite loop, potentially causing a Denial of Service attack in the calling application. The revparse function in `src/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. Potentially, this could also leak memory if the extracted rev spec is reflected back to the attacker. As such, libgit2 versions before 1.4.0 are not affected. Users should upgrade to version 1.6.5 or 1.7.2.

References:
http://web.nvd.nist.gov/view/vuln/detail?vulnId=CVE-2024-24575
https://github.com/libgit2/libgit2/commit/add2dabb3c16aa49b33904dcdc07cd915efc12fa
https://github.com/libgit2/libgit2/releases/tag/v1.6.5
https://github.com/libgit2/libgit2/releases/tag/v1.7.2
https://github.com/libgit2/libgit2/security/advisories/GHSA-54mf-x2rh-hq9v
https://www.cve.org/CVERecord?id=CVE-2024-24575
https://bugzilla.redhat.com/show_bug.cgi?id=2263092
Comment 1 Andreas Stieger 2024-02-07 19:59:44 UTC
https://build.opensuse.org/request/show/1144998
Comment 2 Marcus Meissner 2024-02-09 08:46:21 UTC
Andreas, you used the wrong cve in the submit, can you fix it and resubmit
Comment 3 Marcus Meissner 2024-02-09 08:46:44 UTC
(24574 instead of 24575)
Comment 4 Andreas Stieger 2024-02-09 10:28:20 UTC
https://build.opensuse.org/request/show/1145384
Comment 5 Marcus Meissner 2024-05-19 19:00:22 UTC
only SUSE:SLE-15-SP6:Update libgit2 is affected.

git seems not to have this code pattern.
Comment 10 Andreas Stieger 2024-07-12 14:32:02 UTC
camila.matos@suse.com set the needinfo flag on me, and I assume this was done in combination with a comment marked private. If you wish to engage with a volunteer community member, feel free to do so with public comments. If this is for anything other than openSUSE, through, please contact the SUSE bug assignee or the SUSE Product Security team.
Comment 11 Camila Camargo de Matos 2024-07-12 16:12:09 UTC
(In reply to Andreas Stieger from comment #10)
> camila.matos@suse.com set the needinfo flag on me, and I assume this was
> done in combination with a comment marked private. If you wish to engage
> with a volunteer community member, feel free to do so with public comments.
> If this is for anything other than openSUSE, through, please contact the
> SUSE bug assignee or the SUSE Product Security team.

My apologies, it was my mistake. There is no need to worry about the original needinfo request, as I have already adjusted it. Thanks for the answer!
Comment 12 Scott Reeves 2024-07-15 23:18:58 UTC
Scott B. - Can you take this one and submit an upgrade from 1.7.1 to 1.7.2.  This is a minor version bump with no changes except for bugfix so we don't need an ECO.
Comment 13 Scott Bradnick 2024-07-17 14:01:28 UTC
(In reply to Scott Reeves from comment #12)
> Scott B. - Can you take this one and submit an upgrade from 1.7.1 to 1.7.2. 
> This is a minor version bump with no changes except for bugfix so we don't
> need an ECO.

I've submitted an update to v1.7.2 via https://build.suse.de/request/show/339133 for SUSE:SLE-15-SP6:Update