🔍 CVE-2026-40335

5.2
CVSS Score
MEDIUM
2026-04-18
2026-10-25 23:10
✅ 완료

🇰🇷 한글 설명

libgphoto2 라이브러리의 ptp_unpack_DPV() 함수에서 경계 외 읽기(Out-of-bounds read) 취약점이 발견되었습니다. UINT128 및 INT128 처리 과정에서 버퍼의 남은 크기를 충분히 검증하지 않고 오프셋을 증가시켜 메모리 읽기 오류가 발생할 수 있습니다.

💡 쉬운 설명

카메라를 제어하는 프로그램이 데이터를 읽을 때, 정해진 범위를 넘어서서 메모리를 읽어버리는 오류가 있습니다. 이로 인해 프로그램이 갑자기 종료되거나 잘못된 정보가 노출될 수 있습니다.

🇺🇸 원문 (English)

libgphoto2 is a camera access and control library. Versions up to and including 2.5.33 have an out-of-bounds read in `ptp_unpack_DPV()` in `camlibs/ptp2/ptp-pack.c` (lines 622–629). The UINT128 and INT128 cases advance `*offset += 16` without verifying that 16 bytes remain in the buffer. The entry check at line 609 only guarantees `*offset < total` (at least 1 byte available), leaving up to 15 bytes unvalidated. Commit 433bde9888d70aa726e32744cd751d7dbe94379a patches the issue.

📍 영향받는 시스템

libgphoto2 버전 2.5.33 및 그 이하 버전

⚔️ 공격 벡터

조작된 PTP(Picture Transfer Protocol) 패킷을 전송하여 라이브러리의 메모리 경계 외 읽기 유도

🛡️ 대응 방법

커밋 433bde9888d70aa726e32744cd751d7dbe94379a가 적용된 최신 버전으로 업데이트

🔧 검증 코드

출력된 버전이 2.5.33 이하인지 확인하여 취약 여부를 판단합니다.

Shell / Script
dpkg -l libgphoto2 2>/dev/null | grep -E 'libgphoto2'

📊 CVSS Vector String

CVSS Vector
CVSS:3.1/AV:P/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:L

💻 영향받는 소프트웨어

IBM Security Verify Access