🇰🇷 한글 설명
Linux 커널의 RTC msc313 드라이버에서 msc313_rtc_probe() 함수가 clk_disable_unprepare()를 devm_add_action_or_reset()의 콜백으로 직접 전달하면서 함수 프로토타입이 일치하지 않는 문제가 해결되었습니다. 이로 인해 Clang의 kCFI 환경에서 런타임 실패(커널 패닉 또는 스레드 종료)가 발생할 수 있었습니다. 수정은 devm_clk_get_enabled()를 사용하도록 리팩터링하는 방식으로 이루어졌습니다.
💡 쉬운 설명
컴퓨터 내부 시계 장치를 제어하는 커널 코드에서 함수 형식이 맞지 않아 특정 빌드 환경에서 시스템이 멈추거나 오류가 날 수 있었습니다. 개발자들은 이를 더 안전한 함수 사용 방식으로 고쳤습니다.
🇺🇸 원문 (English)
In the Linux kernel, the following vulnerability has been resolved:
rtc: msc313: Fix function prototype mismatch in msc313_rtc_probe()
With clang's kernel control flow integrity (kCFI, CONFIG_CFI_CLANG),
indirect call targets are validated against the expected function
pointer prototype to make sure the call target is valid to help mitigate
ROP attacks. If they are not identical, there is a failure at run time,
which manifests as either a kernel panic or thread getting killed.
msc313_rtc_probe() was passing clk_disable_unprepare() directly, which
did not have matching prototypes for devm_add_action_or_reset()'s
callback argument. Refactor to use devm_clk_get_enabled() instead.
This was found as a result of Clang's new -Wcast-function-type-strict
flag, which is more sensitive than the simpler -Wcast-function-type,
which only checks for type width mismatches.
📍 영향받는 시스템
msc313 RTC 드라이버를 포함하는 Linux 커널(수정 이전 버전, 특히 Clang kCFI 활성화 빌드)
⚔️ 공격 벡터
직접적인 원격 공격 경로는 명확하지 않으며, 함수 포인터 타입 불일치로 인한 런타임 오류 및 ROP 공격 완화 기능의 오작동 가능성이 주요 위험입니다.
🛡️ 대응 방법
사용 중인 배포판의 최신 Linux 커널 보안 업데이트를 설치하고 재부팅합니다.
🔧 검증 코드
출력된 커널 버전을 배포판의 보안 공지와 비교해 패치 적용 여부를 확인하며, msc313 모듈이 로드되지 않았다면 이 취약점의 영향을 받지 않습니다.
uname -r && (grep -i msc313 /proc/modules 2>/dev/null || echo 'msc313 module not loaded')