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

Fix net mgmt recvfrom #63742

Merged
merged 2 commits into from
Oct 12, 2023
Merged

Conversation

jukkar
Copy link
Member

@jukkar jukkar commented Oct 10, 2023

The recvfrom() should return EMSGSIZE if we try to receive data to too small buffer. Add also test case for it.

Fixes #63835

Copy link
Contributor

@rlubos rlubos left a comment

Choose a reason for hiding this comment

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

LGTM

Return EMSGSIZE if trying to copy too much data into
user supplied buffer.

Signed-off-by: Jukka Rissanen <[email protected]>
Add test that checks we get proper return code if trying
to copy too much data.

Signed-off-by: Jukka Rissanen <[email protected]>
@jukkar jukkar force-pushed the fix-net-mgmt-recvfrom branch from 3770a45 to 14bd40b Compare October 10, 2023 12:55
@jhedberg jhedberg merged commit 5c6dca3 into zephyrproject-rtos:main Oct 12, 2023
19 checks passed
@jukkar jukkar deleted the fix-net-mgmt-recvfrom branch October 12, 2023 07:34
@jukkar jukkar added backport v2.7-branch Request backport to the v2.7-branch backport v3.3-branch labels Oct 12, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area: Networking area: Sockets Networking sockets backport v2.7-branch Request backport to the v2.7-branch
Projects
None yet
Development

Successfully merging this pull request may close these issues.

net_mgmt socket recvfrom does not check size properly
4 participants