First published: Tue Jan 17 2023(Updated: )
A flaw was found in Git, a distributed revision control system. This issue occurs due to an integer overflow in `pretty.c::format_and_pad_commit()`, where a `size_t` is stored improperly as an `int`, and then added as an offset to a `memcpy()`. This overflow can be triggered directly by a user running a command which invokes the commit formatting machinery (e.g., `git log --format=...`). It may also be triggered indirectly through the git archive via the export-subst mechanism, which expands format specifiers inside files within the repository during a git archive. This integer overflow can result in arbitrary heap writes, which may allow arbitrary code execution.
Credit: security-advisories@github.com
Affected Software | Affected Version | How to fix |
---|---|---|
redhat/git | <0:1.8.3.1-24.el7_9 | 0:1.8.3.1-24.el7_9 |
redhat/git | <0:2.31.1-3.el8_7 | 0:2.31.1-3.el8_7 |
redhat/git | <0:2.18.4-2.el8_1 | 0:2.18.4-2.el8_1 |
redhat/git | <0:2.18.4-3.el8_2 | 0:2.18.4-3.el8_2 |
redhat/git | <0:2.27.0-3.el8_4 | 0:2.27.0-3.el8_4 |
redhat/git | <0:2.31.1-3.el8_6 | 0:2.31.1-3.el8_6 |
redhat/git | <0:2.31.1-3.el9_1 | 0:2.31.1-3.el9_1 |
redhat/git | <0:2.31.1-3.el9_0 | 0:2.31.1-3.el9_0 |
redhat/rh-git227-git | <0:2.27.0-4.el7 | 0:2.27.0-4.el7 |
Git Git-shell | <=2.30.6 | |
Git Git-shell | >=2.31.0<=2.31.5 | |
Git Git-shell | >=2.32.0<=2.32.4 | |
Git Git-shell | >=2.33.0<=2.33.5 | |
Git Git-shell | >=2.34.0<=2.34.5 | |
Git Git-shell | >=2.35.0<=2.35.5 | |
Git Git-shell | >=2.36.0<=2.36.3 | |
Git Git-shell | >=2.37.0<=2.37.4 | |
Git Git-shell | >=2.38.0<=2.38.2 | |
Git Git-shell | =2.39.0 |
Sign up to SecAlerts for real-time vulnerability data matched to your software, aggregated from hundreds of sources.
(Appears in the following advisories)
CVE-2022-41903 is a flaw found in Git, a distributed revision control system, that occurs due to an integer overflow in pretty.c.
CVE-2022-41903 affects Git by causing an integer overflow when processing the padding operators in the --format specifiers of git log and git archive.
CVE-2022-41903 has a severity level of 9.8 (critical).
Git versions 1.8.3.1-24.el7_9 to 2.39.0 are affected by CVE-2022-41903.
To fix CVE-2022-41903, update Git to a version that includes the necessary security patches.