🇰🇷 한글 설명
TensorFlow Lite의 GatherNd 및 Gather 구현체에서 음수 인덱스에 대한 유효성 검사가 누락되어 발생하는 취약점입니다. 공격자가 음수 값이 포함된 정교한 모델을 생성할 경우 힙(Heap) 메모리에서 임의의 데이터를 읽을 수 있습니다.
💡 쉬운 설명
데이터를 찾는 과정에서 잘못된 위치(음수 값)를 가리키도록 조작된 파일을 사용하면, 컴퓨터의 중요한 메모리 내용을 몰래 훔쳐볼 수 있는 문제입니다. 이는 마치 잘못된 주소를 입력해 남의 집 안을 들여다보는 것과 같습니다.
🇺🇸 원문 (English)
TensorFlow is an end-to-end open source platform for machine learning. In affected versions TFLite's [`GatherNd` implementation](https://github.com/tensorflow/tensorflow/blob/149562d49faa709ea80df1d99fc41d005b81082a/tensorflow/lite/kernels/gather_nd.cc#L124) does not support negative indices but there are no checks for this situation. Hence, an attacker can read arbitrary data from the heap by carefully crafting a model with negative values in `indices`. Similar issue exists in [`Gather` implementation](https://github.com/tensorflow/tensorflow/blob/149562d49faa709ea80df1d99fc41d005b81082a/tensorflow/lite/kernels/gather.cc). We have patched the issue in GitHub commits bb6a0383ed553c286f87ca88c207f6774d5c4a8f and eb921122119a6b6e470ee98b89e65d721663179d. 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 Lite 모델 파일을 로드하여 실행
🛡️ 대응 방법
TensorFlow를 2.6.0 이상의 최신 버전으로 업데이트하거나 보안 패치가 적용된 버전으로 교체
🔧 검증 코드
출력된 버전이 2.6.0 미만인 경우 해당 취약점에 노출되어 있을 가능성이 높습니다.
pip show tensorflow | grep Version