summaryrefslogtreecommitdiff
path: root/fs
diff options
context:
space:
mode:
authorJan Kara <jack@suse.cz>2015-06-02 17:10:28 +0200
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2015-06-06 08:19:32 -0700
commit9ad68dc3f6f155f6a8bda0bb8837c854a9db2ff2 (patch)
treef6fa4f1c33e5601154b0efda70873fbac669a20c /fs
parent7bbf0eb78d91361497ce6dbb787cf1625cbaeb1a (diff)
lib: Fix strnlen_user() to not touch memory after specified maximum
commit f18c34e483ff6b1d9866472221e4015b3a4698e4 upstream. If the specified maximum length of the string is a multiple of unsigned long, we would load one long behind the specified maximum. If that happens to be in a next page, we can hit a page fault although we were not expected to. Fix the off-by-one bug in the test whether we are at the end of the specified range. Signed-off-by: Jan Kara <jack@suse.cz> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'fs')
0 files changed, 0 insertions, 0 deletions