vfs: Don't allow changing the link count of an inode with an invalid uid or gid
authorEric W. Biederman <ebiederm@xmission.com>
Thu, 14 Sep 2017 17:07:32 +0000 (12:07 -0500)
committerEric W. Biederman <ebiederm@xmission.com>
Thu, 24 May 2018 16:56:18 +0000 (11:56 -0500)
commit593d1ce854dff93b3c9066e897192eb676b09c46
treebe0a5546be2dd24273dd7bae75b35ffa3e24e855
parenta3a5c966a664dfde0393dd366c2cb916962d164f
vfs: Don't allow changing the link count of an inode with an invalid uid or gid

Changing the link count of an inode via unlink or link will cause a
write back of that inode.  If the uids or gids are invalid (aka not known
to the kernel) writing the inode back may change the uid or gid in the
filesystem.   To prevent possible filesystem and to avoid the need for
filesystem maintainers to worry about it don't allow operations on
inodes with an invalid uid or gid.

Acked-by: Seth Forshee <seth.forshee@canonical.com>
Signed-off-by: "Eric W. Biederman" <ebiederm@xmission.com>
fs/namei.c