🇰🇷 한글 설명
Linux 커널의 blk-mq 구성 요소에서 캐시된 요청을 처리하는 과정 중 Use-After-Free 취약점이 발견되었습니다. 특정 상황에서 요청을 꺼내기 전에 작업이 대기 상태로 전환되면, 플러그가 캐시된 요청을 해제하여 이미 해제된 메모리에 접근하게 될 수 있습니다.
💡 쉬운 설명
컴퓨터가 데이터를 저장할 때 사용하는 메모리 관리 과정에서, 이미 사용이 끝난 메모리 공간을 다시 사용하려고 시도하는 오류가 발생합니다. 이로 인해 시스템이 갑자기 멈추거나 보안상 위험한 상태가 될 수 있습니다.
🇺🇸 원문 (English)
In the Linux kernel, the following vulnerability has been resolved:
blk-mq: pop cached request if it is usable
When submitting a bio to blk-mq, if the task should sleep after peeking
a cached request, but before it pops it, the plug flushes and calls
blk_mq_free_plug_rqs, freeing the cached_rqs. This creates a
use-after-free bug. Fix this by popping the cached request before any
possible blocking calls if it is suitable for use.
Popping this request first holds a queue reference, so avoid any
serialization races with queue freezes and can safely proceed with
dispatching that request to the driver. This potentially increases a
timing window from when a driver wants to freeze its queue to when
requests stop being dispatched. That scenario is off the fast path
though, and drivers need to appropriately handle requests during a
freeze request anyway.
The downside is the popped element needs to be individually freed when
we performed a bio plug merge. The cached request would have had to be
freed later anyway, but this patch does it inline with building the plug
list instead of after flushing it.
📍 영향받는 시스템
Linux kernel (blk-mq 구성 요소가 포함된 버전)
⚔️ 공격 벡터
특정 타이밍에 발생하는 경합 조건(Race Condition)을 이용한 메모리 오염 공격
🛡️ 대응 방법
Linux 커널을 최신 보안 패치가 적용된 버전으로 업데이트하십시오.
🔧 검증 코드
출력된 커널 버전이 해당 취약점이 해결된 패치 버전 이후인지 확인하십시오.