-
Notifications
You must be signed in to change notification settings - Fork 3k
USBMSD security updates (bp #12693) #12727
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
Conversation
Fix protects underlaying block device from out-of-bound read/writes - prevents the host from setting block device addres larger then block device size - prevents the host from setting wrong read/write lenght (cherry picked from commit ac105f5)
Fix protects underlaying block device from out-of-bound reads (cherry picked from commit 89e67d3)
Fix prevents unaligned USB transfers (cherry picked from commit 1ffb4d7)
@mergify[bot], thank you for your changes. |
Please include it in next patch release on 5.15 branch. |
CI started |
|
||
if (!_cbw.DataLength) { // host requests no data | ||
if (!_cbw.DataLength || !length_blocks || (length_blocks > _block_count - addr_block) || (_length > _memory_size - _addr)) { // host requests no data or wrong length |
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.
Using a '!' logical operator to check for a zero value rather than a Boolean is not the best way of doing things but is used elsewhere so is at least consistent. Missed this in the original review!
Test run: FAILEDSummary: 1 of 9 test jobs failed Failed test jobs:
|
CI restarted (new CI config) |
Test run: FAILEDSummary: 1 of 9 test jobs failed Failed test jobs:
|
Test run: FAILEDSummary: 1 of 10 test jobs failed Failed test jobs:
|
Test run: SUCCESSSummary: 10 of 10 test jobs passed |
Summary of changes
Backport: Couple of USB MSD fixes improving security:
update USBMSD::infoTransfer implementation ac105f5
Fix protects underlaying block device from out-of-bound read/writes
update USBMSD::memoryRead implementation 89e67d3
Fix protects underlaying block device from out-of-bound reads
update USBMSD::memoryWrite implementation 1ffb4d7
Fix prevents unaligned USB transfers
Impact of changes
Migration actions required
Documentation
Pull request type
Test results
Reviewers