Skip to content

AP_ADSB: add sanity check for access to msg.raw buffer#32654

Merged
tridge merged 1 commit into
ArduPilot:masterfrom
peterbarker:pr/ucp-fixes
Apr 15, 2026
Merged

AP_ADSB: add sanity check for access to msg.raw buffer#32654
tridge merged 1 commit into
ArduPilot:masterfrom
peterbarker:pr/ucp-fixes

Conversation

@peterbarker
Copy link
Copy Markdown
Contributor

Summary

similarly to the code in GDL90_RX_IN_PACKET, we should check if there is space in this buffer before actually writing data into it.

Testing (more checks increases chance of being merged)

  • Checked by a human programmer
  • Tested in SITL
  • Tested on hardware
  • Logs attached
  • Logs available on request
  • Autotest included

Description

This appears to fix an arbitrary-length buffer-overwrite problem; a sequence that only contains escape-byte/normal-byte/escape-byte/normal-byte repeatedly will just continue to overwrite past the buffer.

This issue was responsibly disclosed to the ArduPilot development team by secmate.dev. Many thanks to them for supplying a candidate patch - I have applied their fix here in only a slightly different manner.

similarly to the code in GDL90_RX_IN_PACKET, we should check if there is space in this buffer before actually writing data into it.
@tridge tridge merged commit 45adc06 into ArduPilot:master Apr 15, 2026
114 of 116 checks passed
@github-project-automation github-project-automation Bot moved this from ReadyForDevCall to Done in Peter's ArduPilot 4.8 Queue Apr 15, 2026
@peterbarker peterbarker deleted the pr/ucp-fixes branch April 16, 2026 04:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants