mirror of
https://chromium.googlesource.com/crosvm/crosvm
synced 2025-02-06 02:25:23 +00:00
When skipping descriptors in the next_descriptor() helper function, we advance the offset in the input bytestream by adding the user-controlled bLength field. If bLength was 0, next_descriptor() would get stuck in a loop and never return. Add a check for this case as well as a unit test based on the failing fuzzer input. BUG=b:198320695 TEST=cargo test -p usb_util TEST=cros_fuzz Change-Id: Iec130a33b28f05219907265b7acafa9ee3791c1a Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/crosvm/+/3155363 Reviewed-by: Dennis Kempin <denniskempin@google.com> Tested-by: kokoro <noreply+kokoro@google.com> Commit-Queue: Daniel Verkamp <dverkamp@chromium.org> |
||
---|---|---|
.. | ||
src | ||
Cargo.toml |