6.1medium
libgphoto2 has OOB read in ptp_unpack_EOS_ImageFormat() and ptp_unpack_EOS_CustomFuncEx() due to missing length parameter in ptp-pack.c
- Severity
- 6.1medium CVSS:3.1 by GitHub_M
- Exploit likelihood
- 0.26% (higher than 11% of CVEs)
- Published
- Last changed
- Assigned by
- GitHub_M
Description
libgphoto2 is a camera access and control library. In versions up to and including 2.5.33, two functions in camlibs/ptp2/ptp-pack.c accept a data pointer but no length parameter, performing unbounded reads. Their callers in ptp_unpack_EOS_events() have xsize available but never pass it, leaving both functions unable to validate reads against the actual buffer boundary. Commit 1817ecead20c2aafa7549dac9619fe38f47b2f53 patches the issue.
Affected
| Product or package | Versions | Reported by |
|---|---|---|
| gphoto libgphoto2 | <= 2.5.33 | CVE List |
Classification
SSVC (CISA-ADP): exploitation none, automatable no, technical impact partial.
What each source says
CVE List
libgphoto2 is a camera access and control library. In versions up to and including 2.5.33, two functions in camlibs/ptp2/ptp-pack.c accept a data pointer but no length parameter, performing unbounded reads. Their callers in ptp_unpack_EOS_events() have xsize available but never pass it, leaving both functions unable to validate reads against the actual buffer boundary. Commit 1817ecead20c2aafa7549dac9619fe38f47b2f53 patches the issue.
NVD (es)
libgphoto2 es una biblioteca de acceso y control de cámaras. En versiones hasta la 2.5.33 inclusive, dos funciones en camlibs/ptp2/ptp-pack.c aceptan un puntero de datos pero ningún parámetro de longitud, realizando lecturas sin límites. Sus llamadores en ptp_unpack_EOS_events() tienen xsize disponible pero nunca lo pasan, dejando ambas funciones incapaces de validar las lecturas contra el límite real del búfer. El commit 1817ecead20c2aafa7549dac9619fe38f47b2f53 parchea el problema.
References
Sources
| Source | Record | Licence |
|---|---|---|
| CVE List | CVE-2026-40333 changed 2026-04-20 | CVE Terms of Use |
| NVD | CVE-2026-40333 changed 2026-10-26 | Public domain |