🇰🇷 한글 설명
wolfSSL wolfSSH v1.4.11부터 v1.5.0 버전의 non-Windows 플랫폼에서 wstrncat() 함수 내 부호 없는 정수 언더플로우 취약점이 발견되었습니다. 인증된 원격 공격자가 조작된 SFTP 경로를 전송하면 스택 버퍼 끝에 1바이트의 널(null) 문자를 범위를 벗어나 기록할 수 있으며, 이는 프로세스 충돌을 유발할 수 있습니다.
💡 쉬운 설명
특정 소프트웨어에서 경로 이름을 처리할 때 계산 오류가 발생하여 메모리의 정해진 범위를 아주 조금 벗어나는 문제가 있습니다. 공격자가 특수한 경로를 보내면 프로그램이 갑자기 멈추거나 오류가 발생할 수 있습니다.
🇺🇸 원문 (English)
Unsigned integer underflow in wstrncat() in src/port.c in wolfSSL wolfSSH from v1.4.11 through v1.5.0 on non-Windows platforms allows an authenticated remote attacker to write one out-of-bounds null byte past the end of a stack buffer by sending a crafted SFTP path. wolfSSH_RealPath() in src/ssh.c appends each path component with a remaining-size bound (outSz - curSz) rather than the full destination size, so once the accumulated path reaches half the output buffer the size_t computation n - strlen(s1) - 1 wraps to near SIZE_MAX. The strncat() call is then effectively unbounded and copies the whole component; when that component exactly fills the remainder of the buffer, its terminating null is written one byte past the end. The caller's own length check keeps the copied data inside the buffer, so the overflow is limited to that single null byte, which may corrupt an adjacent stack value and crash the process. Applications that call the public wolfSSH_RealPath() with an output buffer smaller than the input path are additionally exposed to an unbounded copy, because the word32 expression outSz - segSz in that length check also wraps.
📍 영향받는 시스템
wolfSSL wolfSSH v1.4.11 ~ v1.5.0 (non-Windows 플랫폼)
⚔️ 공격 벡터
인증된 원격 공격자가 조작된 SFTP 경로를 전송하여 공격
🛡️ 대응 방법
wolfSSH를 최신 보안 패치가 적용된 버전으로 업데이트하십시오.
🔧 검증 코드
출력된 버전이 v1.4.11에서 v1.5.0 사이인지 확인하십시오.
pkg-config --modversion wolfssh 2>/dev/null || wolfssh_version_cmd_placeholder