]> rtime.felk.cvut.cz Git - hercules2020/nv-tegra/linux-4.4.git/commit
fs: Check for invalid i_uid in may_follow_link()
authorSeth Forshee <seth.forshee@canonical.com>
Tue, 30 Aug 2016 04:35:00 +0000 (00:35 -0400)
committerIshan Mittal <imittal@nvidia.com>
Fri, 6 Jan 2017 10:11:32 +0000 (15:41 +0530)
commita009f2c91b69d34bc37a487625ea476fceeab09c
tree6581c4967cdd16824f048b06eb673ad0ae60bfe3
parent03aa3282f2587e3e5224ed782006455a4548c02b
fs: Check for invalid i_uid in may_follow_link()

[ Upstream commit 2d7f9e2ad35e4e7a3086231f19bfab33c6a8a64a ]

Filesystem uids which don't map into a user namespace may result
in inode->i_uid being INVALID_UID. A symlink and its parent
could have different owners in the filesystem can both get
mapped to INVALID_UID, which may result in following a symlink
when this would not have otherwise been permitted when protected
symlinks are enabled.

Signed-off-by: Seth Forshee <seth.forshee@canonical.com>
Acked-by: Serge Hallyn <serge.hallyn@canonical.com>
Signed-off-by: Eric W. Biederman <ebiederm@xmission.com>
Signed-off-by: Sasha Levin <alexander.levin@verizon.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
fs/namei.c