🇰🇷 한글 설명
Linux 커널의 accel/amdxdna 드라이버에서 명령 체인의 명령 개수가 0인 경우, 페이로드 길이 검사를 통과하여 0 길이의 버퍼가 제출되는 취약점이 발견되었습니다. 이로 인해 특정 펌웨어 환경에서 잘못된 메모리 접근이 발생하여 vmap 가드 페이지에서 결함(fault)이 발생할 수 있습니다.
💡 쉬운 설명
컴퓨터의 명령 전달 과정에서 '명령이 하나도 없는 상태'를 제대로 걸러내지 못해 발생하는 오류입니다. 이 오류를 이용하면 시스템이 예상치 못한 메모리 영역을 건드려 프로그램이 멈추거나 오류가 발생할 수 있습니다.
🇺🇸 원문 (English)
In the Linux kernel, the following vulnerability has been resolved:
accel/amdxdna: reject a command chain that carries no commands
A chain whose command_count is zero passes the payload length check,
because struct_size(payload, data, 0) is just the header. The fill loop
then does not run, so offset stays zero and the request is submitted with
a zero-length buffer.
On firmware without AIE2_NPU_COMMAND that ends at the opcode check, since
op is still ERT_INVALID_CMD and aie2_get_chain_msg_op() answers
MSG_OP_MAX_OPCODE. aie2_get_npu_chain_msg_op() answers
MSG_OP_CHAIN_EXEC_NPU whatever it is given, so there the submission
continues to drm_clflush_virt_range(cmd_buf, 0), which reads the byte
before the buffer and faults on the vmap guard page. EXEC_CMD is
reachable by any process that can open the render node.
Reject the request instead.
📍 영향받는 시스템
Linux kernel (accel/amdxdna 드라이버를 사용하는 AMD NPU 관련 시스템)
⚔️ 공격 벡터
렌더 노드(render node)를 열 수 있는 권한을 가진 프로세스를 통한 명령 체인 제출
🛡️ 대응 방법
Linux 커널을 최신 보안 패치가 적용된 버전으로 업데이트하여 명령 개수가 0인 체인을 거부하도록 수정해야 합니다.
🔧 검증 코드
출력된 커널 버전이 해당 취약점이 해결된 패치 버전 이후인지 확인합니다.