🇰🇷 한글 설명
Linux 커널의 tegra241-cmdqv 드라이버에서 초기화 실패 시 VINTF0 메모리가 해제되지 않고 누수되는 취약점이 발견되었습니다. 특정 오류 경로에서 메모리 소유권 판별 로직이 하드웨어 상태에 의존하여, 초기화되지 않은 객체를 잘못 처리함으로써 메모리 누수와 잘못된 자원 해제를 유발합니다.
💡 쉬운 설명
컴퓨터의 핵심 부품을 준비하는 과정에서 오류가 발생했을 때, 사용했던 메모리를 제대로 돌려주지 않고 버리는 문제가 있습니다. 이 문제가 반복되면 시스템의 메모리가 부족해져 성능이 떨어지거나 불안정해질 수 있습니다.
🇺🇸 원문 (English)
In the Linux kernel, the following vulnerability has been resolved:
iommu/tegra241-cmdqv: Fix VINTF0 leak on the init-failure path
tegra241_cmdqv_init_structures() allocates VINTF0 with kzalloc_obj(), inits
it, and preallocates its logical VCMDQs. Two of its error paths leak.
When tegra241_cmdqv_init_vintf() fails it returns before VINTF0 reaches the
cmdqv->vintfs[] array, so the devres unwind on probe failure cannot reach
it; free it directly there.
A later VCMDQ preallocation failure instead leaves VINTF0 published, and so
this time the unwind does reach tegra241_cmdqv_remove_vintf(), which then
frees it from vintf->hyp_own. But tegra241_vintf_hw_init() sets that flag
only afterward, from a HW read-back, so the still-uninited VINTF0 reads as
guest-owned and leaks, with mutex_destroy() and ida_destroy() run on fields
it never set up.
Decide ownership from vintf->idx instead, the index assigned when its id is
allocated: idx 0 is the kernel-owned VINTF0, while idx >= 1 marks a guest
VINTF. So the in-kernel free decision in tegra241_cmdqv_remove_vintf() and
tegra241_vintf_free_lvcmdq() now keys on idx too, and hyp_own stays a pure
HW-readback state.
📍 영향받는 시스템
Linux kernel (tegra241-cmdqv driver component)
⚔️ 공격 벡터
로컬 공격자가 특정 하드웨어 초기화 실패 상황을 유도하여 메모리 누수를 발생시킬 수 있음
🛡️ 대응 방법
Linux 커널을 최신 보안 패치가 적용된 버전으로 업데이트하여 VINTF0 소유권 판별 로직을 수정해야 함
🔧 검증 코드
출력된 커널 버전이 해당 취약점이 수정된 패치 버전 이후인지 확인하십시오.