🇰🇷 한글 설명
TensorFlow의 `tf.raw_ops.QuantizeAndDequantizeV4Grad` 구현에서 정수 오버플로 취약점이 발견되었습니다. 음수 정수 값을 부호 없는 정수로 변환하는 과정에서 메모리 할당 크기가 비정상적으로 커질 수 있는 문제입니다.
💡 쉬운 설명
컴퓨터가 숫자를 계산할 때 음수를 아주 큰 양수로 잘못 인식하여, 필요 이상의 메모리를 한꺼번에 사용하려고 시도하는 오류입니다. 이로 인해 프로그램이 갑자기 종료되거나 시스템에 문제를 일으킬 수 있습니다.
🇺🇸 원문 (English)
TensorFlow is an end-to-end open source platform for machine learning. In affected versions the implementation of `tf.raw_ops.QuantizeAndDequantizeV4Grad` is vulnerable to an integer overflow issue caused by converting a signed integer value to an unsigned one and then allocating memory based on this value. The [implementation](https://github.com/tensorflow/tensorflow/blob/8d72537c6abf5a44103b57b9c2e22c14f5f49698/tensorflow/core/kernels/quantize_and_dequantize_op.cc#L126) uses the `axis` value as the size argument to `absl::InlinedVector` constructor. But, the constructor uses an unsigned type for the argument, so the implicit conversion transforms the negative value to a large integer. We have patched the issue in GitHub commit 96f364a1ca3009f98980021c4b32be5fdcca33a1. The fix will be included in TensorFlow 2.6.0. We will also cherrypick this commit on TensorFlow 2.5.1, and TensorFlow 2.4.3, as these are also affected and still in supported range.
📍 영향받는 시스템
TensorFlow 2.6.0 미만 버전 (2.5.1, 2.4.3 포함)
⚔️ 공격 벡터
조작된 axis 값을 포함한 TensorFlow 연산 실행을 통한 메모리 할당 유도
🛡️ 대응 방법
TensorFlow를 2.6.0 이상 버전으로 업데이트하거나, 패치가 적용된 2.5.1 또는 2.4.3 버전으로 업데이트하십시오.
🔧 검증 코드
출력된 버전 번호가 2.6.0 미만인지 확인하여 취약 여부를 판단합니다.
python3 -c 'import tensorflow as tf; print(tf.__version__)'