Skip to content

Disallow ancillary data from __sys_{recv,send}msg_file()

Jens Axboe netdev 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest2 patches 2 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/2net: separate out the msghdr copy from ___sys_{send,recv}msg()net/socket.c+95 -460 replies
2/2net: disallow ancillary data for __sys_{send,recv}msg_file()net/socket.c+37 -60 replies

Reviews trailers per patch

None of the 2 patches has a Reviewed-by or Acked-by of their own; the series has one for all of them.

PatchDavid S. Miller
SeriesA-b
1/2
2/2

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v1 thread

Cover letter [PATCHSET 0/2] Disallow ancillary data from __sys_{recv,send}msg_file()

io_uring currently uses __sys_sendmsg_file() and __sys_recvmsg_file() to handle sendmsg and recvmsg operations. This generally works fine, but we don't want to allow cmsg type operations, just "normal" data transfers.

This small patchset first splits the msghdr copy from the two main helpers in net/socket.c, then changes __sys_sendmsg_file() and __sys_recvmsg_file() to use those helpers. With patch 2, we also add a check to explicitly check for msghdr->msg_control and msghdr->msg_controllen and return -EINVAL if they are set.

 net/socket.c | 184 ++++++++++++++++++++++++++++++++++++---------------
 1 file changed, 132 insertions(+), 52 deletions(-)
Signature · 1 line
Jens Axboe