🇰🇷 한글 설명
TensorFlow의 QuantizedMul 연산에서 양자화 임계값으로 잘못된 값을 전달할 경우 힙 버퍼 오버플로우가 발생할 수 있습니다. 구현 과정에서 입력 텐서가 비어 있는 경우를 제대로 검증하지 않고 데이터에 직접 접근하기 때문에 발생하는 취약점입니다.
💡 쉬운 설명
머신러닝 도구인 TensorFlow에서 잘못된 데이터를 입력하면 컴퓨터 메모리의 허용된 범위를 넘어가는 오류가 발생할 수 있습니다. 이로 인해 프로그램이 갑자기 종료되거나 보안 문제가 생길 수 있습니다.
🇺🇸 원문 (English)
TensorFlow is an end-to-end open source platform for machine learning. An attacker can cause a heap buffer overflow in `QuantizedMul` by passing in invalid thresholds for the quantization. This is because the implementation(https://github.com/tensorflow/tensorflow/blob/87cf4d3ea9949051e50ca3f071fc909538a51cd0/tensorflow/core/kernels/quantized_mul_op.cc#L287-L290) assumes that the 4 arguments are always valid scalars and tries to access the numeric value directly. However, if any of these tensors is empty, then `.flat<T>()` is an empty buffer and accessing the element at position 0 results in overflow. 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 미만인 경우 해당 취약점에 노출되어 있을 가능성이 높습니다.
python3 -c 'import tensorflow as tf; print(tf.__version__)'