🇰🇷 한글 설명
Linux 커널의 CXL(Compute Express Link) 기능 구현 중, 입력 버퍼 크기와 실제 명령 페이로드 크기 간의 검증이 누락된 취약점입니다. 공격자가 조작된 op_size를 사용하여 할당된 버퍼 범위를 벗어난 메모리를 읽을 수 있으며, 이는 커널 패닉(Oops)이나 정보 유출을 유발할 수 있습니다.
💡 쉬운 설명
컴퓨터의 메모리 공간을 계산할 때 실제 준비된 크기보다 더 많은 데이터를 읽으려고 시도하는 오류입니다. 이로 인해 시스템이 갑자기 멈추거나 중요한 정보가 밖으로 새 나갈 위험이 있습니다.
🇺🇸 원문 (English)
In the Linux kernel, the following vulnerability has been resolved:
cxl/features: bound fwctl command payload to the input buffer
fwctl_cmd_rpc() copies cmd->in_len bytes into inbuf = kvzalloc(cmd->in_len)
and passes inbuf and in_len to ->fw_rpc(). The CXL callback cxlctl_fw_rpc()
ignores in_len and never checks the user-controlled op_size against it.
cxlctl_set_feature() bounds op_size only from below
(op_size <= sizeof(feat_in->hdr)) and then reads op_size - sizeof(hdr)
bytes from feat_in->feat_data via cxl_set_feature(). With a small in_len
and a large op_size the first memcpy() already reads past the
kvzalloc(in_len) buffer; the out-of-bounds bytes are placed in the mailbox
payload and sent to the device, and a large enough op_size can walk into
unmapped memory and oops the kernel. The Get paths pin op_size to a fixed
size but likewise read the input struct without checking in_len.
Reject, at the single dispatch point, any request whose fixed header plus
op_size does not fit in the copied-in buffer. The lower-bound test guards
the subtraction and ensures op_size was copied in before it is read.
📍 영향받는 시스템
Linux Kernel (CXL 기능이 활성화된 시스템)
⚔️ 공격 벡터
사용자 제어 가능한 op_size 값을 조작하여 할당된 kvzalloc 버퍼 범위를 초과하는 메모리 읽기 시도
🛡️ 대응 방법
CXL 관련 커널 패치를 적용하여 명령 페이로드 크기가 입력 버퍼 내에 있는지 검증하는 로직을 포함해야 함
🔧 검증 코드
출력된 커널 버전을 확인하여 해당 취약점이 해결된 최신 보안 패치 버전인지 확인하십시오.