🔍 CVE-2021-29605

7.1
CVSS Score
HIGH
2021-05-14
2026-06-17 03:48
✅ 완료

🇰🇷 한글 설명

TensorFlow Lite의 TFLiteIntArray 할당 과정에서 정수 오버플로 취약점이 발견되었습니다. 공격자가 조작된 모델을 사용하여 size 곱셈 결과가 int 데이터 타입을 초과하여 음수가 되게 만들면, malloc 함수에 잘못된 값이 전달되어 유효하지 않은 포인터를 참조하게 됩니다.

💡 쉬운 설명

머신러닝 모델을 만들 때 숫자를 계산하는 과정에서 오류를 일으켜 컴퓨터 메모리를 망가뜨릴 수 있는 문제입니다. 나쁜 의도를 가진 모델을 실행하면 프로그램이 비정상적으로 작동하거나 해킹의 통로가 될 수 있습니다.

🇺🇸 원문 (English)

TensorFlow is an end-to-end open source platform for machine learning. The TFLite code for allocating `TFLiteIntArray`s is vulnerable to an integer overflow issue(https://github.com/tensorflow/tensorflow/blob/4ceffae632721e52bf3501b736e4fe9d1221cdfa/tensorflow/lite/c/common.c#L24-L27). An attacker can craft a model such that the `size` multiplier is so large that the return value overflows the `int` datatype and becomes negative. In turn, this results in invalid value being given to `malloc`(https://github.com/tensorflow/tensorflow/blob/4ceffae632721e52bf3501b736e4fe9d1221cdfa/tensorflow/lite/c/common.c#L47-L52). In this case, `ret->size` would dereference an invalid pointer. 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 포함)

⚔️ 공격 벡터

정수 오버플로를 유발하도록 설계된 특수하게 조작된 TensorFlow Lite 모델 파일 실행

🛡️ 대응 방법

TensorFlow를 2.5.0 이상의 최신 버전으로 업데이트하거나 해당 보안 패치가 적용된 버전으로 업그레이드

🔧 검증 코드

출력된 Version이 2.5.0 미만이면 해당 취약점에 노출된 상태입니다.

Shell / Script
pip show tensorflow | grep Version

📊 CVSS Vector String

CVSS Vector
CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:H/A:H

💻 영향받는 소프트웨어

Azure Machine Learning