Page MenuHomeFreeBSD

Rewrite linux_recvfrom. To avoid double conversion of sockaddr use kern_recvit() directly. And check fromlen parameter before sockaddr copyin and conversion.
ClosedPublic

Authored by dchagin on Nov 2 2014, 10:17 PM.
Tags
None
Referenced Files
F133483046: D1082.id2228.diff
Sun, Oct 26, 3:13 AM
Unknown Object (File)
Sep 17 2025, 10:41 AM
Unknown Object (File)
Sep 16 2025, 6:11 PM
Unknown Object (File)
Sep 10 2025, 11:31 AM
Unknown Object (File)
Sep 7 2025, 7:50 AM
Unknown Object (File)
Sep 7 2025, 2:21 AM
Unknown Object (File)
Sep 7 2025, 2:21 AM
Unknown Object (File)
Sep 7 2025, 2:18 AM
Subscribers

Diff Detail

Repository
rS FreeBSD src repository - subversion
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

dchagin retitled this revision from to Rewrite linux_recvfrom. To avoid double conversion of sockaddr use kern_recvit() directly. And check fromlen parameter before sockaddr copyin and conversion..
trasz added inline comments.
sys/compat/linux/linux_socket.c
1035 ↗(On Diff #2228)

!= 0; few other occurences below.

1053 ↗(On Diff #2228)

sys_recvfrom() calls recvit() here, which also copies out the msg_namelen. It seems to be missing here.

1057 ↗(On Diff #2228)

!= NULL

whoops, you are right. fixed. style(9) also fixed.

This revision was automatically updated to reflect the committed changes.