🇰🇷 한글 설명
Linux 커널의 remoteproc 구성 요소에서 rproc_crash_handler_work와 rproc_del 사이의 동기화 부재로 인해 Use-After-Free 취약점이 발생합니다. 드라이버가 제거되는 동안 충돌 처리 작업이 실행될 수 있어 시스템 충돌을 유발할 수 있습니다. 이를 해결하기 위해 드라이버 제거 전 예약된 작업을 취소하고 동기화하는 로직이 추가되었습니다.
💡 쉬운 설명
컴퓨터의 특정 부품(드라이버)을 제거하는 도중에 갑자기 오류를 처리하려는 동작이 겹치면서 시스템이 고장 날 수 있는 문제입니다. 부품을 빼기 전에 오류 처리 작업이 완전히 끝났는지 확인하는 절차가 없어서 발생했습니다.
🇺🇸 원문 (English)
In the Linux kernel, the following vulnerability has been resolved:
remoteproc: Prevent crash handling to race with rproc_del()
There's no synchronization between rproc_crash_handler_work() and
rproc_del(), as such it's possible for a driver to be removed while
crash-handler work is scheduled, or even executing - resulting in
use-after-free issues.
To avoid this the scheduled work need to be cancelled and synchronized
against before the removal proceeds.
In order to ensure that this doesn't race with the reporting, and
thereby scheduling new work, a "deleting" flag is introduced. This is
similar to the RPROC_DELETE state that was introduced to ensure that
"start" didn't race with rproc_del(), but the existing mechanism can not
be used as it's valid to call rproc_report_crash() in atomic context -
and the "state" is protected by a mutex.
In the event that work is cancelled the pm_stay_awake() is left
unbalanced and need to be unrolled.
The blocking and cancelling of crash-handler work prior to the actual
rproc_shutdown() call does have the explicit side-effect that crashes
resulting from the shutdown process will not enter the crash-handling
path, and as such will not generate devcoredumps etc. Due to the
existing mutual exclusion between these code paths there's no concrete
reduction in functionality, but further work would be needed to handle
this case.
📍 영향받는 시스템
Linux kernel (remoteproc driver 사용 시스템)
⚔️ 공격 벡터
로컬 또는 원격에서 원격 프로세서(remoteproc) 드라이버의 제거와 충돌 상황을 동시에 유도하여 메모리 오류 유발
🛡️ 대응 방법
Linux 커널을 최신 보안 패치가 적용된 버전으로 업데이트하십시오.
🔧 검증 코드
출력된 커널 버전이 해당 취약점이 해결된 패치 버전 이후인지 확인하십시오.