🇰🇷 한글 설명
TensorFlow Lite의 최적화된 풀링 구현에서 stride 인자가 0인지 확인하지 않아 발생하는 문제입니다. 사용자가 stride 값이 0인 특수 모델을 제작할 경우, ComputePaddingHeightWidth 함수 호출 시 0으로 나누기 오류(division by zero)가 발생합니다.
💡 쉬운 설명
인공지능 모델을 처리할 때 계산 과정에서 숫자를 0으로 나누는 실수가 발생할 수 있는 결함입니다. 악의적으로 만들어진 모델을 실행하면 프로그램이 갑자기 멈추거나 오류가 날 수 있습니다.
🇺🇸 원문 (English)
TensorFlow is an end-to-end open source platform for machine learning. Optimized pooling implementations in TFLite fail to check that the stride arguments are not 0 before calling `ComputePaddingHeightWidth`(https://github.com/tensorflow/tensorflow/blob/3f24ccd932546416ec906a02ddd183b48a1d2c83/tensorflow/lite/kernels/pooling.cc#L90). Since users can craft special models which will have `params->stride_{height,width}` be zero, this will result in a division by zero. 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 포함)
⚔️ 공격 벡터
stride 값이 0으로 설정된 특수하게 제작된 TensorFlow Lite 모델 파일을 실행함
🛡️ 대응 방법
TensorFlow를 2.5.0 이상의 최신 버전으로 업데이트하거나 해당 패치가 적용된 버전으로 업그레이드
🔧 검증 코드
출력된 버전 번호가 2.5.0보다 낮은지 확인하여 취약 여부를 판단합니다.
python3 -c 'import tensorflow as tf; print(tf.__version__)'