All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCHSET 0/2] Disallow ancillary data from __sys_{recv,send}msg_file()
@ 2019-11-26  1:31 Jens Axboe
  2019-11-26  1:31 ` [PATCH 1/2] net: separate out the msghdr copy from ___sys_{send,recv}msg() Jens Axboe
                   ` (2 more replies)
  0 siblings, 3 replies; 5+ messages in thread
From: Jens Axboe @ 2019-11-26  1:31 UTC (permalink / raw)
  To: netdev; +Cc: davem

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(-)

-- 
Jens Axboe



^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2019-11-26 22:04 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-11-26  1:31 [PATCHSET 0/2] Disallow ancillary data from __sys_{recv,send}msg_file() Jens Axboe
2019-11-26  1:31 ` [PATCH 1/2] net: separate out the msghdr copy from ___sys_{send,recv}msg() Jens Axboe
2019-11-26  1:31 ` [PATCH 2/2] net: disallow ancillary data for __sys_{send,recv}msg_file() Jens Axboe
2019-11-26 22:00 ` [PATCHSET 0/2] Disallow ancillary data from __sys_{recv,send}msg_file() David Miller
2019-11-26 22:04   ` Jens Axboe

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.