🇰🇷 한글 설명
Linux 커널의 SCSI UFS 드라이버에서 TX EQTR 컨텍스트 실행 중 메모리 회수(reclaim) 과정에서 데드락이 발생할 수 있는 취약점입니다. devfreq 기어 스케일링으로 인해 UFS 태그셋이 정지된 상태에서 GFP_KERNEL을 통한 메모리 할당이 발생할 경우, I/O 작업과 메모리 회수 간의 상호 의존성으로 인해 시스템이 멈출 수 있습니다.
💡 쉬운 설명
컴퓨터의 저장 장치(UFS)를 관리하는 소프트웨어에서 메모리를 확보하려다 서로를 기다리며 시스템이 멈춰버리는 현상이 발생할 수 있습니다. 특정 상황에서 메모리 정리 작업과 저장 장치 사용 작업이 충돌하여 발생하는 문제입니다.
🇺🇸 원문 (English)
In the Linux kernel, the following vulnerability has been resolved:
scsi: ufs: core: Avoid possible memory reclaim deadlock in TX EQTR context
TX EQTR may run while devfreq gear scaling has quiesced the UFS
tagset. In that context, functions ufshcd_tx_eqtr(), __ufshcd_tx_eqtr()
and ufs_qcom_get_rx_fom() allocate memory with GFP_KERNEL. If direct
reclaim is triggered, reclaim/writeback can depend on I/O to UFS
device. Because the queue is quiesced, this can cause deadlock.
Use memalloc_noio_save/restore() in ufshcd_tx_eqtr() to cover all
allocations in the TX EQTR call tree, including:
- params->eqtr_record in ufshcd_tx_eqtr()
- eqtr_data in __ufshcd_tx_eqtr()
- params in ufs_qcom_get_rx_fom()
This is preferred over tagging individual call sites with GFP_NOIO, as it
automatically covers any future allocations added anywhere in the call tree
without requiring each caller to be aware of this constraint.
[mkp: fix label as suggested by Bart]
📍 영향받는 시스템
Linux Kernel (UFS 드라이버를 사용하는 시스템)
⚔️ 공격 벡터
직접적인 외부 공격은 어려우나, 특정 하드웨어 상태(devfreq 스케일링) 유도 시 시스템 중단(DoS) 가능
🛡️ 대응 방법
Linux 커널을 최신 보안 패치가 적용된 버전으로 업데이트하여 memalloc_noio_save/restore()가 적용된 패치를 적용해야 합니다.
🔧 검증 코드
출력된 커널 버전이 해당 취약점이 수정된 패치 버전 이후인지 확인합니다.