🇰🇷 한글 설명
Linux 커널의 블록 계층에서 클론된 요청을 처리할 때 무결성 세그먼트(integrity segments)의 개수를 재계산하지 않아 발생하는 취약점입니다. 스택형 드라이버 환경에서 하위 큐의 설정이 상위 큐와 다를 경우, 잘못된 세그먼트 수로 인해 커널 패닉(BUG_ON)이 발생할 수 있습니다.
💡 쉬운 설명
데이터의 안전을 확인하는 과정에서 계산 오류가 발생하여 컴퓨터 시스템이 갑자기 멈추거나 꺼질 수 있는 문제입니다. 특정 저장 장치 연결 방식에서 데이터 처리 규칙이 서로 맞지 않을 때 발생합니다.
🇺🇸 원문 (English)
In the Linux kernel, the following vulnerability has been resolved:
block: recompute nr_integrity_segments in blk_insert_cloned_request
blk_insert_cloned_request() already recomputes nr_phys_segments
against the bottom queue, because "the queue settings related to
segment counting may differ from the original queue." The exact same
reasoning applies to integrity segments: a stacked driver's underlying
queue can have tighter virt_boundary_mask, seg_boundary_mask, or
max_segment_size than the top queue, in which case
blk_rq_count_integrity_sg() against the bottom queue produces a
different count than the cached rq->nr_integrity_segments inherited
from the source request by blk_rq_prep_clone().
When the cached count is lower than the bottom queue's actual count,
blk_rq_map_integrity_sg() trips
BUG_ON(segments > rq->nr_integrity_segments);
on dispatch. The same families of stacked setups that motivated the
existing nr_phys_segments recompute -- dm-multipath fanning out to
nvme-rdma in particular -- can produce this.
Mirror the nr_phys_segments handling: when the request carries
integrity, recompute nr_integrity_segments against the bottom queue
and reject the request if it exceeds the bottom queue's
max_integrity_segments. blk_rq_count_integrity_sg() and
queue_max_integrity_segments() are both already available via
<linux/blk-integrity.h>, which blk-mq.c includes.
This closes a latent gap in the stacking contract and brings the
integrity-segment accounting in line with the existing
phys-segment accounting.
📍 영향받는 시스템
Linux Kernel (blk-mq 관련 모듈을 사용하는 시스템)
⚔️ 공격 벡터
특수하게 조작된 블록 I/O 요청을 생성하여 커널의 BUG_ON을 유발함으로써 시스템 가용성을 침해(DoS)
🛡️ 대응 방법
Linux 커널을 최신 보안 패치가 적용된 버전으로 업데이트하여 nr_integrity_segments 재계산 로직을 적용해야 합니다.
🔧 검증 코드
출력된 커널 버전을 확인하여 해당 취약점이 해결된 패치 버전 이상인지 확인합니다.