🇰🇷 한글 설명
Linux 커널의 i.MX 시리얼 UART 드라이버에서 .thaw_noirq 훅이 누락되어, 시스템 최대절전(hibernate) 복원 시 클록이 비정상적으로 비활성화되는 문제가 있습니다. 이로 인해 커널 경고가 발생합니다. 누락된 훅을 추가하여 클록 enable/disable 호출 순서를 바로잡아 해결합니다.
💡 쉬운 설명
컴퓨터가 절전(최대절전) 상태에서 깨어날 때, 시리얼 포트의 클록 제어가 올바른 순서로 되지 않아 경고가 발생합니다. 누락된 복구 처리 함수를 추가하면 순서가 맞춰져 문제가 사라집니다.
🇺🇸 원문 (English)
In the Linux kernel, the following vulnerability has been resolved:
serial: imx: Add missing .thaw_noirq hook
The following warning is seen with non-console UART instance when
system hibernates.
[ 37.371969] ------------[ cut here ]------------
[ 37.376599] uart3_root_clk already disabled
[ 37.380810] WARNING: CPU: 0 PID: 296 at drivers/clk/clk.c:952 clk_core_disable+0xa4/0xb0
...
[ 37.506986] Call trace:
[ 37.509432] clk_core_disable+0xa4/0xb0
[ 37.513270] clk_disable+0x34/0x50
[ 37.516672] imx_uart_thaw+0x38/0x5c
[ 37.520250] platform_pm_thaw+0x30/0x6c
[ 37.524089] dpm_run_callback.constprop.0+0x3c/0xd4
[ 37.528972] device_resume+0x7c/0x160
[ 37.532633] dpm_resume+0xe8/0x230
[ 37.536036] hibernation_snapshot+0x288/0x430
[ 37.540397] hibernate+0x10c/0x2e0
[ 37.543798] state_store+0xc4/0xd0
[ 37.547203] kobj_attr_store+0x1c/0x30
[ 37.550953] sysfs_kf_write+0x48/0x60
[ 37.554619] kernfs_fop_write_iter+0x118/0x1ac
[ 37.559063] new_sync_write+0xe8/0x184
[ 37.562812] vfs_write+0x230/0x290
[ 37.566214] ksys_write+0x68/0xf4
[ 37.569529] __arm64_sys_write+0x20/0x2c
[ 37.573452] invoke_syscall.constprop.0+0x50/0xf0
[ 37.578156] do_el0_svc+0x11c/0x150
[ 37.581648] el0_svc+0x30/0x140
[ 37.584792] el0t_64_sync_handler+0xe8/0xf0
[ 37.588976] el0t_64_sync+0x1a0/0x1a4
[ 37.592639] ---[ end trace 56e22eec54676d75 ]---
On hibernating, pm core calls into related hooks in sequence like:
.freeze
.freeze_noirq
.thaw_noirq
.thaw
With .thaw_noirq hook being absent, the clock will be disabled in a
unbalanced call which results the warning above.
imx_uart_freeze()
clk_prepare_enable()
imx_uart_suspend_noirq()
clk_disable()
imx_uart_thaw
clk_disable_unprepare()
Adding the missing .thaw_noirq hook as imx_uart_resume_noirq() will have
the call sequence corrected as below and thus fix the warning.
imx_uart_freeze()
clk_prepare_enable()
imx_uart_suspend_noirq()
clk_disable()
imx_uart_resume_noirq()
clk_enable()
imx_uart_thaw
clk_disable_unprepare()
📍 영향받는 시스템
i.MX 기반 임베디드 보드에서 동작하는 수정 전 Linux 커널 (i.MX UART 드라이버 사용, 최대절전 사용 환경)
⚔️ 공격 벡터
원격 공격 경로는 확인되지 않음; 로컬에서 최대절전 전환을 반복 유발해 커널 경고를 일으키는 정도의 영향
🛡️ 대응 방법
패치된 Linux 커널 버전으로 업데이트 (커널 배포판 보안 업데이트 적용)
🔧 검증 코드
커널 버전을 확인해 해당 수정이 포함된 최신 stable 릴리스인지 대조하고, dmesg에 'already disabled' 경고가 있으면 이 문제의 영향을 받았을 가능성이 있습니다.
uname -r && (grep -i imx /proc/tty/drivers 2>/dev/null; dmesg 2>/dev/null | grep -i 'already disabled' | head -n 5)