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

bluetooth: Solving heap-buffer-overflow caused by memcpy. #18

Merged
merged 1 commit into from
Jan 2, 2025

Conversation

jialu522
Copy link
Contributor

@jialu522 jialu522 commented Jan 2, 2025

bug: v/49166

rootcause: The third parameter of memcpy is greater than the length of the source string, resulting in a heap-buffer-overflow error.

@jialu522 jialu522 requested a review from hyson710 as a code owner January 2, 2025 05:35
@@ -74,7 +74,7 @@ typedef struct {
struct list_node node;
uint32_t cmd_code;
union {
uint8_t number[HFP_PHONENUM_DIGITS_MAX];
char number[HFP_PHONENUM_DIGITS_MAX];
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

please fix it in another patch:
HFP_PHONENUM_DIGITS_MAX + 1

and, please also check all other codes

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

OK

@hyson710 hyson710 added the bug Something isn't working label Jan 2, 2025
@jialu522 jialu522 force-pushed the memcpydial branch 2 times, most recently from c1052c4 to e2b3c7a Compare January 2, 2025 09:13
bug: v/49166

rootcause: The third parameter of memcpy is greater than the length of the source string, resulting in a heap-buffer-overflow error.

Signed-off-by: jialu <[email protected]>
@hyson710 hyson710 merged commit d920be6 into open-vela:dev Jan 2, 2025
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants