🇰🇷 한글 설명
TensorFlow의 `tf.raw_ops.MaxPoolGradWithArgmax` 구현에서 특수하게 조작된 입력이 제공될 경우 힙 할당 데이터의 범위를 벗어난 읽기가 발생할 수 있습니다. 이는 `input_min` 및 `input_max` 텐서가 비어 있을 경우 첫 번째 요소에 접근하려 할 때 발생하는 경계 외 읽기 취약점입니다.
💡 쉬운 설명
데이터가 들어있어야 할 공간이 비어 있는데도 프로그램이 강제로 첫 번째 데이터를 읽으려다 발생하는 오류입니다. 공격자가 비어 있는 데이터를 보내면 시스템의 메모리 일부를 몰래 훔쳐볼 위험이 있습니다.
🇺🇸 원문 (English)
TensorFlow is an end-to-end open source platform for machine learning. The implementation of `tf.raw_ops.MaxPoolGradWithArgmax` can cause reads outside of bounds of heap allocated data if attacker supplies specially crafted inputs. The implementation(https://github.com/tensorflow/tensorflow/blob/ac328eaa3870491ababc147822cd04e91a790643/tensorflow/core/kernels/requantization_range_op.cc#L49-L50) assumes that the `input_min` and `input_max` tensors have at least one element, as it accesses the first element in two arrays. If the tensors are empty, `.flat<T>()` is an empty object, backed by an empty array. Hence, accesing even the 0th element is a read outside the bounds. 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 포함)
⚔️ 공격 벡터
비어 있는(empty) `input_min` 또는 `input_max` 텐서를 포함한 특수하게 조작된 입력값 전달
🛡️ 대응 방법
TensorFlow를 2.5.0 이상 버전으로 업데이트하거나, 해당 보안 패치가 적용된 하위 버전(2.4.2, 2.3.3 등)으로 업데이트하십시오.
🔧 검증 코드
출력된 버전 번호가 2.5.0 미만인지 확인하여 취약 여부를 판단합니다.
python3 -c 'import tensorflow as tf; print(tf.__version__)'