🇰🇷 한글 설명
Golang의 RSA 암호화/복호화 코드에서 메모리 누수 취약점이 발견되었으며, 오류 처리 시 pkey와 ctx 객체가 적절히 해제되지 않습니다. 공격자가 제어하는 입력을 이용해 메모리 누수를 반복적으로 유발하여 리소스 고갈 공격을 수행할 수 있습니다.
💡 쉬운 설명
Go 언어의 암호화 함수가 오류 발생 시 메모리를 제대로 정리하지 않아 메모리가 계속 증가합니다. 공격자가 특수한 입력을 반복적으로 전송하면 시스템 메모리가 모두 소비되어 서비스가 중단될 수 있습니다.
🇺🇸 원문 (English)
A memory leak flaw was found in Golang in the RSA encrypting/decrypting code, which might lead to a resource exhaustion vulnerability using attacker-controlled inputs. The memory leak happens in github.com/golang-fips/openssl/openssl/rsa.go#L113. The objects leaked are pkey and ctx. That function uses named return parameters to free pkey and ctx if there is an error initializing the context or setting the different properties. All return statements related to error cases follow the "return nil, nil, fail(...)" pattern, meaning that pkey and ctx will be nil inside the deferred function that should free them.
📍 영향받는 시스템
golang-fips/openssl 라이브러리를 사용하는 Go 애플리케이션 (rsa.go#L113 함수 사용)
⚔️ 공격 벡터
RSA 암호화/복호화 함수에 공격자 제어 입력을 반복적으로 전송하여 메모리 누수 유발
🛡️ 대응 방법
golang-fips/openssl 라이브러리를 최신 보안 패치 버전으로 업그레이드
🔧 검증 코드
명령어 결과에서 openssl 라이브러리 버전이 표시되며, 최신 패치 버전으로 업데이트되었는지 확인합니다.
go list -m all 2>/dev/null | grep openssl