🇰🇷 한글 설명
TensorFlow의 `tf.raw_ops.Dilation2DBackpropInput` 함수에서 잘못된 인자를 전달할 경우 힙 할당 배열의 범위를 벗어나 데이터를 작성할 수 있는 취약점이 발견되었습니다. 이는 구현 과정에서 출력 배열에 쓰기 작업을 수행하기 전 `h_in_max` 및 `w_in_max` 값에 대한 유효성 검사가 누락되었기 때문입니다.
💡 쉬운 설명
머신러닝 도구인 TensorFlow에서 특정 명령을 사용할 때, 정해진 메모리 공간보다 더 큰 데이터를 입력하여 시스템의 메모리 영역을 침범할 수 있는 문제입니다. 이를 통해 프로그램이 비정상적으로 종료되거나 보안 위협이 발생할 수 있습니다.
🇺🇸 원문 (English)
TensorFlow is an end-to-end open source platform for machine learning. An attacker can write outside the bounds of heap allocated arrays by passing invalid arguments to `tf.raw_ops.Dilation2DBackpropInput`. This is because the implementation(https://github.com/tensorflow/tensorflow/blob/afd954e65f15aea4d438d0a219136fc4a63a573d/tensorflow/core/kernels/dilation_ops.cc#L321-L322) does not validate before writing to the output array. The values for `h_out` and `w_out` are guaranteed to be in range for `out_backprop` (as they are loop indices bounded by the size of the array). However, there are no similar guarantees relating `h_in_max`/`w_in_max` and `in_backprop`. 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 포함)
⚔️ 공격 벡터
유효하지 않은 인자(h_in_max, w_in_max)를 포함한 `tf.raw_ops.Dilation2DBackpropInput` 연산 호출
🛡️ 대응 방법
TensorFlow를 2.5.0 이상의 최신 버전으로 업데이트하거나, 사용 중인 지원 버전의 보안 패치 버전으로 업데이트하십시오.
🔧 검증 코드
출력된 버전 번호가 2.5.0보다 낮은지 확인하여 취약 여부를 판단합니다.
python3 -c 'import tensorflow as tf; print(tf.__version__)'