1
0
Fork 0

Smack: correct final mmap check comparison

The mmap policy enforcement checks the access of the
SMACK64MMAP subject against the current subject incorrectly.
The check as written works correctly only if the access
rules involved have the same access. This is the common
case, so initial testing did not find a problem.

Signed-off-by: Casey Schaufler <casey@schaufler-ca.com>
hifive-unleashed-5.1
Casey Schaufler 2011-02-09 19:58:42 -08:00
parent db904aa814
commit 75a25637bf
1 changed files with 1 additions and 1 deletions

View File

@ -1218,7 +1218,7 @@ static int smack_file_mmap(struct file *file,
* not available to a SMACK64MMAP subject
* deny access.
*/
if ((may | mmay) != may) {
if ((may | mmay) != mmay) {
rc = -EACCES;
break;
}