🇰🇷 한글 설명
TensorFlow의 `tf.raw_ops.QuantizedBiasAdd` 연산 과정에서 정수 0으로 나누는 동작이 발생하여 정의되지 않은 동작을 유발할 수 있습니다. 이는 Eigen 커널 구현 시 입력 요소의 개수가 0인지 확인하지 않고 나누기 연산을 수행하기 때문에 발생합니다.
💡 쉬운 설명
수학 계산을 할 때 숫자를 0으로 나누면 컴퓨터가 오류를 일으키거나 예상치 못한 행동을 할 수 있는 문제입니다. TensorFlow를 사용하여 특정 계산을 수행할 때 입력값이 비어 있으면 이런 문제가 발생할 수 있습니다.
🇺🇸 원문 (English)
TensorFlow is an end-to-end open source platform for machine learning. An attacker can trigger an integer division by zero undefined behavior in `tf.raw_ops.QuantizedBiasAdd`. This is because the implementation of the Eigen kernel(https://github.com/tensorflow/tensorflow/blob/61bca8bd5ba8a68b2d97435ddfafcdf2b85672cd/tensorflow/core/kernels/quantization_utils.h#L812-L849) does a division by the number of elements of the smaller input (based on shape) without checking that this is not zero. 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 포함)
⚔️ 공격 벡터
조작된 형태(shape)를 가진 입력을 제공하여 0으로 나누기 연산을 유도함
🛡️ 대응 방법
TensorFlow를 2.5.0 이상 버전으로 업데이트하거나 해당 보안 패치가 적용된 버전으로 업그레이드
🔧 검증 코드
출력된 버전 번호가 2.5.0보다 낮은지 확인하여 취약 여부를 판단합니다.
python3 -c 'import tensorflow as tf; print(tf.__version__)'