🇰🇷 한글 설명
TensorFlow의 `tf.range` 커널에서 출력 크기를 계산할 때 C++의 암시적 형변환 규칙으로 인해 데이터 손실이 발생합니다. 이로 인해 조건문 처리 과정에서 정수 값이 실수로 변환된 후 절삭되어 오버플로가 발생할 수 있습니다.
💡 쉬운 설명
머신러닝 도구인 TensorFlow에서 숫자를 계산할 때 계산 방식의 오류로 인해 숫자가 너무 커지면 잘못된 값이 나올 수 있는 문제입니다. 이로 인해 프로그램이 예상치 못한 동작을 하거나 오류가 발생할 수 있습니다.
🇺🇸 원문 (English)
TensorFlow is an open source platform for machine learning. In affected versions while calculating the size of the output within the `tf.range` kernel, there is a conditional statement of type `int64 = condition ? int64 : double`. Due to C++ implicit conversion rules, both branches of the condition will be cast to `double` and the result would be truncated before the assignment. This result in overflows. The fix will be included in TensorFlow 2.7.0. We will also cherrypick this commit on TensorFlow 2.6.1, TensorFlow 2.5.2, and TensorFlow 2.4.4, as these are also affected and still in supported range.
📍 영향받는 시스템
TensorFlow 2.7.0 미만 버전 (2.6.1, 2.5.2, 2.4.4 포함)
⚔️ 공격 벡터
특수하게 조작된 `tf.range` 입력값을 사용하여 오버플로 유도
🛡️ 대응 방법
TensorFlow를 2.7.0 이상 버전으로 업데이트하거나, 지원되는 최신 패치 버전(2.6.1, 2.5.2, 2.4.4 등)으로 업데이트
🔧 검증 코드
출력된 버전이 2.7.0 미만인지 확인하여 취약 여부를 판단합니다.
python3 -c 'import tensorflow as tf; print(tf.__version__)'