🇰🇷 한글 설명
pybddisasm Python 바인딩의 범위 외 읽기 취약점으로 인해 명령어 디코딩 중 인접한 프로세스 메모리가 노출될 수 있습니다. nd_decode는 Python 버퍼의 실제 길이를 확인하지 않고 최대 15바이트를 읽으며, nd_decode_ex, nd_decode_ex2, nd_decode_with_context는 호출자가 지정한 버퍼 크기를 검증 없이 디코더에 전달합니다. 이 패키지는 더 이상 유지보수되지 않습니다.
💡 쉬운 설명
이 취약점은 프로그램이 명령어를 분석할 때 허용된 범위를 벗어난 메모리 내용을 읽어 노출시킬 수 있는 문제입니다. 공격자가 이 결과를 얻으려면 취약한 API를 짧은 버퍼나 잘못된 길이로 호출하는 애플리케이션이 필요합니다.
🇺🇸 원문 (English)
Out-of-bounds read vulnerabilities in the pybddisasm Python bindings may disclose adjacent process memory during instruction decoding. The nd_decode function may read up to 15 bytes without checking the actual length of the supplied Python buffer. The nd_decode_ex, nd_decode_ex2, and nd_decode_with_context functions pass the caller-supplied buffer size to the decoder without validating it against the actual length of the Python buffer. Data read beyond the buffer may be exposed through nd_get_instrux_bytes, which returns a fixed-length list of 16 bytes. Exploitation requires an application to invoke the affected APIs with a short buffer or an oversized length and to expose the resulting bytes to an attacker. The pybddisasm package is no longer maintained.
📍 영향받는 시스템
pybddisasm Python 바인딩을 사용하는 모든 버전 (유지보수 종료된 패키지)
⚔️ 공격 벡터
취약한 API를 짧은 버퍼 또는 과도한 길이 값으로 호출하도록 유도한 뒤, 반환된 바이트를 공격자가 확인하여 인접 프로세스 메모리를 탈취
🛡️ 대응 방법
pybddisasm 패키지를 제거하고 유지보수되는 대체 디스어셈블러 라이브러리로 전환하거나, 입력 버퍼 길이를 호출 전에 검증하도록 애플리케이션을 수정
🔧 검증 코드
출력에 패키지 정보(Name, Version)가 표시되면 설치된 것이므로 버전을 확인해 취약 여부를 판단하고, 'not installed' 메시지가 나오면 해당 패키지가 없는 것입니다.
pip show pybddisasm 2>/dev/null || echo 'pybddisasm not installed'