Smack: ptrace capability use fixes
authorCasey Schaufler <casey.schaufler@intel.com>
Tue, 18 Sep 2018 23:09:16 +0000 (16:09 -0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 13 Nov 2018 19:08:36 +0000 (11:08 -0800)
commit7a478552b563d7c66525c2d6274bb9f1e030d6db
tree9103d9be8145f0289288660ea85471f79a0b8011
parenteb4a3faebfd113482ea3c266f7d30e13f7d56848
Smack: ptrace capability use fixes

[ Upstream commit dcb569cf6ac99ca899b8109c128b6ae52477a015 ]

This fixes a pair of problems in the Smack ptrace checks
related to checking capabilities. In both cases, as reported
by Lukasz Pawelczyk, the raw capability calls are used rather
than the Smack wrapper that check addition restrictions.
In one case, as reported by Jann Horn, the wrong task is being
checked for capabilities.

Signed-off-by: Casey Schaufler <casey@schaufler-ca.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
security/smack/smack_lsm.c