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
net: sockets: Fix sendmsg() user mode param checks #25932
net: sockets: Fix sendmsg() user mode param checks #25932
Conversation
What about |
If we are calling sendmsg() for a connected socket, then msg_namelen is 0 and msg_name is NULL. Check these allowed values properly. Also modify unit tests so that we test this scenario. Fixes zephyrproject-rtos#25925 Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
If we are calling sendmsg() without any aux data, then msg_controllen is 0 and msg_control is NULL. Check these allowed values properly. Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
a07c531
to
5e2eedb
Compare
Yes, it is optional, just forgot to add the checks. |
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. |
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.
LGTM
If we are calling sendmsg() for a connected socket, then msg_namelen
is 0 and msg_name is NULL. Check these allowed values properly.
Also modify unit tests so that we test this scenario.
Fixes #25925
Signed-off-by: Jukka Rissanen jukka.rissanen@linux.intel.com