]> git.baikalelectronics.ru Git - kernel.git/commit
ext4: add bounds checking to ext4_xattr_find_entry()
authorTheodore Ts'o <tytso@mit.edu>
Sat, 31 Mar 2018 00:00:56 +0000 (20:00 -0400)
committerTheodore Ts'o <tytso@mit.edu>
Sat, 31 Mar 2018 00:00:56 +0000 (20:00 -0400)
commit69382578b477eacff4292673e1d250575d715e4f
treea27458dd6e7b0efec6d50e258c6e60eea30c018a
parent82b0dc6ffc728a5dce6ba05e9a06068839ef6015
ext4: add bounds checking to ext4_xattr_find_entry()

Add some paranoia checks to make sure we don't stray beyond the end of
the valid memory region containing ext4 xattr entries while we are
scanning for a match.

Also rename the function to xattr_find_entry() since it is static and
thus only used in fs/ext4/xattr.c

Signed-off-by: Theodore Ts'o <tytso@mit.edu>
Cc: stable@kernel.org
fs/ext4/xattr.c