🇰🇷 한글 설명
TensorFlow의 `SparseAdd` 연산 과정에서 입력값 검증이 불완전하여 발생하는 취약점입니다. 공격자는 비어 있는 텐서나 차원이 일치하지 않는 텐서를 전송함으로써 널 포인터 역참조 및 힙 영역의 경계 외 쓰기(Out-of-bounds write)를 유발할 수 있습니다.
💡 쉬운 설명
머신러닝 도구인 TensorFlow에서 데이터의 형식을 제대로 확인하지 않아 발생하는 오류입니다. 잘못된 데이터를 입력하면 프로그램이 갑자기 꺼지거나 컴퓨터의 메모리 영역을 마음대로 조작할 수 있습니다.
🇺🇸 원문 (English)
TensorFlow is an end-to-end open source platform for machine learning. Incomplete validation in `SparseAdd` results in allowing attackers to exploit undefined behavior (dereferencing null pointers) as well as write outside of bounds of heap allocated data. The implementation(https://github.com/tensorflow/tensorflow/blob/656e7673b14acd7835dc778867f84916c6d1cac2/tensorflow/core/kernels/sparse_add_op.cc) has a large set of validation for the two sparse tensor inputs (6 tensors in total), but does not validate that the tensors are not empty or that the second dimension of `*_indices` matches the size of corresponding `*_shape`. This allows attackers to send tensor triples that represent invalid sparse tensors to abuse code assumptions that are not protected by validation. 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 포함)
⚔️ 공격 벡터
조작된 희소 텐서(Sparse Tensor) 데이터를 TensorFlow 모델에 입력하여 메모리 오류 유도
🛡️ 대응 방법
TensorFlow를 2.5.0 이상 버전으로 업데이트하거나, 해당 보안 패치가 적용된 최신 마이너 버전으로 업데이트
🔧 검증 코드
출력된 버전 번호가 2.5.0 미만인지 확인하여 취약 여부를 판단합니다.
python3 -c 'import tensorflow as tf; print(tf.__version__)'