🇰🇷 한글 설명
Linux 커널의 dma-buf dma-fence 구성 요소에서 NULL 포인터 역참조가 발생할 수 있는 취약점이 발견되었습니다. 약한 메모리 순서(weakly ordered)를 가진 플랫폼에서 RCU와 원자적 명령 간의 상호작용 문제로 인해 신호 비트와 ops 포인터의 처리 순서가 어긋나며 발생합니다.
💡 쉬운 설명
컴퓨터 부품 간 데이터를 주고받는 과정에서 순서가 뒤섞여 잘못된 메모리 주소를 참조하게 되는 문제입니다. 이로 인해 시스템이 갑자기 멈추거나 오류가 발생할 수 있습니다.
🇺🇸 원문 (English)
In the Linux kernel, the following vulnerability has been resolved:
dma-buf: dma-fence: Fix potential NULL pointer dereference
The commit mentioned in the fixes tag below introduced a mechanism
through which fence producers can fully decouple from fence consumers.
This, desirable, mechanism is based on the fence's signaled-bit as the
"decoupling point".
A sophisticated interaction between RCU and atomic instructions attempts
to ensure that fence consumers can still interact with fence producers
through the dma_fence_ops (callback pointers into the producer).
This is the desired behavior: to check for decoupling, the signaled-bit
is first checked. If it's not yet signaled, RCU ensures that the ops
pointer cannot yet be NULL.
Hereby, dma_fence_signal_timestamp_locked() first sets the signaled-bit,
and then sets the ops pointer to NULL. Readers first load the ops
pointer, and then check through the signaled-bit whether the pointer can
legally be accessed.
These set and load operations could occur out of order on weakly ordered
platforms. This problem can be solved very elegantly by using the ops
pointer itself as the synchronization point. The pointer is either NULL,
or cannot become NULL while it is being used thanks to RCU.
Replace the signaled-bit check in dma_fence_timeline_name() and
dma_fence_driver_name().
📍 영향받는 시스템
Linux kernel (dma-buf/dma-fence 관련 모듈 사용 시스템)
⚔️ 공격 벡터
약한 메모리 순서를 가진 하드웨어 아키텍처에서 특정 타이밍에 발생하는 레이스 컨디션(Race Condition)
🛡️ 대응 방법
해당 취약점이 수정된 최신 버전의 Linux 커널로 업데이트하십시오.
🔧 검증 코드
출력된 커널 버전을 확인하여 해당 취약점이 패치된 버전인지 보안 공지(Security Advisory)와 대조하십시오.