🔍 CVE-2021-29540

2.5
CVSS Score
LOW
2021-05-14
2026-06-17 03:47
✅ 완료

🇰🇷 한글 설명

TensorFlow의 Conv2DBackpropFilter 구현에서 힙 버퍼 오버플로우 취약점이 발견되었습니다. 필터 텐서의 크기를 계산할 때 filter_sizes의 요소 수와 일치하는지 검증하지 않아, 버퍼 읽기/쓰기 시 메모리 오류가 발생할 수 있습니다.

💡 쉬운 설명

데이터를 처리하는 과정에서 메모리 공간의 크기를 잘못 계산하여, 정해진 범위를 넘어서는 데이터를 쓰고 읽을 수 있는 문제입니다. 이로 인해 프로그램이 강제로 종료되거나 보안 문제가 생길 수 있습니다.

🇺🇸 원문 (English)

TensorFlow is an end-to-end open source platform for machine learning. An attacker can cause a heap buffer overflow to occur in `Conv2DBackpropFilter`. This is because the implementation(https://github.com/tensorflow/tensorflow/blob/1b0296c3b8dd9bd948f924aa8cd62f87dbb7c3da/tensorflow/core/kernels/conv_grad_filter_ops.cc#L495-L497) computes the size of the filter tensor but does not validate that it matches the number of elements in `filter_sizes`. Later, when reading/writing to this buffer, code uses the value computed here, instead of the number of elements in the tensor. The fix will be included in TensorFlow 2.5.0. We will also cherrypick this commit on TensorFlow 2.4.2, TensorFlow 2.3.3, TensorFlow 2.2.3 and TensorFlow 2.1.4, as these are also affected and still in supported range.

📍 영향받는 시스템

TensorFlow 2.5.0 미만 버전 (2.4.2, 2.3.3, 2.2.3, 2.1.4 포함)

⚔️ 공격 벡터

조작된 필터 크기 값을 포함한 텐서 데이터를 입력하여 메모리 오버플로우 유도

🛡️ 대응 방법

TensorFlow를 2.5.0 이상의 최신 버전으로 업데이트하거나, 해당 버전의 보안 패치가 적용된 버전으로 업데이트

🔧 검증 코드

출력된 버전 번호가 2.5.0보다 낮은지 확인하여 취약 여부를 판단합니다.

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

📊 CVSS Vector String

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

💻 영향받는 소프트웨어

Azure Machine Learning