]> git.baikalelectronics.ru Git - kernel.git/commit
nfsd4: fix acl buffer overrun
authorJ. Bruce Fields <bfields@redhat.com>
Tue, 11 Feb 2014 16:29:05 +0000 (11:29 -0500)
committerJ. Bruce Fields <bfields@redhat.com>
Tue, 11 Feb 2014 18:48:11 +0000 (13:48 -0500)
commit0e37af0199230f162f2161fa22c9abe4126ad2e3
treed345805a52a70a88485037122e577f1edebc9441
parent5be6c96b0213ddc8bece5d066b36639b99a8bc26
nfsd4: fix acl buffer overrun

d14034d35b4af7fe7730a2a1eefd3e210c01a861 "nfsd: use get_acl and
->set_acl" forgets to set the size in the case get_acl() succeeds, so
_posix_to_nfsv4_one() can then write past the end of its allocation.
Symptoms were slab corruption warnings.

Also, some minor cleanup while we're here.  (Among other things, note
that the first few lines guarantee that pacl is non-NULL.)

Signed-off-by: J. Bruce Fields <bfields@redhat.com>
fs/nfsd/nfs4acl.c