Skip to content

fix(wlua): handle signed MAVLink v2 packets in Wireshark dissector#1211

Open
g-ampo wants to merge 1 commit into
ArduPilot:masterfrom
g-ampo:fix/wireshark-signed-packet-dissection
Open

fix(wlua): handle signed MAVLink v2 packets in Wireshark dissector#1211
g-ampo wants to merge 1 commit into
ArduPilot:masterfrom
g-ampo:fix/wireshark-signed-packet-dissection

Conversation

@g-ampo

@g-ampo g-ampo commented May 4, 2026

Copy link
Copy Markdown

Fixes #1178.

The signature parsing block in generated Lua dissector reads buffer(offset,1) w/out checking remaining length.

On truncated buffers, this throws a Lua Range is out of bounds error that kills the dissector for the entire capture, so guard with offset + 13 <= buffer:len() before reading the 13-byte signature. Also use bit.band() instead of == 0x01 for the incompat flag . MAVLink spec (bitmask field).

Add bounds check before reading 13-byte signature block to prevent Lua
runtime errors on truncated buffers (e.g. USB bulk transfer fragmentation).
Use bit.band() for incompat flag check per MAVLink spec bitmask semantics.

Fixes ArduPilot#1178.
@g-ampo g-ampo force-pushed the fix/wireshark-signed-packet-dissection branch from f40dd48 to 9543ba3 Compare May 25, 2026 17:41
@g-ampo g-ampo requested a review from tridge May 25, 2026 17:42
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.

wireshark lua does not appear to disect signed packets

2 participants