nfsd: nfsd should drop CAP_MKNOD for non-root
authorJ. Bruce Fields <bfields@citi.umich.edu>
Mon, 16 Mar 2009 22:34:20 +0000 (18:34 -0400)
committerJ. Bruce Fields <bfields@citi.umich.edu>
Tue, 17 Mar 2009 18:55:55 +0000 (14:55 -0400)
commit76a67ec6fb79ff3570dcb5342142c16098299911
tree45bfd454d59ce611a103d6b63fff08a5cb5d2194
parent84f09f46b4ee9e4e9b6381f8af31817516d2091b
nfsd: nfsd should drop CAP_MKNOD for non-root

Since creating a device node is normally an operation requiring special
privilege, Igor Zhbanov points out that it is surprising (to say the
least) that a client can, for example, create a device node on a
filesystem exported with root_squash.

So, make sure CAP_MKNOD is among the capabilities dropped when an nfsd
thread handles a request from a non-root user.

Reported-by: Igor Zhbanov <izh1979@gmail.com>
Cc: stable@kernel.org
Signed-off-by: J. Bruce Fields <bfields@citi.umich.edu>
include/linux/capability.h