🇰🇷 한글 설명
Linux 커널의 ath10k 드라이버에서 WCN3990/SNOC 칩셋의 MSA 메모리 덤프 시 unaligned access로 인해 커널 Oops(충돌)가 발생하는 취약점입니다. 기존의 memcpy() 사용 시 정렬되지 않은 메모리 접근이 발생하여 시스템이 충돌하고 모뎀 복구가 실패하는 문제가 있었습니다.
💡 쉬운 설명
특정 와이파이 칩셋에서 오류 데이터를 저장하려고 할 때, 컴퓨터가 이해하기 어려운 방식으로 메모리에 접근하여 시스템이 갑자기 멈추거나 꺼지는 문제입니다. 이로 인해 와이파이 기능뿐만 아니라 모뎀 복구 기능까지 제대로 작동하지 않을 수 있습니다.
🇺🇸 원문 (English)
In the Linux kernel, the following vulnerability has been resolved:
wifi: ath10k: snoc: use memcpy_fromio() for MSA ramdump
On WCN3990/SNOC the MSA region is mapped with devm_memremap(MEMREMAP_WT).
On arm64 such a mapping is not Normal-cacheable, so unaligned accesses to
it are not permitted. ath10k_msa_dump_memory() copies the region with a
plain memcpy(), whose optimized __pi_memcpy_generic implementation issues
wide/unaligned loads. This triggers an alignment fault (FSC=0x21) Oops in
ath10k_snoc_fw_crashed_dump() while collecting the devcoredump:
Unable to handle kernel paging request ... FSC=0x21: alignment fault
pc : __pi_memcpy_generic
lr : ath10k_snoc_fw_crashed_dump [ath10k_snoc]
The Oops both leaves the firmware RAM dump buffer zeroed (no dump is
captured) and crashes the kernel, which in turn breaks modem SSR
recovery.
Use memcpy_fromio(), which only performs accesses that are valid for such
a device-memory mapping. The generic memcpy_fromio() implementation aligns
the source before issuing word-sized reads and stores the destination with
put_unaligned(), so it is also safe for the coherent DMA allocation used on
the non-reserved-memory path. ath11k and ath12k use the same pattern
when copying target memory into crash dumps, so call it unconditionally
here too.
The MEMREMAP_WT pointer is a plain void *, so an explicit __iomem cast is
needed; use __force to keep sparse happy.
Tested-on: WCN3990 hw1.0 SNOC WLAN.HL.3.3.7.c5-00107-QCAHLSWMTPL-1
📍 영향받는 시스템
Linux kernel (ath10k driver, WCN3990/SNOC hardware)
⚔️ 공격 벡터
Local/Hardware-triggered (Firmware crash leading to memory dump)
🛡️ 대응 방법
memcpy() 대신 정렬된 접근을 지원하는 memcpy_fromio()를 사용하도록 커널 패치 적용
🔧 검증 코드
출력된 커널 버전이 해당 취약점이 수정된 패치 버전인지 확인하십시오.