summaryrefslogtreecommitdiffstats
path: root/kernel/sysctl.c
diff options
context:
space:
mode:
authorZev Weiss <zev@bewilderbeest.net>2019-03-12 07:27:58 +0100
committerLinus Torvalds <torvalds@linux-foundation.org>2019-03-12 18:04:00 +0100
commitfec52486682f7b3af2ffc28bcacc6e2ad6f7e1e6 (patch)
treefe71e6f77f514a186429d4313140c7b023c205fd /kernel/sysctl.c
parentMerge tag 'linux-watchdog-5.1-rc1' of git://www.linux-watchdog.org/linux-watc... (diff)
downloadlinux-fec52486682f7b3af2ffc28bcacc6e2ad6f7e1e6.tar.xz
linux-fec52486682f7b3af2ffc28bcacc6e2ad6f7e1e6.zip
tools/testing/selftests/sysctl/sysctl.sh: add tests for >32-bit values written to 32-bit integers
Patch series "sysctl: fix range-checking in do_proc_dointvec_minmax_conv()", v2. After being left with an unusable system after a typo executing something like 'echo $((1<<24)) > /proc/sys/vm/max_map_count', I found that do_proc_dointvec_minmax_conv() was missing a check to ensure that the converted value actually fits in an int. The first of the following patches enhances the sysctl selftest such that it detects this problem; the second provides a minimal fix (suitable for -stable) such that the selftest passes. The third patch then performs a more thorough refactoring to eliminate the code duplication that led to the bug in the first place (maintaining the passing status of the selftest). This patch (of 3): At present this exposes a bug in do_proc_dointvec_minmax_conv() (it fails to check for values that are too wide to fit in an int). Link: http://lkml.kernel.org/r/20190207123426.9202-2-zev@bewilderbeest.net Signed-off-by: Zev Weiss <zev@bewilderbeest.net> Cc: Luis Chamberlain <mcgrof@kernel.org> Cc: Kees Cook <keescook@chromium.org> Cc: Brendan Higgins <brendanhiggins@google.com> Cc: Iurii Zaikin <yzaikin@google.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to '')
0 files changed, 0 insertions, 0 deletions