🇰🇷 한글 설명
TensorFlow에서 로우 API를 통해 텐서를 복구할 때, 텐서 이름이 제공되지 않으면 널 포인터 역참조가 발생할 수 있습니다. 또한, 제공된 텐서 이름의 개수가 부족할 경우 공격자가 힙 할당 데이터의 경계를 벗어나 메모리를 읽을 수 있는 취약점이 존재합니다.
💡 쉬운 설명
TensorFlow라는 인공지능 도구에서 데이터를 불러올 때, 이름이 잘못 입력되면 프로그램이 멈추거나 컴퓨터의 중요한 정보를 몰래 훔쳐볼 수 있는 문제입니다. 공격자가 조작된 데이터를 보내 메모리의 허용되지 않은 영역을 읽어낼 수 있습니다.
🇺🇸 원문 (English)
TensorFlow is an end-to-end open source platform for machine learning. When restoring tensors via raw APIs, if the tensor name is not provided, TensorFlow can be tricked into dereferencing a null pointer. Alternatively, attackers can read memory outside the bounds of heap allocated data by providing some tensor names but not enough for a successful restoration. The [implementation](https://github.com/tensorflow/tensorflow/blob/47a06f40411a69c99f381495f490536972152ac0/tensorflow/core/kernels/save_restore_tensor.cc#L158-L159) retrieves the tensor list corresponding to the `tensor_name` user controlled input and immediately retrieves the tensor at the restoration index (controlled via `preferred_shard` argument). This occurs without validating that the provided list has enough values. If the list is empty this results in dereferencing a null pointer (undefined behavior). If, however, the list has some elements, if the restoration index is outside the bounds this results in heap OOB read. We have patched the issue in GitHub commit 9e82dce6e6bd1f36a57e08fa85af213e2b2f2622. 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 API에 전달
🛡️ 대응 방법
TensorFlow를 2.6.0 이상 버전으로 업데이트하거나, 보안 패치가 적용된 2.5.1, 2.4.3, 2.3.4 버전으로 업데이트
🔧 검증 코드
출력된 버전이 2.6.0 이상인지, 또는 패치가 적용된 특정 버전(2.5.1, 2.4.3, 2.3.4)인지 확인합니다.
python3 -c 'import tensorflow as tf; print(tf.__version__)'