diff options
author | Marcelo Ricardo Leitner | 2018-01-08 19:02:28 -0200 |
---|---|---|
committer | David S. Miller | 2018-01-10 14:53:22 -0500 |
commit | 5960cefab9df76600a1a7d4ff592c59e14616e88 (patch) | |
tree | f7fe350ca04f5ebb6ffa9d7fa09fcc822641c4a1 /net/openvswitch | |
parent | 2e83acb970684008baee471427270c029a76ddbd (diff) |
sctp: add a ceiling to optlen in some sockopts
Hangbin Liu reported that some sockopt calls could cause the kernel to log
a warning on memory allocation failure if the user supplied a large optlen
value. That is because some of them called memdup_user() without a ceiling
on optlen, allowing it to try to allocate really large buffers.
This patch adds a ceiling by limiting optlen to the maximum allowed that
would still make sense for these sockopt.
Reported-by: Hangbin Liu <haliu@redhat.com>
Signed-off-by: Marcelo Ricardo Leitner <marcelo.leitner@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/openvswitch')
0 files changed, 0 insertions, 0 deletions