🔍 CVE-2021-37692

5.5
CVSS Score
MEDIUM
2021-08-12
2026-06-17 04:00
✅ 완료

🇰🇷 한글 설명

TensorFlow의 특정 버전에서 Go 코드가 문자열 메모리 해제 시 세그멘테이션 오류(segfault)를 발생시킬 수 있습니다. 문자열 텐서의 인코딩이 실패한 상태에서 가비지 컬렉션이 수행될 때 잘못된 메모리 해제 방식이 원인입니다.

💡 쉬운 설명

데이터를 처리하는 과정에서 오류가 발생했는데, 컴퓨터가 잘못된 메모리 공간을 정리하려고 시도하다가 프로그램이 갑자기 멈추는 문제입니다. 이는 시스템의 안정성을 해칠 수 있습니다.

🇺🇸 원문 (English)

TensorFlow is an end-to-end open source platform for machine learning. In affected versions under certain conditions, Go code can trigger a segfault in string deallocation. For string tensors, `C.TF_TString_Dealloc` is called during garbage collection within a finalizer function. However, tensor structure isn't checked until encoding to avoid a performance penalty. The current method for dealloc assumes that encoding succeeded, but segfaults when a string tensor is garbage collected whose encoding failed (e.g., due to mismatched dimensions). To fix this, the call to set the finalizer function is deferred until `NewTensor` returns and, if encoding failed for a string tensor, deallocs are determined based on bytes written. We have patched the issue in GitHub commit 8721ba96e5760c229217b594f6d2ba332beedf22. The fix will be included in TensorFlow 2.6.0. We will also cherrypick this commit on TensorFlow 2.5.1, which is the other affected version.

📍 영향받는 시스템

TensorFlow 2.5.1 미만 버전 및 2.6.0 미만 버전

⚔️ 공격 벡터

차원 불일치 등을 유도하여 문자열 텐서 인코딩 실패를 일으킴으로써 메모리 오류 유발

🛡️ 대응 방법

TensorFlow를 2.6.0 이상 버전 또는 패치가 적용된 2.5.1 버전으로 업데이트

🔧 검증 코드

출력된 버전이 2.6.0 이상이거나 패치된 2.5.1 버전인지 확인

Shell / Script
python3 -c 'import tensorflow as tf; print(tf.__version__)'

📊 CVSS Vector String

CVSS Vector
CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H

💻 영향받는 소프트웨어

Azure Machine Learning