Skip to content
Commit 4e89b721 authored by Al Viro's avatar Al Viro
Browse files

fix multiplication overflow in copy_fdtable()

cpy and set really should be size_t; we won't get an overflow on that,
since sysctl_nr_open can't be set above ~(size_t)0 / sizeof(void *),
so nr that would've managed to overflow size_t on that multiplication
won't get anywhere near copy_fdtable() - we'll fail with EMFILE
before that.

Cc: stable@kernel.org # v2.6.25+
Fixes: 9cfe015a

 (get rid of NR_OPEN and introduce a sysctl_nr_open)
Reported-by: default avatarThiago Macieira <thiago.macieira@intel.com>
Signed-off-by: default avatarAl Viro <viro@zeniv.linux.org.uk>
parent b0d3869c
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment