]> www.infradead.org Git - users/jedix/linux-maple.git/commit
CVE-2016-10318 missing authorization check fscrypt_process_policy
authorJack Vogel <jack.vogel@oracle.com>
Tue, 17 Oct 2017 21:06:19 +0000 (14:06 -0700)
committerChuck Anderson <chuck.anderson@oracle.com>
Mon, 23 Oct 2017 05:12:26 +0000 (22:12 -0700)
commit976f7cbc2b8a992892a45332d0621223a0c5efc2
tree9e2798cb4b49bdedb48be5b521a7e9b8a6928c71
parentf386766f732d67e0bed2a7e293057f72f2e900c1
CVE-2016-10318 missing authorization check fscrypt_process_policy

Port to UEK4 of mainline commit id 163ae1c6ad62.

On an ext4 or f2fs filesystem with file encryption supported, a user
could set an encryption policy on any empty directory(*) to which they
had readonly access.  This is obviously problematic, since such a
directory might be owned by another user and the new encryption policy
would prevent that other user from creating files in their own directory
(for example).

Fix this by requiring inode_owner_or_capable() permission to set an
encryption policy.  This means that either the caller must own the file,
or the caller must have the capability CAP_FOWNER.

(*) Or also on any regular file, for f2fs v4.6 and later and ext4
    v4.8-rc1 and later; a separate bug fix is coming for that.

Orabug: 25883175
Signed-off-by: Jack Vogel <jack.vogel@oracle.com>
Acked-by: HÃ¥kon Bugge <haakon.bugge@oracle.com>
Reviewed-by: Ethan Zhao <ethan.zhao@oracle.com>
Signed-off-by: Dhaval Giani <dhaval.giani@oracle.com>
fs/ext4/crypto_policy.c