🇰🇷 한글 설명
TensorFlow의 `boosted_trees_create_quantile_stream_resource` 함수에서 음수 인자 검증이 누락되어 발생하는 취약점입니다. 공격자가 음수 값을 입력할 경우, 내부적으로 매우 큰 양수 값으로 변환되어 메모리 할당 과정에서 시스템 충돌 및 서비스 거부(DoS)를 유발할 수 있습니다.
💡 쉬운 설명
프로그램이 숫자를 처리할 때 '음수'가 들어올 수 있다는 점을 고려하지 않아 발생하는 문제입니다. 잘못된 숫자를 입력하면 컴퓨터가 감당할 수 없는 엄청난 양의 메모리를 사용하려다 프로그램이 갑자기 꺼지게 됩니다.
🇺🇸 원문 (English)
TensorFlow is an end-to-end open source platform for machine learning. In affected versions an attacker can cause a denial of service in `boosted_trees_create_quantile_stream_resource` by using negative arguments. The [implementation](https://github.com/tensorflow/tensorflow/blob/84d053187cb80d975ef2b9684d4b61981bca0c41/tensorflow/core/kernels/boosted_trees/quantile_ops.cc#L96) does not validate that `num_streams` only contains non-negative numbers. In turn, [this results in using this value to allocate memory](https://github.com/tensorflow/tensorflow/blob/84d053187cb80d975ef2b9684d4b61981bca0c41/tensorflow/core/kernels/boosted_trees/quantiles/quantile_stream_resource.h#L31-L40). However, `reserve` receives an unsigned integer so there is an implicit conversion from a negative value to a large positive unsigned. This results in a crash from the standard library. We have patched the issue in GitHub commit 8a84f7a2b5a2b27ecf88d25bad9ac777cd2f7992. 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 2.6.0 이상 버전으로 업데이트하거나, 해당 패치가 적용된 2.5.1, 2.4.3, 2.3.4 버전으로 업데이트하십시오.
🔧 검증 코드
출력된 버전 번호가 2.6.0 미만인지 확인하여 취약 여부를 판단합니다.
python3 -c 'import tensorflow as tf; print(tf.__version__)'