🔍 CVE-2024-40925

7.8
CVSS Score
HIGH
2024-07-12
2026-08-04 11:19
✅ 완료

🇰🇷 한글 설명

리눅스 커널의 블록 계층에서 PREFLUSH/POSTFLUSH 시퀀스 중 요청(request)의 큐 리스트(queuelist)를 잘못 사용하여 커널 크래시가 발생할 수 있는 취약점입니다. 초기화되지 않은 리스트 요소를 이동하려 시도하거나, 특정 상황에서 리스트가 중복 추가되어 시스템 안정성을 해칠 수 있습니다.

💡 쉬운 설명

컴퓨터의 데이터를 저장하는 과정에서 관리 목록을 정리하는 방식에 오류가 있어 시스템이 갑자기 멈추거나 꺼질 수 있는 문제입니다. 데이터 저장 명령을 처리할 때 목록의 순서가 꼬이면서 발생하는 오류입니다.

🇺🇸 원문 (English)

In the Linux kernel, the following vulnerability has been resolved: block: fix request.queuelist usage in flush Friedrich Weber reported a kernel crash problem and bisected to commit 81ada09cc25e ("blk-flush: reuse rq queuelist in flush state machine"). The root cause is that we use "list_move_tail(&rq->queuelist, pending)" in the PREFLUSH/POSTFLUSH sequences. But rq->queuelist.next == xxx since it's popped out from plug->cached_rq in __blk_mq_alloc_requests_batch(). We don't initialize its queuelist just for this first request, although the queuelist of all later popped requests will be initialized. Fix it by changing to use "list_add_tail(&rq->queuelist, pending)" so rq->queuelist doesn't need to be initialized. It should be ok since rq can't be on any list when PREFLUSH or POSTFLUSH, has no move actually. Please note the commit 81ada09cc25e ("blk-flush: reuse rq queuelist in flush state machine") also has another requirement that no drivers would touch rq->queuelist after blk_mq_end_request() since we will reuse it to add rq to the post-flush pending list in POSTFLUSH. If this is not true, we will have to revert that commit IMHO. This updated version adds "list_del_init(&rq->queuelist)" in flush rq callback since the dm layer may submit request of a weird invalid format (REQ_FSEQ_PREFLUSH | REQ_FSEQ_POSTFLUSH), which causes double list_add if without this "list_del_init(&rq->queuelist)". The weird invalid format problem should be fixed in dm layer.

📍 영향받는 시스템

리눅스 커널 (blk-mq 및 blk-flush 관련 구성 요소가 포함된 버전)

⚔️ 공격 벡터

로컬 공격자가 특수하게 조작된 입출력(I/O) 요청을 생성하여 커널의 블록 계층을 트리거함으로써 시스템 크래시 유도

🛡️ 대응 방법

커널 패치(commit 81ada09cc25e 및 관련 수정사항 포함)를 적용하여 최신 보안 업데이트 버전으로 커널 업데이트

🔧 검증 코드

출력된 커널 버전이 취약점이 해결된 패치 버전 이후인지 확인하십시오.

Shell / Script
uname -r

📊 CVSS Vector String

CVSS Vector
CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H

💻 영향받는 소프트웨어

Linux Kernel