Open pv42 opened 3 months ago
@pv42 I think you are right and this needs to be fixed. Would you like to do a PR yourself? or shall I do it?
Hello @tridge, thanks for the response. I just noticed the issue when comparing the c implementation, this python implementation and the documentation. While I was reasonably confident that there is something wrong with this implementation I am not sufficiently confident to write the security critical code of a codebase I am not familiar with.
The function
check_signature(..) -> bool
inmavutil.py
generated frommavgen_python.py
https://github.com/ArduPilot/pymavlink/blob/e192ad8114f203220f404f37f971d6359dd5e3d2/generator/mavgen_python.py#L963 does not increase the value ofself.signing.stream_timestamps[stream_key]
after initially setting it on the first message received per logical stream. The documentation says that a packet should be rejected ifbut since the value is never updated this comparison is only done against the first packet of the stream.