Skip to content
OpenAdvisories
Medium ALAS2-2023-2072 2 CVEs

Moderate: git security update (Amazon Linux 2)

Published Jun 5, 2023 · Updated Jun 7, 2023

Summary

Package updates are available for Amazon Linux 2 that fix the following vulnerabilities: CVE-2023-29007: Git is a revision control system. Prior to versions 2.30.9, 2.31.8, 2.32.7, 2.33.8, 2.34.8, 2.35.8, 2.36.6, 2.37.7, 2.38.5, 2.39.3, and 2.40.1, a specially crafted `.gitmodules` file with submodule URLs that are longer than 1024 characters can used to exploit a bug in `config.c::git_config_copy_or_rename_section_in_file()`. This bug can be used to inject arbitrary configuration into a user's `$GIT_DIR/config` when attempting to remove the configuration section associated with that submodule. When the attacker injects configuration values which specify executables to run (such as `core.pager`, `core.editor`, `core.sshCommand`, etc.) this can lead to a remote code execution. A fix A fix is available in versions 2.30.9, 2.31.8, 2.32.7, 2.33.8, 2.34.8, 2.35.8, 2.36.6, 2.37.7, 2.38.5, 2.39.3, and 2.40.1. As a workaround, avoid running `git submodule deinit` on untrusted repositories or without prior inspection of any submodule sections in `$GIT_DIR/config`. CVE-2023-25652: Git is a revision control system. Prior to versions 2.30.9, 2.31.8, 2.32.7, 2.33.8, 2.34.8, 2.35.8, 2.36.6, 2.37.7, 2.38.5, 2.39.3, and 2.40.1, by feeding specially crafted input to `git apply --reject`, a path outside the working tree can be overwritten with partially controlled contents (corresponding to the rejected hunk(s) from the given patch). A fix is available in versions 2.30.9, 2.31.8, 2.32.7, 2.33.8, 2.34.8, 2.35.8, 2.36.6, 2.37.7, 2.38.5, 2.39.3, and 2.40.1. As a workaround, avoid using `git apply` with `--reject` when applying patches from an untrusted source. Use `git apply --stat` to inspect a patch before applying; avoid applying one that create a conflict where a link corresponding to the `*.rej` file exists.

Fixed packages 18

ReleasePackageFixed in
Amazon Linux · 2 git 0:2.40.1-1.amzn2.0.1
Amazon Linux · 2 git-all 0:2.40.1-1.amzn2.0.1
Amazon Linux · 2 git-core 0:2.40.1-1.amzn2.0.1
Amazon Linux · 2 git-core-doc 0:2.40.1-1.amzn2.0.1
Amazon Linux · 2 git-credential-libsecret 0:2.40.1-1.amzn2.0.1
Amazon Linux · 2 git-cvs 0:2.40.1-1.amzn2.0.1
Amazon Linux · 2 git-daemon 0:2.40.1-1.amzn2.0.1
Amazon Linux · 2 git-debuginfo 0:2.40.1-1.amzn2.0.1
Amazon Linux · 2 git-email 0:2.40.1-1.amzn2.0.1
Amazon Linux · 2 git-gui 0:2.40.1-1.amzn2.0.1
Amazon Linux · 2 git-instaweb 0:2.40.1-1.amzn2.0.1
Amazon Linux · 2 git-p4 0:2.40.1-1.amzn2.0.1
Amazon Linux · 2 git-subtree 0:2.40.1-1.amzn2.0.1
Amazon Linux · 2 git-svn 0:2.40.1-1.amzn2.0.1
Amazon Linux · 2 gitk 0:2.40.1-1.amzn2.0.1
Amazon Linux · 2 gitweb 0:2.40.1-1.amzn2.0.1
Amazon Linux · 2 perl-Git 0:2.40.1-1.amzn2.0.1
Amazon Linux · 2 perl-Git-SVN 0:2.40.1-1.amzn2.0.1

Vulnerabilities 2

  • High 7.5
    CVE-2023-25652 EPSS 52%

    "git apply --reject" partially-controlled arbitrary file write

    Git is a revision control system. Prior to versions 2.30.9, 2.31.8, 2.32.7, 2.33.8, 2.34.8, 2.35.8, 2.36.6, 2.37.7, 2.38.5, 2.39.3, and 2.40.1, by feeding specially crafted input to `git apply --reject`, a path outside the working tree can be overwritten with…

  • High 7.0
    CVE-2023-29007 Public exploit

    Arbitrary configuration injection via `git submodule deinit`

    Git is a revision control system. Prior to versions 2.30.9, 2.31.8, 2.32.7, 2.33.8, 2.34.8, 2.35.8, 2.36.6, 2.37.7, 2.38.5, 2.39.3, and 2.40.1, a specially crafted `.gitmodules` file with submodule URLs that are longer than 1024 characters can used to exploit…

References

  • web
    https://alas.aws.amazon.com/cve/html/CVE-2023-25652.html
  • web
    https://alas.aws.amazon.com/cve/html/CVE-2023-29007.html