🔍 CVE-2021-41219

7.8
CVSS Score
HIGH
2021-11-05
2026-06-17 04:08
✅ 완료

🇰🇷 한글 설명

TensorFlow의 희소 행렬 곱셈(sparse matrix multiplication) 코드에서 행렬 차원이 0 이하일 경우 nullptr 참조로 인한 정의되지 않은 동작이 발생합니다. 이로 인해 빈 출력 텐서에 데이터를 쓰려고 시도할 때 힙 영역의 경계 외(OOB) 접근이 발생할 수 있습니다.

💡 쉬운 설명

데이터 계산 과정에서 크기가 0인 행렬을 처리할 때, 컴퓨터가 잘못된 메모리 위치에 데이터를 쓰려고 시도하는 오류입니다. 이로 인해 프로그램이 강제로 종료되거나 보안 취약점이 발생할 수 있습니다.

🇺🇸 원문 (English)

TensorFlow is an open source platform for machine learning. In affected versions the code for sparse matrix multiplication is vulnerable to undefined behavior via binding a reference to `nullptr`. This occurs whenever the dimensions of `a` or `b` are 0 or less. In the case on one of these is 0, an empty output tensor should be allocated (to conserve the invariant that output tensors are always allocated when the operation is successful) but nothing should be written to it (that is, we should return early from the kernel implementation). Otherwise, attempts to write to this empty tensor would result in heap OOB access. The fix will be included in TensorFlow 2.7.0. We will also cherrypick this commit on TensorFlow 2.6.1, TensorFlow 2.5.2, and TensorFlow 2.4.4, as these are also affected and still in supported range.

📍 영향받는 시스템

TensorFlow 2.7.0 미만 버전 (2.6.1, 2.5.2, 2.4.4 포함)

⚔️ 공격 벡터

차원이 0 또는 음수인 행렬 데이터를 입력하여 힙 메모리 경계 외 접근 유도

🛡️ 대응 방법

TensorFlow를 2.7.0 이상 버전으로 업데이트하거나, 지원되는 최신 패치 버전(2.6.1, 2.5.2, 2.4.4)으로 업데이트하십시오.

🔧 검증 코드

출력된 버전 번호가 2.7.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:H/I:H/A:H