🇰🇷 한글 설명
Linux 커널의 stmmac dwmac1000 드라이버에서, 커밋 2e2c878a3141 이후 RGMII 경로가 GMAC_RGSMIIIS 레지스터를 읽지 않아 상태 비트가 계속 대기 상태로 남는 문제가 수정되었습니다. 재개(resume) 시 인터럽트 폭주로 인한 소프트 락업이나 워치독 리셋이 발생할 수 있어, 인터럽트 상태 확인 시 해당 레지스터를 읽어 상태를 클리어하도록 변경되었습니다.
💡 쉬운 설명
이더넷 장치의 상태 알림이 제대로 지워지지 않아 절전 복귀 시 시스템이 계속 인터럽트를 받아 멈출 수 있었습니다. 이 패치는 해당 알림을 정상적으로 지워 시스템이 멈추지 않도록 합니다.
🇺🇸 원문 (English)
In the Linux kernel, the following vulnerability has been resolved:
net: stmmac: dwmac1000: clear the RGMII status interrupt
Since commit 2e2c878a3141 ("net: stmmac: remove SGMII/RGMII/SMII
interrupt handling") nothing on the RGMII path reads GMAC_RGSMIIIS, so
RGSMIIIS stays pending behind GMAC_INT_MASK from the first link change
on. stmmac_resume() resets the MAC in stmmac_hw_setup(); the reset sets
GMAC_INT_MASK to 0 until dwmac1000_core_init() writes the mask again,
and the pending status storms the line:
dwmac_dma_interrupt: unexpected status 04000000
A register dump at the first message on ODROID-HC4 showed it:
core int_status 00000001 int_mask 00000000 pmt 00000000 rgsmiiis 0000000d
When the resume thread runs on the CPU that takes the MAC interrupt,
the storm starves it: a soft lockup, then a watchdog reset or a hang.
Read GMAC_RGSMIIIS in dwmac1000_irq_status() when the status is not
masked, as the driver did before 2e2c878a3141; the read clears it.
Wake-on-LAN resume from s2idle with the resume thread and the MAC
interrupt on one CPU: Helios64 (dwmac-rk), 7.3-rc6, soft-locked in 3 of
3 resumes without a fix and in 0 of 10 with this patch; it ran with an
out-of-tree dwmac-rk change that keeps the GMAC powered across suspend.
ODROID-HC4 (dwmac-meson8b): 0 of 10 with this patch, 2 of 2 without a
fix on a 7.3-rc5 build. irq_rgmii_n went up by one per resume.
📍 영향받는 시스템
Linux 커널 7.3-rc 계열 중 stmmac dwmac1000(RGMII) 드라이버를 사용하는 ARM 기반 보드 (예: Helios64, ODROID-HC4)
⚔️ 공격 벡터
직접적인 원격 공격 경로는 없으며, 절전 복귀 시 인터럽트 폭주로 인한 서비스 거부(시스템 멈춤) 형태로 나타남
🛡️ 대응 방법
커널을 해당 수정 커밋이 포함된 버전으로 업데이트하거나 패치를 적용
🔧 검증 코드
커널 버전이 수정 포함 버전 이상인지 확인하고, 출력된 인터페이스가 stmmac 드라이버를 사용하는지 확인하며, 해당 버전이 패치되지 않았다면 업데이트가 필요합니다.
uname -r && grep -l stmmac /sys/class/net/*/device/driver/module 2>/dev/null