🇰🇷 한글 설명
Linux 커널 tegra-video 드라이버의 __tegra_channel_try_format() 함수에서 메모리 누수 발생. v4l2_subdev_call() 실패 시 할당된 sd_state 객체가 해제되지 않음.
💡 쉬운 설명
비디오 드라이버가 메모리를 정리하지 않는 문제입니다. 반복된 사용으로 메모리가 계속 줄어들어 결국 시스템이 느려지거나 멈칠 수 있습니다.
🇺🇸 원문 (English)
In the Linux kernel, the following vulnerability has been resolved:
media: tegra-video: Fix memory leak in __tegra_channel_try_format()
The state object allocated by __v4l2_subdev_state_alloc() must be freed
with __v4l2_subdev_state_free() when it is no longer needed.
In __tegra_channel_try_format(), two error paths return directly after
v4l2_subdev_call() fails, without freeing the allocated 'sd_state'
object. This violates the requirement and causes a memory leak.
Fix this by introducing a cleanup label and using goto statements in the
error paths to ensure that __v4l2_subdev_state_free() is always called
before the function returns.
📍 영향받는 시스템
Linux kernel tegra-video 드라이버 (NVIDIA Tegra SoC 기반 임베디드 시스템)
⚔️ 공격 벡터
Local - 비디오 포맷 변환 작업을 반복적으로 실행하여 메모리 누수 트리거
🛡️ 대응 방법
Linux 커널 업데이트 (메모리 누수 수정 패치 적용)
🔧 검증 코드
Vulnerable 출력 시 취약점이 있을 가능성 높음. 커널 소스에서 __tegra_channel_try_format 함수에 cleanup 레이블과 goto 문이 있으면 패치됨.
strings /boot/vmlinuz-$(uname -r) | grep -q '__tegra_channel_try_format' && echo 'Vulnerable' || echo 'Not affected'