🇰🇷 한글 설명
Linux 커널의 DRBD 모듈에서 'two-primaries' 모드가 활성화되었을 때 쓰기 충돌을 처리하는 과정에서 kref_get 누락으로 인한 Use-After-Free 취약점이 발견되었습니다. 이로 인해 drbd_destroy_device가 조기에 호출되어 커널 충돌 및 시스템 크래시가 발생할 수 있습니다.
💡 쉬운 설명
두 대의 서버가 동시에 같은 데이터를 쓰려고 할 때 발생하는 충돌을 처리하는 과정에서 메모리 관리 오류가 발생합니다. 이 오류로 인해 컴퓨터 시스템이 갑자기 멈추거나 꺼질 수 있습니다.
🇺🇸 원문 (English)
In the Linux kernel, the following vulnerability has been resolved:
drbd: add missing kref_get in handle_write_conflicts
With `two-primaries` enabled, DRBD tries to detect "concurrent" writes
and handle write conflicts, so that even if you write to the same sector
simultaneously on both nodes, they end up with the identical data once
the writes are completed.
In handling "superseeded" writes, we forgot a kref_get,
resulting in a premature drbd_destroy_device and use after free,
and further to kernel crashes with symptoms.
Relevance: No one should use DRBD as a random data generator, and apparently
all users of "two-primaries" handle concurrent writes correctly on layer up.
That is cluster file systems use some distributed lock manager,
and live migration in virtualization environments stops writes on one node
before starting writes on the other node.
Which means that other than for "test cases",
this code path is never taken in real life.
FYI, in DRBD 9, things are handled differently nowadays. We still detect
"write conflicts", but no longer try to be smart about them.
We decided to disconnect hard instead: upper layers must not submit concurrent
writes. If they do, that's their fault.
📍 영향받는 시스템
DRBD의 'two-primaries' 기능을 사용하는 Linux 커널 시스템
⚔️ 공격 벡터
두 노드에서 동시에 동일한 섹터에 쓰기 작업을 수행하여 메모리 참조 오류 유도
🛡️ 대응 방법
DRBD의 쓰기 충돌 처리 로직이 수정된 최신 Linux 커널로 업데이트
🔧 검증 코드
현재 실행 중인 커널 버전을 확인하여 취약점이 해결된 패치 버전인지 확인합니다.