🇰🇷 한글 설명
TensorFlow의 `tf.raw_ops.QuantizedResizeBilinear` 연산에서 부동 소수점 반올림 오류로 인해 힙 버퍼 오버플로가 발생할 수 있습니다. 특정 입력값을 조작하여 보간법 계산 시 인덱스 범위 오류를 유도함으로써 메모리 손상을 일으킬 수 있습니다.
💡 쉬운 설명
이미지 크기를 조절하는 과정에서 계산 실수로 인해 허용된 메모리 범위를 벗어나 데이터를 쓰는 오류입니다. 공격자가 특수한 데이터를 입력하면 프로그램이 비정상적으로 작동하거나 메모리 오류를 일으킬 수 있습니다.
🇺🇸 원문 (English)
TensorFlow is an end-to-end open source platform for machine learning. An attacker can trigger a heap buffer overflow in `tf.raw_ops.QuantizedResizeBilinear` by manipulating input values so that float rounding results in off-by-one error in accessing image elements. This is because the implementation(https://github.com/tensorflow/tensorflow/blob/44b7f486c0143f68b56c34e2d01e146ee445134a/tensorflow/core/kernels/quantized_resize_bilinear_op.cc#L62-L66) computes two integers (representing the upper and lower bounds for interpolation) by ceiling and flooring a floating point value. For some values of `in`, `interpolation->upper[i]` might be smaller than `interpolation->lower[i]`. This is an issue if `interpolation->upper[i]` is capped at `in_size-1` as it means that `interpolation->lower[i]` points outside of the image. Then, in the interpolation code(https://github.com/tensorflow/tensorflow/blob/44b7f486c0143f68b56c34e2d01e146ee445134a/tensorflow/core/kernels/quantized_resize_bilinear_op.cc#L245-L264), this would result in heap buffer 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 포함)
⚔️ 공격 벡터
조작된 입력값을 통해 `tf.raw_ops.QuantizedResizeBilinear` 연산의 부동 소수점 계산 오류 유도
🛡️ 대응 방법
TensorFlow를 2.5.0 이상의 최신 버전으로 업데이트하십시오.
🔧 검증 코드
출력된 버전이 2.5.0 미만인 경우 해당 취약점에 노출되어 있습니다.
python3 -c 'import tensorflow as tf; print(tf.__version__)'