gitattributes parsing integer overflow in git
Description
Git is distributed revision control system. gitattributes are a mechanism to allow defining attributes for paths. These attributes can be defined by adding a .gitattributes file to the repository, which contains a set of file patterns and the attributes that should be set for paths matching this pattern. When parsing gitattributes, multiple integer overflows can occur when there is a huge number of path patterns, a huge number of attributes for a single pattern, or when the declared attribute names are huge. These overflows can be triggered via a crafted .gitattributes file that may be part of the commit history. Git silently splits lines longer than 2KB when parsing gitattributes from a file, but not when parsing them from the index. Consequentially, the failure mode depends on whether the file exists in the working tree, the index or both. This integer overflow can result in arbitrary heap reads and writes, which may result in remote code execution. The problem has been patched in the versions published on 2023-01-17, going back to v2.30.7. Users are advised to upgrade. There are no known workarounds for this issue.
AI Insight
LLM-synthesized narrative grounded in this CVE's description and references.
Affected products
62- osv-coords60 versionspkg:apk/chainguard/gitpkg:apk/chainguard/git-completionpkg:apk/chainguard/git-daemonpkg:apk/chainguard/git-docpkg:apk/chainguard/git-emailpkg:apk/chainguard/git-iamguarded-compatpkg:apk/chainguard/git-p4pkg:apk/wolfi/gitpkg:apk/wolfi/git-completionpkg:apk/wolfi/git-daemonpkg:apk/wolfi/git-docpkg:apk/wolfi/git-emailpkg:apk/wolfi/git-iamguarded-compatpkg:apk/wolfi/git-p4pkg:rpm/almalinux/gitpkg:rpm/almalinux/git-allpkg:rpm/almalinux/git-corepkg:rpm/almalinux/git-core-docpkg:rpm/almalinux/git-credential-libsecretpkg:rpm/almalinux/git-daemonpkg:rpm/almalinux/git-emailpkg:rpm/almalinux/git-guipkg:rpm/almalinux/git-instawebpkg:rpm/almalinux/gitkpkg:rpm/almalinux/git-subtreepkg:rpm/almalinux/git-svnpkg:rpm/almalinux/gitwebpkg:rpm/almalinux/perl-Gitpkg:rpm/almalinux/perl-Git-SVNpkg:rpm/opensuse/git&distro=openSUSE%20Leap%2015.4pkg:rpm/opensuse/git&distro=openSUSE%20Tumbleweedpkg:rpm/suse/git&distro=HPE%20Helion%20OpenStack%208pkg:rpm/suse/git&distro=SUSE%20Enterprise%20Storage%206pkg:rpm/suse/git&distro=SUSE%20Enterprise%20Storage%207pkg:rpm/suse/git&distro=SUSE%20Enterprise%20Storage%207.1pkg:rpm/suse/git&distro=SUSE%20Linux%20Enterprise%20High%20Performance%20Computing%2015%20SP1-LTSSpkg:rpm/suse/git&distro=SUSE%20Linux%20Enterprise%20High%20Performance%20Computing%2015%20SP2-LTSSpkg:rpm/suse/git&distro=SUSE%20Linux%20Enterprise%20High%20Performance%20Computing%2015%20SP3-ESPOSpkg:rpm/suse/git&distro=SUSE%20Linux%20Enterprise%20High%20Performance%20Computing%2015%20SP3-LTSSpkg:rpm/suse/git&distro=SUSE%20Linux%20Enterprise%20Module%20for%20Basesystem%2015%20SP4pkg:rpm/suse/git&distro=SUSE%20Linux%20Enterprise%20Module%20for%20Development%20Tools%2015%20SP4pkg:rpm/suse/git&distro=SUSE%20Linux%20Enterprise%20Real%20Time%2015%20SP3pkg:rpm/suse/git&distro=SUSE%20Linux%20Enterprise%20Server%2012%20SP2-BCLpkg:rpm/suse/git&distro=SUSE%20Linux%20Enterprise%20Server%2012%20SP4-LTSSpkg:rpm/suse/git&distro=SUSE%20Linux%20Enterprise%20Server%2012%20SP5pkg:rpm/suse/git&distro=SUSE%20Linux%20Enterprise%20Server%2015%20SP1-LTSSpkg:rpm/suse/git&distro=SUSE%20Linux%20Enterprise%20Server%2015%20SP2-LTSSpkg:rpm/suse/git&distro=SUSE%20Linux%20Enterprise%20Server%2015%20SP3-LTSSpkg:rpm/suse/git&distro=SUSE%20Linux%20Enterprise%20Server%20for%20SAP%20Applications%2012%20SP4pkg:rpm/suse/git&distro=SUSE%20Linux%20Enterprise%20Server%20for%20SAP%20Applications%2012%20SP5pkg:rpm/suse/git&distro=SUSE%20Linux%20Enterprise%20Server%20for%20SAP%20Applications%2015%20SP1pkg:rpm/suse/git&distro=SUSE%20Linux%20Enterprise%20Server%20for%20SAP%20Applications%2015%20SP2pkg:rpm/suse/git&distro=SUSE%20Linux%20Enterprise%20Server%20for%20SAP%20Applications%2015%20SP3pkg:rpm/suse/git&distro=SUSE%20Linux%20Enterprise%20Software%20Development%20Kit%2012%20SP5pkg:rpm/suse/git&distro=SUSE%20Manager%20Proxy%204.2pkg:rpm/suse/git&distro=SUSE%20Manager%20Retail%20Branch%20Server%204.2pkg:rpm/suse/git&distro=SUSE%20Manager%20Server%204.2pkg:rpm/suse/git&distro=SUSE%20OpenStack%20Cloud%208pkg:rpm/suse/git&distro=SUSE%20OpenStack%20Cloud%209pkg:rpm/suse/git&distro=SUSE%20OpenStack%20Cloud%20Crowbar%209
< 2.39.1-r0+ 59 more
- (no CPE)range: < 2.39.1-r0
- (no CPE)range: < 2.39.1-r0
- (no CPE)range: < 2.39.1-r0
- (no CPE)range: < 2.39.1-r0
- (no CPE)range: < 2.39.1-r0
- (no CPE)range: < 2.39.1-r0
- (no CPE)range: < 2.39.1-r0
- (no CPE)range: < 2.39.1-r0
- (no CPE)range: < 2.39.1-r0
- (no CPE)range: < 2.39.1-r0
- (no CPE)range: < 2.39.1-r0
- (no CPE)range: < 2.39.1-r0
- (no CPE)range: < 2.39.1-r0
- (no CPE)range: < 2.39.1-r0
- (no CPE)range: < 2.31.1-3.el8_7
- (no CPE)range: < 2.31.1-3.el8_7
- (no CPE)range: < 2.31.1-3.el8_7
- (no CPE)range: < 2.31.1-3.el8_7
- (no CPE)range: < 2.31.1-3.el8_7
- (no CPE)range: < 2.31.1-3.el8_7
- (no CPE)range: < 2.31.1-3.el8_7
- (no CPE)range: < 2.31.1-3.el8_7
- (no CPE)range: < 2.31.1-3.el8_7
- (no CPE)range: < 2.31.1-3.el8_7
- (no CPE)range: < 2.31.1-3.el8_7
- (no CPE)range: < 2.31.1-3.el8_7
- (no CPE)range: < 2.31.1-3.el8_7
- (no CPE)range: < 2.31.1-3.el8_7
- (no CPE)range: < 2.31.1-3.el8_7
- (no CPE)range: < 2.26.2-150000.44.1
- (no CPE)range: < 2.39.1-1.1
- (no CPE)range: < 2.26.2-27.63.2
- (no CPE)range: < 2.26.2-150000.44.1
- (no CPE)range: < 2.26.2-150000.44.1
- (no CPE)range: < 2.35.3-150300.10.21.1
- (no CPE)range: < 2.26.2-150000.44.1
- (no CPE)range: < 2.26.2-150000.44.1
- (no CPE)range: < 2.35.3-150300.10.21.1
- (no CPE)range: < 2.35.3-150300.10.21.1
- (no CPE)range: < 2.35.3-150300.10.21.1
- (no CPE)range: < 2.35.3-150300.10.21.1
- (no CPE)range: < 2.35.3-150300.10.21.1
- (no CPE)range: < 2.26.2-27.63.2
- (no CPE)range: < 2.26.2-27.63.2
- (no CPE)range: < 2.26.2-27.63.2
- (no CPE)range: < 2.26.2-150000.44.1
- (no CPE)range: < 2.26.2-150000.44.1
- (no CPE)range: < 2.35.3-150300.10.21.1
- (no CPE)range: < 2.26.2-27.63.2
- (no CPE)range: < 2.26.2-27.63.2
- (no CPE)range: < 2.26.2-150000.44.1
- (no CPE)range: < 2.26.2-150000.44.1
- (no CPE)range: < 2.35.3-150300.10.21.1
- (no CPE)range: < 2.26.2-27.63.2
- (no CPE)range: < 2.35.3-150300.10.21.1
- (no CPE)range: < 2.35.3-150300.10.21.1
- (no CPE)range: < 2.35.3-150300.10.21.1
- (no CPE)range: < 2.26.2-27.63.2
- (no CPE)range: < 2.26.2-27.63.2
- (no CPE)range: < 2.26.2-27.63.2
Patches
Vulnerability mechanics
References
3- github.com/git/git/commit/508386c6c5857b4faa2c3e491f422c98cc69ae76mitrex_refsource_MISC
- github.com/git/git/security/advisories/GHSA-c738-c5qq-xg89mitrex_refsource_CONFIRM
- security.gentoo.org/glsa/202312-15mitre
News mentions
1- Jenkins Security Advisory 2023-02-09Jenkins Security Advisories · Feb 9, 2023