kcve.ai취약점 정보 · 내 자산 확인

CVE-2022-23521 gitattributes parsing integer overflow in git

git에서 정수 오버플로우를 파싱하는 gitattributes

설명

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.

Git은 분산된 리비전 제어 시스템이다. gitattributes는 경로에 대한 속성을 정의할 수 있는 메커니즘이다. 이러한 속성들은 `.gitattributes' 파일을 저장소에 추가함으로써 정의될 수 있는데, 저장소에는 파일 패턴의 집합과 이 패턴과 일치하는 경로에 대해 설정되어야 하는 속성들이 포함되어 있다. 기타트리뷰트를 파싱할 때, 다수의 정수 오버플로우는 하나의 패턴에 대해 많은 수의 경로 패턴, 많은 수의 속성이 있을 때, 또는 선언된 속성 이름이 거대할 때 발생할 수 있습니다. 이러한 오버플로는 커밋 이력의 일부가 될 수 있는 만들어진 `.gitattributes` 파일을 통해 트리거될 수 있다. Git은 파일에서 gitattribute를 파싱할 때 2KB보다 긴 줄을 자동으로 분할하지만 인덱스에서 파싱할 때는 그렇지 않다. 결과적으로, 실패 모드는 파일이 작업 트리에 존재하는지, 인덱스 또는 둘 다에 따라 달라집니다. 이 정수 오버플로우는 임의의 힙 읽기 및 쓰기를 초래할 수 있으며, 이는 원격 코드 실행을 초래할 수 있습니다. 이 문제는 2023-01-17에 게시 된 버전에서 패치되었으며 v2.30.7으로 돌아갑니다. 사용자는 업그레이드하는 것이 좋습니다. 이 문제에 대한 알려진 해결 방법이 없습니다.

영향 받는 제품 제품 1개

  • git

    git

    해결 버전 있음

    영향 받는 버전

    • 2.30.7 미만
    • 2.31.0 이상 2.31.6 미만
    • 2.32.0 이상 2.32.5 미만
    • 2.33.0 이상 2.33.6 미만
    • 2.34.0 이상 2.34.6 미만
    • 2.35.0 이상 2.35.6 미만
    • 2.36.0 이상 2.36.4 미만
    • 2.37.0 이상 2.37.5 미만
    외 2개 구간 펼치기
    • 2.38.0 이상 2.38.3 미만
    • 2.39.0

    해결 버전

    • 2.30.7 이상
    • 2.31.6 이상
    • 2.32.5 이상
    • 2.33.6 이상
    • 2.34.6 이상
    • 2.35.6 이상
    • 2.36.4 이상
    • 2.37.5 이상
    외 1개 구간 펼치기
    • 2.38.3 이상

참고 자료 3건

‹ 목록

점검 지원 범위 문의

도입 문의