-
Notifications
You must be signed in to change notification settings - Fork 106
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix infinite loop issue in UsbGetFullHidDescriptor #640
Fix infinite loop issue in UsbGetFullHidDescriptor #640
Conversation
0b74fb4
to
4811932
Compare
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## dev/202405 #640 +/- ##
==============================================
- Coverage 11.59% 11.59% -0.01%
==============================================
Files 132 132
Lines 21555 21558 +3
Branches 2546 2546
==============================================
Hits 2499 2499
- Misses 19022 19025 +3
Partials 34 34
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't think this should happen with a USB-compliant descriptor buffer, but I think this is a good defense mechanism against buggy USB implementations.
I agree. Programmatically this case should be handled. |
## Description UsbGetFullHidDescriptor does not check the Descriptor header length and this might result in an infinite loop if a bad descriptor is passed. - [ ] Impacts functionality? - [ ] Impacts security? - [ ] Breaking change? - [ ] Includes tests? - [ ] Includes documentation? - [x] Backport to release branch? ## How This Was Tested Tested on Surface devices ## Integration Instructions N/A
Description
UsbGetFullHidDescriptor does not check the Descriptor header length and this might result in an infinite loop if a bad descriptor is passed.
How This Was Tested
Tested on Surface devices
Integration Instructions
N/A