aboutsummaryrefslogtreecommitdiff
path: root/drivers/fpga/fpga-mgr.c
diff options
context:
space:
mode:
authorMarcelo Ricardo Leitner <[email protected]>2018-01-08 19:02:28 -0200
committerDavid S. Miller <[email protected]>2018-01-10 14:53:22 -0500
commit5960cefab9df76600a1a7d4ff592c59e14616e88 (patch)
treef7fe350ca04f5ebb6ffa9d7fa09fcc822641c4a1 /drivers/fpga/fpga-mgr.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 <[email protected]> Signed-off-by: Marcelo Ricardo Leitner <[email protected]> Signed-off-by: David S. Miller <[email protected]>
Diffstat (limited to 'drivers/fpga/fpga-mgr.c')
0 files changed, 0 insertions, 0 deletions