🇰🇷 한글 설명
TensorFlow의 모든 브로드캐스팅이 필요 없는 이진 cwise 연산에서 널 포인터 참조로 인해 정의되지 않은 동작이 발생할 수 있는 취약점입니다. 두 입력값의 요소 개수가 동일하다고 가정하지만 이를 검증하지 않아, Eigen 펑터 실행 시 힙 영역의 OOB(Out-of-Bounds) 읽기 및 정의되지 않은 동작을 유발합니다.
💡 쉬운 설명
머신러닝 도구인 TensorFlow에서 데이터 크기가 맞지 않는 계산을 수행할 때 프로그램이 예상치 못한 동작을 하거나 오류를 일으킬 수 있는 문제입니다. 공격자가 이를 악용하면 시스템의 메모리 정보를 잘못 읽어오거나 프로그램을 강제로 종료시킬 수 있습니다.
🇺🇸 원문 (English)
TensorFlow is an end-to-end open source platform for machine learning. In affected versions an attacker can cause undefined behavior via binding a reference to null pointer in all binary cwise operations that don't require broadcasting (e.g., gradients of binary cwise operations). The [implementation](https://github.com/tensorflow/tensorflow/blob/84d053187cb80d975ef2b9684d4b61981bca0c41/tensorflow/core/kernels/cwise_ops_common.h#L264) assumes that the two inputs have exactly the same number of elements but does not check that. Hence, when the eigen functor executes it triggers heap OOB reads and undefined behavior due to binding to nullptr. We have patched the issue in GitHub commit 93f428fd1768df147171ed674fee1fc5ab8309ec. 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 포함)
⚔️ 공격 벡터
브로드캐스팅이 필요 없는 이진 cwise 연산 시 입력 데이터의 크기를 다르게 구성하여 널 포인터 참조 유도
🛡️ 대응 방법
TensorFlow를 2.6.0 이상 버전으로 업데이트하거나, 지원되는 버전(2.5.1, 2.4.3, 2.3.4)의 보안 패치 적용 버전으로 업데이트
🔧 검증 코드
출력된 버전 번호가 2.6.0 미만인지 확인하여 취약 여부를 판단합니다.
python3 -c "import tensorflow as tf; print(tf.__version__)"