mbox series

[net,0/3] Some sockopt optlen fixes

Message ID cover.1515436112.git.marcelo.leitner@gmail.com
Headers show
Series Some sockopt optlen fixes | expand

Message

Marcelo Ricardo Leitner Jan. 8, 2018, 9:02 p.m. UTC
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(-)

Comments

Neil Horman Jan. 9, 2018, 1:23 a.m. UTC | #1
On Mon, Jan 08, 2018 at 07:02:26PM -0200, Marcelo Ricardo Leitner wrote:
> 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
> 
> 
Series
Acked-by: Neil Horman <nhorman@tuxdriver.com>
David Miller Jan. 10, 2018, 7:53 p.m. UTC | #2
From: Marcelo Ricardo Leitner <marcelo.leitner@gmail.com>
Date: Mon,  8 Jan 2018 19:02:26 -0200

> 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.

Series applied, thank you.