Skip to content
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

usb: mass_storage: fix page buffer overflow, check LBA range #23240

Merged
merged 2 commits into from
Mar 4, 2020

Conversation

jfischer-no
Copy link
Collaborator

The page buffer can overflow if dCBWDataTransferLength
is multiple of the BLOCK_SIZE but the host uses
OUT packets smaller than MPS durng transfer.

Check if LBA is in range of the memory size.

The page buffer can overflow if dCBWDataTransferLength
is multiple of the BLOCK_SIZE but the host uses
OUT packets smaller than MPS durng transfer.

Signed-off-by: Johann Fischer <j.fischer@phytec.de>
Check if LBA is in range of the memory size.

Signed-off-by: Johann Fischer <j.fischer@phytec.de>
@jfischer-no jfischer-no added bug The issue is a bug, or the PR is fixing a bug area: USB Universal Serial Bus labels Mar 3, 2020
@carlescufi carlescufi requested a review from eobalski March 4, 2020 10:40
@carlescufi carlescufi requested a review from nordic-auko March 4, 2020 14:14
@jhedberg jhedberg merged commit 23ace0e into zephyrproject-rtos:master Mar 4, 2020
@jfischer-no jfischer-no deleted the pr-fix-usbmsc-write branch March 4, 2020 15:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area: USB Universal Serial Bus bug The issue is a bug, or the PR is fixing a bug
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants