🇰🇷 한글 설명
Vim 9.2.0511부터 9.2.0844 버전 사이의 json_decode_item() 함수에서 잘못된 JSON 문자열이 버퍼를 넘나들 때 해제된 메모리를 참조하는 문제가 발생합니다. 이로 인해 유효하지 않은 JSON 처리 과정에서 이미 해제된 메모리 영역을 읽게 되어 오류가 발생할 수 있습니다.
💡 쉬운 설명
텍스트 편집기인 Vim이 복잡한 JSON 데이터를 읽을 때, 이미 사용이 끝난 메모리 공간을 다시 들여다보려다 발생하는 오류입니다. 이는 프로그램이 예상치 못한 동작을 하거나 비정상적으로 종료되는 원인이 될 수 있습니다.
🇺🇸 원문 (English)
Vim is an open source, command line text editor. From 9.2.0511 until 9.2.0844, json_decode_item() in src/json.c can retain a stale pointer after json_decode_string() invokes channel_fill() to refill and free the current buffer, causing the error path to read freed memory instead of reader->js_buf + reader->js_used when an invalid JSON string spans buffers. This issue is fixed in version 9.2.0844.
📍 영향받는 시스템
Vim version 9.2.0511 ~ 9.2.0844
⚔️ 공격 벡터
잘못된 형식을 가진 특수하게 제작된 JSON 문자열을 Vim을 통해 처리하도록 유도
🛡️ 대응 방법
Vim을 최신 버전인 9.2.0844 이상으로 업데이트
🔧 검증 코드
출력된 버전 번호가 9.2.0511보다 크고 9.2.0844보다 작으면 취약한 상태입니다.
vim --version | grep -E 'Vim (9\.[0-9]{2}\.[0-9]{4})'