aboutsummaryrefslogtreecommitdiff
path: root/net/unix/af_unix.c
diff options
context:
space:
mode:
authorMarcelo Ricardo Leitner2018-01-08 19:02:28 -0200
committerDavid S. Miller2018-01-10 14:53:22 -0500
commit5960cefab9df76600a1a7d4ff592c59e14616e88 (patch)
treef7fe350ca04f5ebb6ffa9d7fa09fcc822641c4a1 /net/unix/af_unix.c
parent2e83acb970684008baee471427270c029a76ddbd (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/unix/af_unix.c')
0 files changed, 0 insertions, 0 deletions