From: Jeff Layton Date: Mon, 3 Dec 2012 11:05:30 +0000 (-0500) Subject: cifs: extra sanity checking for cifs.idmap keys X-Git-Tag: omap-for-v3.8/fixes-for-merge-window-v4-signed~54^2~9 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=2ae03025d520de581fd1c58e98bbf3045c0f4695;p=pandora-kernel.git cifs: extra sanity checking for cifs.idmap keys Now that we aren't so rigid about the length of the key being passed in, we need to be a bit more rigorous about checking the length of the actual data against the claimed length (a'la num_subauths field). Check for the case where userspace sends us a seemingly valid key with a num_subauths field that goes beyond the end of the array. If that happens, return -EIO and invalidate the key. Also change the other places where we check for malformed keys in this code to invalidate the key as well. Reviewed-by: Shirish Pargaonkar Signed-off-by: Jeff Layton Signed-off-by: Steve French --- Reading git-diff-tree failed