🇰🇷 한글 설명
Linux 커널의 IIO(Industrial I/O) 드라이버에서 DMA 펜스 객체를 해제할 때 RCU 안전하지 않은 방식으로 메모리를 해제하여 Use-After-Free 취약점이 발생할 수 있습니다. 기존의 kfree() 대신 dma_fence_free()를 사용하여 kfree_rcu()가 호출되도록 수정함으로써 메모리 관리 문제를 해결했습니다.
💡 쉬운 설명
컴퓨터의 부품들이 데이터를 주고받을 때 사용하는 메모리 관리 방식에 오류가 있어, 이미 사용이 끝난 메모리를 잘못 건드려 시스템 오류를 일으킬 수 있는 문제입니다. 이를 수정하여 메모리를 더 안전한 방식으로 정리하도록 개선했습니다.
🇺🇸 원문 (English)
In the Linux kernel, the following vulnerability has been resolved:
iio: buffer: Make IIO DMA fence release RCU-safe
The `dma_fence` documentation states that if a custom release
implementation is provided, the `dma_fence` object must be freed in an
RCU-safe way. The current `iio_dma_fence` implementation uses `kfree()`,
which might result in a use-after-free.
Remove the custom `release` implementation. This makes the DMA fence core
fall back to `dma_fence_free()`, which calls `kfree_rcu()` on the fence.
This requires that the fence be the first member of `struct iio_dma_fence`.
Using the default release method for extended DMA fence structures is a
common pattern.
📍 영향받는 시스템
Linux Kernel (IIO DMA buffer 관련 모듈 사용 시스템)
⚔️ 공격 벡터
특정 하드웨어 드라이버를 통해 조작된 DMA 요청을 보내 메모리 해제 시점의 충돌 유도
🛡️ 대응 방법
Linux 커널을 최신 보안 패치가 적용된 버전으로 업데이트
🔧 검증 코드
출력된 커널 버전이 해당 취약점이 수정된 패치 버전 이후인지 확인