🇰🇷 한글 설명
pam_usb 0.9.1 이전 버전에서 설정 파일의 XPath 평가로 얻은 디바이스 수(n_devices)에 대한 상한선 검사 없이 힙 메모리를 할당할 때 정수 오버플로우 발생. 32비트 시스템(armv7l, i686)에서 n_devices * sizeof(t_pusb_device) 계산이 wrap around되어 매우 작은 메모리만 할당되고, 이후 배열 쓰기로 인한 힙 오버플로우 발생.
💡 쉬운 설명
USB를 이용한 리눅스 로그인 도구에서 연결된 USB 장치 개수 정보를 처리할 때 메모리 할당 크기 계산 오류 발생. 이로 인해 공격자가 의도적으로 특정 설정 파일을 만들어 시스템 메모리를 손상시킬 수 있음.
🇺🇸 원문 (English)
pam_usb provides hardware authentication for Linux using ordinary removable media. Prior to 0.9.1, src/conf.c allocates heap memory proportional to n_devices, a count derived from libxml2 XPath evaluation of the config file, without first enforcing an upper bound. On 32-bit targets (armv7l, i686 -- both listed in the project Makefile), the multiplication n_devices * sizeof(t_pusb_device) wraps around size_t, causing xmalloc() to receive a very small size. Because xmalloc() only calls abort() on NULL return, a small-but-non-NULL allocation is accepted, and subsequent array writes overflow the heap. This vulnerability is fixed in 0.9.1.
📍 영향받는 시스템
pam_usb < 0.9.1 (32비트 시스템: armv7l, i686)
⚔️ 공격 벡터
설정 파일의 XPath 조작을 통해 n_devices 값을 크게 증가시켜 정수 오버플로우 유발
🛡️ 대응 방법
pam_usb를 0.9.1 이상으로 업그레이드
🔧 검증 코드
VULNERABLE가 출력되면 취약한 버전이 설치됨, PATCHED/NOT_INSTALLED가 출력되면 안전
dpkg -l pam-usb 2>/dev/null | awk '/pam-usb/ {print $3}' | grep -E '^0\.[0-8]\.|^0\.9\.0$' && echo 'VULNERABLE' || echo 'PATCHED/NOT_INSTALLED'
📊 CVSS Vector String
CVSS:3.1/AV:L/AC:L/PR:H/UI:N/S:U/C:H/I:H/A:H
💻 영향받는 소프트웨어
NVIDIA Cloud Gaming Guest Driver for Linux