Closed squizz617 closed 1 year ago
Very good find! Thank you for reporting this.
Your analysis seems otherwise correct, except I cannot think of how octets_to_inline_qos
could legitimately be zero (or less than 16), so you have crafted a malformed submessage.
In any case, such input should cause just submessage parsing to fail, not a panic, so this is good catch.
This should now be fixed in the latest master
commit in Github, and will be included in the next release.
Does it still panic for you?
Thank you for confirming and quickly fixing the issue!
I cannot think of how
octets_to_inline_qos
could legitimately be zero (or less than 16)
You are actually right, and I stand corrected; octets_to_inline_qos
cannot legitimately be zero. This indeed is an malformed packet.
Does it still panic for you?
It doesn't panic anymore in the latest master
branch. Thank you!
Hi,
RustDDS panics while processing a submessage if
octets_to_inline_qos
field is zero (which is allowed by DDS specification).Env: RustDDS 0.8.2, Ubuntu 20.04
Submessage that triggers the panic:
Stderr and trace:
Analysis: In data.rs, both
octets_to_inline_qos
andrtps_v23_data_header_size
are of typeu16
. Therefore, whenoctets_to_inline_qos == 0
, the above panic is triggered.Thank you.