🇰🇷 한글 설명
TensorFlow의 `tf.raw_ops.RaggedTensorToTensor` 함수에서 입력 인자 검증이 미흡하여 발생하는 취약점입니다. 입력값이 비어 있을 경우 정의되지 않은 동작이 발생할 수 있으며, 릴리스 빌드에서는 보안 검증 로직이 작동하지 않아 힙 기반의 Out-of-Bounds(OOB) 메모리 접근이 가능할 수 있습니다.
💡 쉬운 설명
머신러닝 도구인 TensorFlow에서 데이터가 비어 있는 특수한 상황을 제대로 확인하지 못해 발생하는 오류입니다. 이를 악용하면 프로그램이 예상치 못한 동작을 하거나 메모리 오류를 일으킬 수 있습니다.
🇺🇸 원문 (English)
TensorFlow is an end-to-end open source platform for machine learning. Due to lack of validation in `tf.raw_ops.RaggedTensorToTensor`, an attacker can exploit an undefined behavior if input arguments are empty. The implementation(https://github.com/tensorflow/tensorflow/blob/656e7673b14acd7835dc778867f84916c6d1cac2/tensorflow/core/kernels/ragged_tensor_to_tensor_op.cc#L356-L360) only checks that one of the tensors is not empty, but does not check for the other ones. There are multiple `DCHECK` validations to prevent heap OOB, but these are no-op in release builds, hence they don't prevent anything. The fix will be included in TensorFlow 2.5.0. We will also cherrypick these commits 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.RaggedTensorToTensor` 연산에 전달하여 메모리 오류 유도
🛡️ 대응 방법
TensorFlow를 2.5.0 이상 버전으로 업데이트하거나, 해당 패치가 적용된 지원 버전(2.4.2, 2.3.3 등)으로 업데이트하십시오.
🔧 검증 코드
출력된 버전 번호가 2.5.0 미만인지 확인하여 취약 여부를 판단합니다.
python3 -c 'import tensorflow as tf; print(tf.__version__)'