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
BSD socket sendmsg() parameters were not verified in usermode #25706
BSD socket sendmsg() parameters were not verified in usermode #25706
Conversation
All checks passed. checkpatch (informational only, not a failure)
Tip: The bot edits this comment instead of posting a new one, so you can check the comment's history to see earlier messages. |
subsys/net/lib/sockets/sockets.c
Outdated
size_t i; | ||
int ret; | ||
|
||
memcpy(&msg_copy, msg, sizeof(msg_copy)); |
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.
msg is a pointer to user memory, need to use z_user_from_copy()
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.
If run in usermode, the sendmsg() parameters were not verified. Fixes zephyrproject-rtos#25702 Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
Some of the sendmsg() tests were not run when in usermode. Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
48a86b2
to
2124dc4
Compare
Updated according to comments. |
Fixes #25702