🇰🇷 한글 설명
Linux 커널의 DRM(Direct Rendering Manager) 서브시스템에서 drm/prime 코드가 GEM 객체 인스턴스의 dma_buf 필드를 사용하던 변경을 되돌리는 패치입니다. 해당 필드는 사용자 공간이 마지막 GEM 핸들을 해제하면 NULL이 되어 NULL 포인터 역참조가 발생할 수 있었습니다. 이에 .import_attach->dmabuf를 사용하는 방식으로 복원했습니다.
💡 쉬운 설명
그래픽 메모리 버퍼를 관리하는 리눅스 커널 코드에서 메모리 참조가 사라진 뒤에도 접근하려다 시스템이 비정상 종료될 수 있는 문제였습니다. 이번 수정은 안정적인 참조 경로로 되돌려 이 문제를 해결합니다.
🇺🇸 원문 (English)
In the Linux kernel, the following vulnerability has been resolved:
Revert "drm/prime: Use dma_buf from GEM object instance"
This reverts commit f83a9b8c7fd0557b0c50784bfdc1bbe9140c9bf8.
The dma_buf field in struct drm_gem_object is not stable over the
object instance's lifetime. The field becomes NULL when user space
releases the final GEM handle on the buffer object. This resulted
in a NULL-pointer deref.
Workarounds in commit 5307dce878d4 ("drm/gem: Acquire references on
GEM handles for framebuffers") and commit f6bfc9afc751 ("drm/framebuffer:
Acquire internal references on GEM handles") only solved the problem
partially. They especially don't work for buffer objects without a DRM
framebuffer associated.
Hence, this revert to going back to using .import_attach->dmabuf.
v3:
- cc stable
📍 영향받는 시스템
패치가 적용되지 않은 Linux 커널 버전 (DRM/GPU 드라이버를 사용하는 시스템)
⚔️ 공격 벡터
로컬 사용자가 GEM 핸들을 해제하는 과정에서 NULL 포인터 역참조를 유발해 서비스 거부(커널 패닉)를 일으킬 수 있습니다.
🛡️ 대응 방법
배포판의 최신 커널 업데이트를 적용하거나 이 되돌리기 커밋이 포함된 커널로 업그레이드하세요.
🔧 검증 코드
출력된 커널 버전을 배포판 보안 공지와 대조해 이 패치가 포함된 버전인지 확인하세요 (패치 포함 여부는 배포판 changelog로 판단).