]> git.karo-electronics.de Git - karo-tx-linux.git/commit
cifs: extra sanity checking for cifs.idmap keys
authorJeff Layton <jlayton@redhat.com>
Fri, 19 Oct 2012 18:45:14 +0000 (14:45 -0400)
committerJeff Layton <jlayton@redhat.com>
Fri, 19 Oct 2012 18:45:14 +0000 (14:45 -0400)
commitf51de018cc3656b6994335cfdf2ec51d8f1cf8c0
tree025482a3098842dfd957af343bd740312322f7d1
parent7d62755b106cfab98179120b6081e065e97f0b66
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.

Signed-off-by: Jeff Layton <jlayton@redhat.com>
fs/cifs/cifsacl.c