🇰🇷 한글 설명
Linux 커널의 tegra241-cmdqv IOMMU 드라이버에서 LVCMDQ가 완전히 초기화되기 전에 배열에 등록되어 발생하는 취약점입니다. 초기화가 완료되지 않은 상태에서 오류 인터럽트(ISR)가 발생할 경우, NULL 포인터를 참조하여 시스템이 충돌하거나 예기치 않은 동작을 유발할 수 있습니다.
💡 쉬운 설명
장치가 준비를 다 마치기도 전에 '준비 완료' 신호를 먼저 보내서 발생하는 문제입니다. 준비되지 않은 상태에서 명령을 내리려다 보니 컴퓨터 시스템이 멈추거나 오류가 발생할 수 있습니다.
🇺🇸 원문 (English)
In the Linux kernel, the following vulnerability has been resolved:
iommu/tegra241-cmdqv: Publish an LVCMDQ only after it is fully initialized
tegra241_vintf_init_lvcmdq() stores the freshly allocated vcmdq pointer to
the vintf->lvcmdqs[] array, before tegra241_vcmdq_alloc_smmu_cmdq() builds
the vcmdq->cmdq. The error ISR dereferences that cmdq, so a latched LVCMDQ
error (e.g. one inherited across a kexec) firing in this window would make
tegra241_vintf0_handle_error() pass the still-zeroed arm_smmu_cmdq down to
__arm_smmu_cmdq_skip_err(), dereferencing NULL queue register pointers.
Drop the store from tegra241_vintf_init_lvcmdq() and publish the vcmdq at
the end of the allocation instead, with an smp_store_release() that pairs
with an smp_load_acquire() in the ISR, which can see a fully built LVCMDQ
or NULL.
The user-owned LVCMDQ allocation moves accordingly, publishing the vcmdq
once tegra241_vcmdq_hw_init_user() succeeds, using a plain store since a
user VINTF's lvcmdqs[] has no lockless reader -- the error ISR only walks
the VINTF0 array.
📍 영향받는 시스템
Linux kernel (Tegra241 IOMMU driver components)
⚔️ 공격 벡터
하드웨어 오류 또는 kexec를 통한 특정 타이밍의 인터럽트 유발 (Local/Hardware-triggered)
🛡️ 대응 방법
커널 패치를 통해 LVCMDQ 초기화 완료 후 메모리 배리어(smp_store_release)를 사용하여 안전하게 공개하도록 업데이트
🔧 검증 코드
현재 커널 버전과 소스 코드 내 해당 드라이버의 존재 여부를 확인하여 패치 적용 여부를 검토합니다.
uname -r && grep -r "tegra241-cmdqv" /drivers/iommu/ 2>/dev/null