🇰🇷 한글 설명
Linux 커널의 RDMA/ionic 드라이버에서 node_desc 배열이 NUL 문자로 종료되지 않아 발생하는 취약점입니다. 사용자가 sysfs를 통해 64바이트의 데이터를 입력할 경우, hca_type_show() 핸들러가 NUL 문자를 찾을 때까지 메모리를 계속 읽어 인접한 필드까지 침범할 수 있습니다.
💡 쉬운 설명
특정 장치 정보에 꽉 찬 데이터를 입력하면, 컴퓨터가 데이터의 끝을 찾지 못해 옆에 있는 다른 중요한 정보까지 읽어버리는 오류입니다. 이로 인해 시스템 정보가 유출되거나 프로그램이 비정상적으로 작동할 수 있습니다.
🇺🇸 원문 (English)
In the Linux kernel, the following vulnerability has been resolved:
RDMA/ionic: bound node_desc sysfs read with %.64s
node_desc[64] in struct ib_device is not guaranteed to be NUL-
terminated. The core IB sysfs handler uses "%.64s" for exactly this
reason (drivers/infiniband/core/sysfs.c:1307), since node_desc_store()
performs a raw memcpy of up to IB_DEVICE_NODE_DESC_MAX bytes with no NUL
termination:
memcpy(desc.node_desc, buf, min_t(int, count, IB_DEVICE_NODE_DESC_MAX));
If exactly 64 bytes are written via the node_desc sysfs file, the array
contains no NUL byte. The ionic hca_type_show() handler uses unbounded
"%s" and will read past the end of node_desc into adjacent fields of
struct ib_device until it encounters a NUL.
ionic supports IB_DEVICE_MODIFY_NODE_DESC, so this is triggerable by
userspace.
Match the core handler and bound the format specifier.
📍 영향받는 시스템
RDMA/ionic 드라이버를 사용하는 Linux 커널 시스템
⚔️ 공격 벡터
사용자 공간(userspace)에서 IB_DEVICE_MODIFY_NODE_DESC 인터페이스를 통해 64바이트의 데이터를 입력하여 트리거
🛡️ 대응 방법
커널을 최신 보안 패치가 적용된 버전으로 업데이트하여 sysfs 핸들러의 포맷 지정자를 제한해야 함
🔧 검증 코드
출력된 커널 버전을 확인하여 해당 취약점이 해결된 최신 패치 버전인지 확인