summaryrefslogtreecommitdiff
path: root/scripts/gcc-plugins/gcc-common.h
diff options
context:
space:
mode:
authorAl Viro <viro@zeniv.linux.org.uk>2020-05-19 17:48:52 -0400
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2020-05-27 17:37:29 +0200
commitb23af87aabc04ee63935b7f80664f2b36f74fdef (patch)
tree1b4d843201c84790f5abd847ee2792e7110db1b0 /scripts/gcc-plugins/gcc-common.h
parente7a71903eceda26983222895fd2fd3d86197b03b (diff)
fix multiplication overflow in copy_fdtable()
[ Upstream commit 4e89b7210403fa4a8acafe7c602b6212b7af6c3b ] 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: 9cfe015aa424 (get rid of NR_OPEN and introduce a sysctl_nr_open) Reported-by: Thiago Macieira <thiago.macieira@intel.com> Signed-off-by: Al Viro <viro@zeniv.linux.org.uk> Signed-off-by: Sasha Levin <sashal@kernel.org>
Diffstat (limited to 'scripts/gcc-plugins/gcc-common.h')
0 files changed, 0 insertions, 0 deletions