diff options
author | Zev Weiss <[email protected]> | 2019-03-11 23:27:58 -0700 |
---|---|---|
committer | Linus Torvalds <[email protected]> | 2019-03-12 10:04:00 -0700 |
commit | fec52486682f7b3af2ffc28bcacc6e2ad6f7e1e6 (patch) | |
tree | fe71e6f77f514a186429d4313140c7b023c205fd /net/switchdev/switchdev.c | |
parent | a089e4fed5c5e8717f233d71bb750fbf9e1f38e0 (diff) |
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/[email protected]
Signed-off-by: Zev Weiss <[email protected]>
Cc: Luis Chamberlain <[email protected]>
Cc: Kees Cook <[email protected]>
Cc: Brendan Higgins <[email protected]>
Cc: Iurii Zaikin <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
Diffstat (limited to 'net/switchdev/switchdev.c')
0 files changed, 0 insertions, 0 deletions