🇰🇷 한글 설명
Linux 커널의 qla2xxx SCSI 드라이버에서 비동기 IOCB 타임아웃 처리 시 발생하는 Use-After-Free 취약점입니다. 타임아웃 핸들러가 이미 완료된 명령을 중복으로 처리하려고 시도하면서 해제된 스택 프레임에 접근하여 시스템 불안정이나 권한 상승을 초래할 수 있습니다.
💡 쉬운 설명
컴퓨터 부품을 제어하는 소프트웨어에서 이미 끝난 작업을 다시 처리하려고 하다가 메모리 오류를 일으키는 문제입니다. 이로 인해 시스템이 멈추거나 해커가 시스템 권한을 탈취할 위험이 있습니다.
🇺🇸 원문 (English)
In the Linux kernel, the following vulnerability has been resolved:
scsi: qla2xxx: Avoid double completion in async IOCB timeout
qla2x00_async_iocb_timeout() tries to abort a timed-out async IOCB. When
qla24xx_async_abort_cmd() fails, both the SRB_LOGIN_CMD path and the
SRB_CTRL_VP/default path scan outstanding_cmds[] for the SRB and then
call sp->done(sp, QLA_FUNCTION_TIMEOUT) unconditionally, without checking
whether the SRB was actually found and removed.
If the response ISR completes the same handle first, it removes the SRB
under qp_lock_ptr and runs sp->done() -> complete(sp->comp). The
submitter qla24xx_control_vp() wakes from wait_for_completion(), clears
sp->comp, drops its reference and returns, reclaiming the on-stack
completion. The timer reference keeps the SRB alive across the timeout
handler, but not the submitter's stack. The timeout then issues a second
sp->done() -> qla_ctrlvp_sp_done(), which evaluates "if (sp->comp)
complete(sp->comp)"; with the pointer loaded before the submitter's NULL
store, complete() writes into the freed stack frame, a use-after-free.
Track whether this path removed the SRB from outstanding_cmds and only
call sp->done() when it did, so the command is completed exactly once by
whichever path owns it. This mirrors the sp_found guard already used in
qla24xx_abort_iocb_timeout().
📍 영향받는 시스템
Linux kernel (qla2xxx SCSI driver 포함 버전)
⚔️ 공격 벡터
특정 조건에서 SCSI 명령의 타임아웃을 유도하여 메모리 오류를 발생시키는 방식
🛡️ 대응 방법
Linux 커널을 최신 보안 패치가 적용된 버전으로 업데이트하십시오.
🔧 검증 코드
출력된 커널 버전이 해당 취약점이 수정된 패치 버전인지 확인하십시오.