🇰🇷 한글 설명
Notepad++ 8.9.7 미만 버전에서 expandNppEnvironmentStrs 함수가 스택 버퍼의 경계를 확인하지 않고 변수 이름을 복사하는 취약점이 발견되었습니다. 260자 이상의 긴 이름을 사용하여 인접한 스택 데이터를 손상시키면 프로세스가 종료되거나 임의의 코드가 실행될 수 있습니다.
💡 쉬운 설명
메모장 프로그램이 특정 이름의 데이터를 처리할 때 준비된 공간보다 더 많은 정보를 입력받아 프로그램이 망가지는 문제입니다. 이를 통해 해커가 컴퓨터를 제어하거나 프로그램을 강제로 종료시킬 수 있습니다.
🇺🇸 원문 (English)
Notepad++ is a free and open-source source code editor. Prior to 8.9.7, the expandNppEnvironmentStrs function in PowerEditor/src/WinControls/StaticDialog/RunDlg/RunDlg.cpp copies a Notepad++ variable name between $( and ) into the fixed-size wchar_t str[MAX_PATH] stack buffer without bounding the m loop index, allowing a name of 260 or more characters to corrupt adjacent stack data, terminate the process through __report_gsfailure, and potentially execute code. This issue is fixed in version 8.9.7.
📍 영향받는 시스템
Notepad++ 8.9.7 미만 모든 버전
⚔️ 공격 벡터
특수하게 조작된 환경 변수 이름($(...) 형식을 포함한 260자 이상의 문자열)을 통한 스택 버퍼 오버플로우
🛡️ 대응 방법
Notepad++를 최신 버전인 8.9.7 이상으로 업데이트하십시오.
🔧 검증 코드
출력된 Notepad++의 버전을 확인하여 8.9.7 미만인지 확인합니다.
notepadpp --version 2>/dev/null || powershell -Command "(Get-ItemProperty 'HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\*').DisplayName | Select-String 'Notepad++'"