🇰🇷 한글 설명
TensorFlow의 tf.raw_ops.RaggedGather 함수에서 인자값이 유효한 ragged tensor를 결정하지 못할 경우, 힙 할당 버퍼의 범위를 벗어난 메모리 읽기가 발생할 수 있습니다. 이는 텐서의 랭크(rank)를 확인하기 전에 첫 번째 차원을 직접 읽거나, params_nested_splits 리스트가 비어 있는지 확인하지 않는 구현 결함으로 인해 발생합니다.
💡 쉬운 설명
머신러닝 도구인 TensorFlow에서 데이터의 모양을 잘못 설정하면 컴퓨터의 허용된 메모리 영역 밖을 들여다볼 수 있는 보안 약점이 있습니다. 이를 통해 공격자가 시스템의 민감한 정보를 훔쳐볼 위험이 있습니다.
🇺🇸 원문 (English)
TensorFlow is an end-to-end open source platform for machine learning. In affected versions if the arguments to `tf.raw_ops.RaggedGather` don't determine a valid ragged tensor code can trigger a read from outside of bounds of heap allocated buffers. The [implementation](https://github.com/tensorflow/tensorflow/blob/8d72537c6abf5a44103b57b9c2e22c14f5f49698/tensorflow/core/kernels/ragged_gather_op.cc#L70) directly reads the first dimension of a tensor shape before checking that said tensor has rank of at least 1 (i.e., it is not a scalar). Furthermore, the implementation does not check that the list given by `params_nested_splits` is not an empty list of tensors. We have patched the issue in GitHub commit a2b743f6017d7b97af1fe49087ae15f0ac634373. 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 포함)
⚔️ 공격 벡터
조작된 인자를 포함한 tf.raw_ops.RaggedGather 연산 실행을 통한 메모리 경계 외 읽기 공격
🛡️ 대응 방법
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__)'