staging: lustre: validate size in ll_setxattr()
authorDan Carpenter <dan.carpenter@oracle.com>
Wed, 22 Oct 2014 14:23:07 +0000 (17:23 +0300)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 29 Oct 2014 08:33:11 +0000 (16:33 +0800)
commit87ebccf97f54fe20c0a8a86e21164473cc7d57e1
tree97c1af9d5e16a20c95479d6e48f9a301768f7f68
parent85bcfab46955e6f4bcfd08ffb989f941e003da2a
staging: lustre: validate size in ll_setxattr()

If size is smaller than the lov_user_md struct then we are reading
beyond the end of the buffer.  I guess this is an information leak or it
could cause an Oops if the memory is not mapped.

Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/lustre/lustre/llite/xattr.c