🇰🇷 한글 설명
Linux 커널의 mlx5 드라이버에서 MCIA 레지스터 읽기 시 버퍼 오버플로우가 발생하는 취약점입니다. 장치가 32 dword를 지원하더라도 구조체는 12 dword만 정의되어 있어, memcpy 과정에서 할당된 버퍼 범위를 초과하여 데이터를 읽을 수 있습니다.
💡 쉬운 설명
네트워크 장치의 정보를 읽어오는 과정에서 준비된 그릇보다 더 많은 데이터를 담으려다 메모리가 넘치는 문제입니다. 이로 인해 시스템이 멈추거나 오류가 발생할 수 있습니다.
🇺🇸 원문 (English)
In the Linux kernel, the following vulnerability has been resolved:
net/mlx5: Fix MCIA register buffer overflow on 32 dword reads
The MCIA register can return up to 32 dwords (128 bytes) when the device
advertises the mcia_32dwords capability, but struct
mlx5_ifc_mcia_reg_bits only defines dword_0..11, leaving room for just
12 dwords (48 bytes) of data.
mlx5_query_mcia() clamps the read size to mlx5_mcia_max_bytes() and then
memcpy()s that many bytes out of the register, potentially reading past
the end of the 'out' buffer. On kernels built with FORTIFY_SOURCE this
is caught as a buffer overflow while reading the module EEPROM via
ethtool:
detected buffer overflow in memcpy
kernel BUG at lib/string_helpers.c:1048!
RIP: 0010:fortify_panic+0x13/0x20
Call Trace:
mlx5_query_mcia.isra.0+0x200/0x210 [mlx5_core]
mlx5_query_module_eeprom_by_page+0x4a/0xa0 [mlx5_core]
mlx5e_get_module_eeprom_by_page+0xbb/0x120 [mlx5_core]
eeprom_prepare_data+0xf3/0x170
ethnl_default_doit+0xf1/0x3b0
Extend the mcia_reg layout to 32 dwords.
📍 영향받는 시스템
mcia_32dwords 기능을 지원하는 장치를 사용하는 Linux 커널 기반 시스템
⚔️ 공격 벡터
ethtool 등을 통해 모듈 EEPROM을 읽는 과정에서 의도적으로 조작된 레지스터 값을 유도하여 발생
🛡️ 대응 방법
mcia_reg 레이아웃을 32 dword로 확장하는 패치가 적용된 최신 Linux 커널로 업데이트
🔧 검증 코드
출력된 커널 버전이 해당 취약점이 해결된 패치 버전 이후인지 확인
📊 CVSS Vector String
CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:N/A:H
💻 영향받는 소프트웨어
NVIDIA vGPU Guest Driver for Linux