🔍 CVE-2023-28638

7.0
CVSS Score
HIGH
2023-03-27
2026-06-17 05:48
✅ 완료

🇰🇷 한글 설명

Snappier 1.1.0 버전에서 발생하는 버퍼 오버런 취약점으로, 가비지 컬렉터(GC)가 메모리를 재배치하는 과정에서 잘못된 바이트 참조가 발생할 수 있습니다. 공격자가 조작된 데이터를 사용하여 이 취약점을 트리거할 경우, 메모리 보호 위반으로 인해 프로세스가 종료되어 서비스 거부(DoS) 상태가 될 수 있습니다.

💡 쉬운 설명

프로그램이 데이터를 압축하거나 풀 때 메모리 주소를 잠시 잘못 계산하는 실수가 있습니다. 이를 이용해 나쁜 데이터를 보내면 프로그램이 갑자기 멈추거나 꺼질 수 있습니다.

🇺🇸 원문 (English)

Snappier is a high performance C# implementation of the Snappy compression algorithm. This is a buffer overrun vulnerability that can affect any user of Snappier 1.1.0. In this release, much of the code was rewritten to use byte references rather than pointers to pinned buffers. This change generally improves performance and reduces workload on the garbage collector. However, when the garbage collector performs compaction and rearranges memory, it must update any byte references on the stack to refer to the updated location. The .NET garbage collector can only update these byte references if they still point within the buffer or to a point one byte past the end of the buffer. If they point outside this area, the buffer itself may be moved while the byte reference stays the same. There are several places in 1.1.0 where byte references very briefly point outside the valid areas of buffers. These are at locations in the code being used for buffer range checks. While the invalid references are never dereferenced directly, if a GC compaction were to occur during the brief window when they are on the stack then it could invalidate the buffer range check and allow other operations to overrun the buffer. This should be very difficult for an attacker to trigger intentionally. It would require a repetitive bulk attack with the hope that a GC compaction would occur at precisely the right moment during one of the requests. However, one of the range checks with this problem is a check based on input data in the decompression buffer, meaning malformed input data could be used to increase the chance of success. Note that any resulting buffer overrun is likely to cause access to protected memory, which will then cause an exception and the process to be terminated. Therefore, the most likely result of an attack is a denial of service. This issue has been patched in release 1.1.1. Users are advised to upgrade. Users unable to upgrade may pin buffers to a fixed location before using them for compression or decompression to mitigate some, but not all, of these cases. At least one temporary decompression buffer is internal to the library and never pinned.

📍 영향받는 시스템

Snappier 1.1.0

⚔️ 공격 벡터

조작된 압축 데이터를 전송하여 가비지 컬렉션이 발생하는 시점에 버퍼 범위를 벗어나게 유도

🛡️ 대응 방법

Snappier 1.1.1 버전 이상으로 업그레이드하거나, 업그레이드가 불가능할 경우 버퍼를 고정(pin)하여 사용

🔧 검증 코드

출력된 Snappier의 버전이 1.1.0인지 확인하여 취약 여부를 판단합니다.

Shell / Script
dotnet list package | grep Snappier

📊 CVSS Vector String

CVSS Vector
CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:L/I:L/A:H

💻 영향받는 소프트웨어

.NET