staging: lustre: improve length checks in ioctls

We copy "hdr->ioc_len" from the user twice but we only verify that it's
within the limit on the first copy.  Otherwise we could read unmapped
memory and Oops.

Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Reviewed-by: Peng Tao <bergwolf@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
Dan Carpenter 2014-04-25 00:49:13 +03:00 • committed by Greg Kroah-Hartman
commit 2e5ed7fdfb
2 changed files with 6 additions and 0 deletions