Skip to content

bluetooth: hci: userchan: Guard reads from going over frame-sz #89029

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

Merged

Conversation

ubieda
Copy link
Member

@ubieda ubieda commented Apr 24, 2025

Even though through code-inspection there isn't a clear path where the guard wouldn't act upon the length reaching the limit, this check is moved up to unconditially validate it on every read.

Fixes #84731.

@ubieda ubieda changed the title bluetooth: userchan: Guard reads from beyond frame size bluetooth: userchan: Guard reads from going over frame size Apr 24, 2025
@ubieda ubieda marked this pull request as ready for review April 24, 2025 15:44
@ubieda ubieda force-pushed the fix/cid-487679-userchan-buf-overflow branch from 495bcdc to 71141c2 Compare April 24, 2025 15:49
Even though through code-inspection there isn't a clear path where the
guard wouldn't act upon the length reaching the limit, this check is
moved up to unconditially validate it on every read.

Fixes zephyrproject-rtos#84731.

Signed-off-by: Luis Ubieda <[email protected]>
@ubieda ubieda force-pushed the fix/cid-487679-userchan-buf-overflow branch from 71141c2 to f002629 Compare April 24, 2025 15:49
@ubieda ubieda changed the title bluetooth: userchan: Guard reads from going over frame size bluetooth: hci: userchan: Guard reads from going over frame-sz Apr 24, 2025
@dleach02 dleach02 merged commit b6e2486 into zephyrproject-rtos:main Apr 28, 2025
28 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Coverity CID: 487679] Overflowed integer argument in drivers/bluetooth/hci/userchan.c
5 participants