🇰🇷 한글 설명
TensorFlow의 TFLite 구성 요소 중 expand_dims.cc 파일에서 힙 할당 데이터의 범위를 벗어난 요소를 읽을 수 있는 취약점이 발견되었습니다. axis 값이 매우 큰 음수일 경우 경계 검사를 통과하여 메모리 시작 지점 이전의 데이터를 읽게 됩니다.
💡 쉬운 설명
프로그램이 데이터를 읽을 때 정해진 범위를 벗어나 메모리의 엉뚱한 부분을 읽을 수 있는 오류입니다. 공격자가 이 오류를 이용해 시스템 내부의 민감한 정보를 훔쳐볼 위험이 있습니다.
🇺🇸 원문 (English)
TensorFlow is an end-to-end open source platform for machine learning. In affected versions TFLite's [`expand_dims.cc`](https://github.com/tensorflow/tensorflow/blob/149562d49faa709ea80df1d99fc41d005b81082a/tensorflow/lite/kernels/expand_dims.cc#L36-L50) contains a vulnerability which allows reading one element outside of bounds of heap allocated data. If `axis` is a large negative value (e.g., `-100000`), then after the first `if` it would still be negative. The check following the `if` statement will pass and the `for` loop would read one element before the start of `input_dims.data` (when `i = 0`). We have patched the issue in GitHub commit d94ffe08a65400f898241c0374e9edc6fa8ed257. 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 포함)
⚔️ 공격 벡터
조작된 axis 값을 포함한 TFLite 모델을 처리하도록 유도하여 메모리 외부 읽기 수행
🛡️ 대응 방법
TensorFlow 2.6.0 이상 버전으로 업데이트하거나 패치가 적용된 2.5.1, 2.4.3, 2.3.4 버전 사용
🔧 검증 코드
출력된 버전이 2.6.0 이상인지, 혹은 패치가 적용된 특정 버전(2.5.1, 2.4.3, 2.3.4)인지 확인합니다.
python3 -c 'import tensorflow as tf; print(tf.__version__)'