🇰🇷 한글 설명
TensorFlow의 `tf.raw_ops.NonMaxSuppressionV5` 및 `CombinedNonMaxSuppression` 연산에서 발생하는 서비스 거부(DoS) 취약점입니다. 공격자가 음수 값을 입력할 경우, 정수형(int)이 부호 없는 정수형(size_t)으로 암시적 변환되면서 0으로 나누기 오류나 메모리 크기 오류를 유발하여 애플리케이션을 중단시킬 수 있습니다.
💡 쉬운 설명
머신러닝 도구인 TensorFlow에서 잘못된 숫자를 입력하면 프로그램이 갑자기 멈춰버리는 문제입니다. 공격자가 특수한 값을 보내 시스템을 마비시킬 수 있습니다.
🇺🇸 원문 (English)
TensorFlow is an end-to-end open source platform for machine learning. In affected versions an attacker can cause denial of service in applications serving models using `tf.raw_ops.NonMaxSuppressionV5` by triggering a division by 0. The [implementation](https://github.com/tensorflow/tensorflow/blob/460e000de3a83278fb00b61a16d161b1964f15f4/tensorflow/core/kernels/image/non_max_suppression_op.cc#L170-L271) uses a user controlled argument to resize a `std::vector`. However, as `std::vector::resize` takes the size argument as a `size_t` and `output_size` is an `int`, there is an implicit conversion to unsigned. If the attacker supplies a negative value, this conversion results in a crash. A similar issue occurs in `CombinedNonMaxSuppression`. We have patched the issue in GitHub commit 3a7362750d5c372420aa8f0caf7bf5b5c3d0f52d and commit [b5cdbf12ffcaaffecf98f22a6be5a64bb96e4f58. 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 포함)
⚔️ 공격 벡터
모델 서빙 애플리케이션에 조작된 음수 값을 포함한 입력 데이터를 전달하여 연산 오류 유도
🛡️ 대응 방법
TensorFlow를 2.6.0 이상 버전으로 업데이트하거나, 지원되는 버전(2.5.1, 2.4.3, 2.3.4)의 최신 패치 적용
🔧 검증 코드
출력된 버전 번호가 2.6.0 미만인지 확인하여 취약 여부를 판단합니다.
python3 -c 'import tensorflow as tf; print(tf.__version__)'