🇰🇷 한글 설명
TensorFlow의 SparseAdd 함수에서 입력값 검증이 불완전하여 발생하는 취약점입니다. 공격자는 비어 있는 텐서나 차원이 일치하지 않는 텐서를 전송하여 널 포인터 역참조 및 힙 메모리 경계 외 쓰기를 유발할 수 있습니다.
💡 쉬운 설명
데이터를 처리하는 과정에서 입력값이 올바른지 확인하는 절차가 빠져 있는 상태입니다. 이를 통해 해커가 컴퓨터 메모리의 잘못된 영역에 데이터를 쓰거나 프로그램을 강제로 종료시킬 수 있습니다.
🇺🇸 원문 (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_sparse_binary_op_shared.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를 2.5.0 이상의 최신 버전으로 업데이트
🔧 검증 코드
출력된 버전 번호가 2.5.0보다 낮은지 확인하여 취약 여부를 판단합니다.
python3 -c 'import tensorflow as tf; print(tf.__version__)'