🔍 CVE-2022-50303

7.8
CVSS Score
HIGH
2025-09-15
2026-10-15 22:17
✅ 완료

🇰🇷 한글 설명

Linux 커널의 drm/amdkfd 구성 요소에서 compute PASID를 중복 해제하는 취약점이 발견되었습니다. VM 초기화 실패 시 참조 카운트가 적절히 관리되지 않아, 파일 종료 핸들러와 프로세스 파괴 워커가 동일한 PASID를 중복 해제하면서 NULL 포인터 역참조 및 커널 패닉을 유발할 수 있습니다.

💡 쉬운 설명

컴퓨터의 그래픽 자원을 관리하는 과정에서 이미 사용이 끝난 번호표를 두 번 지우려고 시도하여 시스템이 충돌하는 문제입니다. 이로 인해 운영체제가 갑자기 멈추거나 오류가 발생할 수 있습니다.

🇺🇸 원문 (English)

In the Linux kernel, the following vulnerability has been resolved: drm/amdkfd: Fix double release compute pasid If kfd_process_device_init_vm returns failure after vm is converted to compute vm and vm->pasid set to compute pasid, KFD will not take pdd->drm_file reference. As a result, drm close file handler maybe called to release the compute pasid before KFD process destroy worker to release the same pasid and set vm->pasid to zero, this generates below WARNING backtrace and NULL pointer access. Add helper amdgpu_amdkfd_gpuvm_set_vm_pasid and call it at the last step of kfd_process_device_init_vm, to ensure vm pasid is the original pasid if acquiring vm failed or is the compute pasid with pdd->drm_file reference taken to avoid double release same pasid. amdgpu: Failed to create process VM object ida_free called for id=32770 which is not allocated. WARNING: CPU: 57 PID: 72542 at ../lib/idr.c:522 ida_free+0x96/0x140 RIP: 0010:ida_free+0x96/0x140 Call Trace: amdgpu_pasid_free_delayed+0xe1/0x2a0 [amdgpu] amdgpu_driver_postclose_kms+0x2d8/0x340 [amdgpu] drm_file_free.part.13+0x216/0x270 [drm] drm_close_helper.isra.14+0x60/0x70 [drm] drm_release+0x6e/0xf0 [drm] __fput+0xcc/0x280 ____fput+0xe/0x20 task_work_run+0x96/0xc0 do_exit+0x3d0/0xc10 BUG: kernel NULL pointer dereference, address: 0000000000000000 RIP: 0010:ida_free+0x76/0x140 Call Trace: amdgpu_pasid_free_delayed+0xe1/0x2a0 [amdgpu] amdgpu_driver_postclose_kms+0x2d8/0x340 [amdgpu] drm_file_free.part.13+0x216/0x270 [drm] drm_close_helper.isra.14+0x60/0x70 [drm] drm_release+0x6e/0xf0 [drm] __fput+0xcc/0x280 ____fput+0xe/0x20 task_work_run+0x96/0xc0 do_exit+0x3d0/0xc10

📍 영향받는 시스템

Linux kernel (amdgpu/amdkfd driver components)

⚔️ 공격 벡터

로컬 공격자가 특정 조건에서 VM 초기화 실패를 유도하여 커널 오류를 발생시킴

🛡️ 대응 방법

amdgpu_amdkfd_gpuvm_set_vm_pasid 헬퍼 함수가 적용된 최신 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