From mboxrd@z Thu Jan 1 00:00:00 1970 From: Marcelo Ricardo Leitner Subject: [PATCH net 0/3] Some sockopt optlen fixes Date: Mon, 8 Jan 2018 19:02:26 -0200 Message-ID: Cc: linux-sctp@vger.kernel.org, Neil Horman , Vlad Yasevich , haliu@redhat.com To: netdev@vger.kernel.org Return-path: Received: from mail-qt0-f176.google.com ([209.85.216.176]:36986 "EHLO mail-qt0-f176.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932761AbeAHVEQ (ORCPT ); Mon, 8 Jan 2018 16:04:16 -0500 Sender: netdev-owner@vger.kernel.org List-ID: Hangbin Liu reported that some SCTP sockopt are allowing the user to get the kernel to allocate really large buffers by not having a ceiling on optlen. This patchset address this issue (in patch 2), replace an GFP_ATOMIC that isn't needed and avoid calculating the option size multiple times in some setsockopt. Marcelo Ricardo Leitner (3): sctp: GFP_ATOMIC is not needed in sctp_setsockopt_events sctp: add a ceiling to optlen in some sockopts sctp: make use of pre-calculated len net/sctp/socket.c | 28 +++++++++++++++++++++------- 1 file changed, 21 insertions(+), 7 deletions(-) -- 2.14.3