summaryrefslogtreecommitdiffstats
path: root/security
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2024-12-18 21:10:15 +0100
committerLinus Torvalds <torvalds@linux-foundation.org>2024-12-18 21:10:15 +0100
commit397d1d88af2670db9c73d2806ae270b147e6f949 (patch)
tree83a3a9d829c72c2cbeb14c7b6ec1fc152052c094 /security
parentMerge tag 'trace-v6.13-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/... (diff)
parentselinux: ignore unknown extended permissions (diff)
downloadlinux-397d1d88af2670db9c73d2806ae270b147e6f949.tar.xz
linux-397d1d88af2670db9c73d2806ae270b147e6f949.zip
Merge tag 'selinux-pr-20241217' of git://git.kernel.org/pub/scm/linux/kernel/git/pcmoore/selinux
Pull selinux fix from Paul Moore: "One small SELinux patch to get rid improve our handling of unknown extended permissions by safely ignoring them. Not only does this make it easier to support newer SELinux policy on older kernels in the future, it removes to BUG() calls from the SELinux code." * tag 'selinux-pr-20241217' of git://git.kernel.org/pub/scm/linux/kernel/git/pcmoore/selinux: selinux: ignore unknown extended permissions
Diffstat (limited to 'security')
-rw-r--r--security/selinux/ss/services.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/security/selinux/ss/services.c b/security/selinux/ss/services.c
index 971c45d576ba..3d5c563cfc4c 100644
--- a/security/selinux/ss/services.c
+++ b/security/selinux/ss/services.c
@@ -979,7 +979,10 @@ void services_compute_xperms_decision(struct extended_perms_decision *xpermd,
return;
break;
default:
- 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) {
@@ -998,7 +1001,8 @@ void services_compute_xperms_decision(struct extended_perms_decision *xpermd,
&node->datum.u.xperms->perms,
xpermd->dontaudit);
} else {
- BUG();
+ pr_warn_once("SELinux: unknown specified key (%u)\n",
+ node->key.specified);
}
}