🇰🇷 한글 설명
Linux 커널 DRM 드라이버의 DP MST(Multi-Stream Transport) 사이드밴드 메시지 처리 모듈에서, MST 토폴로지가 제거되는 도중 메시지 수신 상태가 다른 스레드에서 초기화되어 경쟁 상태(race condition)가 발생한다. 이로 인해 메시지 파싱 과정에서 메모리 손상이 일어날 수 있으며, 수정은 메시지 수신 전에 수신 상태를 필요 시 초기화하는 방식으로 이루어졌다.
💡 쉬운 설명
여러 작업이 동시에 같은 데이터를 건드리면서 메모리가 잘못 덮어써질 수 있는 결함입니다. 이번 패치는 메시지를 읽기 전에 상태를 먼저 정리하도록 바꿔 이 충돌을 막습니다.
🇺🇸 원문 (English)
In the Linux kernel, the following vulnerability has been resolved:
drm/dp_mst: Fix resetting msg rx state after topology removal
If the MST topology is removed during the reception of an MST down reply
or MST up request sideband message, the
drm_dp_mst_topology_mgr::up_req_recv/down_rep_recv states could be reset
from one thread via drm_dp_mst_topology_mgr_set_mst(false), racing with
the reading/parsing of the message from another thread via
drm_dp_mst_handle_down_rep() or drm_dp_mst_handle_up_req(). The race is
possible since the reader/parser doesn't hold any lock while accessing
the reception state. This in turn can lead to a memory corruption in the
reader/parser as described by commit bd2fccac61b4 ("drm/dp_mst: Fix MST
sideband message body length check").
Fix the above by resetting the message reception state if needed before
reading/parsing a message. Another solution would be to hold the
drm_dp_mst_topology_mgr::lock for the whole duration of the message
reception/parsing in drm_dp_mst_handle_down_rep() and
drm_dp_mst_handle_up_req(), however this would require a bigger change.
Since the fix is also needed for stable, opting for the simpler solution
in this patch.
📍 영향받는 시스템
패치가 적용되지 않은 Linux 커널(DRM DP MST 기능을 사용하는 DisplayPort 멀티 디스플레이 환경의 시스템)
⚔️ 공격 벡터
로컬에서 MST 토폴로지 제거와 사이드밴드 메시지 수신이 동시에 일어나는 타이밍을 유도해 메모리 손상을 일으키는 방식으로 추정되며, 구체적인 악용 기법은 공개 정보에 기반해 확인이 필요합니다.
🛡️ 대응 방법
배포판 제공 보안 업데이트 또는 수정 커밋이 반영된 Linux 커널 버전으로 업데이트하고 재부팅합니다.
🔧 검증 코드
출력된 커널 버전이 배포판의 수정된 보안 업데이트 버전 이상인지 확인하고, drm_display_helper 모듈이 로드되었는지로 DP MST 관련 코드가 활성 상태인지 판단합니다. 버전이 수정 이전이고 모듈이 로드되어 있다면 패치가 필요합니다.
uname -r; ls /sys/module/drm_display_helper 2>/dev/null && echo drm_dp_helper_loaded || echo drm_dp_helper_not_loaded