🇰🇷 한글 설명
Linux 커널의 RDMA/mlx5 드라이버에서 mlx5_ib_dev_res_srq_init() 함수 호출 중 오류 발생 시 잘못된 에러 처리 경로로 인해 발생하는 취약점입니다. 두 번째 SRQ 생성에 실패할 경우 이미 해제된 s0 포인터와 오류 포인터(ERR_PTR)인 s1이 구조체에 할당되어, 이후 메모리 참조 오류나 이중 해제(Double-free) 문제를 유발합니다.
💡 쉬운 설명
컴퓨터의 네트워크 통신을 담당하는 핵심 부품(드라이버)에서 작업 중 오류가 났을 때, 뒷정리를 제대로 하지 못해 발생하는 문제입니다. 이로 인해 시스템이 갑자기 멈추거나 해커가 시스템 권한을 탈취할 수 있는 위험이 있습니다.
🇺🇸 원문 (English)
In the Linux kernel, the following vulnerability has been resolved:
RDMA/mlx5: Fix error path fall-through in mlx5_ib_dev_res_srq_init()
mlx5_ib_dev_res_srq_init() allocates two SRQs, s0 and s1. When
ib_create_srq() fails for s1, the error branch destroys s0 but falls
through and unconditionally assigns the freed s0 and the ERR_PTR s1 to
devr->s0 and devr->s1.
This leads to several problems: the lock-free fast path checks
"if (devr->s1) return 0;" and treats the ERR_PTR as already initialised;
users in mlx5_ib_create_qp() dereference the freed SRQ or ERR_PTR via
to_msrq(devr->s0)->msrq.srqn; and mlx5_ib_dev_res_cleanup() dereferences
the ERR_PTR and double-frees s0 on teardown.
Fix by adding the same `goto unlock` in the s1 failure path.
📍 영향받는 시스템
RDMA/mlx5 드라이버를 사용하는 Linux 커널 버전
⚔️ 공격 벡터
특정 조건에서 SRQ 생성 실패를 유도하여 메모리 오류를 일으키는 로컬 또는 원격 공격
🛡️ 대응 방법
Linux 커널을 최신 보안 패치가 적용된 버전으로 업데이트
🔧 검증 코드
현재 실행 중인 커널 버전을 확인하여 해당 취약점이 해결된 패치 버전인지 확인합니다.