🇰🇷 한글 설명
Linux 커널의 qla2xxx SCSI 드라이버에서 큐 생성 중 오류 발생 시 NULL 포인터를 참조하여 시스템 패닉을 유발하거나, 잘못된 잠금(Locking) 메커니즘으로 인해 데이터가 손상될 수 있는 취약점입니다. dma_free_coherent 호출 시 NULL 체크가 누락되었고, 비트맵 보호를 위한 잠금이 일관되지 않아 경쟁 상태(Race Condition)가 발생할 수 있습니다.
💡 쉬운 설명
컴퓨터의 저장 장치와 통신하는 드라이버에서 오류가 났을 때, 잘못된 메모리 주소를 건드리거나 여러 작업이 동시에 엉키면서 시스템이 멈출 수 있는 문제입니다. 이로 인해 시스템이 갑자기 꺼지거나 데이터가 꼬일 위험이 있습니다.
🇺🇸 원문 (English)
In the Linux kernel, the following vulnerability has been resolved:
scsi: qla2xxx: Fix queue teardown NULL dma_free and bitmap locking
qla25xx_free_req_que() and qla25xx_free_rsp_que() have two pre-existing
bugs exposed on the error path of qla25xx_create_{req,rsp}_que():
1. When dma_alloc_coherent() fails during queue creation, the error
path calls the free function with req->ring / rsp->ring still NULL
(from kzalloc). The unconditional dma_free_coherent() with a NULL
cpu_addr is undefined behavior and can panic.
2. The free functions clear req_qid_map / rsp_qid_map under vport_lock,
but the create functions protect the same bitmaps with mq_lock.
This provides no mutual exclusion. Additionally, the create error
path clears the bit and releases mq_lock before calling the free
function, creating a window where another thread can allocate the
same que_id and have its ha->req_q_map entry clobbered by the
subsequent lockless NULL assignment in the free function.
Fix by:
- Guarding dma_free_coherent() with a NULL check on the ring pointer.
- Using mq_lock (the lock held by all creators) in the free functions
to atomically NULL the map entry and clear the bitmap bit.
- Removing the now-redundant clear_bit blocks from the create error
paths since the free functions handle it atomically.
📍 영향받는 시스템
Linux kernel (qla2xxx SCSI driver)
⚔️ 공격 벡터
특정 오류 경로를 유도하는 하드웨어/소프트웨어 상호작용을 통한 로컬 공격 또는 시스템 불안정 유발
🛡️ 대응 방법
Linux 커널을 최신 보안 패치가 적용된 버전으로 업데이트하십시오.
🔧 검증 코드
출력된 커널 버전이 해당 취약점이 수정된 패치 버전 이후인지 확인하십시오.