-
- Downloads
Avoid memory leak from ill-formatted serialization data
At commit 060d7914 the following `fuzzing/usbredirparserfuzz` input triggers a memory leak: ``` $ base64 -d <<'EOF' | gunzip -c > testcase H4sIAFDwJ2ECA2NgZIADBQWF/zD2HQgfAv4DgcJ/BTzgP0iRAlwRivL/ePX9 R1VAyBaSjcShB8nPTBA9/xn+g5UAANvH+dkSAQAA ``` The data type header segment is empty while there's (supposed) payload data in there. The internal buffers must be filled in the order of header, type header and then data, an invariant important for `usbredirparser_do_read` and violated by this input. With this change the input data is read the same way, but if the invariant would be violated the data read is just ignored. The parser check at the beginning of `usbredirparser_unserialize` is also improved and `write_buf_count` is no longer set explicitly. Signed-off-by:Michael Hanselmann <public@hansmi.ch>
parent
c3c67aba
No related branches found
No related tags found
Checking pipeline status
Loading
-
mentioned in merge request !61 (merged)
-
mentioned in commit 6bf41a23
Please register or sign in to comment