AZL-116353: CVE-2026-138158 affecting package libgphoto2 2.5.31-1
libgphoto2 through 2.5.34 contains a stack buffer overflow in sierragetstringregister() that lets a malicious sierra-protocol camera or USB device overwrite stack memory. When files are listed, the device can answer the file-name register with an oversized packet, writing up to 32 KB past small stack buffers to cause crashes or possible code execution.
Affected Software
Event History
Frequently Asked Questions
Which systems are realistically exposed to exploitation?
Systems using libgphoto2 with a Sierra-protocol camera or USB device are exposed when they interact with an untrusted or malicious device. The vulnerable path is reached while listing files on that device.
What must an attacker control to trigger the issue?
An attacker needs to provide or control a Sierra-protocol camera or USB device that returns an oversized response for the file-name register. The oversized packet can overwrite stack memory by up to 32 KB past the affected buffers.
Which libgphoto2 versions are affected?
The issue affects libgphoto2 through version 2.5.34. The listed Azure Linux package version, 2.5.31-1, falls within that affected range.