mirror of
https://github.com/armbian/linux-cix.git
synced 2026-01-06 12:30:45 -08:00
selinux: ignore unknown extended permissions
commit 900f83cf376bdaf798b6f5dcb2eae0c822e908b6 upstream.
When evaluating extended permissions, ignore unknown permissions instead
of calling BUG(). This commit ensures that future permissions can be
added without interfering with older kernels.
Cc: stable@vger.kernel.org
Fixes: fa1aa143ac ("selinux: extended permissions for ioctls")
Signed-off-by: Thiébaud Weksteen <tweek@google.com>
Signed-off-by: Paul Moore <paul@paul-moore.com>
Acked-by: Paul Moore <paul@paul-moore.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
committed by
Greg Kroah-Hartman
parent
c2a7fc5146
commit
c1dbd28a07
@@ -956,7 +956,10 @@ void services_compute_xperms_decision(struct extended_perms_decision *xpermd,
|
||||
xpermd->driver))
|
||||
return;
|
||||
} else {
|
||||
BUG();
|
||||
pr_warn_once(
|
||||
"SELinux: unknown extended permission (%u) will be ignored\n",
|
||||
node->datum.u.xperms->specified);
|
||||
return;
|
||||
}
|
||||
|
||||
if (node->key.specified == AVTAB_XPERMS_ALLOWED) {
|
||||
@@ -993,7 +996,8 @@ void services_compute_xperms_decision(struct extended_perms_decision *xpermd,
|
||||
node->datum.u.xperms->perms.p[i];
|
||||
}
|
||||
} else {
|
||||
BUG();
|
||||
pr_warn_once("SELinux: unknown specified key (%u)\n",
|
||||
node->key.specified);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user