🇰🇷 한글 설명
Linux 커널의 UFS 드라이버에서 UFS 전원 종료 시 과전류 보호(OCP) 문제가 발생할 수 있는 취약점이 발견되었습니다. 하드웨어 리셋 후 장치가 초기화되는 동안 일시적으로 높은 전류가 흐르는데, 전원 공급 장치가 너무 빨리 저전력 모드로 전환되어 과전류 오류가 발생할 수 있습니다.
💡 쉬운 설명
UFS 저장 장치의 전원을 끌 때, 장치가 다시 켜지는 과정에서 전기를 많이 쓰는데 전원 공급 장치가 너무 빨리 전기를 줄여버려 문제가 생기는 현상입니다. 이를 방지하기 위해 전원을 완전히 끄기 전 잠시 기다리는 과정을 추가했습니다.
🇺🇸 원문 (English)
In the Linux kernel, the following vulnerability has been resolved:
scsi: ufs: ufs-qcom: Fix UFS OCP issue during UFS power down (PC=3)
According to UFS specifications, the power-off sequence for a UFS device
includes:
- Sending an SSU command with Power_Condition=3 and await a response.
- Asserting RST_N low.
- Turning off REF_CLK.
- Turning off VCC.
- Turning off VCCQ/VCCQ2.
As part of ufs shutdown, after the SSU command completion, asserting
hardware reset (HWRST) triggers the device firmware to wake up and
execute its reset routine. This routine initializes hardware blocks and
takes a few milliseconds to complete. During this time, the ICCQ draws a
large current.
This large ICCQ current may cause issues for the regulator which is
supplying power to UFS, because the turn off request from UFS driver to
the regulator framework will be immediately followed by low power
mode(LPM) request by regulator framework. This is done by framework
because UFS which is the only client is requesting for disable. So if
the rail is still in the process of shutting down while ICCQ exceeds LPM
current thresholds, and LPM mode is activated in hardware during this
state, it may trigger an overcurrent protection (OCP) fault in the
regulator.
To prevent this, a 10ms delay is added after asserting HWRST. This
allows the reset operation to complete while power rails remain active
and in high-power mode.
Currently there is no way for Host to query whether the reset is
completed or not and hence this the delay is based on experiments with
Qualcomm UFS controllers across multiple UFS vendors.
📍 영향받는 시스템
Qualcomm UFS 컨트롤러를 사용하는 Linux 커널 기반 시스템
⚔️ 공격 벡터
물리적/소프트웨어적 전원 관리 시퀀스 제어를 통한 하드웨어 오류 유발 (로컬/물리적 접근 필요)
🛡️ 대응 방법
HWRST(하드웨어 리셋) 후 10ms의 지연 시간을 추가한 최신 Linux 커널로 업데이트
🔧 검증 코드
출력된 커널 버전이 해당 패치가 적용된 최신 버전인지 확인