🇰🇷 한글 설명
Linux 커널의 md-cluster 모듈에서 process_metadata_update() 함수가 mddev->thread 포인터를 NULL 검사 없이 역참조하는 취약점입니다. md 배열 시작 과정에서 클러스터 메시지가 메인 스레드 초기화 이전에 도착하면 커널 패닉이 발생할 수 있으며, 수정은 포인터를 검증하고 NULL이면 락을 해제한 뒤 업데이트를 무시하도록 합니다.
💡 쉬운 설명
여러 서버가 함께 쓰는 RAID 디스크 묶음이 켜지는 짧은 순간에 다른 서버로부터 특정 메시지가 도착하면 시스템이 멈출 수 있습니다. 이 문제는 메시지를 처리할 준비가 안 된 상태에서 처리를 시도하기 때문에 발생합니다.
🇺🇸 원문 (English)
In the Linux kernel, the following vulnerability has been resolved:
md-cluster: fix NULL pointer dereference in process_metadata_update
The function process_metadata_update() blindly dereferences the 'thread'
pointer (acquired via rcu_dereference_protected) within the wait_event()
macro.
While the code comment states "daemon thread must exist", there is a valid
race condition window during the MD array startup sequence (md_run):
1. bitmap_load() is called, which invokes md_cluster_ops->join().
2. join() starts the "cluster_recv" thread (recv_daemon).
3. At this point, recv_daemon is active and processing messages.
4. However, mddev->thread (the main MD thread) is not initialized until
later in md_run().
If a METADATA_UPDATED message is received from a remote node during this
specific window, process_metadata_update() will be called while
mddev->thread is still NULL, leading to a kernel panic.
To fix this, we must validate the 'thread' pointer. If it is NULL, we
release the held lock (no_new_dev_lockres) and return early, safely
ignoring the update request as the array is not yet fully ready to
process it.
📍 영향받는 시스템
md-cluster 기능을 사용하는 Linux 커널 (수정된 상위/안정 커널 버전 기준 확인 필요)
⚔️ 공격 벡터
클러스터 내 원격 노드가 RAID 배열 시작 시점에 METADATA_UPDATED 메시지를 전송하여 커널 패닉을 유발 (주로 서비스 거부)
🛡️ 대응 방법
패치가 적용된 Linux 커널 버전으로 업데이트하고 재부팅합니다.
🔧 검증 코드
커널 버전이 배포판의 패치된 버전 이상인지 확인하고, md_cluster 모듈이 로드되지 않았다면 이 취약점의 영향을 받지 않습니다.
uname -r; lsmod | grep -E '^md_cluster' || echo 'md_cluster not loaded'