🇰🇷 한글 설명
Linux 커널의 staging: most: video 영역에서 비디오 장치 등록 실패 시 메모리가 중복 해제되는 취약점이 발견되었습니다. 장치 등록 과정에서 오류가 발생할 경우, 시스템이 이미 해제된 메모리 영역을 다시 해제하려고 시도하여 커널 불안정성을 초래할 수 있습니다.
💡 쉬운 설명
컴퓨터가 비디오 장치를 준비하다가 오류가 났을 때, 이미 치운 물건을 또 치우려고 시도하면서 시스템이 혼란에 빠지는 문제입니다. 이로 인해 시스템이 멈추거나 예상치 못한 오류가 발생할 수 있습니다.
🇺🇸 원문 (English)
In the Linux kernel, the following vulnerability has been resolved:
staging: most: video: avoid double free on video register failure
comp_register_videodev() allocates a video_device with
video_device_alloc() and releases it if video_register_device() fails.
This can double free the video_device when __video_register_device()
reaches device_register() and that call fails:
video_register_device()
-> __video_register_device()
-> device_register() fails
-> put_device(&vdev->dev)
-> v4l2_device_release()
-> vdev->release(vdev)
-> video_device_release(vdev)
comp_register_videodev()
-> video_device_release(mdev->vdev)
Use video_device_release_empty() while registering the device so that
registration failure paths do not free mdev->vdev through vdev->release().
comp_register_videodev() then releases mdev->vdev exactly once on failure.
Restore video_device_release() after successful registration so the
registered device keeps its normal lifetime handling.
This issue was found by a static analysis tool I am developing.
📍 영향받는 시스템
Linux kernel (staging: most: video 관련 모듈 사용 시스템)
⚔️ 공격 벡터
로컬 공격자가 특정 비디오 장치 등록 실패 상황을 유도하여 커널 메모리 오류를 일으킬 수 있음
🛡️ 대응 방법
Linux 커널을 최신 보안 패치가 적용된 버전으로 업데이트하여 video_device_release_empty() 로직을 적용해야 함
🔧 검증 코드
현재 실행 중인 커널 버전을 확인하여 해당 취약점이 해결된 패치 버전인지 확인합니다.