https://github.com/torvalds/linux
Revision f18c34e483ff6b1d9866472221e4015b3a4698e4 authored by Jan Kara on 02 June 2015, 15:10:28 UTC, committed by Linus Torvalds on 02 June 2015, 17:28:52 UTC
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>
Cc: stable@vger.kernel.org
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
1 parent c46a024
History
Tip revision: f18c34e483ff6b1d9866472221e4015b3a4698e4 authored by Jan Kara on 02 June 2015, 15:10:28 UTC
lib: Fix strnlen_user() to not touch memory after specified maximum
Tip revision: f18c34e
File Mode Size
Documentation
arch
block
crypto
drivers
firmware
fs
include
init
ipc
kernel
lib
mm
net
samples
scripts
security
sound
tools
usr
virt
.gitignore -rw-r--r-- 1.2 KB
.mailmap -rw-r--r-- 4.9 KB
COPYING -rw-r--r-- 18.3 KB
CREDITS -rw-r--r-- 94.7 KB
Kbuild -rw-r--r-- 2.1 KB
Kconfig -rw-r--r-- 252 bytes
MAINTAINERS -rw-r--r-- 303.0 KB
Makefile -rw-r--r-- 53.1 KB
README -rw-r--r-- 18.2 KB
REPORTING-BUGS -rw-r--r-- 7.3 KB

README

back to top