🔍 CVE-2021-47081

7.8
CVSS Score
HIGH
2024-03-01
2026-08-04 10:16
✅ 완료

🇰🇷 한글 설명

Linux 커널의 habanalabs/gaudi 드라이버 내 gaudi_memset_device_memory 함수에서 Use-After-Free(UAF) 취약점이 발견되었습니다. 작업 할당 실패 시 참조 횟수가 감소한 후 객체가 해제될 수 있으며, 이후 해당 객체의 ID에 접근하려 할 때 메모리 오류가 발생할 수 있습니다.

💡 쉬운 설명

컴퓨터가 이미 사용이 끝나서 삭제한 메모리 공간을 다시 사용하려고 시도할 때 발생하는 오류입니다. 이로 인해 시스템이 멈추거나 보안 공격에 악용될 위험이 있습니다.

🇺🇸 원문 (English)

In the Linux kernel, the following vulnerability has been resolved: habanalabs/gaudi: Fix a potential use after free in gaudi_memset_device_memory Our code analyzer reported a uaf. In gaudi_memset_device_memory, cb is get via hl_cb_kernel_create() with 2 refcount. If hl_cs_allocate_job() failed, the execution runs into release_cb branch. One ref of cb is dropped by hl_cb_put(cb) and could be freed if other thread also drops one ref. Then cb is used by cb->id later, which is a potential uaf. My patch add a variable 'id' to accept the value of cb->id before the hl_cb_put(cb) is called, to avoid the potential uaf.

📍 영향받는 시스템

Habanalabs Gaudi 가속기를 사용하는 Linux 커널 기반 시스템

⚔️ 공격 벡터

특정 드라이버 함수 호출 과정에서 작업 할당 실패를 유도하여 메모리 해제 후 접근 유도

🛡️ 대응 방법

해당 취약점이 수정된 최신 Linux 커널 버전으로 업데이트

🔧 검증 코드

현재 실행 중인 커널 버전을 확인하여 수정된 패치가 적용된 버전인지 확인합니다.

Shell / Script
uname -r

📊 CVSS Vector String

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

💻 영향받는 소프트웨어

Linux Kernel