🇰🇷 한글 설명
Linux 커널의 Xilinx GPIO 드라이버(gpio-xilinx)에서 xgpio_request() 실패 시 pm_runtime_get_sync()가 증가시킨 사용 카운터를 해제하지 않아 런타임 PM 참조 누수가 발생합니다. 이로 인해 컨트롤러가 런타임 서스펜드되지 못하고 클록이 계속 활성 상태로 남습니다. 수정은 성공 시에만 카운터를 증가시키는 pm_runtime_resume_and_get()으로 전환하는 것입니다.
💡 쉬운 설명
GPIO 장치를 켜는 과정이 실패했을 때 전원 사용 기록을 정리하지 않아 장치가 절전 상태로 들어가지 못합니다. 그 결과 불필요하게 전력이 계속 소모될 수 있습니다.
🇺🇸 원문 (English)
In the Linux kernel, the following vulnerability has been resolved:
gpio: xilinx: fix runtime PM leak on request error path
pm_runtime_get_sync() leaves the usage counter incremented even when it
fails, and xgpio_request() returns the error without dropping it.
gpiolib does not call ->free() when ->request() fails, so xgpio_free(),
which holds the only matching pm_runtime_put(), never runs. The reference
is leaked and the controller can no longer runtime-suspend, so its clock
stays enabled.
Switch to pm_runtime_resume_and_get(), which only increments the usage
counter on success.
📍 영향받는 시스템
Linux 커널의 gpio-xilinx 드라이버를 사용하는 Xilinx 기반 시스템 (수정 이전 커널 버전)
⚔️ 공격 벡터
일반적인 원격 공격 경로는 확인되지 않으며, 로컬 드라이버 요청 실패 상황에서 발생하는 자원(전력/클록) 누수 결함입니다.
🛡️ 대응 방법
커널을 해당 수정이 포함된 상위 버전으로 업데이트하거나, pm_runtime_get_sync()를 pm_runtime_resume_and_get()으로 교체한 패치를 적용하세요.
🔧 검증 코드
커널 버전을 확인하고 소스에 pm_runtime_resume_and_get 호출이 있으면 패치가 적용된 것이며, 결과가 없거나 pm_runtime_get_sync만 보이면 취약한 상태입니다.
uname -r && grep -rn 'pm_runtime_resume_and_get' /usr/src/linux/drivers/gpio/gpio-xilinx.c 2>/dev/null