openh264: Heap Overflow — GLSA 202507-06

A heap overflow has been discovered in openh264, which can lead to arbitrary code execution.

Affected packages

media-libs/openh264 on all architectures
Affected versions < 2.6.0
Unaffected versions >= 2.6.0

Background

OpenH264 is a codec library which supports H.264 encoding and decoding. It is suitable for use in real time applications such as WebRTC.

Description

A vulnerability has been discovered in openh264. Please review the CVE identifiers referenced below for details.

Impact

A vulnerability in the decoding functions of OpenH264 codec library could allow a remote, unauthenticated attacker to trigger a heap overflow. This vulnerability is due to a race condition between a Sequence Parameter Set (SPS) memory allocation and a subsequent non Instantaneous Decoder Refresh (non-IDR) Network Abstraction Layer (NAL) unit memory usage. An attacker could exploit this vulnerability by crafting a malicious bitstream and tricking a victim user into processing an arbitrary video containing the malicious bitstream. An exploit could allow the attacker to cause an unexpected crash in the victim's user decoding client and, possibly, perform arbitrary commands on the victim's host by abusing the heap overflow.

Workaround

There is no known workaround at this time.

Resolution

All openh264 users should upgrade to the latest version:

 # emerge --sync
 # emerge --ask --oneshot --verbose ">=media-libs/openh264-2.6.0"
 

References

Release date
July 08, 2025

Latest revision
July 08, 2025: 1

Severity
high

Exploitable
remote

Bugzilla entries