Bug 2497344 (CVE-2026-59692) - CVE-2026-59692 gstreamer: gstreamer: DTLS certificate Subject DN stack buffer overflow in openssl_verify_callback
Summary: CVE-2026-59692 gstreamer: gstreamer: DTLS certificate Subject DN stack buffer...
Keywords:
Status: NEW
Alias: CVE-2026-59692
Product: Security Response
Classification: Other
Component: vulnerability
Version: unspecified
Hardware: All
OS: Linux
high
high
Target Milestone: ---
Assignee: Product Security
QA Contact:
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2026-07-06 13:42 UTC by OSIDB Bzimport
Modified: 2026-07-09 09:27 UTC (History)
3 users (show)

Fixed In Version:
Clone Of:
Environment:
Last Closed:
Embargoed:


Attachments (Terms of Use)

Description OSIDB Bzimport 2026-07-06 13:42:59 UTC
A stack buffer overflow was found in GStreamer's DTLS plugin (gst-plugins-bad). In openssl_verify_callback(), the peer certificate Subject DN is printed using X509_NAME_print_ex() into a memory BIO, then read via BIO_read() into a fixed gchar buf[2048] on the stack. The number of bytes read comes directly from the X509_NAME_print_ex() return value without bounds checking against the buffer size.

A remote DTLS peer can send a certificate with an oversized Subject DN (many long OU fields) so that the formatted output exceeds 2048 bytes, causing a stack buffer overflow during the DTLS handshake.

File: subprojects/gst-plugins-bad/ext/dtls/gstdtlsconnection.c
Function: openssl_verify_callback() (lines 1136-1144)

Exploitability analysis:
- The overflow content is TEXT ONLY (X509_NAME_print_ex with XN_FLAG_MULTILINE escapes all binary/control characters to printable ASCII sequences like \XX)
- Stack canary (-fstack-protector-strong) terminates the process before return address corruption is exploitable
- Arbitrary byte injection is impossible: null bytes become \00 (3 printable chars), high-bit bytes become \XX
- RCE is NOT achievable. Maximum impact is denial of service (crash)

Attack vector: Unauthenticated remote DTLS-SRTP/WebRTC peer triggers this during handshake by presenting a crafted certificate. No user interaction required.

Affected: GStreamer gst-plugins-bad (reproduced on 1.28.3)
Fixed: Planned for GStreamer 1.28.5
Fix MR: https://gitlab.freedesktop.org/gstreamer/gstreamer-security/-/merge_requests/99
Upstream issue: https://gitlab.freedesktop.org/gstreamer/gstreamer/-/work_items/5172 (confidential)
Advisory: GST-SA-2026-0062

Reporter: Clouditera Security; Z.ai Security; NSFOCUS
PSIRT Ticket: PSIRTSUPT-19090


Note You need to log in before you can comment on or make changes to this bug.