]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
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)
committerGreg Kroah-Hartman <gregkh@suse.de>
Mon, 23 Mar 2009 21:55:25 +0000 (14:55 -0700)
commitf40df5f22298327926688dce132c64351a029d4b
tree1e8dc0effc1c87bc2026b663744b904fd1df4a63
parent0b94331d39f94e826c18a82a26415b5816af6d8f
nfsd: nfsd should drop CAP_MKNOD for non-root

commit 76a67ec6fb79ff3570dcb5342142c16098299911 upstream.

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>
Signed-off-by: J. Bruce Fields <bfields@citi.umich.edu>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
include/linux/capability.h