Description
Stack-based buffer overflow in the (1) diff_addremove and (2) diff_change functions in GIT before 1.5.6.4 might allow local users to execute arbitrary code via a PATH whose length is larger than the system's PATH_MAX when running GIT utilities such as git-diff or git-grep.
Fixed in Linux distributions
Distributions backport fixes, so the version that fixes this vulnerability differs per release — upgrade to at least the version shown. From the distributions' security trackers and advisories.
Debian
Security tracker ↗| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| Debian 5.0 | git-core | 1.5.6.3-1+lenny1 | DTSA-153-2, DTSA-153-1 |
| Debian 4.0 | git-core | 1:1.4.4.4-2.1+etch1 | DSA-1637-1 |
Advisories 3
- DSA-1637-1 git-core - buffer overflow Debian Security (DSA / DLA) · Mar 9, 2026
- DTSA-153-2 git-core - stack-based buffer overflow Debian Security (DSA / DLA) · Mar 9, 2026
- DTSA-153-1 git-core - stack-based buffer overflow Debian Security (DSA / DLA) · Mar 9, 2026
References
- 20080812 rPSA-2008-0253-1 git gitweb mailing-list
- http://www.kernel.org/pub/software/scm/git/docs/RelNotes-1.5.6.4.txt
- 32029 third-party-advisory
- http://wiki.rpath.com/Advisories:rPSA-2008-0253
- git-multiple-bo(44217) vdb-entry
- 33964 third-party-advisory
- https://issues.rpath.com/browse/RPL-2707
- 31347 third-party-advisory
- GLSA-200809-16 vendor-advisory
- DSA-1637 vendor-advisory
- [git] 20080716 [PATCH] Fix buffer overflow in git diff mailing-list
- FEDORA-2008-9080 vendor-advisory
- 32384 third-party-advisory
- 30549 vdb-entry
- ADV-2008-2306 vdb-entry
- 1020627 vdb-entry
- 31780 third-party-advisory
- USN-723-1 vendor-advisory