Name | CVE-2022-39260 |
Description | Git is an open source, scalable, distributed revision control system. `git shell` is a restricted login shell that can be used to implement Git's push/pull functionality via SSH. In versions prior to 2.30.6, 2.31.5, 2.32.4, 2.33.5, 2.34.5, 2.35.5, 2.36.3, and 2.37.4, the function that splits the command arguments into an array improperly uses an `int` to represent the number of entries in the array, allowing a malicious actor to intentionally overflow the return value, leading to arbitrary heap writes. Because the resulting array is then passed to `execv()`, it is possible to leverage this attack to gain remote code execution on a victim machine. Note that a victim must first allow access to `git shell` as a login shell in order to be vulnerable to this attack. This problem is patched in versions 2.30.6, 2.31.5, 2.32.4, 2.33.5, 2.34.5, 2.35.5, 2.36.3, and 2.37.4 and users are advised to upgrade to the latest version. Disabling `git shell` access via remote logins is a viable short-term workaround. |
Source | CVE (at NVD; CERT, LWN, oss-sec, fulldisc, Red Hat, Ubuntu, Gentoo, SUSE bugzilla/CVE, GitHub advisories/code/issues, web search, more) |
References | DLA-3239-1, DSA-5332-1 |
Debian Bugs | 1022046 |
The table below lists information on source packages.
Source Package | Release | Version | Status |
---|---|---|---|
git (PTS) | bullseye | 1:2.30.2-1+deb11u2 | fixed |
bullseye (security) | 1:2.30.2-1+deb11u3 | fixed | |
bookworm, bookworm (security) | 1:2.39.5-0+deb12u1 | fixed | |
trixie | 1:2.45.2-1 | fixed | |
sid | 1:2.45.2-1.2 | fixed |
The information below is based on the following data on fixed versions.
Package | Type | Release | Fixed Version | Urgency | Origin | Debian Bugs |
---|---|---|---|---|---|---|
git | source | buster | 1:2.20.1-2+deb10u5 | DLA-3239-1 | ||
git | source | bullseye | 1:2.30.2-1+deb11u1 | DSA-5332-1 | ||
git | source | (unstable) | 1:2.38.1-1 | 1022046 |
https://www.openwall.com/lists/oss-security/2022/10/18/5
https://lore.kernel.org/git/xmqq4jw1uku5.fsf@gitster.g/T/#u
https://github.com/git/git/commit/32696a4cbe90929ae79ea442f5102c513ce3dfaa (v2.30.6)
https://github.com/git/git/commit/71ad7fe1bcec2a115bd0ab187240348358aa7f21 (v2.30.6)
https://github.com/git/git/commit/0ca6ead81edd4fb1984b69aae87c1189e3025530 (v2.30.6)