🇰🇷 한글 설명
Vim의 :all 명령어 실행 중 비주얼 모드가 활성화된 상태로 다른 버퍼로 전환할 때 힙 버퍼 오버플로우가 발생할 수 있습니다. 이는 Vim이 비주얼 모드를 적절히 종료하지 않아 버퍼 라인 끝을 초과하는 메모리에 접근하기 때문입니다. 이 취약점은 Vim 패치 9.1.1003에서 비주얼 모드 초기화 및 범위 검증 로직을 추가하여 수정되었습니다.
💡 쉬운 설명
Vim 에디터에서 특정 명령어를 사용할 때 메모리 오류가 발생하여 프로그램이 불안정해질 수 있습니다. 이는 비주얼 모드 상태가 제대로 정리되지 않아 발생하는 버그로, 최신 버전으로 업데이트하면 해결됩니다.
🇺🇸 원문 (English)
When switching to other buffers using the :all command and visual mode still being active, this may cause a heap-buffer overflow, because Vim does not properly end visual mode and therefore may try to access beyond the end of a line in a buffer. In Patch 9.1.1003 Vim will correctly reset the visual mode before opening other windows and buffers and therefore fix this bug. In addition it does verify that it won't try to access a position if the position is greater than the corresponding buffer line. Impact is medium since the user must have switched on visual mode when executing the :all ex command. The Vim project would like to thank github user gandalf4a for reporting this issue. The issue has been fixed as of Vim patch v9.1.1003
📍 영향받는 시스템
Vim 9.1.1003 미만 버전
⚔️ 공격 벡터
사용자가 :all 명령어 실행 전 비주얼 모드를 활성화해야 하며, 이를 통해 메모리 손상 유발
🛡️ 대응 방법
Vim을 최신 패치 버전(v9.1.1003 이상)으로 업데이트하십시오.
🔧 검증 코드
명령어 실행 결과 'Vulnerable'이 출력되면 취약한 버전이므로 패치해야 하며, 'Patched'가 출력되면 안전한 버전입니다.
vim --version | grep -E 'Patch: 9\.1\.[0-9]+' | awk '{print $2}' | awk -F. '{if ($3 < 1003) print "Vulnerable"; else print "Patched"}'