🇰🇷 한글 설명
TensorFlow의 `tf.raw_ops.ExperimentalDatasetToTFRecord` 및 `tf.raw_ops.DatasetToTFRecord` 구현에서 힙 버퍼 오버플로 및 세그멘테이션 결함이 발생할 수 있습니다. 해당 함수가 데이터셋의 모든 레코드가 문자열 타입이라고 가정하지만, 이에 대한 검증 과정이 누락되어 발생합니다.
💡 쉬운 설명
데이터를 변환하는 과정에서 데이터의 종류를 제대로 확인하지 않아 발생하는 오류입니다. 잘못된 형식의 데이터를 입력하면 프로그램이 갑자기 종료되거나 메모리 오류가 발생할 수 있습니다.
🇺🇸 원문 (English)
TensorFlow is an end-to-end open source platform for machine learning. In affected versions the implementation for `tf.raw_ops.ExperimentalDatasetToTFRecord` and `tf.raw_ops.DatasetToTFRecord` can trigger heap buffer overflow and segmentation fault. The [implementation](https://github.com/tensorflow/tensorflow/blob/f24faa153ad31a4b51578f8181d3aaab77a1ddeb/tensorflow/core/kernels/data/experimental/to_tf_record_op.cc#L93-L102) assumes that all records in the dataset are of string type. However, there is no check for that, and the example given above uses numeric types. We have patched the issue in GitHub commit e0b6e58c328059829c3eb968136f17aa72b6c876. The fix will be included in TensorFlow 2.6.0. We will also cherrypick this commit on TensorFlow 2.5.1, TensorFlow 2.4.3, and TensorFlow 2.3.4, as these are also affected and still in supported range.
📍 영향받는 시스템
TensorFlow 2.6.0 미만 버전 (2.5.1, 2.4.3, 2.3.4 포함)
⚔️ 공격 벡터
문자열이 아닌 숫자형 데이터가 포함된 조작된 데이터셋을 처리하도록 유도
🛡️ 대응 방법
TensorFlow를 2.6.0 이상 버전으로 업데이트하거나 패치가 적용된 최신 마이너 버전으로 업데이트
🔧 검증 코드
출력된 버전 번호가 2.6.0 미만인지 확인하여 취약 여부를 판단합니다.
python3 -c 'import tensorflow as tf; print(tf.__version__)'