🇰🇷 한글 설명
Tensorflow의 ReverseSequence 함수 내 shape 추론 구현에서 batch_dim 값에 대한 검증이 미흡하여 힙 영역의 OOB(Out-of-Bounds) Read가 발생할 수 있습니다. 음수 차원 값이 입력될 경우 배열의 시작 지점 이전 메모리에 접근할 수 있는 취약점이 존재합니다.
💡 쉬운 설명
텐서플로우라는 인공지능 도구에서 숫자를 계산할 때, 잘못된 음수 값을 입력하면 컴퓨터의 허용되지 않은 메모리 영역을 읽어버릴 수 있는 문제입니다. 이로 인해 프로그램이 멈추거나 중요한 정보가 유출될 위험이 있습니다.
🇺🇸 원문 (English)
Tensorflow is an Open Source Machine Learning Framework. The implementation of shape inference for `ReverseSequence` does not fully validate the value of `batch_dim` and can result in a heap OOB read. There is a check to make sure the value of `batch_dim` does not go over the rank of the input, but there is no check for negative values. Negative dimensions are allowed in some cases to mimic Python's negative indexing (i.e., indexing from the end of the array), however if the value is too negative then the implementation of `Dim` would access elements before the start of an array. The fix will be included in TensorFlow 2.8.0. We will also cherrypick this commit on TensorFlow 2.7.1, TensorFlow 2.6.3, and TensorFlow 2.5.3, as these are also affected and still in supported range.
📍 영향받는 시스템
TensorFlow 2.8.0 미만 버전 (2.7.1, 2.6.3, 2.5.3 포함)
⚔️ 공격 벡터
조작된 음수 batch_dim 값을 포함한 ReverseSequence 연산 수행
🛡️ 대응 방법
TensorFlow를 2.8.0 이상 버전으로 업데이트하거나, 지원되는 최신 패치 버전(2.7.1, 2.6.3, 2.5.3 등)으로 업데이트하십시오.
🔧 검증 코드
출력된 버전 번호가 2.8.0 미만인지 확인하여 취약 여부를 판단합니다.
python3 -c 'import tensorflow as tf; print(tf.__version__)'