🇰🇷 한글 설명
TensorFlow의 `tf.raw_ops.StringNGrams` 함수에서 조작된 입력을 처리할 때 힙 버퍼 오버플로가 발생할 수 있습니다. 특정 조건에서 입력 데이터가 패딩 요소만 포함하도록 분할될 경우, 잘못된 인덱스 참조로 인해 메모리 오류가 발생합니다.
💡 쉬운 설명
TensorFlow라는 인공지능 도구에서 특수한 데이터를 입력하면 프로그램의 메모리 영역을 넘어서는 오류가 발생할 수 있습니다. 이로 인해 프로그램이 갑자기 종료되거나 보안 문제가 생길 수 있습니다.
🇺🇸 원문 (English)
TensorFlow is an end-to-end open source platform for machine learning. An attacker can cause a heap buffer overflow by passing crafted inputs to `tf.raw_ops.StringNGrams`. This is because the implementation(https://github.com/tensorflow/tensorflow/blob/1cdd4da14282210cc759e468d9781741ac7d01bf/tensorflow/core/kernels/string_ngrams_op.cc#L171-L185) fails to consider corner cases where input would be split in such a way that the generated tokens should only contain padding elements. If input is such that `num_tokens` is 0, then, for `data_start_index=0` (when left padding is present), the marked line would result in reading `data[-1]`. 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.StringNGrams` 연산에 전달하여 메모리 오버플로 유도
🛡️ 대응 방법
TensorFlow를 2.5.0 이상의 최신 버전으로 업데이트하거나 해당 패치가 적용된 버전으로 업그레이드
🔧 검증 코드
출력된 버전 번호가 2.5.0보다 낮으면 취약한 버전이 설치된 것입니다.
python3 -c 'import tensorflow as tf; print(tf.__version__)'