🇰🇷 한글 설명
TensorFlow의 `tf.raw_ops.RaggedTensorToVariant` 함수 호출 시 유효하지 않은 RaggedTensor를 인자로 전달하면 Null 포인터 역참조가 발생합니다. 이는 구현 과정에서 RaggedTensor 인자가 비어 있는지 확인하는 검증 절차가 누락되어 발생하며, 프로그램의 비정상 종료를 유발할 수 있습니다.
💡 쉬운 설명
머신러닝 도구인 TensorFlow에서 잘못된 데이터 형식을 입력하면 프로그램이 예상치 못하게 갑자기 꺼질 수 있는 오류입니다. 데이터가 비어 있는 경우를 제대로 확인하지 못해 발생하는 문제입니다.
🇺🇸 원문 (English)
TensorFlow is an end-to-end open source platform for machine learning. Calling `tf.raw_ops.RaggedTensorToVariant` with arguments specifying an invalid ragged tensor results in a null pointer dereference. The implementation of `RaggedTensorToVariant` operations(https://github.com/tensorflow/tensorflow/blob/904b3926ed1c6c70380d5313d282d248a776baa1/tensorflow/core/kernels/ragged_tensor_to_variant_op.cc#L39-L40) does not validate that the ragged tensor argument is non-empty. Since `batched_ragged` contains no elements, `batched_ragged.splits` is a null vector, thus `batched_ragged.splits(0)` will result in dereferencing `nullptr`. 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 포함)
⚔️ 공격 벡터
조작된 RaggedTensor 데이터를 포함한 TensorFlow 연산 실행
🛡️ 대응 방법
TensorFlow를 2.5.0 이상의 최신 버전으로 업데이트하거나 해당 패치가 적용된 버전으로 업그레이드
🔧 검증 코드
출력된 버전 번호가 2.5.0 미만인 경우 해당 취약점에 노출된 상태입니다.
python3 -c 'import tensorflow as tf; print(tf.__version__)'