🔍 CVE-2021-37658

7.1
CVSS Score
HIGH
2021-08-12
2026-06-17 04:00
✅ 완료

🇰🇷 한글 설명

TensorFlow의 `tf.raw_ops.MatrixSetDiagV*` 연산에서 `k` 값의 유효성을 검증하는 과정이 불완전하여 발생하는 취약점입니다. 공격자가 빈 텐서를 입력할 경우 널 포인터 참조로 인해 정의되지 않은 동작이 발생할 수 있습니다.

💡 쉬운 설명

머신러닝 도구인 TensorFlow에서 데이터의 개수를 제대로 확인하지 않아 발생하는 오류입니다. 잘못된 데이터를 입력하면 프로그램이 예상치 못한 방식으로 작동하거나 멈출 수 있습니다.

🇺🇸 원문 (English)

TensorFlow is an end-to-end open source platform for machine learning. In affected versions an attacker can cause undefined behavior via binding a reference to null pointer in all operations of type `tf.raw_ops.MatrixSetDiagV*`. The [implementation](https://github.com/tensorflow/tensorflow/blob/84d053187cb80d975ef2b9684d4b61981bca0c41/tensorflow/core/kernels/linalg/matrix_diag_op.cc) has incomplete validation that the value of `k` is a valid tensor. We have check that this value is either a scalar or a vector, but there is no check for the number of elements. If this is an empty tensor, then code that accesses the first element of the tensor is wrong. We have patched the issue in GitHub commit ff8894044dfae5568ecbf2ed514c1a37dc394f1b. The fix will be included in TensorFlow 2.6.0. We will also cherrypick this commit on TensorFlow 2.5.1, TensorFlow 2.4.3, and TensorFlow 2.3.4, as these are also affected and still in supported range.

📍 영향받는 시스템

TensorFlow 2.6.0 미만 버전 (2.5.1, 2.4.3, 2.3.4 포함)

⚔️ 공격 벡터

조작된 빈 텐서(empty tensor)를 `tf.raw_ops.MatrixSetDiagV*` 연산의 인자로 전달

🛡️ 대응 방법

TensorFlow를 2.6.0 이상 버전으로 업데이트하거나, 해당 패치가 적용된 최신 마이너 버전으로 업데이트하십시오.

🔧 검증 코드

출력된 버전이 2.6.0 미만인지 확인하여 취약 여부를 판단합니다.

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:H/A:H

💻 영향받는 소프트웨어

Azure Machine Learning