summaryrefslogtreecommitdiff
path: root/src/misc/av/memprotectav.cil
diff options
context:
space:
mode:
authorDominick Grift <dominick.grift@defensec.nl>2023-08-20 15:44:41 +0200
committerDominick Grift <dominick.grift@defensec.nl>2023-08-20 15:46:23 +0200
commit0c187b6ff97f91c41dab65a6426dc61f77305cdf (patch)
tree1e35f5851154500a8a39428a45a5671f9488e1da /src/misc/av/memprotectav.cil
downloadselinux-policy-0c187b6ff97f91c41dab65a6426dc61f77305cdf.tar.gz
Import dssp5
Signed-off-by: Dominick Grift <dominick.grift@defensec.nl>
Diffstat (limited to 'src/misc/av/memprotectav.cil')
-rw-r--r--src/misc/av/memprotectav.cil25
1 files changed, 25 insertions, 0 deletions
diff --git a/src/misc/av/memprotectav.cil b/src/misc/av/memprotectav.cil
new file mode 100644
index 0000000..a0ab2b8
--- /dev/null
+++ b/src/misc/av/memprotectav.cil
@@ -0,0 +1,25 @@
+;; SPDX-FileCopyrightText: © 2023 Dominick Grift <dominick.grift@defensec.nl>
+;; SPDX-License-Identifier: Unlicense
+
+(class memprotect (mmap_zero))
+(classorder (unordered memprotect))
+
+(in subj
+
+ (block mmapzero
+
+ (macro type ((type ARG1))
+ (typeattributeset typeattr ARG1))
+
+ (typeattribute not_typeattr)
+ (typeattribute typeattr)
+
+ (typeattributeset not_typeattr (not typeattr))
+
+ (neverallow not_typeattr self (memprotect (mmap_zero)))))
+
+(in subj.unconfined
+
+ (allow typeattr self (memprotect (all)))
+
+ (call mmapzero.type (typeattr)))